unsigned constant_index = 0;
unsigned descriptor_set;
unsigned base_index;
+ bool bindless = false;
if (!deref) {
assert(tex_instr && !image);
tail = &child->deref;
}
descriptor_set = deref->var->data.descriptor_set;
- base_index = deref->var->data.binding;
+
+ if (deref->var->data.bindless) {
+ bindless = deref->var->data.bindless;
+ base_index = deref->var->data.driver_location;
+ } else {
+ base_index = deref->var->data.binding;
+ }
}
return ctx->abi->load_sampler_desc(ctx->abi,
descriptor_set,
base_index,
constant_index, index,
- desc_type, image, write);
+ desc_type, image, write, bindless);
}
static void set_tex_fetch_args(struct ac_llvm_context *ctx,
unsigned constant_index,
LLVMValueRef index,
enum ac_descriptor_type desc_type,
- bool image, bool write);
+ bool image, bool write,
+ bool bindless);
/**
* Load a Vulkan-specific resource.
unsigned constant_index,
LLVMValueRef index,
enum ac_descriptor_type desc_type,
- bool image, bool write)
+ bool image, bool write,
+ bool bindless)
{
struct radv_shader_context *ctx = radv_shader_context_from_abi(abi);
LLVMValueRef list = ctx->descriptor_sets[descriptor_set];
unsigned descriptor_set, unsigned base_index,
unsigned constant_index, LLVMValueRef dynamic_index,
enum ac_descriptor_type desc_type, bool image,
- bool write)
+ bool write, bool bindless)
{
struct si_shader_context *ctx = si_shader_context_from_abi(abi);
LLVMBuilderRef builder = ctx->ac.builder;