Skip to content

Commit ba9c21c

Browse files
kgibalaCompute-Runtime-Automation
authored andcommitted
Refactor functions
Use unified access pattern in obtainPipeControlAndProgramPostSyncOperation Rename getExecutionEnvironment to peekExecutionEnvironment Related-To: NEO-3210 Change-Id: Iedf30833704e2fc4b8822f5d19d36a230f140f27 Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
1 parent 9ac13fb commit ba9c21c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

runtime/command_stream/command_stream_receiver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class CommandStreamReceiver {
9393

9494
LinearStream &getCS(size_t minRequiredSize = 1024u);
9595
OSInterface *getOSInterface() const { return osInterface; };
96-
ExecutionEnvironment &getExecutionEnvironment() const { return executionEnvironment; };
96+
ExecutionEnvironment &peekExecutionEnvironment() const { return executionEnvironment; };
9797

9898
MOCKABLE_VIRTUAL void setTagAllocation(GraphicsAllocation *allocation);
9999
GraphicsAllocation *getTagAllocation() const {

runtime/command_stream/command_stream_receiver_hw_base.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
179179
auto address = getTagAllocation()->getGpuAddress();
180180
PipeControlHelper<GfxFamily>::obtainPipeControlAndProgramPostSyncOperation(commandStreamTask,
181181
PIPE_CONTROL::POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA,
182-
address, taskCount + 1, dispatchFlags.dcFlush, device.getHardwareInfo());
182+
address, taskCount + 1, dispatchFlags.dcFlush, peekHwInfo());
183183

184184
this->latestSentTaskCount = taskCount + 1;
185185
DBG_LOG(LogTaskCounts, __FUNCTION__, "Line: ", __LINE__, "taskCount", taskCount);

runtime/command_stream/experimental_command_buffer.inl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ size_t ExperimentalCommandBuffer::getTimeStampPipeControlSize() noexcept {
6363
using PIPE_CONTROL = typename GfxFamily::PIPE_CONTROL;
6464

6565
// Two P_C for timestamps
66-
return 2 * PipeControlHelper<GfxFamily>::getSizeForPipeControlWithPostSyncOperation(*commandStreamReceiver->getExecutionEnvironment().getHardwareInfo());
66+
return 2 * PipeControlHelper<GfxFamily>::getSizeForPipeControlWithPostSyncOperation(*commandStreamReceiver->peekExecutionEnvironment().getHardwareInfo());
6767
}
6868

6969
template <typename GfxFamily>
@@ -73,7 +73,7 @@ void ExperimentalCommandBuffer::addTimeStampPipeControl() {
7373
uint64_t timeStampAddress = timestamps->getGpuAddress() + timestampsOffset;
7474

7575
PipeControlHelper<GfxFamily>::obtainPipeControlAndProgramPostSyncOperation(*currentStream,
76-
PIPE_CONTROL::POST_SYNC_OPERATION_WRITE_TIMESTAMP, timeStampAddress, 0llu, false, *commandStreamReceiver->getExecutionEnvironment().getHardwareInfo());
76+
PIPE_CONTROL::POST_SYNC_OPERATION_WRITE_TIMESTAMP, timeStampAddress, 0llu, false, *commandStreamReceiver->peekExecutionEnvironment().getHardwareInfo());
7777

7878
//moving to next chunk
7979
timestampsOffset += sizeof(uint64_t);

0 commit comments

Comments
 (0)