From 7dd289d9e4a141a5af786530a010ac0aecdae8b4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolai=20H=C3=A4hnle?= Date: Fri, 21 Sep 2018 17:19:34 +0200 Subject: [PATCH] radeonsi: track constant buffer bind history in si_pipe_set_constant_buffer MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Other callers of si_set_constant_buffer don't need it. Reviewed-by: Marek Olšák --- src/gallium/drivers/radeonsi/si_descriptors.c | 5 +++-- 1 file 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), -- 2.30.2