mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 17:29:14 +08:00
Interfaces to register resources
Change-Id: Ic587aaa5a41e4e7648211cfa730a0aa5bbc2985a Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
9981cdd9e2
commit
d363448515
@@ -47,6 +47,12 @@ BufferObject::BufferObject(Drm *drm, int handle, size_t size, size_t maxOsContex
|
||||
}
|
||||
}
|
||||
|
||||
BufferObject::~BufferObject() {
|
||||
for (auto &i : bindExtHandles) {
|
||||
drm->unregisterResource(i);
|
||||
}
|
||||
};
|
||||
|
||||
uint32_t BufferObject::getRefCount() const {
|
||||
return this->refCount.load();
|
||||
}
|
||||
@@ -200,4 +206,8 @@ int BufferObject::pin(BufferObject *const boToPin[], size_t numberOfBos, OsConte
|
||||
return this->exec(4u, 0u, 0u, false, osContext, vmHandleId, drmContextId, boToPin, numberOfBos, &execObject[0]);
|
||||
}
|
||||
|
||||
void BufferObject::addBindExtHandle(uint32_t handle) {
|
||||
bindExtHandles.push_back(handle);
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user