Skip mipmap generation for integer sparse texture formats
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 21 Apr 2022 19:52:14 +0000 (15:52 -0400)
committerRicardo Garcia <rgarcia@igalia.com>
Mon, 25 Apr 2022 09:29:30 +0000 (11:29 +0200)
According to historical records, this is unsupported, and Mesa throws
GL_INVALID_OPERATION to confirm that it is unsupported.

Affects:
KHR-GL46.sparse_texture2_tests.UncommittedRegionsAccess

Components: OpenGL
VK-GL-CTS issue: 3653

Change-Id: I29dc008b6201939b2b7354b0843e018b9db4069c

external/openglcts/modules/gl/gl4cSparseTexture2Tests.cpp

index 01497786c692102069a6ea0f87bdf37c462c2926..125475bb9ec6004a48d0de29524d2c96070ff62c 100644 (file)
@@ -1537,6 +1537,31 @@ bool UncommittedRegionsAccessTestCase::UncommittedReads(const Functions& gl, GLi
        if (result && level == 0 && target != GL_TEXTURE_RECTANGLE && target != GL_TEXTURE_2D_MULTISAMPLE &&
                target != GL_TEXTURE_2D_MULTISAMPLE_ARRAY)
        {
+               /* Khronos bugzilla #9471 states that mipmap generation with integer formats
+                * is unsupported, so skip this test
+                */
+               switch (format) {
+               case GL_RGB10_A2UI:
+               case GL_R8I:
+               case GL_R8UI:
+               case GL_R16I:
+               case GL_R16UI:
+               case GL_R32I:
+               case GL_R32UI:
+               case GL_RG8I:
+               case GL_RG8UI:
+               case GL_RG16I:
+               case GL_RG16UI:
+               case GL_RG32I:
+               case GL_RG32UI:
+               case GL_RGBA8I:
+               case GL_RGBA8UI:
+               case GL_RGBA16I:
+               case GL_RGBA16UI:
+               case GL_RGBA32I:
+               case GL_RGBA32UI:
+                  return result;
+               }
                mLog << "Mipmap Generate - ";
                Texture::Bind(gl, texture, target);
                gl.generateMipmap(target);