Make spec constants optional

Signed-off-by: Isaac Marovitz <isaacryu@icloud.com>
This commit is contained in:
Isaac Marovitz 2025-03-27 18:43:21 -04:00
parent ce5aeb3fef
commit 253c5954cd
No known key found for this signature in database
GPG key ID: 97250B2B09A132E1

View file

@ -42,11 +42,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