mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
Fix to dispatch MEDIA_VFE_STATE with updated scratchSpacePointer & Size
Minor fix to reset scratch space size and indirect params during cmdList reset Signed-off-by: Vinod Tipparaju <vinod.tipparaju@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
4e737adb05
commit
494a59c7df
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -131,6 +131,7 @@ class CommandStreamReceiver {
|
||||
void overrideDispatchPolicy(DispatchMode overrideValue) { this->dispatchMode = overrideValue; }
|
||||
|
||||
void setMediaVFEStateDirty(bool dirty) { mediaVfeStateDirty = dirty; }
|
||||
bool getMediaVFEStateDirty() { return mediaVfeStateDirty; }
|
||||
|
||||
void setRequiredScratchSizes(uint32_t newRequiredScratchSize, uint32_t newRequiredPrivateScratchSize);
|
||||
GraphicsAllocation *getScratchAllocation();
|
||||
|
||||
@@ -49,6 +49,9 @@ class ScratchSpaceController {
|
||||
|
||||
virtual uint64_t calculateNewGSH() = 0;
|
||||
virtual uint64_t getScratchPatchAddress() = 0;
|
||||
inline uint32_t getPerThreadScratchSpaceSize() {
|
||||
return static_cast<uint32_t>(scratchSizeBytes / computeUnitsUsedForScratch);
|
||||
}
|
||||
|
||||
virtual void reserveHeap(IndirectHeap::Type heapType, IndirectHeap *&indirectHeap) = 0;
|
||||
virtual void programHeaps(HeapContainer &heapContainer,
|
||||
|
||||
@@ -31,7 +31,7 @@ void ScratchSpaceControllerBase::setRequiredScratchSpace(void *sshBaseAddress,
|
||||
bool &stateBaseAddressDirty,
|
||||
bool &vfeStateDirty) {
|
||||
size_t requiredScratchSizeInBytes = requiredPerThreadScratchSize * computeUnitsUsedForScratch;
|
||||
if (requiredScratchSizeInBytes && (!scratchAllocation || scratchSizeBytes < requiredScratchSizeInBytes)) {
|
||||
if (requiredScratchSizeInBytes && (scratchSizeBytes < requiredScratchSizeInBytes)) {
|
||||
if (scratchAllocation) {
|
||||
scratchAllocation->updateTaskCount(currentTaskCount, osContext.getContextId());
|
||||
csrAllocationStorage.storeAllocation(std::unique_ptr<GraphicsAllocation>(scratchAllocation), TEMPORARY_ALLOCATION);
|
||||
|
||||
Reference in New Issue
Block a user