Mesa (mesa_7_5_branch): swrast: can't use deferred texture/ shading if using KIL instruction

Brian Paul brianp at kemper.freedesktop.org
Mon Aug 31 23:14:35 UTC 2009


Module: Mesa
Branch: mesa_7_5_branch
Commit: fcf0804c05faefd196ed5525c068ee4cd30c5312
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=fcf0804c05faefd196ed5525c068ee4cd30c5312

Author: Brian Paul <brianp at vmware.com>
Date:   Mon Aug 31 13:28:31 2009 -0600

swrast: can't use deferred texture/shading if using KIL instruction

If the fragment program uses KIL, we have to execute it before z/stencil
testing.  Otherwise, deferred texture/shading lets us skip shading for
pixels that fail z/stencil testing.

---

 src/mesa/swrast/s_context.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c
index e7c2ace..abf0008 100644
--- a/src/mesa/swrast/s_context.c
+++ b/src/mesa/swrast/s_context.c
@@ -220,6 +220,9 @@ _swrast_update_deferred_texture(GLcontext *ctx)
          /* Z comes from fragment program/shader */
          swrast->_DeferredTexture = GL_FALSE;
       }
+      else if (fprog && fprog->UsesKill) {
+         swrast->_DeferredTexture = GL_FALSE;
+      }
       else if (ctx->Query.CurrentOcclusionObject) {
          /* occlusion query depends on shader discard/kill results */
          swrast->_DeferredTexture = GL_FALSE;




More information about the mesa-commit mailing list