diff options
author | Zack Rusin <zackr@vmware.com> | 2010-03-30 21:10:33 -0400 |
---|---|---|
committer | Zack Rusin <zackr@vmware.com> | 2010-03-30 21:10:33 -0400 |
commit | 880e3fb09b538f6f0b6fad2db7e0e10e9df43555 (patch) | |
tree | e6cc8c691974e679ead73c3731c49a874019c8ba /src/gallium/drivers/identity/id_objects.h | |
parent | 93e342574f5fc95789028dbe7cf637257562e9bb (diff) | |
parent | 4afed821baa6993d85a07c67d42ea40d4e9a600a (diff) |
Merge remote branch 'origin/master' into gallium_draw_llvm
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 7333ecfb7f..9a07ebe8d7 100644 --- a/src/gallium/drivers/identity/id_objects.h +++ b/src/gallium/drivers/identity/id_objects.h @@ -53,6 +53,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; @@ -96,6 +104,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) { @@ -140,6 +157,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) { |