Pass maxOsContextCount to BufferObject

Change-Id: I9e64718a5a64096c8fdc50f3b84d3843701ff602
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2020-08-20 13:20:20 +02:00
committed by sys_ocldev
parent 53cb6a127d
commit 739c1c6c99
10 changed files with 39 additions and 38 deletions

View File

@@ -30,14 +30,14 @@
namespace NEO {
BufferObject::BufferObject(Drm *drm, int handle, size_t size) : drm(drm), refCount(1), handle(handle), size(size), isReused(false) {
BufferObject::BufferObject(Drm *drm, int handle, size_t size, size_t maxOsContextCount) : drm(drm), refCount(1), handle(handle), size(size), isReused(false) {
this->tiling_mode = I915_TILING_NONE;
this->lockedAddress = nullptr;
perContextVmsUsed = drm->isPerContextVMRequired();
if (perContextVmsUsed) {
bindInfo.resize(MemoryManager::maxOsContextCount);
bindInfo.resize(maxOsContextCount);
for (auto &iter : bindInfo) {
iter.fill(false);
}