diff options
author | Lyude <lyude@redhat.com> | 2017-05-22 14:55:09 -0400 |
---|---|---|
committer | Ilia Mirkin <imirkin@alum.mit.edu> | 2017-07-19 20:41:23 -0400 |
commit | 779548372f0a0bab3a344d0470812faa4ae6d7cc (patch) | |
tree | 7b2608bbeb2c10d71272238c8ba73a601d16be13 | |
parent | 56e7e5583cd4a3ca15a8cda154d46d168959dd25 (diff) |
arb_post_depth_coverage: Don't try sample rates we don't support
Some intel hardware supports up to 16 samples, but nvidia only goes up
to 8. So stop these tests from failing on nvidia hardware by only
testing up to the max sample rate we can support.
Signed-off-by: Lyude <lyude@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
-rw-r--r-- | tests/spec/arb_post_depth_coverage/multisampling.c | 4 | ||||
-rw-r--r-- | tests/spec/arb_post_depth_coverage/sample-shading.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/tests/spec/arb_post_depth_coverage/multisampling.c b/tests/spec/arb_post_depth_coverage/multisampling.c index 0c867da7c..f90208d74 100644 --- a/tests/spec/arb_post_depth_coverage/multisampling.c +++ b/tests/spec/arb_post_depth_coverage/multisampling.c @@ -236,12 +236,14 @@ enum piglit_result piglit_display(void) { int samples[4] = { 2, 4, 8, 16 }; + int max_samples; bool pass = true; int i, j, k; glViewport(0, 0, piglit_width, piglit_height); + glGetIntegerv(GL_MAX_SAMPLES, &max_samples); - for (j = 0; j < 4; j++) { + for (j = 0; j < 4 && samples[j] <= max_samples; j++) { sample_mask = (GLint*) calloc (piglit_width * piglit_height, sizeof(GLint)); glBufferData(GL_SHADER_STORAGE_BUFFER, sizeof(GLint) * piglit_width * diff --git a/tests/spec/arb_post_depth_coverage/sample-shading.c b/tests/spec/arb_post_depth_coverage/sample-shading.c index 891e7bcfe..f865a7a8e 100644 --- a/tests/spec/arb_post_depth_coverage/sample-shading.c +++ b/tests/spec/arb_post_depth_coverage/sample-shading.c @@ -242,12 +242,14 @@ enum piglit_result piglit_display(void) { int samples[4] = { 2, 4, 8, 16 }; + int max_samples; bool pass = true; int i, j, k; glViewport(0, 0, piglit_width, piglit_height); + glGetIntegerv(GL_MAX_SAMPLES, &max_samples); - for (j = 0; j < 4; j++) { + for (j = 0; j < 4 && samples[j] <= max_samples; j++) { sample_mask = (GLint*) calloc (piglit_width * piglit_height, sizeof(GLint)); glBufferData(GL_SHADER_STORAGE_BUFFER, sizeof(GLint) * piglit_width * |