From: Keith Whitwell Date: Thu, 4 Mar 2010 16:50:22 +0000 (+0000) Subject: softpipe: fix constant buffer tracking after rework X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3b6a991728ccb174f19de8b9752241cd4f21398e;p=mesa.git softpipe: fix constant buffer tracking after rework --- diff --git a/src/gallium/drivers/softpipe/sp_state_fs.c b/src/gallium/drivers/softpipe/sp_state_fs.c index cd0e905bc99..2b089c28316 100644 --- a/src/gallium/drivers/softpipe/sp_state_fs.c +++ b/src/gallium/drivers/softpipe/sp_state_fs.c @@ -176,19 +176,17 @@ softpipe_set_constant_buffer(struct pipe_context *pipe, assert(shader < PIPE_SHADER_TYPES); assert(index == 0); - if(softpipe->constants[shader][index] == constants) - return; - draw_flush(softpipe->draw); /* note: reference counting */ pipe_buffer_reference(&softpipe->constants[shader][index], constants); if(shader == PIPE_SHADER_VERTEX) { - draw_set_mapped_constant_buffer(softpipe->draw, PIPE_SHADER_VERTEX, 0, + draw_set_mapped_constant_buffer(softpipe->draw, PIPE_SHADER_VERTEX, index, data, size); } + softpipe->mapped_constants[shader][index] = data; softpipe->dirty |= SP_NEW_CONSTANTS; }