[Mesa-dev] [PATCH 2/7] radeonsi/nir: set uses_bindless_images for images

Timothy Arceri tarceri at itsqueeze.com
Tue Feb 20 03:42:28 UTC 2018


---
 src/gallium/drivers/radeonsi/si_shader_nir.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c
index ea9f2076da..974068b88f 100644
--- a/src/gallium/drivers/radeonsi/si_shader_nir.c
+++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
@@ -134,7 +134,11 @@ static void scan_instruction(struct tgsi_shader_info *info,
 		case nir_intrinsic_image_atomic_or:
 		case nir_intrinsic_image_atomic_xor:
 		case nir_intrinsic_image_atomic_exchange:
-		case nir_intrinsic_image_atomic_comp_swap:
+		case nir_intrinsic_image_atomic_comp_swap: {
+			nir_variable *var = intr->variables[0]->var;
+			if (var->data.bindless)
+				info->uses_bindless_images = true;
+		}
 		case nir_intrinsic_store_ssbo:
 		case nir_intrinsic_ssbo_atomic_add:
 		case nir_intrinsic_ssbo_atomic_imin:
-- 
2.14.3



More information about the mesa-dev mailing list