mesa: fix _FP32Buffers bitfield use

Previously we were assuming that all color attachments were active.

Fixes: 070a5e5d92 ("mesa: add explicit enable for EXT_float_blend, and error condition")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35014>
This commit is contained in:
Timothy Arceri
2025-05-16 15:47:27 +10:00
committed by Marge Bot
parent b7d8c195a2
commit c7c4905981
3 changed files with 5 additions and 2 deletions
+2
View File
@@ -764,6 +764,8 @@ _mesa_update_drawbuffer_masks(struct gl_context *ctx,
&ctx->DrawBuffer->_BlendForceAlphaToOneDraw);
update_drawbuffer_mask(ctx, fb, &ctx->DrawBuffer->_IsRGB,
&ctx->DrawBuffer->_IsRGBDraw);
update_drawbuffer_mask(ctx, fb, &ctx->DrawBuffer->_FP32Buffers,
&ctx->DrawBuffer->_FP32DrawBuffers);
}
/**
+1 -1
View File
@@ -234,7 +234,7 @@ _mesa_update_valid_to_render_state(struct gl_context *ctx)
* However GL_EXT_float_blend removes this text.
*/
if (!ctx->Extensions.EXT_float_blend &&
(ctx->DrawBuffer->_FP32Buffers & ctx->Color.BlendEnabled))
(ctx->DrawBuffer->_FP32DrawBuffers & ctx->Color.BlendEnabled))
return;
break;
+2 -1
View File
@@ -2697,7 +2697,8 @@ struct gl_framebuffer
GLbitfield _BlendForceAlphaToOneDraw; /**< Which color buffers need blend factor adjustment */
GLbitfield _IsRGB; /**< Which color attachments have an RGB base format? */
GLbitfield _IsRGBDraw; /**< Which color buffers have an RGB base format? */
GLbitfield _FP32Buffers; /**< Which color buffers are FP32 */
GLbitfield _FP32Buffers; /**< Which color attachments are FP32 */
GLbitfield _FP32DrawBuffers; /**< Which color buffers are FP32 */
/* ARB_color_buffer_float */
GLboolean _AllColorBuffersFixedPoint; /* no integer, no float */