Page 1 of 1

[2.1] D3D11 RS can crash with profiling enabled (with patch)

Posted: Thu Nov 15, 2018 10:47 am
by rujialiu
Hi!

When profiling enabled, D3D11 RS crashed in TransferOwnership() in some of our clients, because when QueryInterface(ID3DUserDefinedAnnotation) failed, the current code did not check hr, dereferencing null. Here is a quick fix:

Code: Select all

            hr = mImmediateContext->QueryInterface(__uuidof(ID3DUserDefinedAnnotation), (LPVOID*)&mPerf);
            if (!SUCCEEDED(hr) || !mPerf->GetStatus()) {
                SAFE_RELEASE(mPerf);
            }

Re: [2.1] D3D11 RS can crash with profiling enabled (with patch)

Posted: Thu Nov 15, 2018 4:53 pm
by dark_sylinc