Skip to content

Commit

Permalink
use verticesPerInstance for rect vertex shaders
Browse files Browse the repository at this point in the history
  • Loading branch information
SamoZ256 committed Nov 11, 2024
1 parent a1b9164 commit 6ea6ad3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit 6ea6ad3

Please sign in to comment.