1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-31 05:52:11 +01:00

[dxvk] Check if xfb buffers have actually changed on binding

We should avoid redundant render pass spilling at all costs.
This affects all games using deferred contexts for rendering
due to their implicit use of ClearState and RestoreState.
This commit is contained in:
Philip Rebohle 2019-09-21 05:13:05 +02:00
parent 1347aeba33
commit 6ecb74d2c0
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -253,12 +253,15 @@ namespace dxvk {
uint32_t binding,
const DxvkBufferSlice& buffer,
const DxvkBufferSlice& counter) {
this->spillRenderPass();
if (!m_state.xfb.buffers [binding].matches(buffer)
|| !m_state.xfb.counters[binding].matches(counter)) {
this->spillRenderPass();
m_state.xfb.buffers [binding] = buffer;
m_state.xfb.counters[binding] = counter;
m_flags.set(DxvkContextFlag::GpDirtyXfbBuffers);
m_state.xfb.buffers [binding] = buffer;
m_state.xfb.counters[binding] = counter;
m_flags.set(DxvkContextFlag::GpDirtyXfbBuffers);
}
}