summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/nir/nir_lower_samplers_as_deref.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_lower_samplers_as_deref.c b/src/compiler/nir/nir_lower_samplers_as_deref.c
index bdbd8672f40..3e819f7fa75 100644
--- a/src/compiler/nir/nir_lower_samplers_as_deref.c
+++ b/src/compiler/nir/nir_lower_samplers_as_deref.c
@@ -157,8 +157,10 @@ static bool
lower_sampler(nir_tex_instr *instr, struct lower_samplers_as_deref_state *state,
nir_builder *b)
{
+ if (!instr->texture)
+ return false;
+
/* In GLSL, we only fill out the texture field. The sampler is inferred */
- assert(instr->texture != NULL);
assert(instr->sampler == NULL);
b->cursor = nir_before_instr(&instr->instr);