diff options
author | Brian <[email protected]> | 2007-03-13 10:53:16 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-03-13 10:53:16 -0600 |
commit | 17ad1d12ebf04ebf4b2b35c1c37d36bb4d2bb550 (patch) | |
tree | 4a5ff1209b01b5e4d042c2f4f5239484af873ab5 | |
parent | 8b9842a2560a1254e98b5e01927f73917a0597fc (diff) |
Check if FRAG_RESULT_COLR is written and update span->interpMask, arrayMask.
Also, fix an assertion.
-rw-r--r-- | src/mesa/swrast/s_fragprog.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c index 7260759306e..7f7c0d6db52 100644 --- a/src/mesa/swrast/s_fragprog.c +++ b/src/mesa/swrast/s_fragprog.c @@ -201,12 +201,19 @@ _swrast_exec_fragment_program( GLcontext *ctx, SWspan *span ) const struct gl_fragment_program *program = ctx->FragmentProgram._Current; /* incoming colors should be floats */ - ASSERT(span->array->ChanType == GL_FLOAT); + if (program->Base.InputsRead & FRAG_BIT_COL0) { + ASSERT(span->array->ChanType == GL_FLOAT); + } ctx->_CurrentProgram = GL_FRAGMENT_PROGRAM_ARB; /* or NV, doesn't matter */ run_program(ctx, span, 0, span->end); + if (program->Base.OutputsWritten & (1 << FRAG_RESULT_COLR)) { + span->interpMask &= ~SPAN_RGBA; + span->arrayMask |= SPAN_RGBA; + } + if (program->Base.OutputsWritten & (1 << FRAG_RESULT_DEPR)) { span->interpMask &= ~SPAN_Z; span->arrayMask |= SPAN_Z; |