diff options
author | Nicolai Hähnle <[email protected]> | 2018-09-21 17:19:34 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2018-12-19 12:01:54 +0100 |
commit | 7dd289d9e4a141a5af786530a010ac0aecdae8b4 (patch) | |
tree | ccbc750ab7dd36b12c8378072663127b12747309 /src/gallium/drivers/radeonsi | |
parent | 829d4179145e9e365b8270080510a394a547e92e (diff) |
radeonsi: track constant buffer bind history in si_pipe_set_constant_buffer
Other callers of si_set_constant_buffer don't need it.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_descriptors.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index f89692c87f8..71ae00c53cb 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -1237,8 +1237,6 @@ static void si_set_constant_buffer(struct si_context *sctx, } else { pipe_resource_reference(&buffer, input->buffer); va = r600_resource(buffer)->gpu_address + input->buffer_offset; - /* Only track usage for non-user buffers. */ - r600_resource(buffer)->bind_history |= PIPE_BIND_CONSTANT_BUFFER; } /* Set the descriptor. */ @@ -1284,6 +1282,9 @@ static void si_pipe_set_constant_buffer(struct pipe_context *ctx, return; } + if (input && input->buffer) + r600_resource(input->buffer)->bind_history |= PIPE_BIND_CONSTANT_BUFFER; + slot = si_get_constbuf_slot(slot); si_set_constant_buffer(sctx, &sctx->const_and_shader_buffers[shader], si_const_and_shader_buffer_descriptors_idx(shader), |