[Piglit] [PATCH] GL_ARB_ubo/maxblocks: don't use dynamically sized array

Anuj Phogat anuj.phogat at gmail.com
Thu Aug 2 13:55:48 PDT 2012


On Thu, Aug 2, 2012 at 8:51 AM, Brian Paul <brianp at vmware.com> wrote:
> To fix MSVC build.
>
> Fixes https://bugs.freedesktop.org/show_bug.cgi?id=53062
> ---
>  tests/spec/arb_uniform_buffer_object/maxblocks.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tests/spec/arb_uniform_buffer_object/maxblocks.c b/tests/spec/arb_uniform_buffer_object/maxblocks.c
> index a8c4c4a..6f67b59 100644
> --- a/tests/spec/arb_uniform_buffer_object/maxblocks.c
> +++ b/tests/spec/arb_uniform_buffer_object/maxblocks.c
> @@ -236,12 +236,10 @@ pass_link_test(int y_index,
>  {
>         bool pass = true;
>         GLuint prog;
> -       GLuint bos[vs_blocks + fs_blocks];
> +       GLuint *bos = (GLuint *) calloc(vs_blocks + fs_blocks, sizeof(GLuint));
>         GLint active_blocks;
>         int i;
>
> -       memset(bos, 0, sizeof(bos));
> -
>         prog = build_shaders(vs_prefix, vs_blocks,
>                              fs_prefix, fs_blocks);
>
> @@ -268,6 +266,8 @@ pass_link_test(int y_index,
>         glDeleteBuffers(active_blocks, bos);
>         glDeleteProgram(prog);
>
> +       free(bos);
> +
>         return pass;
>  }
>
> --
> 1.7.3.4
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit

Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>


More information about the Piglit mailing list