summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-01-07 17:52:37 -0800
committerJason Ekstrand <[email protected]>2015-01-15 07:20:21 -0800
commit4cdabcc0fa2fdddc7125f0351efb1fd728779db5 (patch)
tree3ef02e5737a36ae37eef376fa47ca8d9a2553464
parent62ac0ee804027d1a1fa9864e03428ced7bd8510a (diff)
nir/tex_instr_create: Initialize all 4 sources
This helps a lot with things like lowering passes that may need to add sources. Reviewed-by: Connor Abbott <[email protected]>
-rw-r--r--src/glsl/nir/nir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/nir/nir.c b/src/glsl/nir/nir.c
index b15440b0855..3a64135d94e 100644
--- a/src/glsl/nir/nir.c
+++ b/src/glsl/nir/nir.c
@@ -461,7 +461,7 @@ nir_tex_instr_create(void *mem_ctx, unsigned num_srcs)
dest_init(&instr->dest);
instr->num_srcs = num_srcs;
- for (unsigned i = 0; i < num_srcs; i++)
+ for (unsigned i = 0; i < 4; i++)
src_init(&instr->src[i]);
instr->has_predicate = false;