From 074f9f6f3e04c0d49a97b74c1be935ae1a9541c7 Mon Sep 17 00:00:00 2001 From: Samuliak Date: Thu, 29 Aug 2024 09:28:38 +0200 Subject: [PATCH] align buffer stride after setting to min stride --- src/Cafe/HW/Latte/Renderer/Metal/MetalPipelineCache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cafe/HW/Latte/Renderer/Metal/MetalPipelineCache.cpp b/src/Cafe/HW/Latte/Renderer/Metal/MetalPipelineCache.cpp index 1d068426..6a746515 100644 --- a/src/Cafe/HW/Latte/Renderer/Metal/MetalPipelineCache.cpp +++ b/src/Cafe/HW/Latte/Renderer/Metal/MetalPipelineCache.cpp @@ -328,7 +328,6 @@ MTL::RenderPipelineState* MetalPipelineCache::GetRenderPipelineState(const Latte uint32 bufferIndex = bufferGroup.attributeBufferIndex; uint32 bufferBaseRegisterIndex = mmSQ_VTX_ATTRIBUTE_BLOCK_START + bufferIndex * 7; uint32 bufferStride = (lcr.GetRawView()[bufferBaseRegisterIndex + 2] >> 11) & 0xFFFF; - bufferStride = Align(bufferStride, 4); auto layout = vertexDescriptor->layouts()->object(GET_MTL_VERTEX_BUFFER_INDEX(bufferIndex)); if (bufferStride == 0) @@ -353,6 +352,7 @@ MTL::RenderPipelineState* MetalPipelineCache::GetRenderPipelineState(const Latte cemu_assert(false); } } + bufferStride = Align(bufferStride, 4); layout->setStride(bufferStride); }