summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2018-01-27 01:58:18 +0100
committerRoland Scheidegger <sroland@vmware.com>2018-02-06 04:29:24 +0100
commit12bc99b7c0a1cd411b892815875a7cf26f56baf5 (patch)
treede57430f10cf3cb6c39d2006c76828cc8acf985f /tests
parent449ae8e43733c03cee8e7d30e1c3e34981721c8e (diff)
arb_internalformat_query2: don't try glGetTexLevelParameteriv() for tex buffers
I believe querying that information for GL_TEXTURE_BUFFFER via internal format query should return the correct values, but it's definitely impossible if just ARB_texture_buffer_object is supported but not GL 3.1. Hence just pretend it succeeded in this case. (Also see the corresponding mesa change.)
Diffstat (limited to 'tests')
-rw-r--r--tests/spec/arb_internalformat_query2/common.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/spec/arb_internalformat_query2/common.c b/tests/spec/arb_internalformat_query2/common.c
index ab8da4ecf..68f33a4a0 100644
--- a/tests/spec/arb_internalformat_query2/common.c
+++ b/tests/spec/arb_internalformat_query2/common.c
@@ -553,6 +553,18 @@ test_data_check_against_get_tex_level_parameter(test_data *data,
GLenum real_target = target;
GLenum pname_equiv = translate_pname(pname);
+ /*
+ * Special case for texture buffer - this is not valid as
+ * glGetTexLevelParameteriv target with just ARB_tbo, only with gl 3.1.
+ * However, I believe the query2 should still return the correct
+ * values, despite the spec saying
+ * "For textures this query will return the same information as
+ * querying GetTexLevelParameter{if}v for TEXTURE_*_SIZE would return."
+ */
+ if (target == GL_TEXTURE_BUFFER && piglit_get_gl_version() < 31) {
+ return GL_TRUE;
+ }
+
result = create_texture(target, internalformat, &tex, &buffer);
if (!result)
return test_data_is_unsupported_response(data, pname);