summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_atifragshader.c
diff options
context:
space:
mode:
authorRoland Scheidegger <rscheidegger@gmx.ch>2006-03-03 02:46:03 +0000
committerRoland Scheidegger <rscheidegger@gmx.ch>2006-03-03 02:46:03 +0000
commit5e01f9a11489079d8509927774d8239c1857224a (patch)
treeb3780c9ab7518c1a79b7cb74a61bd6c05f2c8f44 /src/mesa/swrast/s_atifragshader.c
parentf4ab5654d0a460736465edb420f78297c4e2be3b (diff)
Fix bogus span mask in s_atifragshader.c leading to trouble when the pixel was later discarded by z test (this fixes doom3 r200 renderpath with swrast). Fix calling _swrast_alpha_test potentially leading to bogus results when Alpha Test might not be enabled. While here, don't disable deferred_texture (early z) when ATI_fragment_shader is active, as it is not necessary (for the record, this boosts doom3 swrast performance by roughly a factor of 2 (4 seconds per frame now...) with the r200 render path, might be a worthwile optimization for fragment programs which don't write z).
Diffstat (limited to 'src/mesa/swrast/s_atifragshader.c')
-rw-r--r--src/mesa/swrast/s_atifragshader.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_atifragshader.c b/src/mesa/swrast/s_atifragshader.c
index 36ada5fa30..08640e146b 100644
--- a/src/mesa/swrast/s_atifragshader.c
+++ b/src/mesa/swrast/s_atifragshader.c
@@ -593,10 +593,11 @@ _swrast_exec_fragment_shader(GLcontext * ctx, struct sw_span *span)
if (span->array->mask[i]) {
init_machine(ctx, &ctx->ATIFragmentShader.Machine,
ctx->ATIFragmentShader.Current, span, i);
-
- if (execute_shader(ctx, shader, ~0,
+ /* can't really happen... */
+ if (!execute_shader(ctx, shader, ~0,
&ctx->ATIFragmentShader.Machine, span, i)) {
span->array->mask[i] = GL_FALSE;
+ span->writeAll = GL_FALSE;
}
{