mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-26 15:03:02 +08:00
Allow Device creating multiple CSRs [8/n]
Use OsContextId instead of DeviceIndex for residency Change-Id: Ib2367b32b5b3e320252d8254f1042f1c3d497068
This commit is contained in:
committed by
sys_ocldev
parent
3dd13e08a6
commit
b728526c4e
@@ -22,13 +22,13 @@ ScratchSpaceControllerBase::ScratchSpaceControllerBase(const HardwareInfo &info,
|
||||
void ScratchSpaceControllerBase::setRequiredScratchSpace(void *sshBaseAddress,
|
||||
uint32_t requiredPerThreadScratchSize,
|
||||
uint32_t currentTaskCount,
|
||||
uint32_t deviceIdx,
|
||||
uint32_t contextId,
|
||||
bool &stateBaseAddressDirty,
|
||||
bool &vfeStateDirty) {
|
||||
size_t requiredScratchSizeInBytes = requiredPerThreadScratchSize * computeUnitsUsedForScratch;
|
||||
if (requiredScratchSizeInBytes && (!scratchAllocation || scratchSizeBytes < requiredScratchSizeInBytes)) {
|
||||
if (scratchAllocation) {
|
||||
scratchAllocation->updateTaskCount(currentTaskCount, deviceIdx);
|
||||
scratchAllocation->updateTaskCount(currentTaskCount, contextId);
|
||||
csrAllocationStorage.storeAllocation(std::unique_ptr<GraphicsAllocation>(scratchAllocation), TEMPORARY_ALLOCATION);
|
||||
}
|
||||
scratchSizeBytes = requiredScratchSizeInBytes;
|
||||
|
||||
Reference in New Issue
Block a user