From: Dave Airlie <airl...@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 <airl...@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

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to