From 6588f5a123724a0af811316f8b125e86d6306267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Fri, 24 Nov 2023 16:42:32 +0100 Subject: [PATCH] spirv: implement SPV_KHR_maximal_reconvergence Reviewed-by: Georg Lehmann Part-of: --- src/compiler/shader_info.h | 5 +++++ src/compiler/spirv/spirv_to_nir.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h index bb3f1f0334c..61a6affedc6 100644 --- a/src/compiler/shader_info.h +++ b/src/compiler/shader_info.h @@ -347,6 +347,11 @@ typedef struct shader_info { */ bool uses_printf:1; + /** + * VK_KHR_shader_maximal_reconvergence + */ + bool maximally_reconverges:1; + /** * Set if this shader uses legacy (DX9 or ARB assembly) math rules. * diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 3b4be6b19e5..29358e2e529 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -5521,6 +5521,10 @@ vtn_handle_execution_mode(struct vtn_builder *b, struct vtn_value *entry_point, break; } + case SpvExecutionModeMaximallyReconvergesKHR: + b->shader->info.maximally_reconverges = true; + break; + case SpvExecutionModeLocalSizeId: case SpvExecutionModeLocalSizeHintId: case SpvExecutionModeSubgroupsPerWorkgroupId: