Mesa (main): spirv: add MeshViewCountNV/MeshViewIndidcesNV builtins from SPV_NV_mesh_shader
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jan 11 23:38:45 UTC 2022
Module: Mesa
Branch: main
Commit: e4ff7fd76adf35233a8899cf3e7c89de6ce8bc6c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e4ff7fd76adf35233a8899cf3e7c89de6ce8bc6c
Author: Marcin Ślusarz <marcin.slusarz at intel.com>
Date: Thu Dec 16 14:28:58 2021 +0100
spirv: add MeshViewCountNV/MeshViewIndidcesNV builtins from SPV_NV_mesh_shader
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Reviewed-by: Caio Oliveira <caio.oliveira at intel.com>
Acked-by: Timur Kristóf <timur.kristof at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14263>
---
src/compiler/spirv/vtn_variables.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c
index fd17127542f..3ee5f611d3c 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -1140,6 +1140,14 @@ vtn_get_builtin_location(struct vtn_builder *b,
case SpvBuiltInTaskCountNV:
*location = VARYING_SLOT_TASK_COUNT;
break;
+ case SpvBuiltInMeshViewCountNV:
+ *location = SYSTEM_VALUE_MESH_VIEW_COUNT;
+ set_mode_system_value(b, mode);
+ break;
+ case SpvBuiltInMeshViewIndicesNV:
+ *location = SYSTEM_VALUE_MESH_VIEW_INDICES;
+ set_mode_system_value(b, mode);
+ break;
default:
vtn_fail("Unsupported builtin: %s (%u)",
spirv_builtin_to_string(builtin), builtin);
More information about the mesa-commit
mailing list