From: Brian Paul Date: Mon, 31 Aug 2009 19:28:31 +0000 (-0600) Subject: swrast: can't use deferred texture/shading if using KIL instruction X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=18656201ef62da1892d66e0899001ae82e2555c2;p=mesa.git 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. --- diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index e7c2ace32c7..abf00085651 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;