diff --git a/src/d3d11/d3d11_context.cpp b/src/d3d11/d3d11_context.cpp index 977a403e0..4b06ae380 100644 --- a/src/d3d11/d3d11_context.cpp +++ b/src/d3d11/d3d11_context.cpp @@ -386,11 +386,16 @@ namespace dxvk { const UINT Values[4]) { D3D10DeviceLock lock = LockContext(); - auto uav = static_cast(pUnorderedAccessView); - - if (!uav) + if (!pUnorderedAccessView) return; + Com qiUav; + + if (FAILED(pUnorderedAccessView->QueryInterface(IID_PPV_ARGS(&qiUav)))) + return; + + auto uav = static_cast(qiUav.ptr()); + // Gather UAV format info. We'll use this to determine // whether we need to create a temporary view or not. D3D11_UNORDERED_ACCESS_VIEW_DESC uavDesc;