diff --git a/MoltenVK/MoltenVK/Commands/MVKCommandEncoderState.mm b/MoltenVK/MoltenVK/Commands/MVKCommandEncoderState.mm index 72db24d6..d01dc5ef 100644 --- a/MoltenVK/MoltenVK/Commands/MVKCommandEncoderState.mm +++ b/MoltenVK/MoltenVK/Commands/MVKCommandEncoderState.mm @@ -826,6 +826,10 @@ void MVKGraphicsResourcesCommandEncoderState::markDirty() { } } +#if !MVK_XCODE_15 +static const NSUInteger MTLAttributeStrideStatic = NSUIntegerMax; +#endif + void MVKGraphicsResourcesCommandEncoderState::encodeImpl(uint32_t stage) { auto* pipeline = _cmdEncoder->_graphicsPipelineState.getGraphicsPipeline(); diff --git a/MoltenVK/MoltenVK/GPUObjects/MVKPipeline.mm b/MoltenVK/MoltenVK/GPUObjects/MVKPipeline.mm index e361f1ea..6660e9b7 100644 --- a/MoltenVK/MoltenVK/GPUObjects/MVKPipeline.mm +++ b/MoltenVK/MoltenVK/GPUObjects/MVKPipeline.mm @@ -1348,6 +1348,10 @@ bool MVKGraphicsPipeline::addFragmentShaderToPipeline(MTLRenderPipelineDescripto return true; } +#if !MVK_XCODE_15 +static const NSUInteger MTLBufferLayoutStrideDynamic = NSUIntegerMax; +#endif + template bool MVKGraphicsPipeline::addVertexInputToPipeline(T* inputDesc, const VkPipelineVertexInputStateCreateInfo* pVI, diff --git a/MoltenVK/MoltenVK/Utility/MVKFoundation.h b/MoltenVK/MoltenVK/Utility/MVKFoundation.h index 8503b917..c729c153 100644 --- a/MoltenVK/MoltenVK/Utility/MVKFoundation.h +++ b/MoltenVK/MoltenVK/Utility/MVKFoundation.h @@ -386,8 +386,8 @@ static constexpr bool mvkVkComponentMappingsMatch(VkComponentMapping cm1, VkComp #pragma mark Math /** Rounds the value to nearest integer using half-to-even rounding. */ -static constexpr double mvkRoundHalfToEven(const double val) { - return val - std::remainder(val, 1.0); // remainder() uses half-to-even rounding, and unfortunately isn't constexpr until C++23. +static inline double mvkRoundHalfToEven(const double val) { + return val - std::remainder(val, 1.0); // remainder() uses half-to-even rounding, but unfortunately isn't constexpr until C++23. } /** Returns whether the value will fit inside the numeric type. */