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.h | |
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.h')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_context.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_context.h b/src/gallium/drivers/llvmpipe/lp_context.h index 5afa4360aae..b11a3d838e3 100644 --- a/src/gallium/drivers/llvmpipe/lp_context.h +++ b/src/gallium/drivers/llvmpipe/lp_context.h @@ -72,7 +72,7 @@ struct llvmpipe_context { struct pipe_blend_color blend_color; struct pipe_stencil_ref stencil_ref; struct pipe_clip_state clip; - struct pipe_resource *constants[PIPE_SHADER_TYPES][LP_MAX_TGSI_CONST_BUFFERS]; + struct pipe_constant_buffer constants[PIPE_SHADER_TYPES][LP_MAX_TGSI_CONST_BUFFERS]; struct pipe_framebuffer_state framebuffer; struct pipe_poly_stipple poly_stipple; struct pipe_scissor_state scissor; |