[02/12] arb_internalformat_query2: add gles3 checks when checking for dependencies

Submitted by apinheiro on May 13, 2016, 3:26 p.m.

Details

Message ID 1463153173-12219-3-git-send-email-apinheiro@igalia.com
State New
Headers show
Series "ARB_internalformat_query2 support for OpenGL ES and other fixes" ( rev: 1 ) in Piglit

Not browsing as part of any series.

Commit Message

apinheiro May 13, 2016, 3:26 p.m.
Acked-by: Eduardo Lima <elima@igalia.com>
Acked-by: Antia Puentes <apuentes@igalia.com>
---
 tests/spec/arb_internalformat_query2/common.c | 29 ++++++++++++++++++++++-----
 1 file changed, 24 insertions(+), 5 deletions(-)

Patch hide | download patch | download mbox

diff --git a/tests/spec/arb_internalformat_query2/common.c b/tests/spec/arb_internalformat_query2/common.c
index 1d60abb..6d05368 100644
--- a/tests/spec/arb_internalformat_query2/common.c
+++ b/tests/spec/arb_internalformat_query2/common.c
@@ -664,6 +664,18 @@  check_query2_pname_dependencies(const GLenum pname)
         return true;
 }
 
+static bool
+is_gles3()
+{
+        return piglit_is_gles() && piglit_get_gl_version() >= 30;
+}
+
+static bool
+is_gles31()
+{
+        return piglit_is_gles() && piglit_get_gl_version() >= 31;
+}
+
 /*
  * Returns if @target query2 dependencies are fulfilled. So for
  * example, TEXTURE_1D_ARRAY needs
@@ -678,11 +690,16 @@  check_query2_target_dependencies(const GLenum target)
 {
         switch(target) {
         case GL_TEXTURE_1D_ARRAY:
-        case GL_TEXTURE_2D_ARRAY:
                 if (!piglit_is_extension_supported("GL_EXT_texture_array"))
                         return false;
                 break;
 
+        case GL_TEXTURE_2D_ARRAY:
+                if (!(piglit_is_extension_supported("GL_EXT_texture_array") ||
+                      is_gles3()))
+                        return false;
+                break;
+
         case GL_TEXTURE_CUBE_MAP_ARRAY:
                 if (!piglit_is_extension_supported("GL_ARB_texture_cube_map_array"))
                         return false;
@@ -690,7 +707,8 @@  check_query2_target_dependencies(const GLenum target)
 
         case GL_TEXTURE_2D_MULTISAMPLE:
         case GL_TEXTURE_2D_MULTISAMPLE_ARRAY:
-                if (!piglit_is_extension_supported("GL_ARB_texture_multisample"))
+                if (!(piglit_is_extension_supported("GL_ARB_texture_multisample") ||
+                      is_gles31()))
                         return false;
                 break;
 
@@ -700,9 +718,10 @@  check_query2_target_dependencies(const GLenum target)
                 break;
 
         case GL_RENDERBUFFER:
-                if (!piglit_is_extension_supported("GL_ARB_framebuffer_object") &&
-                    !piglit_is_extension_supported("GL_EXT_framebuffer_object"))
-                        return false;
+                if (!(piglit_is_extension_supported("GL_ARB_framebuffer_object") ||
+                      piglit_is_extension_supported("GL_EXT_framebuffer_object") ||
+                      is_gles3()))
+                    return false;
                 break;
 
         case GL_TEXTURE_BUFFER: