summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2017-10-02 00:17:22 -0700
committerJordan Justen <[email protected]>2017-10-25 12:36:21 -0700
commit16867154d8c7bb6b2b46f00203ed94a4a810abde (patch)
treec74300ff24b941a576b5ef2d156e9ee4ab791748 /src/compiler/glsl
parent78550869a1e0892e7950eafcde805e8b9e749801 (diff)
glsl_to_nir: Zero nir_variable struct 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 63694fd41f4..1d1085ffbcf 100644
--- a/src/compiler/glsl/glsl_to_nir.cpp
+++ b/src/compiler/glsl/glsl_to_nir.cpp
@@ -311,7 +311,7 @@ nir_visitor::visit(ir_variable *ir)
if (ir->data.mode == ir_var_shader_shared)
return;
- nir_variable *var = ralloc(shader, nir_variable);
+ nir_variable *var = rzalloc(shader, nir_variable);
var->type = ir->type;
var->name = ralloc_strdup(var, ir->name);