mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-07-21 06:42:02 +00:00
[idd] cancel stale swap chain assignments
Invalidate in-progress swap chain setup when IddCx unassigns the monitor, and serialize replacement assignments so workers are never started on abandoned handles. Also initialize all worker dependencies before starting the processing thread and treat teardown during SetDevice as normal cancellation.
This commit is contained in:
@@ -36,9 +36,13 @@ using namespace Microsoft::WRL;
|
||||
|
||||
#define STAGING_TEXTURES 3
|
||||
|
||||
class CIndirectMonitorContext;
|
||||
|
||||
class CSwapChainProcessor
|
||||
{
|
||||
private:
|
||||
CIndirectMonitorContext * m_monitorContext;
|
||||
UINT64 m_assignmentGeneration;
|
||||
IDDCX_MONITOR m_monitor;
|
||||
CIndirectDeviceContext * m_devContext;
|
||||
IDDCX_SWAPCHAIN m_hSwapChain;
|
||||
@@ -74,7 +78,8 @@ private:
|
||||
DXGI_COLOR_SPACE_TYPE colorSpace, UINT sdrWhiteLevel);
|
||||
|
||||
public:
|
||||
CSwapChainProcessor(IDDCX_MONITOR monitor, CIndirectDeviceContext * devContext, IDDCX_SWAPCHAIN hSwapChain,
|
||||
CSwapChainProcessor(CIndirectMonitorContext * monitorContext, UINT64 assignmentGeneration,
|
||||
IDDCX_MONITOR monitor, CIndirectDeviceContext * devContext, IDDCX_SWAPCHAIN hSwapChain,
|
||||
std::shared_ptr<CD3D11Device> dx11Device, std::shared_ptr<CD3D12Device> dx12Device, HANDLE newFrameEvent);
|
||||
~CSwapChainProcessor();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user