diff options
author | Marek Olšák <[email protected]> | 2015-07-05 14:48:33 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-07-16 16:52:20 +0200 |
commit | 05a12c53a308965aba1c00f0caf36d8e0f32e035 (patch) | |
tree | 7914bcae5a16fff973d438326b3cc9749de8d22b /src/gallium/include/pipe/p_state.h | |
parent | b73bec0ecd43861337daf9663e242d2b44f36dbd (diff) |
gallium: add interface for writable shader images
PIPE_CAPs will be added some other time.
Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/include/pipe/p_state.h')
-rw-r--r-- | src/gallium/include/pipe/p_state.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index 1c529f7d078..78dc5785332 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -389,6 +389,31 @@ struct pipe_sampler_view /** + * A view into a writable buffer or texture that can be bound to a shader + * stage. + */ +struct pipe_image_view +{ + struct pipe_reference reference; + struct pipe_resource *resource; /**< resource into which this is a view */ + struct pipe_context *context; /**< context this view belongs to */ + enum pipe_format format; /**< typed PIPE_FORMAT_x */ + + union { + struct { + unsigned first_layer:16; /**< first layer to use for array textures */ + unsigned last_layer:16; /**< last layer to use for array textures */ + unsigned level:8; /**< mipmap level to use */ + } tex; + struct { + unsigned first_element; + unsigned last_element; + } buf; + } u; +}; + + +/** * Subregion of 1D/2D/3D image resource. */ struct pipe_box |