mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 07:14:10 +08:00
Store residency status for each osContext separately
Change-Id: I2f17f68dcef6db7b596a69579a435b7ccd24e44b Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
6be8aee45d
commit
1cd59e927a
@@ -111,9 +111,10 @@ void DrmCommandStreamReceiver<GfxFamily>::processResidency(ResidencyContainer &i
|
||||
auto drmAlloc = static_cast<DrmAllocation *>(alloc);
|
||||
if (drmAlloc->fragmentsStorage.fragmentCount) {
|
||||
for (unsigned int f = 0; f < drmAlloc->fragmentsStorage.fragmentCount; f++) {
|
||||
if (!drmAlloc->fragmentsStorage.fragmentStorageData[f].residency->resident) {
|
||||
const auto osContextId = osContext->getContextId();
|
||||
if (!drmAlloc->fragmentsStorage.fragmentStorageData[f].residency->resident[osContextId]) {
|
||||
makeResident(drmAlloc->fragmentsStorage.fragmentStorageData[f].osHandleStorage->bo);
|
||||
drmAlloc->fragmentsStorage.fragmentStorageData[f].residency->resident = true;
|
||||
drmAlloc->fragmentsStorage.fragmentStorageData[f].residency->resident[osContextId] = true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -134,7 +135,7 @@ void DrmCommandStreamReceiver<GfxFamily>::makeNonResident(GraphicsAllocation &gf
|
||||
}
|
||||
if (gfxAllocation.fragmentsStorage.fragmentCount) {
|
||||
for (auto fragmentId = 0u; fragmentId < gfxAllocation.fragmentsStorage.fragmentCount; fragmentId++) {
|
||||
gfxAllocation.fragmentsStorage.fragmentStorageData[fragmentId].residency->resident = false;
|
||||
gfxAllocation.fragmentsStorage.fragmentStorageData[fragmentId].residency->resident[osContext->getContextId()] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user