From 95fae23679bf1717083797c4ff792666d610f5d4 Mon Sep 17 00:00:00 2001 From: Matthew Netsch Date: Wed, 23 Dec 2020 01:10:32 +0530 Subject: [PATCH] Allow GL_RGB9_E5 as a valid fbo format If GL_QCOM_render_shared_exponent is available then treat GL_RGB9_E5 as a valid internal format for fbo. Also, allow copy of RGB9_E5 pixel data. Components: OpenGL VK-GL-CTS Issue: 2898 Affects: KHR-GLES3.packed_pixels.rectangle.rgb9_e5 KHR-GLES3.packed_pixels.pbo_rectangle.rgb9_e5 KHR-GLES3.packed_pixels.varied_rectangle.rgb9_e5 Change-Id: Ie57d74b9bbd11cf7ccca175813077c22405a0926 (cherry picked from commit db8e2899b1f0ab4677aa24af6fad4119f5fe1fa2) --- .../openglcts/modules/common/glcPackedPixelsTests.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/external/openglcts/modules/common/glcPackedPixelsTests.cpp b/external/openglcts/modules/common/glcPackedPixelsTests.cpp index 08119f958..0dd9b4e67 100644 --- a/external/openglcts/modules/common/glcPackedPixelsTests.cpp +++ b/external/openglcts/modules/common/glcPackedPixelsTests.cpp @@ -1814,7 +1814,8 @@ bool RectangleTest::isCopyValid(const InternalFormat& copyInternalFormat, const // and conversions to SNORM internalformats are not allowed by Table 3.2 (copyInternalFormat.sampler == SAMPLER_NORM) || ((copyInternalFormat.sizedFormat == GL_RGB9_E5) && - !contextInfo.isExtensionSupported("GL_APPLE_color_buffer_packed_float"))) + (!contextInfo.isExtensionSupported("GL_APPLE_color_buffer_packed_float") && + !contextInfo.isExtensionSupported("GL_QCOM_render_shared_exponent")))) { /* Some formats are activated by extensions, check. */ if (((internalFormat.baseFormat == GL_LUMINANCE && copyInternalFormat.baseFormat == GL_LUMINANCE) || @@ -1913,6 +1914,12 @@ bool RectangleTest::isFBOImageAttachValid(const InternalFormat& internalformat, return true; } + if ((GL_RGB9_E5 == validFormat->internalformat) && + contextInfo.isExtensionSupported("GL_QCOM_render_shared_exponent")) + { + return true; + } + if ((GL_LUMINANCE == validFormat->internalformat || GL_ALPHA == validFormat->internalformat || GL_LUMINANCE_ALPHA == validFormat->internalformat) && contextInfo.isExtensionSupported("GL_NV_render_luminance_alpha")) -- 2.34.1