glsl: Bitwise conversion operator support in the software renderers.
[mesa.git] / src / mesa / state_tracker / st_atom_scissor.c
index 56b1383ae39017ba80affd875393b2a258e73d0b..eb13877787b7df717c517ddfebb18804b87452f1 100644 (file)
@@ -44,7 +44,8 @@ static void
 update_scissor( struct st_context *st )
 {
    struct pipe_scissor_state scissor;
-   const struct gl_framebuffer *fb = st->ctx->DrawBuffer;
+   const struct gl_context *ctx = st->ctx;
+   const struct gl_framebuffer *fb = ctx->DrawBuffer;
    GLint miny, maxy;
 
    scissor.minx = 0;
@@ -52,15 +53,15 @@ update_scissor( struct st_context *st )
    scissor.maxx = fb->Width;
    scissor.maxy = fb->Height;
 
-   if (st->ctx->Scissor.Enabled) {
+   if (ctx->Scissor.Enabled) {
       /* need to be careful here with xmax or ymax < 0 */
-      GLint xmax = MAX2(0, st->ctx->Scissor.X + st->ctx->Scissor.Width);
-      GLint ymax = MAX2(0, st->ctx->Scissor.Y + st->ctx->Scissor.Height);
+      GLint xmax = MAX2(0, ctx->Scissor.X + ctx->Scissor.Width);
+      GLint ymax = MAX2(0, ctx->Scissor.Y + ctx->Scissor.Height);
 
-      if (st->ctx->Scissor.X > (GLint)scissor.minx)
-         scissor.minx = st->ctx->Scissor.X;
-      if (st->ctx->Scissor.Y > (GLint)scissor.miny)
-         scissor.miny = st->ctx->Scissor.Y;
+      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 (xmax < (GLint) scissor.maxx)
          scissor.maxx = xmax;