mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 06:23:01 +08:00
refactor: encapsulate condition
Related-To: NEO-14844 Signed-off-by: Tomasz Biernacik <tomasz.biernacik@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9619adbf4e
commit
2da77209dc
@@ -1574,4 +1574,10 @@ size_t CommandQueue::calculateHostPtrSizeForImage(const size_t *region, size_t r
|
||||
return Image::calculateHostPtrSize(region, dstRowPitch, dstSlicePitch, bytesPerPixel, image->getImageDesc().image_type);
|
||||
}
|
||||
|
||||
void CommandQueue::registerWalkerWithProfilingEnqueued(Event *event) {
|
||||
if (this->shouldRegisterEnqueuedWalkerWithProfiling && isProfilingEnabled() && event) {
|
||||
this->isWalkerWithProfilingEnqueued = true;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -415,14 +415,7 @@ class CommandQueue : public BaseObject<_cl_command_queue> {
|
||||
return this->isCacheFlushOnNextBcsWriteRequired && this->isImageWriteOperation(cmdType);
|
||||
}
|
||||
|
||||
bool getShouldRegisterEnqueuedWalkerWithProfiling() {
|
||||
return this->shouldRegisterEnqueuedWalkerWithProfiling;
|
||||
}
|
||||
|
||||
void registerWalkerWithProfilingEnqueued() {
|
||||
this->isWalkerWithProfilingEnqueued = true;
|
||||
}
|
||||
|
||||
void registerWalkerWithProfilingEnqueued(Event *event);
|
||||
bool getAndClearIsWalkerWithProfilingEnqueued() {
|
||||
bool retVal = this->isWalkerWithProfilingEnqueued;
|
||||
this->isWalkerWithProfilingEnqueued = false;
|
||||
|
||||
@@ -155,9 +155,7 @@ void HardwareInterface<GfxFamily>::dispatchWalker(
|
||||
dispatchInfo.dispatchEpilogueCommands(*commandStream, walkerArgs.timestampPacketDependencies, commandQueue.getDevice().getRootDeviceEnvironment());
|
||||
}
|
||||
|
||||
if (commandQueue.getShouldRegisterEnqueuedWalkerWithProfiling() && commandQueue.isProfilingEnabled() && walkerArgs.event) {
|
||||
commandQueue.registerWalkerWithProfilingEnqueued();
|
||||
}
|
||||
commandQueue.registerWalkerWithProfilingEnqueued(walkerArgs.event);
|
||||
|
||||
if (PauseOnGpuProperties::gpuScratchRegWriteAllowed(debugManager.flags.GpuScratchRegWriteAfterWalker.get(), commandQueue.getGpgpuCommandStreamReceiver().peekTaskCount())) {
|
||||
uint32_t registerOffset = debugManager.flags.GpuScratchRegWriteRegisterOffset.get();
|
||||
|
||||
Reference in New Issue
Block a user