On Sun, Mar 15, 2015 at 8:41 PM, Ilia Mirkin <[email protected]> wrote:
> Avoid unnecessary failures on drivers not supporting float depth
> buffers.
>
> Signed-off-by: Ilia Mirkin <[email protected]>
> ---
>  tests/texturing/texsubimage-depth-formats.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/tests/texturing/texsubimage-depth-formats.c 
> b/tests/texturing/texsubimage-depth-formats.c
> index b6d9416..2d35e63 100644
> --- a/tests/texturing/texsubimage-depth-formats.c
> +++ b/tests/texturing/texsubimage-depth-formats.c
> @@ -55,8 +55,8 @@ struct format_info {
>  };
>  static const struct format_info formats[] = {
>         { GL_DEPTH_COMPONENT16,  GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT,       
>           sizeof(short) },
> -       { GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT, GL_FLOAT,                
>           sizeof(float) },
>         { GL_DEPTH24_STENCIL8,   GL_DEPTH_STENCIL,   GL_UNSIGNED_INT_24_8,    
>           sizeof(int) },
> +       { GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT, GL_FLOAT,                
>           sizeof(float) },
>         { GL_DEPTH32F_STENCIL8,  GL_DEPTH_STENCIL,   
> GL_FLOAT_32_UNSIGNED_INT_24_8_REV, sizeof(int) + sizeof(float) }
>  };
>
> @@ -166,6 +166,9 @@ piglit_display(void)
>         glGenTextures(ARRAY_SIZE(formats), tex);
>
>         for (i = 0; i < ARRAY_SIZE(formats); i++) {
> +               if 
> (!piglit_is_extension_supported("GL_ARB_depth_buffer_float") &&

Glenn mentioned that this should also be

piglit_get_gl_version() < 30 &&

since all of this is implicitly in GL 3.0. I've added it locally.

> +                   i >= 2)
> +                       continue;
>                 for (j = 0; j < ARRAY_SIZE(tex_size); j++) {
>                         result = true;
>                         load_texture(i, j);
> --
> 2.0.5
>
_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to