[Mesa-dev] [PATCH 1/2] radeonsi/nir: add missing piece for bindless image support

Timothy Arceri tarceri at itsqueeze.com
Tue Jan 22 02:28:39 UTC 2019


This fixes some piglit tests and is was TGSI does.
---
 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 65da6384c7..0ac737a062 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.20.1



More information about the mesa-dev mailing list