[Piglit] [PATCH] squash! arb_texture_multisample: stress test of very large textures

Brian Paul brianp at vmware.com
Sat Dec 23 21:30:36 UTC 2017


On 12/22/2017 05:05 PM, Fabian Bieler wrote:
> Only limit texture size to 512x512 in quick.py.
> ---
> If you squash this into your test it should only limit the texture size in the 'quick' profile.
>
> Two nitpicks:
>> +       config.khr_no_error_support = PIGLIT_NO_ERRORS;
> Isn't it possible for this test to generate GL errors during its attempts to create the largest possible texture?

Yes, I'll rm that.


>
>> +       while (width > 1 && height > 1) {
>> +               tex = create_texture_max_size(target, intFormat,
>> +                                             &width, &height, samples);
>> +
>> +               if (!tex) {
>> +                       printf("Failed to create MSAA texture\n");
>> +                       piglit_report_result(PIGLIT_FAIL);
>> +               }
>> +
>> +               fbo = create_fbo(tex, target);
>> +               if (!fbo) {
>> +                       /* texture creation worked, but FBO failed.
>> +                        * Try smaller texture.
>> +                        */
>> +                       glDeleteTextures(1, &tex);
>> +                       if (height >= width) {
>> +                               height /= 2;
>> +                       }
>> +                       else {
>> +                               width /= 2;
>> +                       }
>> +               }
>> +               else {
>> +                       break;
>> +               }
>> +       }
> In theory it's possible to exit this loop without an fbo. I have no idea if there are GL implementations that can't create float fbos, so this might be pathological.

I suppose that could fail if something's not working properly.  I'll 
check for fbo==0 and report PIGLIT_FAIL in that case.

>
> Reviewed-by: Fabian Bieler <fabianbieler at fastmail.fm>

Thanks!

I have some comment updates coming in v2 too.

-Brian

>
>   tests/all.py                                           | 18 +++++++-----------
>   tests/quick.py                                         | 17 +++++++++++++++++
>   .../spec/arb_texture_multisample/large-float-texture.c |  6 +++++-
>   3 files changed, 29 insertions(+), 12 deletions(-)
>
> diff --git a/tests/all.py b/tests/all.py
> index 330bd138e..7306e39e6 100644
> --- a/tests/all.py
> +++ b/tests/all.py
> @@ -1653,18 +1653,14 @@ with profile.test_list.group_manager(
>   # Group ARB_texture_multisample
>   with profile.test_list.group_manager(
>           PiglitGLTest, grouptools.join('spec', 'ARB_texture_multisample')) as g:
> -    # XXX limit texture size to 512x512.  The default (max supported size)
> -    # can be pretty slow.  Ideally, we should set --texsize in quick.py but
> -    # I haven't figured out how to make that work.
> -    size_arg = ['--texsize', '512']
> -    g(['arb_texture_multisample-large-float-texture'] + size_arg,
> -      run_concurrent=False)
> -    g(['arb_texture_multisample-large-float-texture', '--array'] + size_arg,
> -      run_concurrent=False)
> -    g(['arb_texture_multisample-large-float-texture', '--fp16'] + size_arg,
> -      run_concurrent=False)
> -    g(['arb_texture_multisample-large-float-texture', '--array', '--fp16'] + size_arg,
> +    g(['arb_texture_multisample-large-float-texture'], 'large-float-texture',
>         run_concurrent=False)
> +    g(['arb_texture_multisample-large-float-texture', '--array'],
> +      'large-float-texture-array', run_concurrent=False)
> +    g(['arb_texture_multisample-large-float-texture', '--fp16'],
> +      'large-float-texture-fp16', run_concurrent=False)
> +    g(['arb_texture_multisample-large-float-texture', '--array', '--fp16'],
> +      'large-float-texture-array-fp16', run_concurrent=False)
>       g(['arb_texture_multisample-minmax'])
>       g(['texelFetch', 'fs', 'sampler2DMS', '4', '1x71-501x71'])
>       g(['texelFetch', 'fs', 'sampler2DMS', '4', '1x130-501x130'])
> diff --git a/tests/quick.py b/tests/quick.py
> index 1a7d674d0..53774e4db 100644
> --- a/tests/quick.py
> +++ b/tests/quick.py
> @@ -68,6 +68,23 @@ with profile.test_list.group_manager(
>       with profile.test_list.allow_reassignment:
>           g(['ext_texture_env_combine-combine', '--quick'], 'texture-env-combine')
>
> +# Limit texture size to 512x512 for some texture_multisample tests.
> +# The default (max supported size) can be pretty slow.
> +with profile.test_list.group_manager(
> +        PiglitGLTest,
> +        grouptools.join('spec', 'ARB_texture_multisample')) as g:
> +    with profile.test_list.allow_reassignment:
> +        size_arg = ['--texsize', '512']
> +        g(['arb_texture_multisample-large-float-texture'] + size_arg,
> +          'large-float-texture', run_concurrent=False)
> +        g(['arb_texture_multisample-large-float-texture', '--array'] +
> +          size_arg, 'large-float-texture-array', run_concurrent=False)
> +        g(['arb_texture_multisample-large-float-texture', '--fp16'] +
> +          size_arg, 'large-float-texture-fp16', run_concurrent=False)
> +        g(['arb_texture_multisample-large-float-texture', '--array',
> +           '--fp16'] + size_arg,
> +          'large-float-texture-array-fp16', run_concurrent=False)
> +
>   # These take too long
>   profile.filters.append(lambda n, _: '-explosion' not in n)
>   profile.filters.append(FilterVsIn())
> diff --git a/tests/spec/arb_texture_multisample/large-float-texture.c b/tests/spec/arb_texture_multisample/large-float-texture.c
> index 7e2db1ac8..7f8baac4e 100644
> --- a/tests/spec/arb_texture_multisample/large-float-texture.c
> +++ b/tests/spec/arb_texture_multisample/large-float-texture.c
> @@ -637,7 +637,7 @@ piglit_init(int argc, char **argv)
>   		}
>   	}
>
> -	GLuint tex, fbo;
> +	GLuint tex, fbo = 0;
>
>   	if (width == -1 || height == -1) {
>   		width = height = maxSize;
> @@ -669,6 +669,10 @@ piglit_init(int argc, char **argv)
>   			break;
>   		}
>   	}
> +	if(!fbo) {
> +		printf("Failed to create FBO\n");
> +		piglit_report_result(PIGLIT_SKIP);
> +	}
>
>   	GLint64 mbytes = (GLint64) width * height * samples
>   		* texel_size(intFormat) / (1024 * 1024);
>



More information about the Piglit mailing list