Also restore Metal scissor rect

This commit is contained in:
Jack Andersen 2016-09-11 19:34:45 -10:00
parent 4cffc6e4ec
commit 516e5fbe0e
1 changed files with 9 additions and 3 deletions

View File

@ -719,9 +719,15 @@ struct MetalCommandQueue : IGraphicsCommandQueue
m_enc = [m_cmdBuf renderCommandEncoderWithDescriptor:ctarget->m_passDesc]; m_enc = [m_cmdBuf renderCommandEncoderWithDescriptor:ctarget->m_passDesc];
[m_enc setFrontFacingWinding:MTLWindingCounterClockwise]; [m_enc setFrontFacingWinding:MTLWindingCounterClockwise];
} }
if (ctarget == m_boundTarget && (m_boundVp.width || m_boundVp.height)) if (ctarget == m_boundTarget)
[m_enc setViewport:m_boundVp]; {
m_boundTarget = ctarget; if (m_boundVp.width || m_boundVp.height)
[m_enc setViewport:m_boundVp];
if (m_boundScissor.width || m_boundScissor.height)
[m_enc setScissorRect:m_boundScissor];
}
else
m_boundTarget = ctarget;
} }
void setRenderTarget(ITextureR* target) void setRenderTarget(ITextureR* target)