diff options
author | Michal Krol <[email protected]> | 2010-02-19 19:00:26 +0100 |
---|---|---|
committer | Michal Krol <[email protected]> | 2010-02-19 19:00:26 +0100 |
commit | f6106566081978f663cf08e54bb8908cb58a5316 (patch) | |
tree | 7bc2482548f55471d7024f04c75ac7f58402afa9 /src/gallium/drivers/identity/id_objects.h | |
parent | 3d0bfc6a4be73d43928493641bf819f77075bbc1 (diff) |
gallium: WIP: Introduce sampler views.
Diffstat (limited to 'src/gallium/drivers/identity/id_objects.h')
-rw-r--r-- | src/gallium/drivers/identity/id_objects.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/gallium/drivers/identity/id_objects.h b/src/gallium/drivers/identity/id_objects.h index 77cc7190798..b48df83b3ed 100644 --- a/src/gallium/drivers/identity/id_objects.h +++ b/src/gallium/drivers/identity/id_objects.h @@ -52,6 +52,14 @@ struct identity_texture }; +struct identity_sampler_view +{ + struct pipe_sampler_view base; + + struct pipe_sampler_view *sampler_view; +}; + + struct identity_surface { struct pipe_surface base; @@ -94,6 +102,15 @@ identity_texture(struct pipe_texture *_texture) return (struct identity_texture *)_texture; } +static INLINE struct identity_sampler_view * +identity_sampler_view(struct pipe_sampler_view *_sampler_view) +{ + if (!_sampler_view) { + return NULL; + } + return (struct identity_sampler_view *)_sampler_view; +} + static INLINE struct identity_surface * identity_surface(struct pipe_surface *_surface) { @@ -138,6 +155,15 @@ identity_texture_unwrap(struct pipe_texture *_texture) return identity_texture(_texture)->texture; } +static INLINE struct pipe_sampler_view * +identity_sampler_view_unwrap(struct pipe_sampler_view *_sampler_view) +{ + if (!_sampler_view) { + return NULL; + } + return identity_sampler_view(_sampler_view)->sampler_view; +} + static INLINE struct pipe_surface * identity_surface_unwrap(struct pipe_surface *_surface) { |