summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_state_fs.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-10-09 13:41:33 +0100
committerJosé Fonseca <jfonseca@vmware.com>2009-10-09 13:41:33 +0100
commitd904ed88c1d957f662497343de7dc3e9fa743e47 (patch)
tree1825d9f1a7210c8ec6a9c1627880bffeb6015e4b /src/gallium/drivers/llvmpipe/lp_state_fs.c
parent00ffef383c62ca6cd0d5687539dc45fecfbefeec (diff)
llvmpipe: Pass state to setup.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_fs.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_fs.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index 59c7afc6f7..63e675e584 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -681,16 +681,15 @@ llvmpipe_set_constant_buffer(struct pipe_context *pipe,
assert(shader < PIPE_SHADER_TYPES);
assert(index == 0);
+ if(llvmpipe->constants[shader].buffer == buffer)
+ return;
+
if(shader == PIPE_SHADER_VERTEX)
draw_flush(llvmpipe->draw);
/* note: reference counting */
pipe_buffer_reference(&llvmpipe->constants[shader].buffer, buffer);
- if(shader == PIPE_SHADER_FRAGMENT) {
- llvmpipe->jit_context.constants = data;
- }
-
if(shader == PIPE_SHADER_VERTEX) {
draw_set_mapped_constant_buffer(llvmpipe->draw, data, size);
}