[Mesa-dev] [PATCH] glsl/tests: fix segfault in uniform initializer test

Aaron Watry awatry at gmail.com
Thu Aug 11 01:21:02 UTC 2016


On Wed, Aug 10, 2016 at 7:34 PM, Timothy Arceri <
timothy.arceri at collabora.com> wrote:

> Cause by 549222f5
>

s/Cause/Caused/ ?

Fixes the make check failure for me (haven't done a full piglit run, just
build/check/install test). Thanks for the quick turnaround.

--Aaron


>
> Cc: Aaron Watry <awatry at gmail.com>
> ---
>  src/compiler/glsl/tests/set_uniform_initializer_tests.cpp | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/src/compiler/glsl/tests/set_uniform_initializer_tests.cpp
> b/src/compiler/glsl/tests/set_uniform_initializer_tests.cpp
> index a36ffdc..9d41017 100644
> --- a/src/compiler/glsl/tests/set_uniform_initializer_tests.cpp
> +++ b/src/compiler/glsl/tests/set_uniform_initializer_tests.cpp
> @@ -24,6 +24,7 @@
>  #include "main/compiler.h"
>  #include "main/mtypes.h"
>  #include "main/macros.h"
> +#include "program/hash_table.h"
>  #include "util/ralloc.h"
>  #include "uniform_initializer_utils.h"
>
> @@ -108,6 +109,7 @@ establish_uniform_storage(struct gl_shader_program
> *prog, unsigned num_storage,
>                                                + type->components()));
>     const unsigned red_zone_components = total_components -
> data_components;
>
> +   prog->UniformHash = new string_to_uint_map;
>     prog->UniformStorage = rzalloc_array(prog, struct gl_uniform_storage,
>                                         num_storage);
>     prog->NumUniformStorage = num_storage;
> @@ -128,6 +130,9 @@ establish_uniform_storage(struct gl_shader_program
> *prog, unsigned num_storage,
>                                      data_components,
>                                      red_zone_components);
>
> +   prog->UniformHash->put(index_to_set,
> +                          prog->UniformStorage[index_to_set].name);
> +
>     for (unsigned i = 0; i < num_storage; i++) {
>        if (i == index_to_set)
>          continue;
> --
> 2.7.4
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160810/c27614b9/attachment.html>


More information about the mesa-dev mailing list