fix: track shifted contextIds in bitset in bindlessHeapsHelper

- bitset is 64 bit in size, context ids may go beyond that limit
when multiple devices are available
- this change subtracts contextId of first context for a given root
device - tracked state dirty contexts ids are now zero-based

Resolves: GSD-10025

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2024-10-08 17:51:14 +00:00
committed by Compute-Runtime-Automation
parent 46a63d3e0e
commit 5ae2552b4b
4 changed files with 81 additions and 2 deletions

View File

@@ -368,6 +368,14 @@ void MemoryManager::updateLatestContextIdForRootDevice(uint32_t rootDeviceIndex)
}
}
uint32_t MemoryManager::getFirstContextIdForRootDevice(uint32_t rootDeviceIndex) {
auto entry = rootDeviceIndexToContextId.find(rootDeviceIndex);
if (entry != rootDeviceIndexToContextId.end()) {
return entry->second + 1;
}
return 0;
}
OsContext *MemoryManager::createAndRegisterOsContext(CommandStreamReceiver *commandStreamReceiver,
const EngineDescriptor &engineDescriptor) {
auto rootDeviceIndex = commandStreamReceiver->getRootDeviceIndex();