From f0ed59076f7e6e2bf8c6f5d42b6a8e8aac57d3e2 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Tue, 22 Jan 2019 11:48:51 +1100 Subject: [PATCH] radeonsi/nir: add missing piece for bindless image support MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This fixes some piglit tests and is was TGSI does. Reviewed-by: Marek Olšák --- src/gallium/drivers/radeonsi/si_shader_nir.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c index 037376a22ef..7554f5b9f8b 100644 --- a/src/gallium/drivers/radeonsi/si_shader_nir.c +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c @@ -939,6 +939,12 @@ si_nir_load_sampler_desc(struct ac_shader_abi *abi, /* dynamic_index is the bindless handle */ if (image) { + /* For simplicity, bindless image descriptors use fixed + * 16-dword slots for now. + */ + dynamic_index = LLVMBuildMul(ctx->ac.builder, dynamic_index, + LLVMConstInt(ctx->i32, 2, 0), ""); + return si_load_image_desc(ctx, list, dynamic_index, desc_type, dcc_off, true); } -- 2.30.2