mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
fix: return correct device address for standalone CB Event
Related-To: NEO-8145 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
cb914a7b49
commit
5d6ce43cf9
@@ -19,19 +19,12 @@ ZE_APIEXPORT ze_result_t ZE_APICALL
|
||||
zexEventGetDeviceAddress(ze_event_handle_t event, uint64_t *completionValue, uint64_t *address) {
|
||||
auto eventObj = Event::fromHandle(event);
|
||||
|
||||
if (!eventObj || !eventObj->isCounterBased() || !completionValue || !address) {
|
||||
if (!eventObj || !eventObj->isCounterBased() || !eventObj->getInOrderExecInfo() || !completionValue || !address) {
|
||||
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
|
||||
}
|
||||
|
||||
*completionValue = eventObj->getInOrderExecSignalValueWithSubmissionCounter();
|
||||
|
||||
auto deviceAlloc = eventObj->getInOrderExecDataAllocation();
|
||||
|
||||
if (deviceAlloc) {
|
||||
*address = deviceAlloc->getGpuAddress() + eventObj->getInOrderAllocationOffset();
|
||||
} else {
|
||||
*address = 0;
|
||||
}
|
||||
*address = eventObj->getInOrderExecInfo()->getBaseDeviceAddress() + eventObj->getInOrderAllocationOffset();
|
||||
|
||||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user