Mesa (master): i965/gen8: Don' t enable alpha test and alpha to coverage if draw bufer zero is integer type
Anuj Phogat
aphogat at kemper.freedesktop.org
Mon Oct 24 18:50:11 UTC 2016
Module: Mesa
Branch: master
Commit: 35010718bc64c169b19268ec988b3e358272c302
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=35010718bc64c169b19268ec988b3e358272c302
Author: Anuj Phogat <anuj.phogat at gmail.com>
Date: Tue Oct 18 15:52:19 2016 -0700
i965/gen8: Don't enable alpha test and alpha to coverage if draw bufer zero is integer type
We follow this rule at multiple places in i965 driver. This patch
doesn't fix any testcase.
Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/drivers/dri/i965/gen8_blend_state.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/gen8_blend_state.c b/src/mesa/drivers/dri/i965/gen8_blend_state.c
index 84cbf60..c721da1 100644
--- a/src/mesa/drivers/dri/i965/gen8_blend_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_blend_state.c
@@ -218,13 +218,16 @@ gen8_upload_ps_blend(struct brw_context *brw)
if (brw_color_buffer_write_enabled(brw))
dw1 |= GEN8_PS_BLEND_HAS_WRITEABLE_RT;
- /* _NEW_COLOR */
- if (ctx->Color.AlphaEnabled)
- dw1 |= GEN8_PS_BLEND_ALPHA_TEST_ENABLE;
+ if(!buffer0_is_integer) {
+ /* _NEW_COLOR */
+ if (ctx->Color.AlphaEnabled)
+ dw1 |= GEN8_PS_BLEND_ALPHA_TEST_ENABLE;
- /* _NEW_MULTISAMPLE */
- if (_mesa_is_multisample_enabled(ctx) && ctx->Multisample.SampleAlphaToCoverage)
- dw1 |= GEN8_PS_BLEND_ALPHA_TO_COVERAGE_ENABLE;
+ /* _NEW_MULTISAMPLE */
+ if (_mesa_is_multisample_enabled(ctx) &&
+ ctx->Multisample.SampleAlphaToCoverage)
+ dw1 |= GEN8_PS_BLEND_ALPHA_TO_COVERAGE_ENABLE;
+ }
/* Used for implementing the following bit of GL_EXT_texture_integer:
* "Per-fragment operations that require floating-point color
More information about the mesa-commit
mailing list