mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 19:54:19 +01:00
d3d11: Fix crash when srv is submitted to ClearUnorderedAccessViewUint
* The Settlers submits (possibly incorrectly) an SRV to ClearUnorderedAccessViewUint. The static_cast in the function does not translate correctly and crashes. Native D3D11 behavior is to ignore the bad parameter entirely. It does not clear the SRV nor does it fault or even error with the DEBUG validator.
This commit is contained in:
parent
6199776869
commit
d4c5fc74e7
@ -386,11 +386,16 @@ namespace dxvk {
|
||||
const UINT Values[4]) {
|
||||
D3D10DeviceLock lock = LockContext();
|
||||
|
||||
auto uav = static_cast<D3D11UnorderedAccessView*>(pUnorderedAccessView);
|
||||
|
||||
if (!uav)
|
||||
if (!pUnorderedAccessView)
|
||||
return;
|
||||
|
||||
Com<ID3D11UnorderedAccessView> qiUav;
|
||||
|
||||
if (FAILED(pUnorderedAccessView->QueryInterface(IID_PPV_ARGS(&qiUav))))
|
||||
return;
|
||||
|
||||
auto uav = static_cast<D3D11UnorderedAccessView*>(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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user