[Piglit] [PATCH] shader_image: fix max images if fragment shader has limited outputs.
Dave Airlie
airlied at gmail.com
Wed Feb 28 02:58:25 UTC 2018
From: Dave Airlie <airlied at redhat.com>
This drops one from the max images as the fragment shader needs
one output for outputing the results
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
tests/spec/arb_shader_image_load_store/image.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/spec/arb_shader_image_load_store/image.c b/tests/spec/arb_shader_image_load_store/image.c
index e664d3cc4..1bfaebfdb 100644
--- a/tests/spec/arb_shader_image_load_store/image.c
+++ b/tests/spec/arb_shader_image_load_store/image.c
@@ -670,11 +670,14 @@ num_reserved_images(GLbitfield stages)
unsigned
image_stage_max_images(const struct image_stage_info *stage)
{
- int n = 0;
+ int n = 0, n2 = 0;
switch (stage->stage) {
case GL_FRAGMENT_SHADER:
glGetIntegerv(GL_MAX_FRAGMENT_IMAGE_UNIFORMS, &n);
+ glGetIntegerv(GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES, &n2);
+ if (n == n2)
+ n--;
break;
case GL_VERTEX_SHADER:
--
2.14.3
More information about the Piglit
mailing list