diff options
author | Anuj Phogat <[email protected]> | 2016-10-18 15:47:32 -0700 |
---|---|---|
committer | Anuj Phogat <[email protected]> | 2016-10-24 11:07:39 -0700 |
commit | 93b84cae54d1af7ecd0db3bc9f3bb5ab7c09ef55 (patch) | |
tree | a6ee516b7dc998c89e7081c56d9feba90e57f5c6 /src | |
parent | e2dd582de8eb5ccba669daddf0bd1cb5f72c6bd4 (diff) |
i965/gen8: Use DrawBuffer->_IntegerBuffers in gen8_upload_ps_blend()
No functional changes in this patch.
Signed-off-by: Anuj Phogat <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/gen8_blend_state.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/gen8_blend_state.c b/src/mesa/drivers/dri/i965/gen8_blend_state.c index 8aca8b8ad68..84cbf60c92f 100644 --- a/src/mesa/drivers/dri/i965/gen8_blend_state.c +++ b/src/mesa/drivers/dri/i965/gen8_blend_state.c @@ -212,6 +212,7 @@ gen8_upload_ps_blend(struct brw_context *brw) /* _NEW_BUFFERS */ struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0]; + const bool buffer0_is_integer = ctx->DrawBuffer->_IntegerBuffers & 0x1; /* BRW_NEW_FRAGMENT_PROGRAM | _NEW_BUFFERS | _NEW_COLOR */ if (brw_color_buffer_write_enabled(brw)) @@ -236,11 +237,7 @@ gen8_upload_ps_blend(struct brw_context *brw) * integer format, the SAMPLE_ALPHA_TO_COVERAGE and SAMPLE_ALPHA_TO_ONE * operations are skipped." */ - GLenum rb_type = - rb ? _mesa_get_format_datatype(rb->Format) : GL_UNSIGNED_NORMALIZED; - - if (rb && rb_type != GL_INT && rb_type != GL_UNSIGNED_INT && - (ctx->Color.BlendEnabled & 1)) { + if (rb && !buffer0_is_integer && (ctx->Color.BlendEnabled & 1)) { GLenum eqRGB = ctx->Color.Blend[0].EquationRGB; GLenum eqA = ctx->Color.Blend[0].EquationA; GLenum srcRGB = ctx->Color.Blend[0].SrcRGB; |