ac/nir_to_llvm: fix regression in bindless support
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 9 Jan 2019 04:03:36 +0000 (15:03 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Wed, 16 Jan 2019 23:35:36 +0000 (10:35 +1100)
This wasn't ported over when deref support was implemented.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/amd/common/ac_nir_to_llvm.c

index e0c6b0968f03affac054bc96dcd8e59e6b459a2c..a2069ebb44f51c30c375c5bb9caf4fa170d5c25a 100644 (file)
@@ -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,