[Piglit] [PATCH 2/3] arb_texture_storage_multisample: don't use fixed sample count

Brian Paul brianp at vmware.com
Tue Dec 5 16:43:36 UTC 2017


---
 tests/spec/arb_texture_storage_multisample/tex-param.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/spec/arb_texture_storage_multisample/tex-param.c b/tests/spec/arb_texture_storage_multisample/tex-param.c
index 8aa3df3..bc40ecc 100644
--- a/tests/spec/arb_texture_storage_multisample/tex-param.c
+++ b/tests/spec/arb_texture_storage_multisample/tex-param.c
@@ -149,11 +149,15 @@ piglit_display(void)
 	struct subtest *t;
 	enum piglit_result result = PIGLIT_PASS;
 	enum piglit_result subtest_result;
+	GLint num_samples;
+
+	/* Use the max number of samples for testing */
+	glGetIntegerv(GL_MAX_COLOR_TEXTURE_SAMPLES, &num_samples);
 
 	glGenTextures(1, &tex);
 	glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, tex);
 	glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE,
-				4, GL_RGBA, 64, 64, GL_TRUE);
+				num_samples, GL_RGBA, 64, 64, GL_TRUE);
 
 	for (t = subtests; t->param; t++) {
 		subtest_result = check_subtest(t);
-- 
1.9.1



More information about the Piglit mailing list