From 6ea6ad37d657dea4676f61beed8b553b89dd958f Mon Sep 17 00:00:00 2001 From: Samuliak Date: Mon, 11 Nov 2024 17:40:58 +0100 Subject: [PATCH] use verticesPerInstance for rect vertex shaders --- .../Latte/LegacyShaderDecompiler/LatteDecompilerAnalyzer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Cafe/HW/Latte/LegacyShaderDecompiler/LatteDecompilerAnalyzer.cpp b/src/Cafe/HW/Latte/LegacyShaderDecompiler/LatteDecompilerAnalyzer.cpp index 3a45ade50..e0b39767f 100644 --- a/src/Cafe/HW/Latte/LegacyShaderDecompiler/LatteDecompilerAnalyzer.cpp +++ b/src/Cafe/HW/Latte/LegacyShaderDecompiler/LatteDecompilerAnalyzer.cpp @@ -549,8 +549,10 @@ namespace LatteDecompiler } if (g_renderer->GetType() == RendererAPI::Metal) { + bool isRectVertexShader = (static_cast(decompilerContext->contextRegisters[mmVGT_PRIMITIVE_TYPE]) == LattePrimitiveMode::RECTS); + // TODO: also check for rect primitive - if (decompilerContext->shaderType == LatteConst::ShaderType::Vertex && decompilerContext->options->usesGeometryShader) + if (decompilerContext->shaderType == LatteConst::ShaderType::Vertex && (decompilerContext->options->usesGeometryShader || isRectVertexShader)) decompilerContext->hasUniformVarBlock = true; // uf_verticesPerInstance } }