mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-11-26 11:04:18 +01:00
MacOS: Workaround for Metal stride limitation (#445)
This commit is contained in:
parent
a129d22a57
commit
521f2fb707
@ -457,6 +457,12 @@ void PipelineCompiler::InitVertexInputState(const LatteContextRegister& latteReg
|
|||||||
uint32 bufferStride = (latteRegister.GetRawView()[bufferBaseRegisterIndex + 2] >> 11) & 0xFFFF;
|
uint32 bufferStride = (latteRegister.GetRawView()[bufferBaseRegisterIndex + 2] >> 11) & 0xFFFF;
|
||||||
|
|
||||||
VkVertexInputBindingDescription entry{};
|
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;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
entry.stride = bufferStride;
|
entry.stride = bufferStride;
|
||||||
if (!fetchType.has_value() || fetchType == LatteConst::VertexFetchType2::VERTEX_DATA)
|
if (!fetchType.has_value() || fetchType == LatteConst::VertexFetchType2::VERTEX_DATA)
|
||||||
entry.inputRate = VK_VERTEX_INPUT_RATE_VERTEX;
|
entry.inputRate = VK_VERTEX_INPUT_RATE_VERTEX;
|
||||||
|
Loading…
Reference in New Issue
Block a user