Reduce unneeded state changes

This commit is contained in:
sunshineinabox 2024-05-29 09:45:56 -07:00
parent 5c65880ec0
commit e6492f8e78
3 changed files with 40 additions and 17 deletions

View file

@ -434,7 +434,10 @@ namespace Ryujinx.Graphics.Vulkan
{
api.CmdSetDepthTestEnable(commandBuffer, DepthTestEnable);
api.CmdSetDepthWriteEnable(commandBuffer, DepthWriteEnable);
if (DepthTestEnable)
{
api.CmdSetDepthWriteEnable(commandBuffer, DepthWriteEnable);
}
}
private readonly void RecordDepthTestCompareOp(ExtExtendedDynamicState api, CommandBuffer commandBuffer)