[Piglit] [RESEND RFC 03/25] gen_tes_input_tests.py: replace tabs with spaces

Vinson Lee vlee at freedesktop.org
Fri Oct 23 01:20:01 PDT 2015


On Wed, Oct 21, 2015 at 10:20 AM,  <baker.dylan.c at gmail.com> wrote:
> From: Dylan Baker <baker.dylan.c at gmail.com>
>
> This breaks python 3 compatibility
>
> Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
> ---
>  generated_tests/gen_tes_input_tests.py | 50 +++++++++++++++++-----------------
>  1 file changed, 25 insertions(+), 25 deletions(-)
>
> diff --git a/generated_tests/gen_tes_input_tests.py b/generated_tests/gen_tes_input_tests.py
> index cac1722..3bd1787 100644
> --- a/generated_tests/gen_tes_input_tests.py
> +++ b/generated_tests/gen_tes_input_tests.py
> @@ -214,7 +214,7 @@ GL_ARB_tessellation_shader
>  [vertex shader]
>  void main()
>  {{
> -       gl_Position = vec4(0);
> +        gl_Position = vec4(0);
>  }}
>
>  [tessellation control shader]
> @@ -222,12 +222,12 @@ void main()
>  layout(vertices = 3) out;
>
>  uniform struct S0 {{
> -       {self.var_type_full} v;
> +        {self.var_type_full} v;
>  }} reference[12];
>
>  #if {self.use_block}
>  {self.interface_prefix}out {self.interface_name} {{
> -       {self.var_type_full} {self.var_name};
> +        {self.var_type_full} {self.var_name};
>  }} {self.interface_tcs_instance}{self.interface_postfix};
>  #else
>  {self.interface_prefix}out {self.var_type_full} {self.var_name};
> @@ -235,10 +235,10 @@ uniform struct S0 {{
>
>  void main()
>  {{
> -       const int vertices_in = 3;
> -       {self.interface_tcs_instance}{self.tcs_var_ref} = reference[{self.tcs_reference_index}].v;
> -       gl_TessLevelOuter = float[4](1.0, 1.0, 1.0, 1.0);
> -       gl_TessLevelInner = float[2](1.0, 1.0);
> +        const int vertices_in = 3;
> +        {self.interface_tcs_instance}{self.tcs_var_ref} = reference[{self.tcs_reference_index}].v;
> +        gl_TessLevelOuter = float[4](1.0, 1.0, 1.0, 1.0);
> +        gl_TessLevelInner = float[2](1.0, 1.0);
>  }}
>
>  [tessellation evaluation shader]
> @@ -246,12 +246,12 @@ void main()
>  layout(quads) in;
>
>  uniform struct S0 {{
> -       {self.var_type_full} v;
> +        {self.var_type_full} v;
>  }} reference[12];
>
>  #if {self.use_block}
>  {self.interface_prefix}in {self.interface_name} {{
> -       {self.var_type_full} {self.var_name};
> +        {self.var_type_full} {self.var_name};
>  }} {self.interface_tes_instance}{self.interface_postfix};
>  #else
>  {self.interface_prefix}in {self.var_type_full} {self.var_name};
> @@ -261,21 +261,21 @@ out vec4 vert_color;
>
>  void main()
>  {{
> -       const int vertices_in = 3;
> -       const vec4 red = vec4(1, 0, 0, 1);
> -       const vec4 green = vec4(0, 1, 0, 1);
> -       vert_color = green;
> -       for (int i = 0; i < vertices_in; ++i)
> -               if ({self.interface_tes_instance}{self.tes_var_ref} != reference[{self.tes_reference_index}].v)
> -                       vert_color = red;
> -       vec2[3] position = vec2[3](
> -               vec2(float(gl_PrimitiveID / 2) - 1.0, float(gl_PrimitiveID % 2) - 1.0),
> -               vec2(float(gl_PrimitiveID / 2) - 0.0, float(gl_PrimitiveID % 2) - 1.0),
> -               vec2(float(gl_PrimitiveID / 2) - 1.0, float(gl_PrimitiveID % 2) - 0.0)
> -       );
> -       gl_Position = vec4(position[0]
> -                   + (position[1] - position[0]) * gl_TessCoord[0]
> -                   + (position[2] - position[0]) * gl_TessCoord[1], 0.0, 1.0);
> +        const int vertices_in = 3;
> +        const vec4 red = vec4(1, 0, 0, 1);
> +        const vec4 green = vec4(0, 1, 0, 1);
> +        vert_color = green;
> +        for (int i = 0; i < vertices_in; ++i)
> +                if ({self.interface_tes_instance}{self.tes_var_ref} != reference[{self.tes_reference_index}].v)
> +                        vert_color = red;
> +        vec2[3] position = vec2[3](
> +                vec2(float(gl_PrimitiveID / 2) - 1.0, float(gl_PrimitiveID % 2) - 1.0),
> +                vec2(float(gl_PrimitiveID / 2) - 0.0, float(gl_PrimitiveID % 2) - 1.0),
> +                vec2(float(gl_PrimitiveID / 2) - 1.0, float(gl_PrimitiveID % 2) - 0.0)
> +        );
> +        gl_Position = vec4(position[0]
> +                    + (position[1] - position[0]) * gl_TessCoord[0]
> +                    + (position[2] - position[0]) * gl_TessCoord[1], 0.0, 1.0);
>  }}
>
>  [fragment shader]
> @@ -286,7 +286,7 @@ out vec4 frag_color;
>
>  void main()
>  {{
> -       frag_color = vert_color;
> +        frag_color = vert_color;
>  }}
>
>  [test]
> --
> 2.6.1
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit

Reviewed-by: Vinson Lee <vlee at freedesktop.org>


More information about the Piglit mailing list