summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2017-10-02 00:19:31 -0700
committerJordan Justen <[email protected]>2017-10-25 12:36:21 -0700
commit87e71726e0c44871778c3e1428dc81649cd9f292 (patch)
treed8344f53b7fa96d50c40832946e9d87357b21119 /src/compiler/glsl
parent16867154d8c7bb6b2b46f00203ed94a4a810abde (diff)
glsl_to_nir: Zero nir_constant in constant_copy for valgrind & nir_serialize
Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r--src/compiler/glsl/glsl_to_nir.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp
index 1d1085ffbcf..c659a25ca77 100644
--- a/src/compiler/glsl/glsl_to_nir.cpp
+++ b/src/compiler/glsl/glsl_to_nir.cpp
@@ -219,7 +219,7 @@ constant_copy(ir_constant *ir, void *mem_ctx)
if (ir == NULL)
return NULL;
- nir_constant *ret = ralloc(mem_ctx, nir_constant);
+ nir_constant *ret = rzalloc(mem_ctx, nir_constant);
const unsigned rows = ir->type->vector_elements;
const unsigned cols = ir->type->matrix_columns;