From c11a6f28b59d38e6d689f19a8b94fe3e75d3b151 Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Thu, 27 Mar 2025 18:43:21 -0400 Subject: [PATCH] Make spec constants optional Signed-off-by: Isaac Marovitz --- XenosRecomp/shader_common.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/XenosRecomp/shader_common.h b/XenosRecomp/shader_common.h index b55f30f..f480042 100644 --- a/XenosRecomp/shader_common.h +++ b/XenosRecomp/shader_common.h @@ -41,11 +41,17 @@ struct PushConstants using namespace metal; +#ifdef SPEC_CONSTANTS constant uint G_SPEC_CONSTANT [[function_constant(0)]]; +#endif uint g_SpecConstants() { +#ifdef SPEC_CONSTANTS return G_SPEC_CONSTANT; +#else + return 0; +#endif } struct PushConstants