[Piglit] [PATCH] glsl-1.30: Test interpolation qualifiers on built-in variables
Ian Romanick
idr at freedesktop.org
Thu Sep 5 10:42:09 PDT 2013
On 09/03/2013 08:28 AM, Paul Berry wrote:
> On 29 August 2013 09:05, Ian Romanick <idr at freedesktop.org
> <mailto:idr at freedesktop.org>> wrote:
>
> From: Ian Romanick <ian.d.romanick at intel.com
> <mailto:ian.d.romanick at intel.com>>
[snip]
> +interpolation_modes = {
> + 'flat',
> + 'noperspective',
> + 'smooth',
> + 'default'
> +}
>
>
> This uses Python's "set literal" syntax, which was introduced in Python
> 2.7. Piglit only requires 2.6, so I think we should change this to a list:
>
> interpolation_modes = [
> 'flat',
> 'noperspective',
> 'smooth',
> 'default'
> ]
>
> Same with vertex_shader_variables and vertex_shader_variables_front_only.
>
> All of my other comments (below) are minor, so with this fixed, the
> patch is:
>
> Reviewed-by: Paul Berry <stereotype441 at gmail.com
> <mailto:stereotype441 at gmail.com>>
>
>
> +
> +vertex_shader_variables = {
> + 'gl_FrontColor',
> + 'gl_BackColor',
> + 'gl_FrontSecondaryColor',
> + 'gl_BackSecondaryColor'
> +}
> +
> +vertex_shader_variables_front_only = {
> + 'gl_FrontColor',
> + 'gl_FrontSecondaryColor',
> +}
> +
> +vertex_shader_variables_other_side = {
> + 'gl_FrontColor': 'gl_BackColor',
> + 'gl_BackColor': 'gl_FrontColor',
> + 'gl_FrontSecondaryColor': 'gl_BackSecondaryColor',
> + 'gl_BackSecondaryColor': 'gl_FrontSecondaryColor'
> +}
> +
> +fragment_shader_variables = {
> + 'gl_FrontColor': 'gl_Color',
> + 'gl_BackColor': 'gl_Color',
> + 'gl_FrontSecondaryColor': 'gl_SecondaryColor',
> + 'gl_BackSecondaryColor': 'gl_SecondaryColor'
> +}
>
>
> Minor quibble: vertex_shader_variables_other_side and
> fragment_shader_variables sound like names of lists, when they're in
> fact mappings from one variable name to another. Maybe rename to
> something like "other_side_map" and "vs_to_fs_map"?
Should I still use the { } syntax here? Does that work in Python 2.6?
More information about the Piglit
mailing list