Analogous to 3957dd34102bf60cb738596e2a5551b6a4858c8f. Makes sure that image load/store tests don't accidentally use the image unit or uniform reserved for the framework to read back the result of the compute shader. --- tests/spec/arb_shader_image_load_store/image.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/spec/arb_shader_image_load_store/image.c b/tests/spec/arb_shader_image_load_store/image.c index 81c1e81..b65c0f6 100644 --- a/tests/spec/arb_shader_image_load_store/image.c +++ b/tests/spec/arb_shader_image_load_store/image.c @@ -712,7 +712,7 @@ max_combined_images(void) int n; glGetIntegerv(GL_MAX_COMBINED_IMAGE_UNIFORMS, &n); - return n; + return MAX2(0, n - num_reserved_images(~0)); } unsigned @@ -721,7 +721,7 @@ max_image_units(void) int n; glGetIntegerv(GL_MAX_IMAGE_UNITS, &n); - return n; + return MAX2(0, n - num_reserved_images(~0)); } unsigned -- 2.7.0 _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit