aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/program
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-05-12 10:54:06 +0000
committermarha <marha@users.sourceforge.net>2011-05-12 10:54:06 +0000
commit6355693a021ce9473196b685cc9f8c2cbb0899a8 (patch)
treed781e4e3e935e9b3b9be7aff2a2952269b33e12a /mesalib/src/mesa/program
parent0f6aea154580c2f220be98d12108dd7d316c21f6 (diff)
downloadvcxsrv-6355693a021ce9473196b685cc9f8c2cbb0899a8.tar.gz
vcxsrv-6355693a021ce9473196b685cc9f8c2cbb0899a8.tar.bz2
vcxsrv-6355693a021ce9473196b685cc9f8c2cbb0899a8.zip
libxcb mesa xcb-proto git update 12 May 2011
Diffstat (limited to 'mesalib/src/mesa/program')
-rw-r--r--mesalib/src/mesa/program/programopt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mesalib/src/mesa/program/programopt.c b/mesalib/src/mesa/program/programopt.c
index a239da2c6..c72dfb23b 100644
--- a/mesalib/src/mesa/program/programopt.c
+++ b/mesalib/src/mesa/program/programopt.c
@@ -267,6 +267,11 @@ _mesa_append_fog_code(struct gl_context *ctx,
return;
}
+ if (!(fprog->Base.OutputsWritten & (1 << FRAG_RESULT_COLOR))) {
+ /* program doesn't output color, so nothing to do */
+ return;
+ }
+
/* Alloc storage for new instructions */
newInst = _mesa_alloc_instructions(newLen);
if (!newInst) {
@@ -407,6 +412,7 @@ _mesa_append_fog_code(struct gl_context *ctx,
fprog->Base.Instructions = newInst;
fprog->Base.NumInstructions = inst - newInst;
fprog->Base.InputsRead |= FRAG_BIT_FOGC;
+ assert(fprog->Base.OutputsWritten & (1 << FRAG_RESULT_COLOR));
}