From b12316cc925a7659d5edf62d62b8d7987fe7a657 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Wed, 9 Jan 2019 15:03:36 +1100 Subject: [PATCH] ac/nir_to_llvm: fix regression in bindless support MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This wasn't ported over when deref support was implemented. Reviewed-by: Marek Olšák --- src/amd/common/ac_nir_to_llvm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index e0c6b0968f0..a2069ebb44f 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -3305,7 +3305,12 @@ static LLVMValueRef get_sampler_desc(struct ac_nir_context *ctx, deref_instr = nir_src_as_deref(deref_instr->parent); } descriptor_set = deref_instr->var->data.descriptor_set; - base_index = deref_instr->var->data.binding; + + if (deref_instr->var->data.bindless) { + base_index = deref_instr->var->data.driver_location; + bindless = true; + } else + base_index = deref_instr->var->data.binding; } return ctx->abi->load_sampler_desc(ctx->abi, -- 2.30.2