mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
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:
committed by
Compute-Runtime-Automation
parent
46a63d3e0e
commit
5ae2552b4b
@@ -75,13 +75,19 @@ GraphicsAllocation *BindlessHeapsHelper::getHeapAllocation(size_t heapSize, size
|
||||
void BindlessHeapsHelper::clearStateDirtyForContext(uint32_t osContextId) {
|
||||
std::lock_guard<std::mutex> autolock(this->mtx);
|
||||
|
||||
stateCacheDirtyForContext.reset(osContextId);
|
||||
uint32_t contextIdShifted = osContextId - memManager->getFirstContextIdForRootDevice(rootDeviceIndex);
|
||||
DEBUG_BREAK_IF(contextIdShifted >= stateCacheDirtyForContext.size());
|
||||
|
||||
stateCacheDirtyForContext.reset(contextIdShifted);
|
||||
}
|
||||
|
||||
bool BindlessHeapsHelper::getStateDirtyForContext(uint32_t osContextId) {
|
||||
std::lock_guard<std::mutex> autolock(this->mtx);
|
||||
|
||||
return stateCacheDirtyForContext.test(osContextId);
|
||||
uint32_t contextIdShifted = osContextId - memManager->getFirstContextIdForRootDevice(rootDeviceIndex);
|
||||
DEBUG_BREAK_IF(contextIdShifted >= stateCacheDirtyForContext.size());
|
||||
|
||||
return stateCacheDirtyForContext.test(contextIdShifted);
|
||||
}
|
||||
|
||||
SurfaceStateInHeapInfo BindlessHeapsHelper::allocateSSInHeap(size_t ssSize, GraphicsAllocation *surfaceAllocation, BindlesHeapType heapType) {
|
||||
|
||||
Reference in New Issue
Block a user