[Piglit] [PATCH v2 1/2] shader_runner: make active_uniforms's all_types variable be global
Ian Romanick
idr at freedesktop.org
Wed Sep 23 12:20:53 PDT 2015
Series is
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
On 09/23/2015 02:28 AM, Samuel Iglesias Gonsalvez wrote:
> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
> ---
> tests/shaders/shader_runner.c | 156 +++++++++++++++++++++---------------------
> 1 file changed, 78 insertions(+), 78 deletions(-)
>
> diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
> index 0614c7f..7a647a1 100644
> --- a/tests/shaders/shader_runner.c
> +++ b/tests/shaders/shader_runner.c
> @@ -158,6 +158,84 @@ enum comparison {
> less_equal
> };
>
> +static const struct string_to_enum all_types[] = {
> + ENUM_STRING(GL_FLOAT),
> + ENUM_STRING(GL_FLOAT_VEC2),
> + ENUM_STRING(GL_FLOAT_VEC3),
> + ENUM_STRING(GL_FLOAT_VEC4),
> + ENUM_STRING(GL_DOUBLE),
> + ENUM_STRING(GL_DOUBLE_VEC2),
> + ENUM_STRING(GL_DOUBLE_VEC3),
> + ENUM_STRING(GL_DOUBLE_VEC4),
> + ENUM_STRING(GL_INT),
> + ENUM_STRING(GL_INT_VEC2),
> + ENUM_STRING(GL_INT_VEC3),
> + ENUM_STRING(GL_INT_VEC4),
> + ENUM_STRING(GL_UNSIGNED_INT),
> + ENUM_STRING(GL_UNSIGNED_INT_VEC2),
> + ENUM_STRING(GL_UNSIGNED_INT_VEC3),
> + ENUM_STRING(GL_UNSIGNED_INT_VEC4),
> + ENUM_STRING(GL_BOOL),
> + ENUM_STRING(GL_BOOL_VEC2),
> + ENUM_STRING(GL_BOOL_VEC3),
> + ENUM_STRING(GL_BOOL_VEC4),
> + ENUM_STRING(GL_FLOAT_MAT2),
> + ENUM_STRING(GL_FLOAT_MAT3),
> + ENUM_STRING(GL_FLOAT_MAT4),
> + ENUM_STRING(GL_FLOAT_MAT2x3),
> + ENUM_STRING(GL_FLOAT_MAT2x4),
> + ENUM_STRING(GL_FLOAT_MAT3x2),
> + ENUM_STRING(GL_FLOAT_MAT3x4),
> + ENUM_STRING(GL_FLOAT_MAT4x2),
> + ENUM_STRING(GL_FLOAT_MAT4x3),
> + ENUM_STRING(GL_DOUBLE_MAT2),
> + ENUM_STRING(GL_DOUBLE_MAT3),
> + ENUM_STRING(GL_DOUBLE_MAT4),
> + ENUM_STRING(GL_DOUBLE_MAT2x3),
> + ENUM_STRING(GL_DOUBLE_MAT2x4),
> + ENUM_STRING(GL_DOUBLE_MAT3x2),
> + ENUM_STRING(GL_DOUBLE_MAT3x4),
> + ENUM_STRING(GL_DOUBLE_MAT4x2),
> + ENUM_STRING(GL_DOUBLE_MAT4x3),
> + ENUM_STRING(GL_SAMPLER_1D),
> + ENUM_STRING(GL_SAMPLER_2D),
> + ENUM_STRING(GL_SAMPLER_3D),
> + ENUM_STRING(GL_SAMPLER_CUBE),
> + ENUM_STRING(GL_SAMPLER_1D_SHADOW),
> + ENUM_STRING(GL_SAMPLER_2D_SHADOW),
> + ENUM_STRING(GL_SAMPLER_1D_ARRAY),
> + ENUM_STRING(GL_SAMPLER_2D_ARRAY),
> + ENUM_STRING(GL_SAMPLER_1D_ARRAY_SHADOW),
> + ENUM_STRING(GL_SAMPLER_2D_ARRAY_SHADOW),
> + ENUM_STRING(GL_SAMPLER_2D_MULTISAMPLE),
> + ENUM_STRING(GL_SAMPLER_2D_MULTISAMPLE_ARRAY),
> + ENUM_STRING(GL_SAMPLER_CUBE_SHADOW),
> + ENUM_STRING(GL_SAMPLER_BUFFER),
> + ENUM_STRING(GL_SAMPLER_2D_RECT),
> + ENUM_STRING(GL_SAMPLER_2D_RECT_SHADOW),
> + ENUM_STRING(GL_INT_SAMPLER_1D),
> + ENUM_STRING(GL_INT_SAMPLER_2D),
> + ENUM_STRING(GL_INT_SAMPLER_3D),
> + ENUM_STRING(GL_INT_SAMPLER_CUBE),
> + ENUM_STRING(GL_INT_SAMPLER_1D_ARRAY),
> + ENUM_STRING(GL_INT_SAMPLER_2D_ARRAY),
> + ENUM_STRING(GL_INT_SAMPLER_2D_MULTISAMPLE),
> + ENUM_STRING(GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY),
> + ENUM_STRING(GL_INT_SAMPLER_BUFFER),
> + ENUM_STRING(GL_INT_SAMPLER_2D_RECT),
> + ENUM_STRING(GL_UNSIGNED_INT_SAMPLER_1D),
> + ENUM_STRING(GL_UNSIGNED_INT_SAMPLER_2D),
> + ENUM_STRING(GL_UNSIGNED_INT_SAMPLER_3D),
> + ENUM_STRING(GL_UNSIGNED_INT_SAMPLER_CUBE),
> + ENUM_STRING(GL_UNSIGNED_INT_SAMPLER_1D_ARRAY),
> + ENUM_STRING(GL_UNSIGNED_INT_SAMPLER_2D_ARRAY),
> + ENUM_STRING(GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE),
> + ENUM_STRING(GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY),
> + ENUM_STRING(GL_UNSIGNED_INT_SAMPLER_BUFFER),
> + ENUM_STRING(GL_UNSIGNED_INT_SAMPLER_2D_RECT),
> + { NULL, 0 }
> +};
> +
> GLenum
> lookup_enum_string(const struct string_to_enum *table, const char **line,
> const char *error_desc)
> @@ -1860,84 +1938,6 @@ active_uniform(const char *line)
> { NULL, 0 }
> };
>
> - static const struct string_to_enum all_types[] = {
> - ENUM_STRING(GL_FLOAT),
> - ENUM_STRING(GL_FLOAT_VEC2),
> - ENUM_STRING(GL_FLOAT_VEC3),
> - ENUM_STRING(GL_FLOAT_VEC4),
> - ENUM_STRING(GL_DOUBLE),
> - ENUM_STRING(GL_DOUBLE_VEC2),
> - ENUM_STRING(GL_DOUBLE_VEC3),
> - ENUM_STRING(GL_DOUBLE_VEC4),
> - ENUM_STRING(GL_INT),
> - ENUM_STRING(GL_INT_VEC2),
> - ENUM_STRING(GL_INT_VEC3),
> - ENUM_STRING(GL_INT_VEC4),
> - ENUM_STRING(GL_UNSIGNED_INT),
> - ENUM_STRING(GL_UNSIGNED_INT_VEC2),
> - ENUM_STRING(GL_UNSIGNED_INT_VEC3),
> - ENUM_STRING(GL_UNSIGNED_INT_VEC4),
> - ENUM_STRING(GL_BOOL),
> - ENUM_STRING(GL_BOOL_VEC2),
> - ENUM_STRING(GL_BOOL_VEC3),
> - ENUM_STRING(GL_BOOL_VEC4),
> - ENUM_STRING(GL_FLOAT_MAT2),
> - ENUM_STRING(GL_FLOAT_MAT3),
> - ENUM_STRING(GL_FLOAT_MAT4),
> - ENUM_STRING(GL_FLOAT_MAT2x3),
> - ENUM_STRING(GL_FLOAT_MAT2x4),
> - ENUM_STRING(GL_FLOAT_MAT3x2),
> - ENUM_STRING(GL_FLOAT_MAT3x4),
> - ENUM_STRING(GL_FLOAT_MAT4x2),
> - ENUM_STRING(GL_FLOAT_MAT4x3),
> - ENUM_STRING(GL_DOUBLE_MAT2),
> - ENUM_STRING(GL_DOUBLE_MAT3),
> - ENUM_STRING(GL_DOUBLE_MAT4),
> - ENUM_STRING(GL_DOUBLE_MAT2x3),
> - ENUM_STRING(GL_DOUBLE_MAT2x4),
> - ENUM_STRING(GL_DOUBLE_MAT3x2),
> - ENUM_STRING(GL_DOUBLE_MAT3x4),
> - ENUM_STRING(GL_DOUBLE_MAT4x2),
> - ENUM_STRING(GL_DOUBLE_MAT4x3),
> - ENUM_STRING(GL_SAMPLER_1D),
> - ENUM_STRING(GL_SAMPLER_2D),
> - ENUM_STRING(GL_SAMPLER_3D),
> - ENUM_STRING(GL_SAMPLER_CUBE),
> - ENUM_STRING(GL_SAMPLER_1D_SHADOW),
> - ENUM_STRING(GL_SAMPLER_2D_SHADOW),
> - ENUM_STRING(GL_SAMPLER_1D_ARRAY),
> - ENUM_STRING(GL_SAMPLER_2D_ARRAY),
> - ENUM_STRING(GL_SAMPLER_1D_ARRAY_SHADOW),
> - ENUM_STRING(GL_SAMPLER_2D_ARRAY_SHADOW),
> - ENUM_STRING(GL_SAMPLER_2D_MULTISAMPLE),
> - ENUM_STRING(GL_SAMPLER_2D_MULTISAMPLE_ARRAY),
> - ENUM_STRING(GL_SAMPLER_CUBE_SHADOW),
> - ENUM_STRING(GL_SAMPLER_BUFFER),
> - ENUM_STRING(GL_SAMPLER_2D_RECT),
> - ENUM_STRING(GL_SAMPLER_2D_RECT_SHADOW),
> - ENUM_STRING(GL_INT_SAMPLER_1D),
> - ENUM_STRING(GL_INT_SAMPLER_2D),
> - ENUM_STRING(GL_INT_SAMPLER_3D),
> - ENUM_STRING(GL_INT_SAMPLER_CUBE),
> - ENUM_STRING(GL_INT_SAMPLER_1D_ARRAY),
> - ENUM_STRING(GL_INT_SAMPLER_2D_ARRAY),
> - ENUM_STRING(GL_INT_SAMPLER_2D_MULTISAMPLE),
> - ENUM_STRING(GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY),
> - ENUM_STRING(GL_INT_SAMPLER_BUFFER),
> - ENUM_STRING(GL_INT_SAMPLER_2D_RECT),
> - ENUM_STRING(GL_UNSIGNED_INT_SAMPLER_1D),
> - ENUM_STRING(GL_UNSIGNED_INT_SAMPLER_2D),
> - ENUM_STRING(GL_UNSIGNED_INT_SAMPLER_3D),
> - ENUM_STRING(GL_UNSIGNED_INT_SAMPLER_CUBE),
> - ENUM_STRING(GL_UNSIGNED_INT_SAMPLER_1D_ARRAY),
> - ENUM_STRING(GL_UNSIGNED_INT_SAMPLER_2D_ARRAY),
> - ENUM_STRING(GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE),
> - ENUM_STRING(GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY),
> - ENUM_STRING(GL_UNSIGNED_INT_SAMPLER_BUFFER),
> - ENUM_STRING(GL_UNSIGNED_INT_SAMPLER_2D_RECT),
> - { NULL, 0 }
> - };
> -
> char name[512];
> char name_buf[512];
> char pname_string[512];
>
More information about the Piglit
mailing list