macOS: Workaround for MoltenVK stride limitation (#534)

This commit is contained in:
goeiecool9999 2022-11-30 01:26:42 +01:00 committed by GitHub
parent 79e731d9b4
commit a3476c7b7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 57 additions and 3 deletions

View file

@ -459,8 +459,7 @@ void PipelineCompiler::InitVertexInputState(const LatteContextRegister& latteReg
VkVertexInputBindingDescription entry{};
#if BOOST_OS_MACOS
if (bufferStride % 4 != 0) {
forceLog_printf("MoltenVK error: vertex stride was %d, expected multiple of 4", bufferStride);
bufferStride = 0;
bufferStride = bufferStride + (4-(bufferStride % 4));
}
#endif
entry.stride = bufferStride;