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

Discussion area about developing with Ogre2 branches (2.1, 2.2 and beyond)
Post Reply
rujialiu
Goblin
Posts: 241
Joined: Mon May 09, 2016 8:21 am
x 24

[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: 4149
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 272
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