aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/swrast')
-rw-r--r--mesalib/src/mesa/swrast/s_context.c10
-rw-r--r--mesalib/src/mesa/swrast/s_depth.c10
-rw-r--r--mesalib/src/mesa/swrast/s_fragprog.c2
3 files changed, 11 insertions, 11 deletions
diff --git a/mesalib/src/mesa/swrast/s_context.c b/mesalib/src/mesa/swrast/s_context.c
index f219d3de0..07485006c 100644
--- a/mesalib/src/mesa/swrast/s_context.c
+++ b/mesalib/src/mesa/swrast/s_context.c
@@ -61,7 +61,7 @@ _swrast_update_rasterflags( struct gl_context *ctx )
if (ctx->Color.BlendEnabled) rasterMask |= BLEND_BIT;
if (ctx->Depth.Test) rasterMask |= DEPTH_BIT;
if (swrast->_FogEnabled) rasterMask |= FOG_BIT;
- if (ctx->Scissor.Enabled) rasterMask |= CLIP_BIT;
+ if (ctx->Scissor.EnableFlags) rasterMask |= CLIP_BIT;
if (ctx->Stencil._Enabled) rasterMask |= STENCIL_BIT;
for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) {
if (!ctx->Color.ColorMask[i][0] ||
@@ -74,10 +74,10 @@ _swrast_update_rasterflags( struct gl_context *ctx )
}
if (ctx->Color.ColorLogicOpEnabled) rasterMask |= LOGIC_OP_BIT;
if (ctx->Texture._EnabledUnits) rasterMask |= TEXTURE_BIT;
- if ( ctx->Viewport.X < 0
- || ctx->Viewport.X + ctx->Viewport.Width > (GLint) ctx->DrawBuffer->Width
- || ctx->Viewport.Y < 0
- || ctx->Viewport.Y + ctx->Viewport.Height > (GLint) ctx->DrawBuffer->Height) {
+ if ( ctx->ViewportArray[0].X < 0
+ || ctx->ViewportArray[0].X + ctx->ViewportArray[0].Width > (GLfloat) ctx->DrawBuffer->Width
+ || ctx->ViewportArray[0].Y < 0
+ || ctx->ViewportArray[0].Y + ctx->ViewportArray[0].Height > (GLfloat) ctx->DrawBuffer->Height) {
rasterMask |= CLIP_BIT;
}
diff --git a/mesalib/src/mesa/swrast/s_depth.c b/mesalib/src/mesa/swrast/s_depth.c
index 0f4fb9506..7f3c76de4 100644
--- a/mesalib/src/mesa/swrast/s_depth.c
+++ b/mesalib/src/mesa/swrast/s_depth.c
@@ -171,12 +171,12 @@ _swrast_depth_clamp_span( struct gl_context *ctx, SWspan *span )
GLfloat min_f, max_f;
GLuint i;
- if (ctx->Viewport.Near < ctx->Viewport.Far) {
- min_f = ctx->Viewport.Near;
- max_f = ctx->Viewport.Far;
+ if (ctx->ViewportArray[0].Near < ctx->ViewportArray[0].Far) {
+ min_f = ctx->ViewportArray[0].Near;
+ max_f = ctx->ViewportArray[0].Far;
} else {
- min_f = ctx->Viewport.Far;
- max_f = ctx->Viewport.Near;
+ min_f = ctx->ViewportArray[0].Far;
+ max_f = ctx->ViewportArray[0].Near;
}
/* Convert floating point values in [0,1] to device Z coordinates in
diff --git a/mesalib/src/mesa/swrast/s_fragprog.c b/mesalib/src/mesa/swrast/s_fragprog.c
index 4e9ac394e..fa45fa97a 100644
--- a/mesalib/src/mesa/swrast/s_fragprog.c
+++ b/mesalib/src/mesa/swrast/s_fragprog.c
@@ -182,7 +182,7 @@ init_machine(struct gl_context *ctx, struct gl_program_machine *machine,
machine->Samplers = program->Base.SamplerUnits;
/* if running a GLSL program (not ARB_fragment_program) */
- if (ctx->Shader.CurrentFragmentProgram) {
+ if (ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT]) {
/* Store front/back facing value */
machine->Attribs[VARYING_SLOT_FACE][col][0] = 1.0F - span->facing;
}