diff options
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_texture.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_texture.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c index f4d2cb6c5d0..31ea7dca50e 100644 --- a/src/gallium/drivers/llvmpipe/lp_texture.c +++ b/src/gallium/drivers/llvmpipe/lp_texture.c @@ -669,8 +669,12 @@ llvmpipe_transfer_map( struct pipe_context *pipe, } } - if (resource == llvmpipe->constants[PIPE_SHADER_FRAGMENT][0]) + /* Check if we're mapping the current constant buffer */ + if ((usage & PIPE_TRANSFER_WRITE) && + resource == llvmpipe->constants[PIPE_SHADER_FRAGMENT][0].buffer) { + /* constants may have changed */ llvmpipe->dirty |= LP_NEW_CONSTANTS; + } lpt = CALLOC_STRUCT(llvmpipe_transfer); if (!lpt) |