[Piglit] [PATCH] shader_image: fix max images if fragment shader has limited outputs.
Francisco Jerez
currojerez at riseup.net
Wed Feb 28 18:08:34 UTC 2018
Dave Airlie <airlied at gmail.com> writes:
> 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--;
I don't think this is guaranteed to fix the problem where there is one.
GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES imposes a limit on the number of
active image units in the whole pipeline, and you can reach it whether
GL_MAX_FRAGMENT_IMAGE_UNIFORMS is equal, lower or greater than
GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES. You probably need to fix the
test case instead to require a lower number of image units.
> break;
>
> case GL_VERTEX_SHADER:
> --
> 2.14.3
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20180228/65e6f2f9/attachment.sig>
More information about the Piglit
mailing list