[Piglit] [PATCH 2/2] arb_internalformat_query2: don't try glGetTexLevelParameteriv() for tex buffers
sroland at vmware.com
sroland at vmware.com
Sat Jan 27 01:00:35 UTC 2018
From: Roland Scheidegger <sroland at vmware.com>
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.)
---
tests/spec/arb_internalformat_query2/common.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tests/spec/arb_internalformat_query2/common.c b/tests/spec/arb_internalformat_query2/common.c
index 5fc4c833b..f1757d041 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);
--
2.12.3
More information about the Piglit
mailing list