[Piglit] [PATCH] shader_runner: allow GL_MAX_VERTEX_ATTRIBS in requirements
Marek Olšák
maraeo at gmail.com
Tue Apr 26 09:00:40 UTC 2016
On Mon, Apr 25, 2016 at 4:03 PM, Andres Gomez <agomez at igalia.com> wrote:
> Signed-off-by: Andres Gomez <agomez at igalia.com>
> ---
> tests/shaders/shader_runner.c | 17 ++++++++++++++++-
> 1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
> index 239735c..2f6bec8 100644
> --- a/tests/shaders/shader_runner.c
> +++ b/tests/shaders/shader_runner.c
> @@ -89,6 +89,7 @@ static struct component_version glsl_req_version;
> static int gl_max_vertex_output_components;
> static int gl_max_fragment_uniform_components;
> static int gl_max_vertex_uniform_components;
> +static int gl_max_vertex_attribs;
> static int gl_max_varying_components;
> static int gl_max_clip_planes;
>
> @@ -724,6 +725,11 @@ process_requirement(const char *line)
> "vertex uniform components",
> },
> {
> + "GL_MAX_VERTEX_ATTRIBS",
> + &gl_max_vertex_attribs,
> + "vertex attribs",
> + },
> + {
> "GL_MAX_VARYING_COMPONENTS",
> &gl_max_varying_components,
> "varying components",
> @@ -3323,9 +3329,12 @@ piglit_init(int argc, char **argv)
> glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS,
> &gl_max_fragment_uniform_components);
> if (piglit_get_gl_version() >= 20 ||
> - piglit_is_extension_supported("GL_ARB_vertex_shader"))
> + piglit_is_extension_supported("GL_ARB_vertex_shader")) {
> glGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS,
> &gl_max_vertex_uniform_components);
> + glGetIntegerv(GL_MAX_VERTEX_ATTRIBS,
> + &gl_max_vertex_attribs);
> + }
> if (piglit_get_gl_version() >= 30 ||
> piglit_is_extension_supported("GL_ARB_geometry_shader4") ||
> piglit_is_extension_supported("GL_EXT_geometry_shader4"))
> @@ -3346,6 +3355,12 @@ piglit_init(int argc, char **argv)
> gl_max_vertex_uniform_components *= 4;
> gl_max_varying_components *= 4;
> gl_max_clip_planes = 0;
> +#if defined(PIGLIT_USE_OPENGL_ES3) || defined(PIGLIT_USE_OPENGL_ES2)
> + glGetIntegerv(GL_MAX_VERTEX_ATTRIBS,
> + &gl_max_vertex_attribs);
> +#else
> + gl_max_vertex_attribs = 16;
This seems to override the first query above. Is that intentional?
Marek
> +#endif
> #endif
> if (argc < 2) {
> printf("usage: shader_runner <test.shader_test>\n");
> --
> 2.8.0.rc3
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit
More information about the Piglit
mailing list