Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Generals/Code/Libraries/Source/WWVegas/WW3D2/dx8wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1681,6 +1681,13 @@ void DX8Wrapper::End_Scene(bool flip_frames)
}
}

// TheSuperHackers @bugfix 01/2025
// Add delay before releasing resources to allow GPU to complete pending operations.
// This mitigates race conditions in the D3D9-to-D3D12 translation layer on Windows 10+
// where the GPU may still be processing commands from the current frame when the CPU
// releases vertex/index buffers, causing access violations in CViewBoundState::IsDirty.
ThreadClass::Sleep_Ms(50);

// Each frame, release all of the buffers and textures.
Set_Vertex_Buffer(NULL);
Set_Index_Buffer(NULL,0);
Expand Down
7 changes: 7 additions & 0 deletions GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx8wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1844,6 +1844,13 @@ void DX8Wrapper::End_Scene(bool flip_frames)
}
}

// TheSuperHackers @bugfix 01/2025
// Add delay before releasing resources to allow GPU to complete pending operations.
// This mitigates race conditions in the D3D9-to-D3D12 translation layer on Windows 10+
// where the GPU may still be processing commands from the current frame when the CPU
// releases vertex/index buffers, causing access violations in CViewBoundState::IsDirty.
ThreadClass::Sleep_Ms(50);

// Each frame, release all of the buffers and textures.
Set_Vertex_Buffer(NULL);
Set_Index_Buffer(NULL,0);
Expand Down
Loading