diff options
author | Christian König <[email protected]> | 2011-05-15 19:26:53 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2011-05-15 19:26:53 +0200 |
commit | 828540e491d88b9b6217e6568873a78462919ae8 (patch) | |
tree | c952145c1188cdf6b9c56902f8f5c189e090c278 /src/mesa/program/programopt.c | |
parent | 3db6514357a7c634045ae7bc7bba7d7dbf9d58c5 (diff) | |
parent | bd5b7a6f7113da38a2c1f07a4a71e9993666a567 (diff) |
Merge remote-tracking branch 'origin/master' into pipe-video
Diffstat (limited to 'src/mesa/program/programopt.c')
-rw-r--r-- | src/mesa/program/programopt.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/program/programopt.c b/src/mesa/program/programopt.c index a239da2c609..c72dfb23b4d 100644 --- a/src/mesa/program/programopt.c +++ b/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)); } |