VK_EXT_extended_dynamic_state fix build fail before Xcode 15.

This commit is contained in:
Bill Hollings 2023-10-10 13:58:08 -04:00
parent f4423428e3
commit 659b1cecd7
3 changed files with 10 additions and 2 deletions

View File

@ -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();

View File

@ -1348,6 +1348,10 @@ bool MVKGraphicsPipeline::addFragmentShaderToPipeline(MTLRenderPipelineDescripto
return true;
}
#if !MVK_XCODE_15
static const NSUInteger MTLBufferLayoutStrideDynamic = NSUIntegerMax;
#endif
template<class T>
bool MVKGraphicsPipeline::addVertexInputToPipeline(T* inputDesc,
const VkPipelineVertexInputStateCreateInfo* pVI,

View File

@ -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. */