[perf] add state compute mode dirty flag to allow selective properties update

- full properties update is time intesive task and must be done only once
- selective update can be done after initial update
- dirty flag will allow to distinguish initial update is done

Related-To: NEO-5055

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2023-03-10 13:20:23 +00:00
committed by Compute-Runtime-Automation
parent d93f00e075
commit 24c8f089ed
8 changed files with 50 additions and 6 deletions

View File

@@ -534,6 +534,7 @@ void CommandStreamReceiver::initProgrammingFlags() {
bindingTableBaseAddressRequired = true;
mediaVfeStateDirty = true;
lastVmeSubslicesConfig = false;
stateComputeModeDirty = true;
lastSentL3Config = 0;
lastMediaSamplerConfig = -1;

View File

@@ -159,10 +159,13 @@ class CommandStreamReceiver {
void overrideDispatchPolicy(DispatchMode overrideValue) { this->dispatchMode = overrideValue; }
void setMediaVFEStateDirty(bool dirty) { mediaVfeStateDirty = dirty; }
bool getMediaVFEStateDirty() { return mediaVfeStateDirty; }
bool getMediaVFEStateDirty() const { return mediaVfeStateDirty; }
void setGSBAStateDirty(bool dirty) { GSBAStateDirty = dirty; }
bool getGSBAStateDirty() { return GSBAStateDirty; }
bool getGSBAStateDirty() const { return GSBAStateDirty; }
void setStateComputeModeDirty(bool dirty) { stateComputeModeDirty = dirty; }
bool getStateComputeModeDirty() const { return stateComputeModeDirty; }
void setRequiredScratchSizes(uint32_t newRequiredScratchSize, uint32_t newRequiredPrivateScratchSize);
GraphicsAllocation *getScratchAllocation();
@@ -507,6 +510,7 @@ class CommandStreamReceiver {
bool bindingTableBaseAddressRequired = false;
bool heapStorageRequiresRecyclingTag = false;
bool mediaVfeStateDirty = true;
bool stateComputeModeDirty = true;
bool lastVmeSubslicesConfig = false;
bool timestampPacketWriteEnabled = false;
bool staticWorkPartitioningEnabled = false;

View File

@@ -804,6 +804,7 @@ void CommandStreamReceiverHw<GfxFamily>::programComputeMode(LinearStream &stream
EncodeComputeMode<GfxFamily>::programComputeModeCommandWithSynchronization(
stream, this->streamProperties.stateComputeMode, dispatchFlags.pipelineSelectArgs,
hasSharedHandles(), this->peekRootDeviceEnvironment(), isRcs(), this->dcFlushSupport, logicalStateHelper.get());
this->setStateComputeModeDirty(false);
}
}