gallium: Always allocate new const buffers instead of modifying existing ones.
This commit is contained in:
@@ -71,13 +71,12 @@ void st_upload_constants( struct st_context *st,
|
|||||||
|
|
||||||
_mesa_load_state_parameters(st->ctx, params);
|
_mesa_load_state_parameters(st->ctx, params);
|
||||||
|
|
||||||
if (cbuf->buffer && cbuf->size != paramBytes)
|
/* We always need to get a new buffer, to keep the drivers simple and
|
||||||
pipe_buffer_reference( ws, &cbuf->buffer, NULL );
|
* avoid gratuitous rendering synchronization.
|
||||||
|
*/
|
||||||
if (!cbuf->buffer) {
|
pipe_buffer_reference( ws, &cbuf->buffer, NULL );
|
||||||
cbuf->buffer = ws->buffer_create(ws, 1, PIPE_BUFFER_USAGE_CONSTANT,
|
cbuf->buffer = ws->buffer_create( ws, 1, PIPE_BUFFER_USAGE_CONSTANT,
|
||||||
paramBytes);
|
paramBytes );
|
||||||
}
|
|
||||||
|
|
||||||
if (0)
|
if (0)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user