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:
parent
1347aeba33
commit
6ecb74d2c0
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user