diff options
author | Marek Olšák <[email protected]> | 2019-02-27 21:54:47 -0500 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-04-04 19:28:52 -0400 |
commit | 66a82ec6f0fa3586fecee001da6bae1fc33f12d1 (patch) | |
tree | 91352a6aae525110ad061b510bc1b9b21670a3b8 /src/gallium/auxiliary/util | |
parent | b19494c54e704ce23f5d0523c321fbffc0f70494 (diff) |
gallium: add writable_bitmask parameter into set_shader_buffers
to indicate write usage per buffer.
This is just a hint (it will be used by radeonsi).
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r-- | src/gallium/auxiliary/util/u_threaded_context.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/util/u_threaded_context.c b/src/gallium/auxiliary/util/u_threaded_context.c index bd2c8f57a10..fc448908564 100644 --- a/src/gallium/auxiliary/util/u_threaded_context.c +++ b/src/gallium/auxiliary/util/u_threaded_context.c @@ -890,6 +890,7 @@ tc_set_shader_images(struct pipe_context *_pipe, struct tc_shader_buffers { ubyte shader, start, count; bool unbind; + unsigned writable_bitmask; struct pipe_shader_buffer slot[0]; /* more will be allocated if needed */ }; @@ -900,11 +901,12 @@ tc_call_set_shader_buffers(struct pipe_context *pipe, union tc_payload *payload) unsigned count = p->count; if (p->unbind) { - pipe->set_shader_buffers(pipe, p->shader, p->start, p->count, NULL); + pipe->set_shader_buffers(pipe, p->shader, p->start, p->count, NULL, 0); return; } - pipe->set_shader_buffers(pipe, p->shader, p->start, p->count, p->slot); + pipe->set_shader_buffers(pipe, p->shader, p->start, p->count, p->slot, + p->writable_bitmask); for (unsigned i = 0; i < count; i++) pipe_resource_reference(&p->slot[i].buffer, NULL); @@ -914,7 +916,8 @@ static void tc_set_shader_buffers(struct pipe_context *_pipe, enum pipe_shader_type shader, unsigned start, unsigned count, - const struct pipe_shader_buffer *buffers) + const struct pipe_shader_buffer *buffers, + unsigned writable_bitmask) { if (!count) return; @@ -928,6 +931,7 @@ tc_set_shader_buffers(struct pipe_context *_pipe, p->start = start; p->count = count; p->unbind = buffers == NULL; + p->writable_bitmask = writable_bitmask; if (buffers) { for (unsigned i = 0; i < count; i++) { |