mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-14 22: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:
parent
6d6825067b
commit
635d96a5ba
@ -2458,9 +2458,6 @@ namespace dxvk {
|
|||||||
|
|
||||||
|
|
||||||
void DxvkContext::flushResolves() {
|
void DxvkContext::flushResolves() {
|
||||||
if (!m_device->perfHints().preferRenderPassOps)
|
|
||||||
return;
|
|
||||||
|
|
||||||
for (size_t i = 0; i < m_state.om.framebufferInfo.numAttachments(); i++) {
|
for (size_t i = 0; i < m_state.om.framebufferInfo.numAttachments(); i++) {
|
||||||
auto& resolve = m_deferredResolves.at(i);
|
auto& resolve = m_deferredResolves.at(i);
|
||||||
|
|
||||||
@ -5659,10 +5656,13 @@ namespace dxvk {
|
|||||||
// On drivers that don't natively support secondary command buffers, only
|
// On drivers that don't natively support secondary command buffers, only
|
||||||
// use them to enable MSAA resolve attachments. Also ignore color-only
|
// use them to enable MSAA resolve attachments. Also ignore color-only
|
||||||
// render passes here since we almost certainly need the output anyway.
|
// 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))
|
if (m_device->perfHints().preferRenderPassOps) {
|
||||||
useSecondaryCmdBuffer = renderingInheritance.rasterizationSamples > VK_SAMPLE_COUNT_1_BIT;
|
useSecondaryCmdBuffer = renderingInheritance.rasterizationSamples > VK_SAMPLE_COUNT_1_BIT
|
||||||
|
|| (!m_device->perfHints().preferPrimaryCmdBufs && depthStencilAspects);
|
||||||
|
}
|
||||||
|
|
||||||
if (useSecondaryCmdBuffer) {
|
if (useSecondaryCmdBuffer) {
|
||||||
// Begin secondary command buffer on tiling GPUs so that subsequent
|
// Begin secondary command buffer on tiling GPUs so that subsequent
|
||||||
|
@ -451,8 +451,7 @@ namespace dxvk {
|
|||||||
|
|
||||||
// Be less aggressive on secondary command buffer usage on
|
// Be less aggressive on secondary command buffer usage on
|
||||||
// drivers that do not natively support them
|
// drivers that do not natively support them
|
||||||
hints.preferPrimaryCmdBufs = !hints.preferRenderPassOps
|
hints.preferPrimaryCmdBufs = m_adapter->matchesDriver(VK_DRIVER_ID_MESA_HONEYKRISP);
|
||||||
|| m_adapter->matchesDriver(VK_DRIVER_ID_MESA_HONEYKRISP);
|
|
||||||
return hints;
|
return hints;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user