From 18656201ef62da1892d66e0899001ae82e2555c2 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 31 Aug 2009 13:28:31 -0600 Subject: 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 file changed, 3 insertions(+) diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index e7c2ace32c..abf0008565 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; -- cgit v1.2.3