diff options
author | Dave Airlie <[email protected]> | 2017-11-01 14:17:49 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2017-11-10 08:39:35 +1000 |
commit | cca5617348ad2544f2cf8e201828de3fa942df3c (patch) | |
tree | 10a86b26415ffb1ea5a49cfbdfb6596ed4cc8429 /src/gallium/include | |
parent | 4b0b82770aad9581ee2df2dd01d63c51b28e7656 (diff) |
gallium: add hw atomic buffer binding API.
This API binds atomic buffers for all bound shaders (as per the
GL semantics).
This is needed to support cross shader hw atomic counters.
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Tested-By: Gert Wollny <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/include')
-rw-r--r-- | src/gallium/include/pipe/p_context.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h index 0dd4ad12424..b74e6492196 100644 --- a/src/gallium/include/pipe/p_context.h +++ b/src/gallium/include/pipe/p_context.h @@ -332,6 +332,22 @@ struct pipe_context { const struct pipe_shader_buffer *buffers); /** + * Bind an array of hw atomic buffers for use by all shaders. + * And buffers that were previously bound to the specified range + * will be unbound. + * + * \param start_slot first buffer slot to bind. + * \param count number of consecutive buffers to bind. + * \param buffers array of pointers to the buffers to bind, it + * should contain at least \a count elements + * unless it's NULL, in which case no buffers will + * be bound. + */ + void (*set_hw_atomic_buffers)(struct pipe_context *, + unsigned start_slot, unsigned count, + const struct pipe_shader_buffer *buffers); + + /** * Bind an array of images that will be used by a shader. * Any images that were previously bound to the specified range * will be unbound. |