diff options
Diffstat (limited to 'src/mesa/swrast/s_context.c')
-rw-r--r-- | src/mesa/swrast/s_context.c | 43 |
1 files changed, 1 insertions, 42 deletions
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 314931d4676..8e6b28bb4c6 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -87,7 +87,7 @@ _swrast_update_rasterflags( GLcontext *ctx ) * MULTI_DRAW_BIT flag. Also set it if we're drawing to no * buffers or the RGBA or CI mask disables all writes. */ - if (ctx->DrawBuffer->_NumColorDrawBuffers[0] != 1) { + if (ctx->DrawBuffer->_NumColorDrawBuffers != 1) { /* more than one color buffer designated for writing (or zero buffers) */ rasterMask |= MULTI_DRAW_BIT; } @@ -596,44 +596,6 @@ _swrast_update_active_attribs(GLcontext *ctx) } -/** - * Update the swrast->_ColorOutputsMask which indicates which color - * renderbuffers (aka rendertargets) are being written to by the current - * fragment program. - * We also take glDrawBuffers() into account to skip outputs that are - * set to GL_NONE. - */ -static void -_swrast_update_color_outputs(GLcontext *ctx) -{ - SWcontext *swrast = SWRAST_CONTEXT(ctx); - const struct gl_framebuffer *fb = ctx->DrawBuffer; - - swrast->_ColorOutputsMask = 0; - swrast->_NumColorOutputs = 0; - - if (ctx->FragmentProgram._Current) { - const GLbitfield outputsWritten - = ctx->FragmentProgram._Current->Base.OutputsWritten; - GLuint output; - for (output = 0; output < ctx->Const.MaxDrawBuffers; output++) { - if ((outputsWritten & (1 << (FRAG_RESULT_DATA0 + output))) - && (fb->_NumColorDrawBuffers[output] > 0)) { - swrast->_ColorOutputsMask |= (1 << output); - swrast->_NumColorOutputs = output + 1; - } - } - } - if (swrast->_ColorOutputsMask == 0x0) { - /* no fragment program, or frag prog didn't write to gl_FragData[] */ - if (fb->_NumColorDrawBuffers[0] > 0) { - swrast->_ColorOutputsMask = 0x1; - swrast->_NumColorOutputs = 1; - } - } -} - - void _swrast_validate_derived( GLcontext *ctx ) { @@ -683,9 +645,6 @@ _swrast_validate_derived( GLcontext *ctx ) _NEW_TEXTURE)) _swrast_update_active_attribs(ctx); - if (swrast->NewState & (_NEW_PROGRAM | _NEW_BUFFERS)) - _swrast_update_color_outputs(ctx); - swrast->NewState = 0; swrast->StateChanges = 0; swrast->InvalidateState = _swrast_invalidate_state; |