summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2013-04-18 19:05:53 +0100
committerJosé Fonseca <[email protected]>2013-04-18 20:48:12 +0100
commitb72ff373fb105fbf75603369afe4897b4de06892 (patch)
treedf1f8cd22020525aaa59ef4b9ee784759ec4069b /src/gallium/drivers/llvmpipe
parent78eaaff696b34ebd4b13466c1eb75295e88eeb53 (diff)
llvmpipe: Take in consideration all current constant buffers when mapping.
Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Zack Rusin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_texture.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c
index 99bd6d3417f..08046193a37 100644
--- a/src/gallium/drivers/llvmpipe/lp_texture.c
+++ b/src/gallium/drivers/llvmpipe/lp_texture.c
@@ -669,9 +669,15 @@ llvmpipe_transfer_map( struct pipe_context *pipe,
/* 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;
+ (resource->bind & PIPE_BIND_CONSTANT_BUFFER)) {
+ unsigned i;
+ for (i = 0; i < Elements(llvmpipe->constants[PIPE_SHADER_FRAGMENT]); ++i) {
+ if (resource == llvmpipe->constants[PIPE_SHADER_FRAGMENT][i].buffer) {
+ /* constants may have changed */
+ llvmpipe->dirty |= LP_NEW_CONSTANTS;
+ break;
+ }
+ }
}
lpt = CALLOC_STRUCT(llvmpipe_transfer);