mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-27 04:54:15 +01:00
[d3d11] Reset dirty tracking when re-applying context state
This commit is contained in:
parent
9d890c75ac
commit
3e6dfcfb15
@ -4746,6 +4746,15 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void D3D11CommonContext<ContextType>::ResetDirtyTracking() {
|
||||
// Must only be called when all bindings are guaranteed to get applied
|
||||
// to the DXVK context before the next draw or dispatch command.
|
||||
m_state.lazy.bindingsDirty.reset();
|
||||
m_state.lazy.shadersDirty = 0u;
|
||||
}
|
||||
|
||||
|
||||
template<typename ContextType>
|
||||
void D3D11CommonContext<ContextType>::ResetStagingBuffer() {
|
||||
m_staging.reset();
|
||||
@ -4880,6 +4889,8 @@ namespace dxvk {
|
||||
for (uint32_t i = 0; i < m_state.so.targets.size(); i++)
|
||||
BindXfbBuffer(i, m_state.so.targets[i].buffer.ptr(), ~0u);
|
||||
|
||||
ResetDirtyTracking();
|
||||
|
||||
for (uint32_t i = 0; i < uint32_t(DxbcProgramType::Count); i++) {
|
||||
auto stage = DxbcProgramType(i);
|
||||
|
||||
|
@ -992,6 +992,8 @@ namespace dxvk {
|
||||
|
||||
void ResetContextState();
|
||||
|
||||
void ResetDirtyTracking();
|
||||
|
||||
void ResetStagingBuffer();
|
||||
|
||||
template<DxbcProgramType ShaderStage, typename T>
|
||||
|
@ -754,7 +754,11 @@ namespace dxvk {
|
||||
if (!pState)
|
||||
return;
|
||||
|
||||
// Reset all state affected by the current context state
|
||||
// Clear dirty tracking here since all context state will be
|
||||
// re-applied anyway when the context state is swapped in again.
|
||||
ResetDirtyTracking();
|
||||
|
||||
// Reset all state affected by the current context state.
|
||||
ResetCommandListState();
|
||||
|
||||
Com<D3D11DeviceContextState, false> oldState = std::move(m_stateObject);
|
||||
|
Loading…
x
Reference in New Issue
Block a user