arb_internalformat_query2: fix TBO testing (v3)

Submitted by Marek Olšák on Oct. 24, 2017, 9 a.m.

Details

Message ID 1508835639-30411-1-git-send-email-maraeo@gmail.com
State New
Headers show
Series "arb_internalformat_query2: fix TBO testing (v3)" ( rev: 1 ) in Piglit

Not browsing as part of any series.

Commit Message

Marek Olšák Oct. 24, 2017, 9 a.m.
From: Marek Olšák <marek.olsak@amd.com>

This was never tested and it uses functions that are illegal with TBOs,
like glGetTexParameteriv and glTexImage2DMultisample.

v2: enable GL_xxx_COMPONENTS testing
v3: enable all pname tests
---
 tests/spec/arb_internalformat_query2/common.h                         | 4 +++-
 .../spec/arb_internalformat_query2/image-format-compatibility-type.c  | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/tests/spec/arb_internalformat_query2/common.h b/tests/spec/arb_internalformat_query2/common.h
index df68581..0e5e11f 100644
--- a/tests/spec/arb_internalformat_query2/common.h
+++ b/tests/spec/arb_internalformat_query2/common.h
@@ -25,26 +25,28 @@ 
 
 static const GLenum valid_targets[] = {
         GL_TEXTURE_1D,
         GL_TEXTURE_1D_ARRAY,
         GL_TEXTURE_2D,
         GL_TEXTURE_2D_ARRAY,
         GL_TEXTURE_3D,
         GL_TEXTURE_CUBE_MAP,
         GL_TEXTURE_CUBE_MAP_ARRAY,
         GL_TEXTURE_RECTANGLE,
-        GL_TEXTURE_BUFFER,
         GL_RENDERBUFFER,
         GL_TEXTURE_2D_MULTISAMPLE,
         GL_TEXTURE_2D_MULTISAMPLE_ARRAY,
+	GL_TEXTURE_BUFFER,
 };
 
+#define NUM_TARGETS_EXCEPT_TBO (ARRAY_SIZE(valid_targets) - 1)
+
 static const GLenum invalid_targets[] = {
         GL_FRAMEBUFFER,
         GL_COLOR_ATTACHMENT0,
         GL_COLOR_ATTACHMENT1,
         GL_COLOR_ATTACHMENT2,
         GL_COLOR_ATTACHMENT3,
         GL_COLOR_ATTACHMENT4,
         GL_COLOR_ATTACHMENT5,
         GL_COLOR_ATTACHMENT6,
         GL_COLOR_ATTACHMENT7,
diff --git a/tests/spec/arb_internalformat_query2/image-format-compatibility-type.c b/tests/spec/arb_internalformat_query2/image-format-compatibility-type.c
index 28bf292..af46c60 100644
--- a/tests/spec/arb_internalformat_query2/image-format-compatibility-type.c
+++ b/tests/spec/arb_internalformat_query2/image-format-compatibility-type.c
@@ -138,21 +138,21 @@  try_local(const GLenum *targets, unsigned num_targets,
 static bool
 check_format_compatibility_type(void)
 {
         bool pass = true;
         test_data *data = test_data_new(0, 1);
         int testing64;
 
         for (testing64 = 0; testing64 <= 1; testing64++) {
                 test_data_set_testing64(data, testing64);
 
-                pass = try_local(valid_targets, ARRAY_SIZE(valid_targets),
+                pass = try_local(valid_targets, NUM_TARGETS_EXCEPT_TBO,
                                  valid_internalformats, ARRAY_SIZE(valid_internalformats),
                                  GL_IMAGE_FORMAT_COMPATIBILITY_TYPE,
                                  data)
                         && pass;
         }
 
         piglit_report_subtest_result(pass ? PIGLIT_PASS : PIGLIT_FAIL,
                                      "%s", piglit_get_gl_enum_name(GL_IMAGE_FORMAT_COMPATIBILITY_TYPE));
 
         test_data_clear(&data);