[Piglit] [PATCH 1/9] shader_runner: Support testing GL_NUM_PROGRAM_BINARY_FORMATS
Jordan Justen
jordan.l.justen at intel.com
Sun Jun 10 06:06:09 UTC 2018
On 2018-06-09 21:56:33, Timothy Arceri wrote:
> Small nit with patch 2. Patch 8 seems obsolete with patch 6 I'm a
> missing something?
They are close. Patch 6 tests that the uniform is reset by examining
the result of drawing. Patch 8 tests by reading the uniform value via
the GL API.
I guess there is a small chance that restoring the program might
somehow cause a different result in the program state vs the GL API
state.
I wrote 6 and 8 last fall, and I can't remember if I saw an actual bug
that made me write the test in patch 8.
-Jordan
> Otherwise, this series looks great thanks for working on it :)
>
> Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
>
> On 09/06/18 15:47, Jordan Justen wrote:
> > Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> > ---
> > tests/shaders/shader_runner.c | 16 ++++++++++++++++
> > 1 file changed, 16 insertions(+)
> >
> > diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
> > index 794524e8f..c4e25a33d 100644
> > --- a/tests/shaders/shader_runner.c
> > +++ b/tests/shaders/shader_runner.c
> > @@ -98,6 +98,7 @@ 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;
> > +static int gl_num_program_binary_formats = 0;
> >
> > static const char *test_start = NULL;
> > static unsigned test_start_line_num = 0;
> > @@ -768,6 +769,11 @@ process_requirement(const char *line)
> > &gl_max_varying_components,
> > "varying components",
> > },
> > + {
> > + "GL_NUM_PROGRAM_BINARY_FORMATS",
> > + &gl_num_program_binary_formats,
> > + "num program binary formats",
> > + },
> > };
> > unsigned i;
> >
> > @@ -4090,6 +4096,16 @@ piglit_init(int argc, char **argv)
> > read_width = render_width = piglit_width;
> > read_height = render_height = piglit_height;
> >
> > +#ifdef PIGLIT_USE_OPENGL
> > + if (piglit_is_extension_supported("GL_ARB_get_program_binary"))
> > + glGetIntegerv(GL_NUM_PROGRAM_BINARY_FORMATS,
> > + &gl_num_program_binary_formats);
> > +#else
> > + if (piglit_is_extension_supported("GL_OES_get_program_binary"))
> > + glGetIntegerv(GL_NUM_PROGRAM_BINARY_FORMATS_OES,
> > + &gl_num_program_binary_formats);
> > +#endif
> > +
> > /* Automatic mode can run multiple tests per session. */
> > if (report_subtests) {
> > char testname[4096], *ext;
> >
More information about the Piglit
mailing list