mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-27 04:11:05 +00:00
Add explicit error message for fetching counters without developer mode
* Now that we can report proper error messages, also return more information and don't use a separate message box.
This commit is contained in:
@@ -593,11 +593,15 @@ rdcarray<CounterResult> D3D12Replay::FetchCounters(const rdcarray<GPUCounter> &c
|
||||
// Only supported with developer mode drivers!!!
|
||||
hr = m_pDevice->SetStablePowerState(TRUE);
|
||||
if(FAILED(hr))
|
||||
MessageBoxA(NULL,
|
||||
"D3D12 counters require Win10 developer mode enabled: Settings > Update & Security "
|
||||
"> For Developers > Developer Mode",
|
||||
"D3D12 Counters Error", MB_ICONWARNING | MB_OK);
|
||||
m_pDevice->CheckHRESULT(hr);
|
||||
{
|
||||
RDResult err;
|
||||
SET_ERROR_RESULT(
|
||||
err, ResultCode::ReplayDeviceLost,
|
||||
"D3D12 counters require Win10 developer mode enabled: Settings > Update & Security "
|
||||
"> For Developers > Developer Mode");
|
||||
m_pDevice->ReportFatalError(err);
|
||||
return ret;
|
||||
}
|
||||
|
||||
D3D12GPUTimerCallback cb(m_pDevice, this, timerQueryHeap, pipestatsQueryHeap, occlusionQueryHeap);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user