summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2018-02-28 02:57:21 +0000
committerDave Airlie <airlied@redhat.com>2018-08-27 07:28:47 +0100
commit693f0fdbe8db3e9ab3fb3ee44b3dd527fefa778e (patch)
tree9c33a1c3408e342da47d7ba54eee0707d9bf1159
parent698b4927caedf5703d1fce9bd182ebacff4b47e7 (diff)
shader_image: fix max images if fragment shader has limited outputs.zink-wip
This drops one from the max images as the fragment shader needs one output for outputing the results Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--tests/spec/arb_shader_image_load_store/image.c5
1 files changed, 4 insertions, 1 deletions
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: