diff options
author | Courtney Goeltzenleuchter <[email protected]> | 2013-11-13 14:02:12 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2014-01-20 11:29:42 -0800 |
commit | a9c73fb778a41b422a811c67b4aba806d4dfb7c8 (patch) | |
tree | 1ee48d66f17021d2c33030a0e1d93caa10b89e87 /src/mesa/main/scissor.c | |
parent | 1f59e963b40a260d3087f83799de0a6fb0941d07 (diff) |
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 <[email protected]>
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/scissor.c')
-rw-r--r-- | src/mesa/main/scissor.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/mesa/main/scissor.c b/src/mesa/main/scissor.c index ac86bd59138..7ec927ecd8b 100644 --- a/src/mesa/main/scissor.c +++ b/src/mesa/main/scissor.c @@ -66,17 +66,17 @@ void _mesa_set_scissor(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height) { - if (x == ctx->Scissor.X && - y == ctx->Scissor.Y && - width == ctx->Scissor.Width && - height == ctx->Scissor.Height) + if (x == ctx->Scissor.ScissorArray[0].X && + y == ctx->Scissor.ScissorArray[0].Y && + width == ctx->Scissor.ScissorArray[0].Width && + height == ctx->Scissor.ScissorArray[0].Height) return; FLUSH_VERTICES(ctx, _NEW_SCISSOR); - ctx->Scissor.X = x; - ctx->Scissor.Y = y; - ctx->Scissor.Width = width; - ctx->Scissor.Height = height; + ctx->Scissor.ScissorArray[0].X = x; + ctx->Scissor.ScissorArray[0].Y = y; + ctx->Scissor.ScissorArray[0].Width = width; + ctx->Scissor.ScissorArray[0].Height = height; if (ctx->Driver.Scissor) ctx->Driver.Scissor(ctx); @@ -91,9 +91,9 @@ void _mesa_init_scissor(struct gl_context *ctx) { /* Scissor group */ - ctx->Scissor.Enabled = GL_FALSE; - ctx->Scissor.X = 0; - ctx->Scissor.Y = 0; - ctx->Scissor.Width = 0; - ctx->Scissor.Height = 0; + ctx->Scissor.EnableFlags = GL_FALSE; + ctx->Scissor.ScissorArray[0].X = 0; + ctx->Scissor.ScissorArray[0].Y = 0; + ctx->Scissor.ScissorArray[0].Width = 0; + ctx->Scissor.ScissorArray[0].Height = 0; } |