diff options
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_atom_rasterizer.c | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_atom_scissor.c | 14 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_bitmap.c | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_clear.c | 10 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_drawpixels.c | 2 |
5 files changed, 15 insertions, 15 deletions
diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c index ca227dcfafc..a4f3ffee324 100644 --- a/src/mesa/state_tracker/st_atom_rasterizer.c +++ b/src/mesa/state_tracker/st_atom_rasterizer.c @@ -223,7 +223,7 @@ static void update_raster_state( struct st_context *st ) raster->multisample = ctx->Multisample._Enabled; /* _NEW_SCISSOR */ - raster->scissor = ctx->Scissor.Enabled; + raster->scissor = ctx->Scissor.EnableFlags; /* _NEW_FRAG_CLAMP */ raster->clamp_fragment_color = !st->clamp_frag_color_in_shader && diff --git a/src/mesa/state_tracker/st_atom_scissor.c b/src/mesa/state_tracker/st_atom_scissor.c index 539c423ebc8..a1f72da47e0 100644 --- a/src/mesa/state_tracker/st_atom_scissor.c +++ b/src/mesa/state_tracker/st_atom_scissor.c @@ -53,15 +53,15 @@ update_scissor( struct st_context *st ) scissor.maxx = fb->Width; scissor.maxy = fb->Height; - if (ctx->Scissor.Enabled) { + if (ctx->Scissor.EnableFlags & 1) { /* need to be careful here with xmax or ymax < 0 */ - GLint xmax = MAX2(0, ctx->Scissor.X + ctx->Scissor.Width); - GLint ymax = MAX2(0, ctx->Scissor.Y + ctx->Scissor.Height); + GLint xmax = MAX2(0, ctx->Scissor.ScissorArray[0].X + ctx->Scissor.ScissorArray[0].Width); + GLint ymax = MAX2(0, ctx->Scissor.ScissorArray[0].Y + ctx->Scissor.ScissorArray[0].Height); - if (ctx->Scissor.X > (GLint)scissor.minx) - scissor.minx = ctx->Scissor.X; - if (ctx->Scissor.Y > (GLint)scissor.miny) - scissor.miny = ctx->Scissor.Y; + if (ctx->Scissor.ScissorArray[0].X > (GLint)scissor.minx) + scissor.minx = ctx->Scissor.ScissorArray[0].X; + if (ctx->Scissor.ScissorArray[0].Y > (GLint)scissor.miny) + scissor.miny = ctx->Scissor.ScissorArray[0].Y; if (xmax < (GLint) scissor.maxx) scissor.maxx = xmax; diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c index 487a46164d7..874ff77b50c 100644 --- a/src/mesa/state_tracker/st_cb_bitmap.c +++ b/src/mesa/state_tracker/st_cb_bitmap.c @@ -457,7 +457,7 @@ draw_bitmap_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z, cso_save_aux_vertex_buffer_slot(cso); /* rasterizer state: just scissor */ - st->bitmap.rasterizer.scissor = ctx->Scissor.Enabled; + st->bitmap.rasterizer.scissor = ctx->Scissor.EnableFlags & 1; cso_set_rasterizer(cso, &st->bitmap.rasterizer); /* fragment shader state: TEX lookup program */ diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c index 28f9c83d5d3..97cc5a232ca 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); } diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index 72cc9fa549b..4e79511d606 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -713,7 +713,7 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z, rasterizer.half_pixel_center = 1; rasterizer.bottom_edge_rule = 1; rasterizer.depth_clip = !ctx->Transform.DepthClamp; - rasterizer.scissor = ctx->Scissor.Enabled; + rasterizer.scissor = ctx->Scissor.EnableFlags; cso_set_rasterizer(cso, &rasterizer); } |