From: Nicolai Hähnle Date: Fri, 21 Sep 2018 15:19:34 +0000 (+0200) Subject: radeonsi: track constant buffer bind history in si_pipe_set_constant_buffer X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7dd289d9e4a141a5af786530a010ac0aecdae8b4;p=mesa.git 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 --- 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),