Program hardware context in L0 command queue

Related-To: NEO-4577

Change-Id: I204a5e86ad3b23b71071bbbfd58c23a408f6865f
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2020-05-22 18:11:28 +02:00
committed by sys_ocldev
parent ca459b8d59
commit f4ef256900
39 changed files with 195 additions and 122 deletions

View File

@@ -82,7 +82,7 @@ class CommandStreamReceiver {
virtual bool flushBatchedSubmissions() = 0;
bool submitBatchBuffer(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency);
virtual void programHardwareContext() = 0;
virtual void programHardwareContext(LinearStream &cmdStream) = 0;
virtual size_t getCmdsSizeForHardwareContext() const = 0;
MOCKABLE_VIRTUAL void makeResident(GraphicsAllocation &gfxAllocation);
@@ -138,6 +138,7 @@ class CommandStreamReceiver {
GraphicsAllocation *getDebugSurfaceAllocation() const { return debugSurface; }
GraphicsAllocation *allocateDebugSurface(size_t size);
GraphicsAllocation *getPreemptionAllocation() const { return preemptionAllocation; }
GraphicsAllocation *getGlobalFenceAllocation() const { return globalFenceAllocation; }
void requestStallingPipeControlOnNextFlush() { stallingPipeControlOnNextFlushRequired = true; }
bool isStallingPipeControlOnNextFlushRequired() const { return stallingPipeControlOnNextFlushRequired; }

View File

@@ -40,7 +40,7 @@ class CommandStreamReceiverHw : public CommandStreamReceiver {
uint32_t taskLevel, DispatchFlags &dispatchFlags, Device &device) override;
bool flushBatchedSubmissions() override;
void programHardwareContext() override;
void programHardwareContext(LinearStream &cmdStream) override;
size_t getCmdsSizeForHardwareContext() const override;
static void addBatchBufferEnd(LinearStream &commandStream, void **patchLocation);

View File

@@ -143,8 +143,8 @@ inline void CommandStreamReceiverHw<GfxFamily>::addPipeControlCmd(
}
template <typename GfxFamily>
void CommandStreamReceiverHw<GfxFamily>::programHardwareContext() {
programEnginePrologue(commandStream);
void CommandStreamReceiverHw<GfxFamily>::programHardwareContext(LinearStream &cmdStream) {
programEnginePrologue(cmdStream);
}
template <typename GfxFamily>
@@ -294,7 +294,7 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
pageTableManagerInitialized = executionEnvironment.rootDeviceEnvironments[device.getRootDeviceIndex()]->pageTableManager->initPageTableManagerRegisters(this);
}
programHardwareContext();
programHardwareContext(commandStreamCSR);
programComputeMode(commandStreamCSR, dispatchFlags);
programPipelineSelect(commandStreamCSR, dispatchFlags.pipelineSelectArgs);
programL3(commandStreamCSR, dispatchFlags, newL3Config);