summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-08-31 13:28:31 -0600
committerBrian Paul <brianp@vmware.com>2009-08-31 19:34:47 -0600
commit18656201ef62da1892d66e0899001ae82e2555c2 (patch)
tree9c352094dd6b5c40191aab9623de9059db57a3b6
parent31a5a9e9cc943ae38077658302e43c05b80983d7 (diff)
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.
-rw-r--r--src/mesa/swrast/s_context.c3
1 files changed, 3 insertions, 0 deletions
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;