···776776 }
777777 D3D_INFO(c, "Native compositor created a timeline semaphore for us.");
778778779779+ // Because importFence throws on failure we use this ref.
779780 unique_compositor_semaphore_ref timeline_semaphore{xcsem};
780781782782+ // unique_compositor_semaphore_ref now owns the handle.
783783+ HANDLE timeline_semaphore_handle_raw = timeline_semaphore_handle.release();
784784+781785 // try to import and signal
782782- wil::com_ptr<ID3D11Fence> fence = import_fence(*(c->fence_device), timeline_semaphore_handle.get());
786786+ wil::com_ptr<ID3D11Fence> fence = import_fence(*(c->fence_device), timeline_semaphore_handle_raw);
783787 HRESULT hr = c->fence_context->Signal(fence.get(), c->timeline_semaphore_value);
784788 if (!SUCCEEDED(hr)) {
785789 D3D_WARN(c,
+4-4
src/xrt/compositor/client/comp_d3d12_client.cpp
···10401040 // Because importFence throws on failure we use this ref.
10411041 unique_compositor_semaphore_ref timeline_semaphore{xcsem};
1042104210431043+ // unique_compositor_semaphore_ref now owns the handle.
10441044+ HANDLE timeline_semaphore_handle_raw = timeline_semaphore_handle.release();
10451045+10431046 // Try to import, importFence throws on failure.
10441047 wil::com_ptr<ID3D12Fence1> fence = xrt::auxiliary::d3d::d3d12::importFence( //
10451048 *(c->device), //
10461046- timeline_semaphore_handle.get()); //
10471047-10481048- // The fence now owns the handle., importFence throws on failure.
10491049- timeline_semaphore_handle.release();
10491049+ timeline_semaphore_handle_raw); //
1050105010511051 // Check flags.
10521052 D3D12_FENCE_FLAGS flags = fence->GetCreationFlags();