diff options
Diffstat (limited to 'src/compiler/nir/nir.c')
-rw-r--r-- | src/compiler/nir/nir.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index 6a070f530b2..df40a554714 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -489,6 +489,8 @@ nir_tex_instr_create(nir_shader *shader, unsigned num_srcs) instr->texture_index = 0; instr->texture_array_size = 0; instr->texture = NULL; + instr->sampler_index = 0; + instr->sampler = NULL; return instr; } @@ -1012,6 +1014,11 @@ visit_tex_src(nir_tex_instr *instr, nir_foreach_src_cb cb, void *state) return false; } + if (instr->sampler != NULL) { + if (!visit_deref_src(instr->sampler, cb, state)) + return false; + } + return true; } |