summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_setup_context.h
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2012-12-10 12:31:46 -0700
committerBrian Paul <brianp@vmware.com>2012-12-11 12:48:06 -0700
commit3427466e6dbbb8db7c1ecda6b3859ca1cc5827a3 (patch)
tree0ab7a2dca11aad6b000c75220bec7fa554ba04f3 /src/gallium/drivers/llvmpipe/lp_setup_context.h
parent4c6053dc519aecd93c12c383b4cdc0c159b3d9b3 (diff)
downloadexternal_mesa3d-3427466e6dbbb8db7c1ecda6b3859ca1cc5827a3.zip
external_mesa3d-3427466e6dbbb8db7c1ecda6b3859ca1cc5827a3.tar.gz
external_mesa3d-3427466e6dbbb8db7c1ecda6b3859ca1cc5827a3.tar.bz2
llvmpipe: support pipe_resource-based constant buffers
Before this we only supported user-based constant buffers. First, we basically plumb pipe_constant_buffer objects through llvmpipe rather than pipe_resource objects. Second, update llvmpipe_set_constant_buffer() and try_update_scene_state() so they understand both resource- and user-based constant buffers. The problem with user constant buffers is the potential for use-after-free, as seen in some WebGL tests. The next patch will flip the switch for resource-based const buffers. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_setup_context.h')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_context.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_context.h b/src/gallium/drivers/llvmpipe/lp_setup_context.h
index 60809db..4d20dd3 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_context.h
+++ b/src/gallium/drivers/llvmpipe/lp_setup_context.h
@@ -128,7 +128,7 @@ struct lp_setup_context
/** fragment shader constants */
struct {
- struct pipe_resource *current;
+ struct pipe_constant_buffer current;
unsigned stored_size;
const void *stored_data;
} constants[LP_MAX_TGSI_CONST_BUFFERS];