summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/swrast/s_atifragshader.c5
-rw-r--r--src/mesa/swrast/s_span.c9
2 files changed, 8 insertions, 6 deletions
diff --git a/src/mesa/swrast/s_atifragshader.c b/src/mesa/swrast/s_atifragshader.c
index 36ada5fa304..08640e146b5 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;
}
{
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index 0856b801ed2..c4a725fa197 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -1084,7 +1084,6 @@ _swrast_write_rgba_span( GLcontext *ctx, struct sw_span *span)
const GLbitfield origArrayMask = span->arrayMask;
const GLboolean deferredTexture = !(ctx->Color.AlphaEnabled ||
ctx->FragmentProgram._Active ||
- ctx->ATIFragmentShader._Enabled ||
ctx->ShaderObjects.CurrentProgram);
ASSERT(span->primitive == GL_POINT || span->primitive == GL_LINE ||
@@ -1174,9 +1173,11 @@ _swrast_write_rgba_span( GLcontext *ctx, struct sw_span *span)
_swrast_texture_span( ctx, span );
/* Do the alpha test */
- if (!_swrast_alpha_test(ctx, span)) {
- span->arrayMask = origArrayMask;
- return;
+ if (ctx->Color.AlphaEnabled) {
+ if (!_swrast_alpha_test(ctx, span)) {
+ span->arrayMask = origArrayMask;
+ return;
+ }
}
}