Fix state query tests for desktop GL context
authorTapani Pälli <tapani.palli@intel.com>
Tue, 13 Dec 2022 15:44:32 +0000 (17:44 +0200)
committerPiotr Byszewski <piotr.byszewski@mobica.com>
Mon, 9 Jan 2023 11:08:33 +0000 (11:08 +0000)
Affects:
dEQP-GL45-ES3.functional.state_query.integers.generate_mipmap_hint*
dEQP-GL45-ES3.functional.state_query.integers.viewport*
dEQP-GL45-ES3.functional.state_query.texture.texture*
dEQP-GL45-ES3.functional.state_query.rbo.renderbuffer_internal_format
dEQP-GL45-ES3.functional.state_query.shader.vertex_attrib*

Components: OpenGL
VK-GL-CTS issue: 3761

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Change-Id: I872b46d9ca6c56c773851bcda00376d2abeacdad

external/openglcts/data/mustpass/gl/aosp_mustpass/4.6.1.x/gl45-es3-master.txt
external/openglcts/data/mustpass/gl/aosp_mustpass/main/gl45-es3-master.txt
modules/gles3/functional/es3fFboStateQueryTests.cpp
modules/gles3/functional/es3fIntegerStateQueryTests.cpp
modules/gles3/functional/es3fRboStateQueryTests.cpp
modules/gles3/functional/es3fShaderStateQueryTests.cpp
modules/glshared/glsTextureStateQueryTests.cpp

index 15bab69..7a41872 100644 (file)
@@ -269,24 +269,6 @@ dEQP-GL45-ES3.functional.state_query.integers.max_transform_feedback_separate_co
 dEQP-GL45-ES3.functional.state_query.integers.max_samples_getboolean
 dEQP-GL45-ES3.functional.state_query.integers.max_samples_getinteger64
 dEQP-GL45-ES3.functional.state_query.integers.max_samples_getfloat
-dEQP-GL45-ES3.functional.state_query.integers.red_bits_getboolean
-dEQP-GL45-ES3.functional.state_query.integers.red_bits_getinteger64
-dEQP-GL45-ES3.functional.state_query.integers.red_bits_getfloat
-dEQP-GL45-ES3.functional.state_query.integers.green_bits_getboolean
-dEQP-GL45-ES3.functional.state_query.integers.green_bits_getinteger64
-dEQP-GL45-ES3.functional.state_query.integers.green_bits_getfloat
-dEQP-GL45-ES3.functional.state_query.integers.blue_bits_getboolean
-dEQP-GL45-ES3.functional.state_query.integers.blue_bits_getinteger64
-dEQP-GL45-ES3.functional.state_query.integers.blue_bits_getfloat
-dEQP-GL45-ES3.functional.state_query.integers.alpha_bits_getboolean
-dEQP-GL45-ES3.functional.state_query.integers.alpha_bits_getinteger64
-dEQP-GL45-ES3.functional.state_query.integers.alpha_bits_getfloat
-dEQP-GL45-ES3.functional.state_query.integers.depth_bits_getboolean
-dEQP-GL45-ES3.functional.state_query.integers.depth_bits_getinteger64
-dEQP-GL45-ES3.functional.state_query.integers.depth_bits_getfloat
-dEQP-GL45-ES3.functional.state_query.integers.stencil_bits_getboolean
-dEQP-GL45-ES3.functional.state_query.integers.stencil_bits_getinteger64
-dEQP-GL45-ES3.functional.state_query.integers.stencil_bits_getfloat
 dEQP-GL45-ES3.functional.state_query.integers.min_program_texel_offset_getboolean
 dEQP-GL45-ES3.functional.state_query.integers.min_program_texel_offset_getinteger64
 dEQP-GL45-ES3.functional.state_query.integers.min_program_texel_offset_getfloat
@@ -300,10 +282,6 @@ dEQP-GL45-ES3.functional.state_query.integers.samples_getboolean
 dEQP-GL45-ES3.functional.state_query.integers.samples_getinteger
 dEQP-GL45-ES3.functional.state_query.integers.samples_getinteger64
 dEQP-GL45-ES3.functional.state_query.integers.samples_getfloat
-dEQP-GL45-ES3.functional.state_query.integers.generate_mipmap_hint_getboolean
-dEQP-GL45-ES3.functional.state_query.integers.generate_mipmap_hint_getinteger
-dEQP-GL45-ES3.functional.state_query.integers.generate_mipmap_hint_getinteger64
-dEQP-GL45-ES3.functional.state_query.integers.generate_mipmap_hint_getfloat
 dEQP-GL45-ES3.functional.state_query.integers.fragment_shader_derivative_hint_getboolean
 dEQP-GL45-ES3.functional.state_query.integers.fragment_shader_derivative_hint_getinteger
 dEQP-GL45-ES3.functional.state_query.integers.fragment_shader_derivative_hint_getinteger64
index 15bab69..7a41872 100644 (file)
@@ -269,24 +269,6 @@ dEQP-GL45-ES3.functional.state_query.integers.max_transform_feedback_separate_co
 dEQP-GL45-ES3.functional.state_query.integers.max_samples_getboolean
 dEQP-GL45-ES3.functional.state_query.integers.max_samples_getinteger64
 dEQP-GL45-ES3.functional.state_query.integers.max_samples_getfloat
-dEQP-GL45-ES3.functional.state_query.integers.red_bits_getboolean
-dEQP-GL45-ES3.functional.state_query.integers.red_bits_getinteger64
-dEQP-GL45-ES3.functional.state_query.integers.red_bits_getfloat
-dEQP-GL45-ES3.functional.state_query.integers.green_bits_getboolean
-dEQP-GL45-ES3.functional.state_query.integers.green_bits_getinteger64
-dEQP-GL45-ES3.functional.state_query.integers.green_bits_getfloat
-dEQP-GL45-ES3.functional.state_query.integers.blue_bits_getboolean
-dEQP-GL45-ES3.functional.state_query.integers.blue_bits_getinteger64
-dEQP-GL45-ES3.functional.state_query.integers.blue_bits_getfloat
-dEQP-GL45-ES3.functional.state_query.integers.alpha_bits_getboolean
-dEQP-GL45-ES3.functional.state_query.integers.alpha_bits_getinteger64
-dEQP-GL45-ES3.functional.state_query.integers.alpha_bits_getfloat
-dEQP-GL45-ES3.functional.state_query.integers.depth_bits_getboolean
-dEQP-GL45-ES3.functional.state_query.integers.depth_bits_getinteger64
-dEQP-GL45-ES3.functional.state_query.integers.depth_bits_getfloat
-dEQP-GL45-ES3.functional.state_query.integers.stencil_bits_getboolean
-dEQP-GL45-ES3.functional.state_query.integers.stencil_bits_getinteger64
-dEQP-GL45-ES3.functional.state_query.integers.stencil_bits_getfloat
 dEQP-GL45-ES3.functional.state_query.integers.min_program_texel_offset_getboolean
 dEQP-GL45-ES3.functional.state_query.integers.min_program_texel_offset_getinteger64
 dEQP-GL45-ES3.functional.state_query.integers.min_program_texel_offset_getfloat
@@ -300,10 +282,6 @@ dEQP-GL45-ES3.functional.state_query.integers.samples_getboolean
 dEQP-GL45-ES3.functional.state_query.integers.samples_getinteger
 dEQP-GL45-ES3.functional.state_query.integers.samples_getinteger64
 dEQP-GL45-ES3.functional.state_query.integers.samples_getfloat
-dEQP-GL45-ES3.functional.state_query.integers.generate_mipmap_hint_getboolean
-dEQP-GL45-ES3.functional.state_query.integers.generate_mipmap_hint_getinteger
-dEQP-GL45-ES3.functional.state_query.integers.generate_mipmap_hint_getinteger64
-dEQP-GL45-ES3.functional.state_query.integers.generate_mipmap_hint_getfloat
 dEQP-GL45-ES3.functional.state_query.integers.fragment_shader_derivative_hint_getboolean
 dEQP-GL45-ES3.functional.state_query.integers.fragment_shader_derivative_hint_getinteger
 dEQP-GL45-ES3.functional.state_query.integers.fragment_shader_derivative_hint_getinteger64
index 2ff8064..bc9a6c9 100644 (file)
@@ -172,7 +172,7 @@ public:
                                                                                        m_context.getRenderTarget().getPixelFormat().alphaBits > 0;
                const GLenum    attachments[] =
                {
-                       GL_BACK,
+                       (GLenum)(glu::contextSupports(m_context.getRenderContext().getType(), glu::ApiType::core(4, 5)) ? GL_FRONT : GL_BACK),
                        GL_DEPTH,
                        GL_STENCIL
                };
@@ -566,14 +566,15 @@ public:
 
        void test (void)
        {
+               const GLenum colorAttachment = (glu::contextSupports(m_context.getRenderContext().getType(), glu::ApiType::core(4, 5)) ? GL_FRONT : GL_BACK);
                // check default
-               if (attachmentExists(GL_BACK))
+               if (attachmentExists(colorAttachment))
                {
                        checkAttachmentComponentSizeAtLeast(
                                m_testCtx,
                                *this,
                                GL_FRAMEBUFFER,
-                               GL_BACK,
+                               colorAttachment,
                                m_context.getRenderTarget().getPixelFormat().redBits,
                                m_context.getRenderTarget().getPixelFormat().greenBits,
                                m_context.getRenderTarget().getPixelFormat().blueBits,
index 14ce441..c1978a8 100644 (file)
@@ -1152,7 +1152,8 @@ public:
                GLboolean hasViewportArray = false;
                glGetIntegerv(GL_MAX_VIEWPORT_DIMS, maxViewportDimensions);
                hasViewportArray = m_context.getContextInfo().isExtensionSupported("GL_OES_viewport_array") ||
-                                                  m_context.getContextInfo().isExtensionSupported("GL_NV_viewport_array");
+                                  m_context.getContextInfo().isExtensionSupported("GL_NV_viewport_array") ||
+                                  m_context.getContextInfo().isExtensionSupported("GL_ARB_viewport_array");
                if (hasViewportArray)
                {
                        glGetFloatv(GL_VIEWPORT_BOUNDS_RANGE, viewportBoundsRange);
@@ -2591,7 +2592,9 @@ public:
 
        void test (void)
        {
-               const GLint validInitialValues[] = {GL_BACK, GL_NONE};
+               const bool isGlCore45 = glu::contextSupports(m_context.getRenderContext().getType(), glu::ApiType::core(4, 5));
+               const GLenum colorAttachment = isGlCore45 ? GL_FRONT : GL_BACK;
+               const GLint validInitialValues[] = {(GLint)colorAttachment, GL_BACK, GL_NONE};
                m_verifier->verifyIntegerAnyOf(m_testCtx, GL_READ_BUFFER, validInitialValues, DE_LENGTH_OF_ARRAY(validInitialValues));
                expectError(GL_NO_ERROR);
 
@@ -2599,8 +2602,8 @@ public:
                m_verifier->verifyInteger(m_testCtx, GL_READ_BUFFER, GL_NONE);
                expectError(GL_NO_ERROR);
 
-               glReadBuffer(GL_BACK);
-               m_verifier->verifyInteger(m_testCtx, GL_READ_BUFFER, GL_BACK);
+               glReadBuffer(colorAttachment);
+               m_verifier->verifyInteger(m_testCtx, GL_READ_BUFFER, colorAttachment);
                expectError(GL_NO_ERROR);
 
                // test GL_READ_BUFFER with framebuffers
@@ -2631,7 +2634,7 @@ public:
                glDeleteRenderbuffers(1, &renderbuffer_id);
                expectError(GL_NO_ERROR);
 
-               m_verifier->verifyInteger(m_testCtx, GL_READ_BUFFER, GL_BACK);
+               m_verifier->verifyInteger(m_testCtx, GL_READ_BUFFER, colorAttachment);
                expectError(GL_NO_ERROR);
        }
 private:
@@ -2649,7 +2652,7 @@ public:
 
        void test (void)
        {
-               const GLint validInitialValues[] = {GL_BACK, GL_NONE};
+               const GLint validInitialValues[] = {GL_FRONT, GL_BACK, GL_NONE};
                m_verifier->verifyIntegerAnyOf(m_testCtx, GL_DRAW_BUFFER0, validInitialValues, DE_LENGTH_OF_ARRAY(validInitialValues));
                expectError(GL_NO_ERROR);
 
@@ -2660,7 +2663,8 @@ public:
 
                bufs = GL_BACK;
                glDrawBuffers(1, &bufs);
-               m_verifier->verifyInteger(m_testCtx, GL_DRAW_BUFFER0, GL_BACK);
+               const GLint validDraw0Values[] = {GL_FRONT_LEFT, GL_BACK};
+               m_verifier->verifyIntegerAnyOf(m_testCtx, GL_DRAW_BUFFER0, validDraw0Values, DE_LENGTH_OF_ARRAY(validDraw0Values));
                expectError(GL_NO_ERROR);
 
                // test GL_DRAW_BUFFER with framebuffers
@@ -2703,7 +2707,7 @@ public:
                glDeleteRenderbuffers(2, renderbuffer_ids);
                expectError(GL_NO_ERROR);
 
-               m_verifier->verifyInteger(m_testCtx, GL_DRAW_BUFFER0, GL_BACK);
+               m_verifier->verifyIntegerAnyOf(m_testCtx, GL_DRAW_BUFFER0, validDraw0Values, DE_LENGTH_OF_ARRAY(validDraw0Values));
                expectError(GL_NO_ERROR);
        }
 private:
@@ -2784,60 +2788,66 @@ void IntegerStateQueryTests::init (void)
                const char*             description;
                GLenum                  targetName;
                GLint                   value;
+               bool                    skipForGl;
        } implementationMinLimits[] =
        {
-               { "subpixel_bits",                                                                      "SUBPIXEL_BITS has minimum value of 4",                                                                         GL_SUBPIXEL_BITS,                                                                       4       },
-               { "max_3d_texture_size",                                                        "MAX_3D_TEXTURE_SIZE has minimum value of 256",                                                         GL_MAX_3D_TEXTURE_SIZE,                                                         256     },
-               { "max_texture_size",                                                           "MAX_TEXTURE_SIZE has minimum value of 2048",                                                           GL_MAX_TEXTURE_SIZE,                                                            2048},
-               { "max_array_texture_layers",                                           "MAX_ARRAY_TEXTURE_LAYERS has minimum value of 256",                                            GL_MAX_ARRAY_TEXTURE_LAYERS,                                            256     },
-               { "max_cube_map_texture_size",                                          "MAX_CUBE_MAP_TEXTURE_SIZE has minimum value of 2048",                                          GL_MAX_CUBE_MAP_TEXTURE_SIZE,                                           2048},
-               { "max_renderbuffer_size",                                                      "MAX_RENDERBUFFER_SIZE has minimum value of 2048",                                                      GL_MAX_RENDERBUFFER_SIZE,                                                       2048},
-               { "max_draw_buffers",                                                           "MAX_DRAW_BUFFERS has minimum value of 4",                                                                      GL_MAX_DRAW_BUFFERS,                                                            4       },
-               { "max_color_attachments",                                                      "MAX_COLOR_ATTACHMENTS has minimum value of 4",                                                         GL_MAX_COLOR_ATTACHMENTS,                                                       4       },
-               { "max_elements_indices",                                                       "MAX_ELEMENTS_INDICES has minimum value of 0",                                                          GL_MAX_ELEMENTS_INDICES,                                                        0       },
-               { "max_elements_vertices",                                                      "MAX_ELEMENTS_VERTICES has minimum value of 0",                                                         GL_MAX_ELEMENTS_VERTICES,                                                       0       },
-               { "num_extensions",                                                                     "NUM_EXTENSIONS has minimum value of 0",                                                                        GL_NUM_EXTENSIONS,                                                                      0       },
-               { "major_version",                                                                      "MAJOR_VERSION has minimum value of 3",                                                                         GL_MAJOR_VERSION,                                                                       3       },
-               { "minor_version",                                                                      "MINOR_VERSION has minimum value of 0",                                                                         GL_MINOR_VERSION,                                                                       0       },
-               { "max_vertex_attribs",                                                         "MAX_VERTEX_ATTRIBS has minimum value of 16",                                                           GL_MAX_VERTEX_ATTRIBS,                                                          16      },
-               { "max_vertex_uniform_components",                                      "MAX_VERTEX_UNIFORM_COMPONENTS has minimum value of 1024",                                      GL_MAX_VERTEX_UNIFORM_COMPONENTS,                                       1024},
-               { "max_vertex_uniform_vectors",                                         "MAX_VERTEX_UNIFORM_VECTORS has minimum value of 256",                                          GL_MAX_VERTEX_UNIFORM_VECTORS,                                          256     },
-               { "max_vertex_uniform_blocks",                                          "MAX_VERTEX_UNIFORM_BLOCKS has minimum value of 12",                                            GL_MAX_VERTEX_UNIFORM_BLOCKS,                                           12      },
-               { "max_vertex_output_components",                                       "MAX_VERTEX_OUTPUT_COMPONENTS has minimum value of 64",                                         GL_MAX_VERTEX_OUTPUT_COMPONENTS,                                        64      },
-               { "max_vertex_texture_image_units",                                     "MAX_VERTEX_TEXTURE_IMAGE_UNITS has minimum value of 16",                                       GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS,                                      16      },
-               { "max_fragment_uniform_components",                            "MAX_FRAGMENT_UNIFORM_COMPONENTS has minimum value of 896",                                     GL_MAX_FRAGMENT_UNIFORM_COMPONENTS,                                     896     },
-               { "max_fragment_uniform_vectors",                                       "MAX_FRAGMENT_UNIFORM_VECTORS has minimum value of 224",                                        GL_MAX_FRAGMENT_UNIFORM_VECTORS,                                        224     },
-               { "max_fragment_uniform_blocks",                                        "MAX_FRAGMENT_UNIFORM_BLOCKS has minimum value of 12",                                          GL_MAX_FRAGMENT_UNIFORM_BLOCKS,                                         12      },
-               { "max_fragment_input_components",                                      "MAX_FRAGMENT_INPUT_COMPONENTS has minimum value of 60",                                        GL_MAX_FRAGMENT_INPUT_COMPONENTS,                                       60      },
-               { "max_texture_image_units",                                            "MAX_TEXTURE_IMAGE_UNITS has minimum value of 16",                                                      GL_MAX_TEXTURE_IMAGE_UNITS,                                                     16      },
-               { "max_program_texel_offset",                                           "MAX_PROGRAM_TEXEL_OFFSET has minimum value of 7",                                                      GL_MAX_PROGRAM_TEXEL_OFFSET,                                            7       },
-               { "max_uniform_buffer_bindings",                                        "MAX_UNIFORM_BUFFER_BINDINGS has minimum value of 24",                                          GL_MAX_UNIFORM_BUFFER_BINDINGS,                                         24      },
-               { "max_combined_uniform_blocks",                                        "MAX_COMBINED_UNIFORM_BLOCKS has minimum value of 24",                                          GL_MAX_COMBINED_UNIFORM_BLOCKS,                                         24      },
-               { "max_varying_components",                                                     "MAX_VARYING_COMPONENTS has minimum value of 60",                                                       GL_MAX_VARYING_COMPONENTS,                                                      60      },
-               { "max_varying_vectors",                                                        "MAX_VARYING_VECTORS has minimum value of 15",                                                          GL_MAX_VARYING_VECTORS,                                                         15      },
-               { "max_combined_texture_image_units",                           "MAX_COMBINED_TEXTURE_IMAGE_UNITS has minimum value of 32",                                     GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS,                            32      },
-               { "max_transform_feedback_interleaved_components",      "MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS has minimum value of 64",        GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS,       64      },
-               { "max_transform_feedback_separate_attribs",            "MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS has minimum value of 4",                       GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS,                     4       },
-               { "max_transform_feedback_separate_components",         "MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS has minimum value of 4",            GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS,          4       },
-               { "max_samples",                                                                        "MAX_SAMPLES has minimum value of 4",                                                                           GL_MAX_SAMPLES,                                                                         4       },
-               { "red_bits",                                                                           "RED_BITS has minimum value of 0",                                                                                      GL_RED_BITS,                                                                            0       },
-               { "green_bits",                                                                         "GREEN_BITS has minimum value of 0",                                                                            GL_GREEN_BITS,                                                                          0       },
-               { "blue_bits",                                                                          "BLUE_BITS has minimum value of 0",                                                                                     GL_BLUE_BITS,                                                                           0       },
-               { "alpha_bits",                                                                         "ALPHA_BITS has minimum value of 0",                                                                            GL_ALPHA_BITS,                                                                          0       },
-               { "depth_bits",                                                                         "DEPTH_BITS has minimum value of 0",                                                                            GL_DEPTH_BITS,                                                                          0       },
-               { "stencil_bits",                                                                       "STENCIL_BITS has minimum value of 0",                                                                          GL_STENCIL_BITS,                                                                        0       },
+               { "subpixel_bits",                                                                      "SUBPIXEL_BITS has minimum value of 4",                                                                         GL_SUBPIXEL_BITS,                                                                       4       ,       false},
+               { "max_3d_texture_size",                                                        "MAX_3D_TEXTURE_SIZE has minimum value of 256",                                                         GL_MAX_3D_TEXTURE_SIZE,                                                         256     ,       false   },
+               { "max_texture_size",                                                           "MAX_TEXTURE_SIZE has minimum value of 2048",                                                           GL_MAX_TEXTURE_SIZE,                                                            2048    ,       false   },
+               { "max_array_texture_layers",                                           "MAX_ARRAY_TEXTURE_LAYERS has minimum value of 256",                                            GL_MAX_ARRAY_TEXTURE_LAYERS,                                            256     ,       false   },
+               { "max_cube_map_texture_size",                                          "MAX_CUBE_MAP_TEXTURE_SIZE has minimum value of 2048",                                          GL_MAX_CUBE_MAP_TEXTURE_SIZE,                                           2048    ,       false   },
+               { "max_renderbuffer_size",                                                      "MAX_RENDERBUFFER_SIZE has minimum value of 2048",                                                      GL_MAX_RENDERBUFFER_SIZE,                                                       2048    ,       false   },
+               { "max_draw_buffers",                                                           "MAX_DRAW_BUFFERS has minimum value of 4",                                                                      GL_MAX_DRAW_BUFFERS,                                                            4       ,       false   },
+               { "max_color_attachments",                                                      "MAX_COLOR_ATTACHMENTS has minimum value of 4",                                                         GL_MAX_COLOR_ATTACHMENTS,                                                       4       ,       false   },
+               { "max_elements_indices",                                                       "MAX_ELEMENTS_INDICES has minimum value of 0",                                                          GL_MAX_ELEMENTS_INDICES,                                                        0       ,       false   },
+               { "max_elements_vertices",                                                      "MAX_ELEMENTS_VERTICES has minimum value of 0",                                                         GL_MAX_ELEMENTS_VERTICES,                                                       0       ,       false   },
+               { "num_extensions",                                                                     "NUM_EXTENSIONS has minimum value of 0",                                                                        GL_NUM_EXTENSIONS,                                                                      0       ,       false   },
+               { "major_version",                                                                      "MAJOR_VERSION has minimum value of 3",                                                                         GL_MAJOR_VERSION,                                                                       3       ,       false   },
+               { "minor_version",                                                                      "MINOR_VERSION has minimum value of 0",                                                                         GL_MINOR_VERSION,                                                                       0       ,       false   },
+               { "max_vertex_attribs",                                                         "MAX_VERTEX_ATTRIBS has minimum value of 16",                                                           GL_MAX_VERTEX_ATTRIBS,                                                          16      ,       false   },
+               { "max_vertex_uniform_components",                                      "MAX_VERTEX_UNIFORM_COMPONENTS has minimum value of 1024",                                      GL_MAX_VERTEX_UNIFORM_COMPONENTS,                                       1024    ,       false   },
+               { "max_vertex_uniform_vectors",                                         "MAX_VERTEX_UNIFORM_VECTORS has minimum value of 256",                                          GL_MAX_VERTEX_UNIFORM_VECTORS,                                          256     ,       false   },
+               { "max_vertex_uniform_blocks",                                          "MAX_VERTEX_UNIFORM_BLOCKS has minimum value of 12",                                            GL_MAX_VERTEX_UNIFORM_BLOCKS,                                           12      ,       false   },
+               { "max_vertex_output_components",                                       "MAX_VERTEX_OUTPUT_COMPONENTS has minimum value of 64",                                         GL_MAX_VERTEX_OUTPUT_COMPONENTS,                                        64      ,       false   },
+               { "max_vertex_texture_image_units",                                     "MAX_VERTEX_TEXTURE_IMAGE_UNITS has minimum value of 16",                                       GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS,                                      16      ,       false   },
+               { "max_fragment_uniform_components",                            "MAX_FRAGMENT_UNIFORM_COMPONENTS has minimum value of 896",                                     GL_MAX_FRAGMENT_UNIFORM_COMPONENTS,                                     896     ,       false   },
+               { "max_fragment_uniform_vectors",                                       "MAX_FRAGMENT_UNIFORM_VECTORS has minimum value of 224",                                        GL_MAX_FRAGMENT_UNIFORM_VECTORS,                                        224     ,       false   },
+               { "max_fragment_uniform_blocks",                                        "MAX_FRAGMENT_UNIFORM_BLOCKS has minimum value of 12",                                          GL_MAX_FRAGMENT_UNIFORM_BLOCKS,                                         12      ,       false   },
+               { "max_fragment_input_components",                                      "MAX_FRAGMENT_INPUT_COMPONENTS has minimum value of 60",                                        GL_MAX_FRAGMENT_INPUT_COMPONENTS,                                       60      ,       false   },
+               { "max_texture_image_units",                                            "MAX_TEXTURE_IMAGE_UNITS has minimum value of 16",                                                      GL_MAX_TEXTURE_IMAGE_UNITS,                                                     16      ,       false   },
+               { "max_program_texel_offset",                                           "MAX_PROGRAM_TEXEL_OFFSET has minimum value of 7",                                                      GL_MAX_PROGRAM_TEXEL_OFFSET,                                            7       ,       false   },
+               { "max_uniform_buffer_bindings",                                        "MAX_UNIFORM_BUFFER_BINDINGS has minimum value of 24",                                          GL_MAX_UNIFORM_BUFFER_BINDINGS,                                         24      ,       false   },
+               { "max_combined_uniform_blocks",                                        "MAX_COMBINED_UNIFORM_BLOCKS has minimum value of 24",                                          GL_MAX_COMBINED_UNIFORM_BLOCKS,                                         24      ,       false   },
+               { "max_varying_components",                                                     "MAX_VARYING_COMPONENTS has minimum value of 60",                                                       GL_MAX_VARYING_COMPONENTS,                                                      60      ,       false   },
+               { "max_varying_vectors",                                                        "MAX_VARYING_VECTORS has minimum value of 15",                                                          GL_MAX_VARYING_VECTORS,                                                         15      ,       false   },
+               { "max_combined_texture_image_units",                           "MAX_COMBINED_TEXTURE_IMAGE_UNITS has minimum value of 32",                                     GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS,                            32      ,       false   },
+               { "max_transform_feedback_interleaved_components",      "MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS has minimum value of 64",        GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS,       64      ,       false   },
+               { "max_transform_feedback_separate_attribs",            "MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS has minimum value of 4",                       GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS,                     4       ,       false   },
+               { "max_transform_feedback_separate_components",         "MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS has minimum value of 4",            GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS,          4       ,       false   },
+               { "max_samples",                                                                        "MAX_SAMPLES has minimum value of 4",                                                                           GL_MAX_SAMPLES,                                                                         4       ,       false   },
+               { "red_bits",                                                                           "RED_BITS has minimum value of 0",                                                                                      GL_RED_BITS,                                                                            0,      true    },
+               { "green_bits",                                                                         "GREEN_BITS has minimum value of 0",                                                                            GL_GREEN_BITS,                                                                          0,      true    },
+               { "blue_bits",                                                                          "BLUE_BITS has minimum value of 0",                                                                                     GL_BLUE_BITS,                                                                           0,      true    },
+               { "alpha_bits",                                                                         "ALPHA_BITS has minimum value of 0",                                                                            GL_ALPHA_BITS,                                                                          0,      true    },
+               { "depth_bits",                                                                         "DEPTH_BITS has minimum value of 0",                                                                            GL_DEPTH_BITS,                                                                          0,      true    },
+               { "stencil_bits",                                                                       "STENCIL_BITS has minimum value of 0",                                                                          GL_STENCIL_BITS,                                                                        0,      true    },
        };
        const LimitedStateInteger implementationMaxLimits[] =
        {
-               { "min_program_texel_offset",                                           "MIN_PROGRAM_TEXEL_OFFSET has maximum value of -8",                                                     GL_MIN_PROGRAM_TEXEL_OFFSET,                                            -8      },
-               { "uniform_buffer_offset_alignment",                            "UNIFORM_BUFFER_OFFSET_ALIGNMENT has minimum value of 1",                                       GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT,                                     256     },
+               { "min_program_texel_offset",                                           "MIN_PROGRAM_TEXEL_OFFSET has maximum value of -8",                                                     GL_MIN_PROGRAM_TEXEL_OFFSET,                                            -8      ,       false   },
+               { "uniform_buffer_offset_alignment",                            "UNIFORM_BUFFER_OFFSET_ALIGNMENT has minimum value of 1",                                       GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT,                                     256     ,       false   },
        };
 
        // \note implementation defined limits have their own tests so just check the conversions to boolean, int64 and float
        StateVerifier* implementationLimitVerifiers[] = {m_verifierBoolean, m_verifierInteger64, m_verifierFloat};
 
+       const bool isGlCore45 = glu::contextSupports(m_context.getRenderContext().getType(), glu::ApiType::core(4, 5));
        for (int testNdx = 0; testNdx < DE_LENGTH_OF_ARRAY(implementationMinLimits); testNdx++)
+       {
+               if (implementationMinLimits[testNdx].skipForGl && isGlCore45)
+                       continue;
                FOR_EACH_VERIFIER(implementationLimitVerifiers, addChild(new ConstantMinimumValueTestCase(m_context, verifier, (std::string(implementationMinLimits[testNdx].name) + verifier->getTestNamePostfix()).c_str(), implementationMinLimits[testNdx].description, implementationMinLimits[testNdx].targetName, implementationMinLimits[testNdx].value)));
+       }
        for (int testNdx = 0; testNdx < DE_LENGTH_OF_ARRAY(implementationMaxLimits); testNdx++)
                FOR_EACH_VERIFIER(implementationLimitVerifiers, addChild(new ConstantMaximumValueTestCase(m_context, verifier, (std::string(implementationMaxLimits[testNdx].name) + verifier->getTestNamePostfix()).c_str(), implementationMaxLimits[testNdx].description, implementationMaxLimits[testNdx].targetName, implementationMaxLimits[testNdx].value)));
 
@@ -2846,7 +2856,8 @@ void IntegerStateQueryTests::init (void)
        FOR_EACH_VERIFIER(implementationLimitVerifiers, addChild(new SampleBuffersTestCase              (m_context,      verifier, (std::string("sample_buffers")                                               + verifier->getTestNamePostfix()).c_str(),              "SAMPLE_BUFFERS")));
 
        FOR_EACH_VERIFIER(normalVerifiers, addChild(new SamplesTestCase                         (m_context,      verifier, (std::string("samples")                                                              + verifier->getTestNamePostfix()).c_str(),              "SAMPLES")));
-       FOR_EACH_VERIFIER(normalVerifiers, addChild(new HintTestCase                            (m_context,      verifier, (std::string("generate_mipmap_hint")                                 + verifier->getTestNamePostfix()).c_str(),              "GENERATE_MIPMAP_HINT",                         GL_GENERATE_MIPMAP_HINT)));
+       if (!isGlCore45)
+               FOR_EACH_VERIFIER(normalVerifiers, addChild(new HintTestCase                            (m_context,      verifier, (std::string("generate_mipmap_hint")                                 + verifier->getTestNamePostfix()).c_str(),              "GENERATE_MIPMAP_HINT",                         GL_GENERATE_MIPMAP_HINT)));
        FOR_EACH_VERIFIER(normalVerifiers, addChild(new HintTestCase                            (m_context,      verifier, (std::string("fragment_shader_derivative_hint")              + verifier->getTestNamePostfix()).c_str(),              "FRAGMENT_SHADER_DERIVATIVE_HINT",      GL_FRAGMENT_SHADER_DERIVATIVE_HINT)));
        FOR_EACH_VERIFIER(normalVerifiers, addChild(new DepthFuncTestCase                       (m_context,      verifier, (std::string("depth_func")                                                   + verifier->getTestNamePostfix()).c_str(),              "DEPTH_FUNC")));
        FOR_EACH_VERIFIER(normalVerifiers, addChild(new CullFaceTestCase                        (m_context,      verifier, (std::string("cull_face_mode")                                               + verifier->getTestNamePostfix()).c_str(),              "CULL_FACE_MODE")));
index 69530f9..4387edb 100644 (file)
@@ -174,7 +174,11 @@ public:
                glBindRenderbuffer(GL_RENDERBUFFER, renderbufferID);
                expectError(GL_NO_ERROR);
 
-               checkRenderbufferParam(m_testCtx, *this, GL_RENDERBUFFER_INTERNAL_FORMAT, GL_RGBA4);
+               const glu::ContextType& contextType = m_context.getRenderContext().getType();
+               const bool isCoreGL45 = glu::contextSupports(contextType, glu::ApiType::core(4, 5));
+
+               GLenum initialValue = isCoreGL45 ? GL_RGBA : GL_RGBA4;
+               checkRenderbufferParam(m_testCtx, *this, GL_RENDERBUFFER_INTERNAL_FORMAT, initialValue);
                expectError(GL_NO_ERROR);
 
                const GLenum requiredColorformats[] =
index 90aa7a7..612ae91 100644 (file)
@@ -2189,7 +2189,11 @@ public:
                        { 1, GL_INT,            0,      GL_FALSE, vertexData },
                };
 
+               const glu::ContextType& contextType = m_context.getRenderContext().getType();
+               const bool isCoreGL45 = glu::contextSupports(contextType, glu::ApiType::core(4, 5));
+
                // Test with default VAO
+               if (!isCoreGL45)
                {
                        const tcu::ScopedLogSection section(m_log, "DefaultVAO", "Test with default VAO");
 
@@ -2254,7 +2258,11 @@ public:
 
        void test (void)
        {
+               const glu::ContextType& contextType = m_context.getRenderContext().getType();
+               const bool isCoreGL45 = glu::contextSupports(contextType, glu::ApiType::core(4, 5));
+
                // Test with default VAO
+               if (!isCoreGL45)
                {
                        const tcu::ScopedLogSection section(m_log, "DefaultVAO", "Test with default VAO");
 
@@ -2360,7 +2368,11 @@ public:
 
        void test (void)
        {
+               const glu::ContextType& contextType = m_context.getRenderContext().getType();
+               const bool isCoreGL45 = glu::contextSupports(contextType, glu::ApiType::core(4, 5));
+
                // Test with default VAO
+               if (!isCoreGL45)
                {
                        const tcu::ScopedLogSection section(m_log, "DefaultVAO", "Test with default VAO");
 
@@ -2475,7 +2487,11 @@ public:
 
        void test (void)
        {
+               const glu::ContextType& contextType = m_context.getRenderContext().getType();
+               const bool isCoreGL45 = glu::contextSupports(contextType, glu::ApiType::core(4, 5));
+
                // Test with default VAO
+               if (!isCoreGL45)
                {
                        const tcu::ScopedLogSection section(m_log, "DefaultVAO", "Test with default VAO");
 
@@ -2586,7 +2602,11 @@ public:
 
        void test (void)
        {
+               const glu::ContextType& contextType = m_context.getRenderContext().getType();
+               const bool isCoreGL45 = glu::contextSupports(contextType, glu::ApiType::core(4, 5));
+
                // Test with default VAO
+               if (!isCoreGL45)
                {
                        const tcu::ScopedLogSection section(m_log, "DefaultVAO", "Test with default VAO");
 
@@ -2694,7 +2714,11 @@ public:
        {
                // VERTEX_ATTRIB_ARRAY_ENABLED
 
+               const glu::ContextType& contextType = m_context.getRenderContext().getType();
+               const bool isCoreGL45 = glu::contextSupports(contextType, glu::ApiType::core(4, 5));
+
                // Test with default VAO
+               if (!isCoreGL45)
                {
                        const tcu::ScopedLogSection section(m_log, "DefaultVAO", "Test with default VAO");
 
@@ -2749,7 +2773,11 @@ public:
 
        void test (void)
        {
+               const glu::ContextType& contextType = m_context.getRenderContext().getType();
+               const bool isCoreGL45 = glu::contextSupports(contextType, glu::ApiType::core(4, 5));
+
                // Test with default VAO
+               if (!isCoreGL45)
                {
                        const tcu::ScopedLogSection section(m_log, "DefaultVAO", "Test with default VAO");
 
@@ -2804,7 +2832,11 @@ public:
 
        void test (void)
        {
+               const glu::ContextType& contextType = m_context.getRenderContext().getType();
+               const bool isCoreGL45 = glu::contextSupports(contextType, glu::ApiType::core(4, 5));
+
                // Test with default VAO
+               if (!isCoreGL45)
                {
                        const tcu::ScopedLogSection section(m_log, "DefaultVAO", "Test with default VAO");
 
@@ -2876,7 +2908,11 @@ public:
 
        void test (void)
        {
+               const glu::ContextType& contextType = m_context.getRenderContext().getType();
+               const bool isCoreGL45 = glu::contextSupports(contextType, glu::ApiType::core(4, 5));
+
                // Test with default VAO
+               if (!isCoreGL45)
                {
                        const tcu::ScopedLogSection section(m_log, "DefaultVAO", "Test with default VAO");
 
index 7bc99d6..b55e4a4 100644 (file)
@@ -1188,10 +1188,29 @@ TextureFilterCase::TextureFilterCase (tcu::TestContext& testCtx, const glu::Rend
 void TextureFilterCase::test (glu::CallLogWrapper& gl, tcu::ResultCollector& result) const
 {
        const bool                      isPureCase      = isPureIntTester(m_tester) || isPureUintTester(m_tester);
-       const glw::GLenum       initial         = (m_pname == GL_TEXTURE_MAG_FILTER) ? (GL_LINEAR)
+       glw::GLenum     initial         = (m_pname == GL_TEXTURE_MAG_FILTER) ? (GL_LINEAR)
                                                                        : (m_pname == GL_TEXTURE_MIN_FILTER) ? (GL_NEAREST_MIPMAP_LINEAR)
                                                                        : (0);
 
+       const glu::ContextType& contextType = m_renderCtx.getType();
+       const bool isCoreGL45 = glu::contextSupports(contextType, glu::ApiType::core(4, 5));
+
+       /* Update initial values to match desktop context. */
+       if (isCoreGL45)
+       {
+               GLenum initialMin = (m_target == GL_TEXTURE_CUBE_MAP_ARRAY) ?
+                       GL_NEAREST_MIPMAP_LINEAR : GL_LINEAR_MIPMAP_NEAREST;
+
+               if (m_pname == GL_TEXTURE_MIN_FILTER)
+               {
+                       initial = initialMin;
+               }
+               else if (m_pname == GL_TEXTURE_MAG_FILTER)
+               {
+                       initial = GL_LINEAR;
+               }
+       }
+
        if (!isPureCase)
        {
                const tcu::ScopedLogSection section(m_testCtx.getLog(), "Initial", "Initial");