summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_setup_context.h
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_setup_context.h
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_setup_context.h')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_context.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_context.h b/src/gallium/drivers/llvmpipe/lp_setup_context.h
index e6f6f0e0bb..fc0aef1376 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_context.h
+++ b/src/gallium/drivers/llvmpipe/lp_setup_context.h
@@ -45,6 +45,7 @@
#define LP_SETUP_NEW_FS 0x01
#define LP_SETUP_NEW_CONSTANTS 0x02
#define LP_SETUP_NEW_BLEND_COLOR 0x04
+#define LP_SETUP_NEW_SCISSOR 0x08
struct lp_scene_queue;
@@ -122,6 +123,11 @@ struct setup_context
uint8_t *stored;
} blend_color;
+ struct {
+ struct pipe_scissor_state current;
+ const void *stored;
+ } scissor;
+
unsigned dirty; /**< bitmask of LP_SETUP_NEW_x bits */
void (*point)( struct setup_context *,