mesa/src/compiler/spirv
Georg Lehmann 4bb8d70fd6 spirv: fix cooperative matrix by value function params
The vtn_ssa_value for a cmat is not backed by a nir_def, but by a nir_variable, so
can't be used directly when calling a function.  In most cases the cmat is used by
reference so code will take the value of deref for it (which is a `nir_def`).

When passing a cooperative matrix to a function by value, let the caller pass the deref
value, and the callee copy to a new local variable from that deref.

Fixes: b98f87612b ("spirv: Implement SPV_KHR_cooperative_matrix")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34364>
(cherry picked from commit 0cad7b0968)
2025-04-10 17:12:24 +02:00
..
tests spirv: Use spirv_capabilities in tests 2024-05-09 01:14:22 +00:00
gl_spirv.c mesa: Use the new spirv_capabilities struct 2024-05-09 01:14:22 +00:00
GLSL.ext.AMD.h spirv: Update headers and grammer JSON 2023-08-18 16:57:22 +00:00
GLSL.std.450.h spirv: Update the JSON and headers 2024-05-09 01:14:22 +00:00
meson.build meson: rework mesa-clc=system handling 2025-01-25 03:28:07 +00:00
nir_spirv.h spirv: add an options to lower SpvOpTerminateInvocation to OpKill 2024-12-12 19:54:39 +00:00
OpenCL.std.h spirv: Update the JSON and headers 2024-05-09 01:14:22 +00:00
spir-v.xml spirv: Update SPIR-V grammar to use aliases 2024-10-10 02:48:00 +00:00
spirv.core.grammar.json vulkan: update to 302 headers for av1 encode 2024-12-02 06:29:00 +10:00
spirv.h vulkan: update to 302 headers for av1 encode 2024-12-02 06:29:00 +10:00
spirv2nir.c spirv: Get rid of the old caps struct 2024-05-09 01:14:23 +00:00
spirv_info_gen.py spirv: Update SPIR-V grammar to use aliases 2024-10-10 02:48:00 +00:00
spirv_to_nir.c vtn: Support cooperative matrices in OpConstantNull 2025-03-15 09:49:03 +01:00
vtn_alu.c spirv: explicitly lower derivatives to zero 2024-09-25 09:39:44 +00:00
vtn_amd.c nir: Drop nir_dest 2023-08-14 21:22:53 +00:00
vtn_bindgen.c vtn: introduce vtn_bindgen tool 2024-11-22 23:04:17 +00:00
vtn_cfg.c spirv: fix cooperative matrix by value function params 2025-04-10 17:12:24 +02:00
vtn_cmat.c treewide: Replace the include of nir_types.h with glsl_types.h 2023-12-30 15:08:11 +00:00
vtn_debug.c vtn: Add a debug flag to dump SPIR-V assembly 2024-08-28 21:52:59 +00:00
vtn_gather_types_c.py vulkan: update to 302 headers for av1 encode 2024-12-02 06:29:00 +10:00
vtn_generator_ids_h.py util,vulkan,mesa,compiler: Generate source files with utf8 encoding from mako template 2023-12-07 12:41:07 +00:00
vtn_glsl450.c spirv: clamp/sign-extend non 32bit ldexp exponents 2025-04-10 17:12:23 +02:00
vtn_opencl.c spirv: Rename vtn_pointer::ptr_type to vtn_pointer::type 2024-09-10 00:46:20 +00:00
vtn_private.h vtn: plumb through OpEntryPoint 2024-11-27 20:02:05 +00:00
vtn_structured_cfg.c spirv: add an options to lower SpvOpTerminateInvocation to OpKill 2024-12-12 19:54:39 +00:00
vtn_subgroup.c nir: remove rotate scope 2024-03-05 14:12:21 +00:00
vtn_variables.c vulkan: update to 302 headers for av1 encode 2024-12-02 06:29:00 +10:00