diff options
author | Eric Anholt <[email protected]> | 2015-08-11 17:10:35 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2015-08-14 11:39:18 -0700 |
commit | fb2425a641dd7f891964e6f51b10cce63dff7d2c (patch) | |
tree | 50c0a4909e2e6da448b03aaf3c0a86552359af50 /src/glsl/nir/nir.c | |
parent | bf3c50fba221f216e38d3f60f89161ced4c684c0 (diff) |
nir: Zero out texture instructions when creating them.
There are so many flags in textures, that the CSE pass would have a hard
time referencing the correct set when figuring out if two texture ops are
the same. By zeroing, we can avoid that fragility.
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir.c')
-rw-r--r-- | src/glsl/nir/nir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/nir/nir.c b/src/glsl/nir/nir.c index 78ff886218d..2f7cbae42be 100644 --- a/src/glsl/nir/nir.c +++ b/src/glsl/nir/nir.c @@ -450,7 +450,7 @@ nir_call_instr_create(nir_shader *shader, nir_function_overload *callee) nir_tex_instr * nir_tex_instr_create(nir_shader *shader, unsigned num_srcs) { - nir_tex_instr *instr = ralloc(shader, nir_tex_instr); + nir_tex_instr *instr = rzalloc(shader, nir_tex_instr); instr_init(&instr->instr, nir_instr_type_tex); dest_init(&instr->dest); |