summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-02-19 08:44:50 +1100
committerTimothy Arceri <[email protected]>2018-04-10 14:43:45 +1000
commitd7cbe795edefb616c2df9d3bda0a2dc80a2c3405 (patch)
tree31b1d78d8e562c60981646088c5dae804d682406 /src
parent74b3fc2ce0f854bbe4b1d5e052e59b61a49f62ba (diff)
radeonsi/nir: set uses_bindless_images for images
V2: add missing intrinsics (Spotted-by: Samuel Pitoiset) Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader_nir.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c
index 80c436247c8..45cbf1ce7f3 100644
--- a/src/gallium/drivers/radeonsi/si_shader_nir.c
+++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
@@ -124,6 +124,15 @@ static void scan_instruction(struct tgsi_shader_info *info,
case nir_intrinsic_load_tess_level_outer:
info->reads_tess_factors = true;
break;
+ case nir_intrinsic_image_var_load:
+ case nir_intrinsic_image_var_size:
+ case nir_intrinsic_image_var_samples: {
+ nir_variable *var = intr->variables[0]->var;
+ if (var->data.bindless)
+ info->uses_bindless_images = true;
+
+ break;
+ }
case nir_intrinsic_image_var_store:
case nir_intrinsic_image_var_atomic_add:
case nir_intrinsic_image_var_atomic_min:
@@ -132,7 +141,13 @@ static void scan_instruction(struct tgsi_shader_info *info,
case nir_intrinsic_image_var_atomic_or:
case nir_intrinsic_image_var_atomic_xor:
case nir_intrinsic_image_var_atomic_exchange:
- case nir_intrinsic_image_var_atomic_comp_swap:
+ case nir_intrinsic_image_var_atomic_comp_swap: {
+ nir_variable *var = intr->variables[0]->var;
+ if (var->data.bindless)
+ info->uses_bindless_images = true;
+
+ /* fall-through */
+ }
case nir_intrinsic_store_ssbo:
case nir_intrinsic_ssbo_atomic_add:
case nir_intrinsic_ssbo_atomic_imin: