diff options
author | marha <marha@users.sourceforge.net> | 2011-05-12 11:03:26 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-05-12 11:03:26 +0000 |
commit | 3e9b8f0b0c2c4a0fdde2013a5445ebce9c344dd4 (patch) | |
tree | b42afb31d05c2de227d17a076cdf58267e4d57b9 /mesalib/src/mesa/program/programopt.c | |
parent | f871d84ccfff423c34259024eaccc61e475cea6b (diff) | |
parent | 6355693a021ce9473196b685cc9f8c2cbb0899a8 (diff) | |
download | vcxsrv-3e9b8f0b0c2c4a0fdde2013a5445ebce9c344dd4.tar.gz vcxsrv-3e9b8f0b0c2c4a0fdde2013a5445ebce9c344dd4.tar.bz2 vcxsrv-3e9b8f0b0c2c4a0fdde2013a5445ebce9c344dd4.zip |
merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/program/programopt.c')
-rw-r--r-- | mesalib/src/mesa/program/programopt.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mesalib/src/mesa/program/programopt.c b/mesalib/src/mesa/program/programopt.c index a01252dab..62b406653 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));
}
|