mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Fail when handle cannot be obtain for an allocation
If a handle cannot be obtained, like PRIME_HANDLE_TO_FD, then properly check for the error and propagate it upwards. Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
acb8186744
commit
4391ad21bb
@ -160,6 +160,15 @@ class TestedDrmMemoryManager : public MemoryManagerCreate<DrmMemoryManager> {
|
||||
|
||||
bool failOnfindAndReferenceSharedBufferObject = false;
|
||||
|
||||
bool failOnObtainFdFromHandle = false;
|
||||
|
||||
int obtainFdFromHandle(int boHandle, uint32_t rootDeviceIndex) override {
|
||||
if (failOnObtainFdFromHandle) {
|
||||
return -1;
|
||||
}
|
||||
return DrmMemoryManager::obtainFdFromHandle(boHandle, rootDeviceIndex);
|
||||
}
|
||||
|
||||
ExecutionEnvironment *executionEnvironment = nullptr;
|
||||
|
||||
protected:
|
||||
|
Reference in New Issue
Block a user