fix another logic error in computing deferredTexture
authorBrian Paul <brian.paul@tungstengraphics.com>
Sat, 21 Oct 2006 22:56:21 +0000 (22:56 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Sat, 21 Oct 2006 22:56:21 +0000 (22:56 +0000)
src/mesa/swrast/s_span.c

index 4fcd4d22517b3498eaf0acb2d0006c79b07bb055..ad55e1b10c3ccebd39c122ec9b843695b4a39d58 100644 (file)
@@ -1423,11 +1423,15 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span)
       deferredTexture = GL_FALSE;
    }
    else if (shaderOrTexture) {
-      if (ctx->FragmentProgram._Enabled &&
-          (ctx->FragmentProgram.Current->Base.OutputsWritten
-           & (1 << FRAG_RESULT_DEPR))) {
-         /* Z comes from fragment program */
-         deferredTexture = GL_FALSE;
+      if (ctx->FragmentProgram._Enabled) {
+         if (ctx->FragmentProgram.Current->Base.OutputsWritten
+             & (1 << FRAG_RESULT_DEPR)) {
+            /* Z comes from fragment program */
+            deferredTexture = GL_FALSE;
+         }
+         else {
+            deferredTexture = GL_TRUE;
+         }
       }
       else if (ctx->ShaderObjects._FragmentShaderPresent) {
          /* XXX how do we test if Z is written by shader? */