[Piglit] [PATCH 15/21] arb_internalformat_query2: add generic check for GET_TEXTURE_IMAGE_TYPE

Alejandro PiƱeiro apinheiro at igalia.com
Fri Jan 22 08:06:02 PST 2016


>From spec:
 "GET_TEXTURE_IMAGE_TYPE:
  <skip>

  Possible values include any value that is legal to pass for the
  <type> parameter to GetTexImage, or NONE if the resource does not
  support this operation, or if GetTexImage is not supported."

Tested on NVIDIA GeForce GTX 950 - NVIDIA 352.55: pass.
---
 .../arb_internalformat_query2/generic-pname-checks.c  | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/tests/spec/arb_internalformat_query2/generic-pname-checks.c b/tests/spec/arb_internalformat_query2/generic-pname-checks.c
index 53f577f..cfa1eb3 100644
--- a/tests/spec/arb_internalformat_query2/generic-pname-checks.c
+++ b/tests/spec/arb_internalformat_query2/generic-pname-checks.c
@@ -397,5 +397,24 @@ piglit_init(int argc, char **argv)
                         && pass;
         }
 
+        /*
+         * From spec:
+         * "GET_TEXTURE_IMAGE_TYPE:
+         *  <skip>
+         *  Possible values include any value that is legal to pass
+         *  for the <type> parameter to GetTexImage, or NONE if the
+         *  resource does not support this operation, or if
+         *  GetTexImage is not supported."
+         *
+         * From 4.2 spec (section 6.1.4) this is table 3.2, that are
+         * also the possible values for TEXTURE_IMAGE_TYPE, so we
+         * reuse that list here.
+         *
+         **/
+        pname = GL_GET_TEXTURE_IMAGE_TYPE;
+        pass = check_basic(&pname, 1, possible_values_texture_image_type,
+                           ARRAY_SIZE(possible_values_texture_image_type))
+                && pass;
+
         piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL);
 }
-- 
2.1.4



More information about the Piglit mailing list