mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-28 08:37:12 +08:00
Revert "performance: remove not needed logic"
This reverts commit 0ec4e9333d.
Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f9228ad11b
commit
5dc01e5764
@@ -165,6 +165,7 @@ void CommandStreamReceiver::makeResident(GraphicsAllocation &gfxAllocation) {
|
||||
}
|
||||
|
||||
if (this->dispatchMode == DispatchMode::batchedDispatch) {
|
||||
checkForNewResources(submissionTaskCount, gfxAllocation.getTaskCount(osContext->getContextId()), gfxAllocation);
|
||||
if (!gfxAllocation.isResident(osContext->getContextId())) {
|
||||
this->totalMemoryUsed += gfxAllocation.getUnderlyingBufferSize();
|
||||
}
|
||||
@@ -987,6 +988,17 @@ void CommandStreamReceiver::printDeviceIndex() {
|
||||
}
|
||||
}
|
||||
|
||||
void CommandStreamReceiver::checkForNewResources(TaskCountType submittedTaskCount, TaskCountType allocationTaskCount, GraphicsAllocation &gfxAllocation) {
|
||||
if (useNewResourceImplicitFlush) {
|
||||
if (allocationTaskCount == GraphicsAllocation::objectNotUsed && !GraphicsAllocation::isIsaAllocationType(gfxAllocation.getAllocationType())) {
|
||||
newResources = true;
|
||||
if (debugManager.flags.ProvideVerboseImplicitFlush.get()) {
|
||||
printf("New resource detected of type %llu\n", static_cast<unsigned long long>(gfxAllocation.getAllocationType()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool CommandStreamReceiver::checkImplicitFlushForGpuIdle() {
|
||||
if (useGpuIdleImplicitFlush) {
|
||||
if (this->taskCount == *getTagAddress()) {
|
||||
|
||||
@@ -543,6 +543,7 @@ class CommandStreamReceiver {
|
||||
protected:
|
||||
void cleanupResources();
|
||||
void printDeviceIndex();
|
||||
void checkForNewResources(TaskCountType submittedTaskCount, TaskCountType allocationTaskCount, GraphicsAllocation &gfxAllocation);
|
||||
bool checkImplicitFlushForGpuIdle();
|
||||
void downloadTagAllocation(TaskCountType taskCountToWait);
|
||||
void printTagAddressContent(TaskCountType taskCountToWait, int64_t waitTimeout, bool start);
|
||||
|
||||
Reference in New Issue
Block a user