From 070a5e5d9248a77aa84375f74fe48c5067362ea8 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Tue, 12 Feb 2019 21:32:27 -0500 Subject: mesa: add explicit enable for EXT_float_blend, and error condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If EXT_float_blend is not supported, error out on blending of FP32 attachments in an ES2 context. Signed-off-by: Ilia Mirkin Reviewed-by: Tapani Pälli Reviewed-by: Jason Ekstrand --- src/mesa/main/fbobject.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mesa/main/fbobject.c') diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 341fd93efc6..1298e09e1b0 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -1004,6 +1004,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, fb->_HasAttachments = true; fb->_IntegerBuffers = 0; fb->_RGBBuffers = 0; + fb->_FP32Buffers = 0; /* Start at -2 to more easily loop over all attachment points. * -2: depth buffer @@ -1153,6 +1154,9 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, if (f == GL_RGB) fb->_RGBBuffers |= (1 << i); + if (type == GL_FLOAT && _mesa_get_format_max_bits(attFormat) > 16) + fb->_FP32Buffers |= (1 << i); + fb->_AllColorBuffersFixedPoint = fb->_AllColorBuffersFixedPoint && (type == GL_UNSIGNED_NORMALIZED || type == GL_SIGNED_NORMALIZED); -- cgit v1.2.3