Allow GL_RGB9_E5 as a valid fbo format
authorMatthew Netsch <quic_mnetsch@quicinc.com>
Tue, 22 Dec 2020 19:40:32 +0000 (01:10 +0530)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Fri, 3 Sep 2021 17:36:30 +0000 (17:36 +0000)
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)

external/openglcts/modules/common/glcPackedPixelsTests.cpp

index 08119f9..0dd9b4e 100644 (file)
@@ -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"))