diff options
author | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2013-11-13 14:02:12 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2014-01-20 11:29:42 -0800 |
commit | a9c73fb778a41b422a811c67b4aba806d4dfb7c8 (patch) | |
tree | 1ee48d66f17021d2c33030a0e1d93caa10b89e87 /src/mesa/state_tracker/st_cb_clear.c | |
parent | 1f59e963b40a260d3087f83799de0a6fb0941d07 (diff) | |
download | external_mesa3d-a9c73fb778a41b422a811c67b4aba806d4dfb7c8.zip external_mesa3d-a9c73fb778a41b422a811c67b4aba806d4dfb7c8.tar.gz external_mesa3d-a9c73fb778a41b422a811c67b4aba806d4dfb7c8.tar.bz2 |
mesa: Update gl_scissor_attrib to support ARB_viewport_array
Update Mesa and drivers to access updated gl_scissor_attrib.
Now have an enable bitfield and array of gl_scissor_rects.
Drivers have been updated to the new scissor enable state
attribute (gl_context.scissor.EnableFlags) but still treat it
as a single boolean which is okay as mesa will only use
bit 0 when communicating with a driver that does not support
ARB_viewport_array.
v2 (idr): Rebase fixes.
v3 (idr): Small code formatting fix suggsted by Ken.
Signed-off-by: Courtney Goeltzenleuchter <courtney@LunarG.com>
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa/state_tracker/st_cb_clear.c')
-rw-r--r-- | src/mesa/state_tracker/st_cb_clear.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c index 28f9c83..97cc5a2 100644 --- a/src/mesa/state_tracker/st_cb_clear.c +++ b/src/mesa/state_tracker/st_cb_clear.c @@ -364,11 +364,11 @@ clear_with_quad(struct gl_context *ctx, unsigned clear_buffers) static INLINE GLboolean is_scissor_enabled(struct gl_context *ctx, struct gl_renderbuffer *rb) { - return ctx->Scissor.Enabled && - (ctx->Scissor.X > 0 || - ctx->Scissor.Y > 0 || - (unsigned) ctx->Scissor.Width < rb->Width || - (unsigned) ctx->Scissor.Height < rb->Height); + return (ctx->Scissor.EnableFlags & 1) && + (ctx->Scissor.ScissorArray[0].X > 0 || + ctx->Scissor.ScissorArray[0].Y > 0 || + (unsigned) ctx->Scissor.ScissorArray[0].Width < rb->Width || + (unsigned) ctx->Scissor.ScissorArray[0].Height < rb->Height); } |