use verticesPerInstance for rect vertex shaders

This commit is contained in:
Samuliak 2024-11-11 17:40:58 +01:00
parent a1b9164831
commit 6ea6ad37d6
No known key found for this signature in database

View File

@ -549,8 +549,10 @@ namespace LatteDecompiler
}
if (g_renderer->GetType() == RendererAPI::Metal)
{
bool isRectVertexShader = (static_cast<LattePrimitiveMode>(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
}
}