Module: Mesa
Branch: main
Commit: 41f814df6f25d0458ecf71e318045b831b085116
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=41f814df6f25d0458ecf71e318045b831b085116

Author: Karol Herbst <[email protected]>
Date:   Fri Oct 13 11:30:13 2023 +0200

nir: allow vec derefs on system values

There is no real reason to prevent this as far as I know. And some of the
SPIR-V generated by DPCPP is running into this.

Signed-off-by: Karol Herbst <[email protected]>
Reviewed-by: Faith Ekstrand <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25701>

---

 src/compiler/nir/nir.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 3b37b981cbf..db3c8554357 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -211,13 +211,13 @@ typedef enum {
                                    nir_var_system_value | nir_var_mem_constant 
|
                                    nir_var_mem_ubo,
    /* Modes where vector derefs can be indexed as arrays. nir_var_shader_out
-    * is only for mesh stages.
+    * is only for mesh stages. nir_var_system_value is only for kernel stages.
     */
    nir_var_vec_indexable_modes   = nir_var_shader_temp | nir_var_function_temp 
|
                                  nir_var_mem_ubo | nir_var_mem_ssbo |
                                  nir_var_mem_shared | nir_var_mem_global |
                                  nir_var_mem_push_const | 
nir_var_mem_task_payload |
-                                 nir_var_shader_out,
+                                 nir_var_shader_out | nir_var_system_value,
    nir_num_variable_modes        = 18,
    nir_var_all                   = (1 << nir_num_variable_modes) - 1,
 } nir_variable_mode;

Reply via email to