mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
VFE state programming cleanup
Change-Id: I38fb47b00211a1d28244369ac417427ada145f61 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
cb3e4eeb84
commit
010e1a4738
@@ -354,7 +354,7 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
|
||||
}
|
||||
|
||||
if (parentKernel) {
|
||||
getCommandStreamReceiver().overrideMediaVFEStateDirty(true);
|
||||
getCommandStreamReceiver().setMediaVFEStateDirty(true);
|
||||
|
||||
if (devQueueHw->getSchedulerReturnInstance() > 0) {
|
||||
waitUntilComplete(completionStamp.taskCount, completionStamp.flushStamp, false);
|
||||
|
||||
@@ -114,7 +114,7 @@ class CommandStreamReceiver {
|
||||
bool isNTo1SubmissionModelEnabled() const { return this->nTo1SubmissionModelEnabled; }
|
||||
void overrideDispatchPolicy(DispatchMode overrideValue) { this->dispatchMode = overrideValue; }
|
||||
|
||||
virtual void overrideMediaVFEStateDirty(bool dirty) { mediaVfeStateDirty = dirty; }
|
||||
void setMediaVFEStateDirty(bool dirty) { mediaVfeStateDirty = dirty; }
|
||||
|
||||
void setRequiredScratchSize(uint32_t newRequiredScratchSize);
|
||||
GraphicsAllocation *getScratchAllocation();
|
||||
|
||||
@@ -81,7 +81,7 @@ class CommandStreamReceiverHw : public CommandStreamReceiver {
|
||||
void programMediaSampler(LinearStream &csr, DispatchFlags &dispatchFlags);
|
||||
void programStateSip(LinearStream &cmdStream, Device &device);
|
||||
void handleEventsTimestampPacketTags(LinearStream &csr, DispatchFlags &dispatchFlags, Device ¤tDevice);
|
||||
virtual void programVFEState(LinearStream &csr, DispatchFlags &dispatchFlags);
|
||||
void programVFEState(LinearStream &csr, DispatchFlags &dispatchFlags);
|
||||
virtual void initPageTableManagerRegisters(LinearStream &csr){};
|
||||
|
||||
void addPipeControlWA(LinearStream &commandStream, bool flushDC);
|
||||
|
||||
@@ -251,7 +251,7 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
|
||||
stateBaseAddressDirty,
|
||||
checkVfeStateDirty);
|
||||
if (checkVfeStateDirty) {
|
||||
overrideMediaVFEStateDirty(true);
|
||||
setMediaVFEStateDirty(true);
|
||||
}
|
||||
makeResident(*scratchSpaceController->getScratchSpaceAllocation());
|
||||
}
|
||||
@@ -735,7 +735,7 @@ template <typename GfxFamily>
|
||||
inline void CommandStreamReceiverHw<GfxFamily>::programVFEState(LinearStream &csr, DispatchFlags &dispatchFlags) {
|
||||
if (mediaVfeStateDirty) {
|
||||
PreambleHelper<GfxFamily>::programVFEState(&csr, hwInfo, requiredScratchSize, getScratchPatchAddress());
|
||||
overrideMediaVFEStateDirty(false);
|
||||
setMediaVFEStateDirty(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,6 @@ class DrmCommandStreamReceiver : public DeviceCommandStreamReceiver<GfxFamily> {
|
||||
void processResidency(ResidencyContainer &allocationsForResidency) override;
|
||||
void makeNonResident(GraphicsAllocation &gfxAllocation) override;
|
||||
bool waitForFlushStamp(FlushStamp &flushStampToWait) override;
|
||||
void overrideMediaVFEStateDirty(bool dirty) override;
|
||||
|
||||
DrmMemoryManager *getMemoryManager();
|
||||
MemoryManager *createMemoryManager(bool enable64kbPages, bool enableLocalMemory) override;
|
||||
@@ -52,12 +51,10 @@ class DrmCommandStreamReceiver : public DeviceCommandStreamReceiver<GfxFamily> {
|
||||
|
||||
protected:
|
||||
void makeResident(BufferObject *bo);
|
||||
void programVFEState(LinearStream &csr, DispatchFlags &dispatchFlags) override;
|
||||
|
||||
std::vector<BufferObject *> residency;
|
||||
std::vector<drm_i915_gem_exec_object2> execObjectsStorage;
|
||||
Drm *drm;
|
||||
gemCloseWorkerMode gemCloseWorkerOperationMode;
|
||||
bool mediaVfeStateLowPriorityDirty = true;
|
||||
};
|
||||
} // namespace OCLRT
|
||||
|
||||
@@ -162,20 +162,4 @@ bool DrmCommandStreamReceiver<GfxFamily>::waitForFlushStamp(FlushStamp &flushSta
|
||||
return true;
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
inline void DrmCommandStreamReceiver<GfxFamily>::overrideMediaVFEStateDirty(bool dirty) {
|
||||
this->mediaVfeStateDirty = dirty;
|
||||
this->mediaVfeStateLowPriorityDirty = dirty;
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
inline void DrmCommandStreamReceiver<GfxFamily>::programVFEState(LinearStream &csr, DispatchFlags &dispatchFlags) {
|
||||
bool ¤tContextDirtyFlag = dispatchFlags.lowPriority ? mediaVfeStateLowPriorityDirty : mediaVfeStateDirty;
|
||||
|
||||
if (currentContextDirtyFlag) {
|
||||
PreambleHelper<GfxFamily>::programVFEState(&csr, hwInfo, requiredScratchSize, getScratchPatchAddress());
|
||||
currentContextDirtyFlag = false;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace OCLRT
|
||||
|
||||
Reference in New Issue
Block a user