don't set verticesPerInstance twice

This commit is contained in:
Samuliak 2024-10-01 19:07:19 +02:00
parent 6dc8f9a019
commit 2fb4d83a5f
3 changed files with 5 additions and 12 deletions

View file

@ -4075,8 +4075,8 @@ void LatteDecompiler_emitMSLShader(LatteDecompilerShaderContext* shaderContext,
{
// Calculate the imaginary vertex id
src->add("uint vid = tig * VERTICES_PER_VERTEX_PRIMITIVE + tid;" _CRLF);
src->add("uint iid = vid / verticesPerInstance;" _CRLF);
src->add("vid %= verticesPerInstance;" _CRLF);
src->add("uint iid = vid / supportBuffer.verticesPerInstance;" _CRLF);
src->add("vid %= supportBuffer.verticesPerInstance;" _CRLF);
// Fetch the input
src->add("VertexIn in = fetchVertex(vid, iid, indexBuffer, indexType VERTEX_BUFFERS);" _CRLF);