[Piglit] [PATCH 1/9] shader_runner: Support testing GL_NUM_PROGRAM_BINARY_FORMATS

Timothy Arceri tarceri at itsqueeze.com
Sun Jun 10 04:56:33 UTC 2018


Small nit with patch 2. Patch 8 seems obsolete with patch 6 I'm a 
missing something?

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