summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_state_derived.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-01-14 19:15:00 -0700
committerBrian Paul <brianp@vmware.com>2010-01-14 19:15:00 -0700
commit4461442849bfdb817334b38567136f7f9dabdf59 (patch)
tree2539c1448256f7c617e6b902deba793ca63a4959 /src/gallium/drivers/llvmpipe/lp_state_derived.c
parentca12e30d97b83fb33e1f8f83da05b5ed2809b0af (diff)
llvmpipe: implement scissor testing
The scissor test is implemented as another per-quad operation in the JIT code. The four scissor box params are passed via the lp_jit_context. In the JIT code we compare the quad's x/y coords against the clip bounds and create a new in/out mask that's AND'd with the main quad mask. Note: we should also do scissor testing in the triangle setup code to improve efficiency. That's not done yet.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_derived.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_derived.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_derived.c b/src/gallium/drivers/llvmpipe/lp_state_derived.c
index 2c349fdb1d..28af477914 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_derived.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_derived.c
@@ -160,6 +160,7 @@ void llvmpipe_update_derived( struct llvmpipe_context *llvmpipe )
if (llvmpipe->dirty & (LP_NEW_FS |
LP_NEW_BLEND |
+ LP_NEW_SCISSOR |
LP_NEW_DEPTH_STENCIL_ALPHA |
LP_NEW_RASTERIZER |
LP_NEW_SAMPLER |
@@ -170,6 +171,9 @@ void llvmpipe_update_derived( struct llvmpipe_context *llvmpipe )
lp_setup_set_blend_color(llvmpipe->setup,
&llvmpipe->blend_color);
+ if (llvmpipe->dirty & LP_NEW_SCISSOR)
+ lp_setup_set_scissor(llvmpipe->setup, &llvmpipe->scissor);
+
if (llvmpipe->dirty & LP_NEW_DEPTH_STENCIL_ALPHA)
lp_setup_set_alpha_ref_value(llvmpipe->setup,
llvmpipe->depth_stencil->alpha.ref_value);