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.
This commit is contained in:
Brian Paul 2009-08-31 13:28:31 -06:00
parent 9f36473a8e
commit fcf0804c05

View file

@ -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;