1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-14 04:29:15 +01:00

[dxvk] Also try to use render pass resolves on desktop drivers

Elides redundant back-to-back resolves in some games, and reduces
some barrier spam when the app resolves multiple images.
This commit is contained in:
Philip Rebohle 2025-03-05 12:33:59 +01:00
parent 6d6825067b
commit 635d96a5ba
2 changed files with 7 additions and 8 deletions

View File

@ -2458,9 +2458,6 @@ namespace dxvk {
void DxvkContext::flushResolves() {
if (!m_device->perfHints().preferRenderPassOps)
return;
for (size_t i = 0; i < m_state.om.framebufferInfo.numAttachments(); i++) {
auto& resolve = m_deferredResolves.at(i);
@ -5659,10 +5656,13 @@ namespace dxvk {
// On drivers that don't natively support secondary command buffers, only
// use them to enable MSAA resolve attachments. Also ignore color-only
// render passes here since we almost certainly need the output anyway.
bool useSecondaryCmdBuffer = m_device->perfHints().preferRenderPassOps;
bool useSecondaryCmdBuffer = !m_device->perfHints().preferPrimaryCmdBufs
&& renderingInheritance.rasterizationSamples > VK_SAMPLE_COUNT_1_BIT;
if (useSecondaryCmdBuffer && (m_device->perfHints().preferPrimaryCmdBufs || !depthStencilAspects))
useSecondaryCmdBuffer = renderingInheritance.rasterizationSamples > VK_SAMPLE_COUNT_1_BIT;
if (m_device->perfHints().preferRenderPassOps) {
useSecondaryCmdBuffer = renderingInheritance.rasterizationSamples > VK_SAMPLE_COUNT_1_BIT
|| (!m_device->perfHints().preferPrimaryCmdBufs && depthStencilAspects);
}
if (useSecondaryCmdBuffer) {
// Begin secondary command buffer on tiling GPUs so that subsequent

View File

@ -451,8 +451,7 @@ namespace dxvk {
// Be less aggressive on secondary command buffer usage on
// drivers that do not natively support them
hints.preferPrimaryCmdBufs = !hints.preferRenderPassOps
|| m_adapter->matchesDriver(VK_DRIVER_ID_MESA_HONEYKRISP);
hints.preferPrimaryCmdBufs = m_adapter->matchesDriver(VK_DRIVER_ID_MESA_HONEYKRISP);
return hints;
}