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

Design / architecture / roadmap discussions related to future of Ogre3D (version 2.0 and above)
Post Reply
rujialiu
Greenskin
Posts: 140
Joined: Mon May 09, 2016 8:21 am
x 11

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

Post by rujialiu » Thu Nov 15, 2018 10:47 am

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);
            }
1 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3840
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 150
Contact:

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

Post by dark_sylinc » Thu Nov 15, 2018 4:53 pm

0 x

Post Reply