mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-05 22:41:18 +12:00
don't set verticesPerInstance twice
This commit is contained in:
parent
6dc8f9a019
commit
2fb4d83a5f
3 changed files with 5 additions and 12 deletions
|
@ -1247,13 +1247,9 @@ void MetalRenderer::draw_execute(uint32 baseVertex, uint32 baseInstance, uint32
|
|||
// We have already retrieved the buffer, no need for it to be locked anymore
|
||||
bufferAllocator.UnlockBuffer(indexBufferIndex);
|
||||
}
|
||||
|
||||
if (usesGeometryShader)
|
||||
{
|
||||
uint32 verticesPerInstance = count / instanceCount;
|
||||
// TODO: make a helper function for this
|
||||
renderCommandEncoder->setObjectBytes(&verticesPerInstance, sizeof(verticesPerInstance), vertexShader->resourceMapping.verticesPerInstanceBinding);
|
||||
encoderState.m_buffers[METAL_SHADER_TYPE_OBJECT][vertexShader->resourceMapping.verticesPerInstanceBinding] = {nullptr};
|
||||
|
||||
if (indexBuffer)
|
||||
SetBuffer(renderCommandEncoder, METAL_SHADER_TYPE_OBJECT, indexBuffer, indexBufferOffset, vertexShader->resourceMapping.indexBufferBinding);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue