diff options
author | Brian Paul <[email protected]> | 2012-12-10 12:31:46 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-12-11 12:48:06 -0700 |
commit | 3427466e6dbbb8db7c1ecda6b3859ca1cc5827a3 (patch) | |
tree | 0ab7a2dca11aad6b000c75220bec7fa554ba04f3 /src/gallium/drivers/llvmpipe/lp_context.c | |
parent | 4c6053dc519aecd93c12c383b4cdc0c159b3d9b3 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_context.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_context.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_context.c b/src/gallium/drivers/llvmpipe/lp_context.c index e59ae237efd..eb454b1c41f 100644 --- a/src/gallium/drivers/llvmpipe/lp_context.c +++ b/src/gallium/drivers/llvmpipe/lp_context.c @@ -83,7 +83,7 @@ static void llvmpipe_destroy( struct pipe_context *pipe ) for (i = 0; i < Elements(llvmpipe->constants); i++) { for (j = 0; j < Elements(llvmpipe->constants[i]); j++) { - pipe_resource_reference(&llvmpipe->constants[i][j], NULL); + pipe_resource_reference(&llvmpipe->constants[i][j].buffer, NULL); } } |