[Piglit] [PATCH 3/4] arb_shader_image_load_store/image: Reserve image unit and combined uniform for the grid framework.
Francisco Jerez
currojerez at riseup.net
Sun Feb 14 03:36:40 UTC 2016
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
More information about the Piglit
mailing list