From: Timothy Arceri Date: Tue, 22 Jan 2019 00:48:51 +0000 (+1100) Subject: radeonsi/nir: add missing piece for bindless image support X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f0ed59076f7e6e2bf8c6f5d42b6a8e8aac57d3e2;p=mesa.git radeonsi/nir: add missing piece for bindless image support This fixes some piglit tests and is was TGSI does. Reviewed-by: Marek Olšák --- 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); }