[Piglit] [PATCH] Fix invalid glShaderSource call in pipeline_stats_comp.
Mark Janes
mark.a.janes at intel.com
Wed Feb 10 16:51:15 UTC 2016
Reviewed-by: Mark Janes <mark.a.janes at intel.com>
Kenneth Graunke <kenneth at whitecape.org> writes:
> The test was passing a pointer to an uninitialized integer value as the
> glShaderSource length parameter. This is meant to be an array
> containing the length of each shader string.
>
> Instead, just pass NULL, which makes the GL assume the strings are
> null-terminated (which they are).
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93335
> Cc: Jordan Justen <jljusten at gmail.com>
> Cc: Mark Janes <mark.a.janes at intel.com>
> ---
> tests/spec/arb_pipeline_statistics_query/pipeline_stats_comp.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/tests/spec/arb_pipeline_statistics_query/pipeline_stats_comp.c b/tests/spec/arb_pipeline_statistics_query/pipeline_stats_comp.c
> index 47a36b0..3c511f1 100644
> --- a/tests/spec/arb_pipeline_statistics_query/pipeline_stats_comp.c
> +++ b/tests/spec/arb_pipeline_statistics_query/pipeline_stats_comp.c
> @@ -79,7 +79,6 @@ static void
> dispatch_size(uint32_t x, uint32_t y, uint32_t z)
> {
> char *compute_shader;
> - GLint shader_string_size;
> GLuint shader = glCreateShader(GL_COMPUTE_SHADER);
> GLint ok;
> static GLint prog = 0;
> @@ -92,7 +91,7 @@ dispatch_size(uint32_t x, uint32_t y, uint32_t z)
>
> glShaderSource(shader, 1,
> (const GLchar **) &compute_shader,
> - &shader_string_size);
> + NULL);
>
> glCompileShader(shader);
>
> --
> 2.7.0
More information about the Piglit
mailing list