Improve debug breaks in getDeviceState()

Change-Id: I8a8e1012e812dde8f4e5df54699aa1fc4a0ee070
This commit is contained in:
Dunajski, Bartosz
2018-03-27 10:06:08 +02:00
committed by sys_ocldev
parent 09923fcb39
commit eb6c8aeec9
2 changed files with 4 additions and 6 deletions

View File

@ -799,7 +799,7 @@ bool Wddm::submit(uint64_t commandBuffer, size_t size, void *commandHeader) {
return success;
}
bool Wddm::getDeviceState() {
void Wddm::getDeviceState() {
#ifdef _DEBUG
D3DKMT_GETDEVICESTATE GetDevState;
memset(&GetDevState, 0, sizeof(GetDevState));
@ -809,13 +809,11 @@ bool Wddm::getDeviceState() {
GetDevState.StateType = D3DKMT_DEVICESTATE_EXECUTION;
status = gdi->getDeviceState(&GetDevState);
DEBUG_BREAK_IF(status != STATUS_SUCCESS);
if (status == STATUS_SUCCESS) {
if (GetDevState.ExecutionState == D3DKMT_DEVICEEXECUTION_ERROR_OUTOFMEMORY) {
DEBUG_BREAK_IF(true);
}
DEBUG_BREAK_IF(GetDevState.ExecutionState != D3DKMT_DEVICEEXECUTION_ACTIVE);
}
#endif
return true;
}
void Wddm::handleCompletion() {

View File

@ -252,7 +252,7 @@ class Wddm {
bool destroyDevice();
bool closeAdapter();
bool createMonitoredFence();
bool getDeviceState();
void getDeviceState();
void handleCompletion();
unsigned int readEnablePreemptionRegKey();