diff options
Diffstat (limited to 'src/amd/common')
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 6fd2a0c4f62..9bcd5f6db46 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -3973,16 +3973,18 @@ static LLVMValueRef get_sampler_desc(struct nir_to_llvm_context *ctx, constant_index = child->base_offset; } - if (desc_type == DESC_SAMPLER && binding->immutable_samplers && + if (desc_type == DESC_SAMPLER && binding->immutable_samplers_offset && (!index || binding->immutable_samplers_equal)) { if (binding->immutable_samplers_equal) constant_index = 0; + const uint32_t *samplers = radv_immutable_samplers(layout, binding); + LLVMValueRef constants[] = { - LLVMConstInt(ctx->i32, binding->immutable_samplers[constant_index * 4 + 0], 0), - LLVMConstInt(ctx->i32, binding->immutable_samplers[constant_index * 4 + 1], 0), - LLVMConstInt(ctx->i32, binding->immutable_samplers[constant_index * 4 + 2], 0), - LLVMConstInt(ctx->i32, binding->immutable_samplers[constant_index * 4 + 3], 0), + LLVMConstInt(ctx->i32, samplers[constant_index * 4 + 0], 0), + LLVMConstInt(ctx->i32, samplers[constant_index * 4 + 1], 0), + LLVMConstInt(ctx->i32, samplers[constant_index * 4 + 2], 0), + LLVMConstInt(ctx->i32, samplers[constant_index * 4 + 3], 0), }; return ac_build_gather_values(&ctx->ac, constants, 4); } |