diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_cc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_cc.c b/src/mesa/drivers/dri/i965/brw_cc.c index f0aa7b89704..1574788736c 100644 --- a/src/mesa/drivers/dri/i965/brw_cc.c +++ b/src/mesa/drivers/dri/i965/brw_cc.c @@ -34,6 +34,7 @@ #include "brw_state.h" #include "brw_defines.h" #include "brw_util.h" +#include "main/glformats.h" #include "main/macros.h" #include "main/stencil.h" #include "intel_batchbuffer.h" @@ -126,7 +127,9 @@ static void upload_cc_unit(struct brw_context *brw) * force the destination alpha to 1.0. This means replacing GL_DST_ALPHA * with GL_ONE and GL_ONE_MINUS_DST_ALPHA with GL_ZERO. */ - if (ctx->DrawBuffer->Visual.alphaBits == 0) { + const struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0]; + if (rb && !_mesa_base_format_has_channel(rb->_BaseFormat, + GL_TEXTURE_ALPHA_TYPE)) { srcRGB = brw_fix_xRGB_alpha(srcRGB); srcA = brw_fix_xRGB_alpha(srcA); dstRGB = brw_fix_xRGB_alpha(dstRGB); |