diff options
author | Brian Paul <brianp@vmware.com> | 2009-08-31 13:28:31 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-08-31 13:28:31 -0600 |
commit | fcf0804c05faefd196ed5525c068ee4cd30c5312 (patch) | |
tree | c2066af3b1de6f73e9ea3783a55e1645248580bf | |
parent | 9f36473a8ecc9c3358ae99651f511725344f22cc (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.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 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; |