mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 23:56:39 +08:00
fix: do not notify KMDAF when lock/unlock fails
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
6fcb0f1407
commit
a26e25f1df
@@ -887,8 +887,10 @@ void *Wddm::lockResource(const D3DKMT_HANDLE &handle, bool applyMakeResidentPrio
|
||||
lock2.hAllocation = handle;
|
||||
lock2.hDevice = this->device;
|
||||
|
||||
[[maybe_unused]] NTSTATUS status = getGdi()->lock2(&lock2);
|
||||
DEBUG_BREAK_IF(status != STATUS_SUCCESS);
|
||||
NTSTATUS status = getGdi()->lock2(&lock2);
|
||||
if (status != STATUS_SUCCESS) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
kmDafLock(handle);
|
||||
return lock2.pData;
|
||||
@@ -900,8 +902,10 @@ void Wddm::unlockResource(const D3DKMT_HANDLE &handle) {
|
||||
unlock2.hAllocation = handle;
|
||||
unlock2.hDevice = this->device;
|
||||
|
||||
[[maybe_unused]] NTSTATUS status = getGdi()->unlock2(&unlock2);
|
||||
DEBUG_BREAK_IF(status != STATUS_SUCCESS);
|
||||
NTSTATUS status = getGdi()->unlock2(&unlock2);
|
||||
if (status != STATUS_SUCCESS) {
|
||||
return;
|
||||
}
|
||||
|
||||
kmDafListener->notifyUnlock(featureTable->flags.ftrKmdDaf, getAdapter(), device, &handle, 1, getGdi()->escape);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user