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 8752326f1c
commit c11a6f28b5
No known key found for this signature in database
GPG key ID: 97250B2B09A132E1

View file

@ -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