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

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

vtn: add hack for system values placed in CrossWorkgroup memory

Upstream bug: https://github.com/intel/llvm/issues/6703

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

---

 src/compiler/spirv/vtn_variables.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/compiler/spirv/vtn_variables.c 
b/src/compiler/spirv/vtn_variables.c
index 8ee77534036..0b6f69145e8 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -845,7 +845,9 @@ set_mode_system_value(struct vtn_builder *b, 
nir_variable_mode *mode)
 {
    vtn_assert(*mode == nir_var_system_value || *mode == nir_var_shader_in ||
               /* Hack for NV_mesh_shader due to lack of dedicated storage 
class. */
-              *mode == nir_var_mem_task_payload);
+              *mode == nir_var_mem_task_payload ||
+              /* Hack for DPCPP, see https://github.com/intel/llvm/issues/6703 
*/
+              *mode == nir_var_mem_global);
    *mode = nir_var_system_value;
 }
 

Reply via email to