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>
This commit is contained in:
Krzysztof Gibala
2019-08-19 10:55:35 +02:00
committed by sys_ocldev
parent 9ac13fb66e
commit ba9c21cf82
3 changed files with 4 additions and 4 deletions

View File

@@ -93,7 +93,7 @@ class CommandStreamReceiver {
LinearStream &getCS(size_t minRequiredSize = 1024u);
OSInterface *getOSInterface() const { return osInterface; };
ExecutionEnvironment &getExecutionEnvironment() const { return executionEnvironment; };
ExecutionEnvironment &peekExecutionEnvironment() const { return executionEnvironment; };
MOCKABLE_VIRTUAL void setTagAllocation(GraphicsAllocation *allocation);
GraphicsAllocation *getTagAllocation() const {

View File

@@ -179,7 +179,7 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
auto address = getTagAllocation()->getGpuAddress();
PipeControlHelper<GfxFamily>::obtainPipeControlAndProgramPostSyncOperation(commandStreamTask,
PIPE_CONTROL::POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA,
address, taskCount + 1, dispatchFlags.dcFlush, device.getHardwareInfo());
address, taskCount + 1, dispatchFlags.dcFlush, peekHwInfo());
this->latestSentTaskCount = taskCount + 1;
DBG_LOG(LogTaskCounts, __FUNCTION__, "Line: ", __LINE__, "taskCount", taskCount);

View File

@@ -63,7 +63,7 @@ size_t ExperimentalCommandBuffer::getTimeStampPipeControlSize() noexcept {
using PIPE_CONTROL = typename GfxFamily::PIPE_CONTROL;
// Two P_C for timestamps
return 2 * PipeControlHelper<GfxFamily>::getSizeForPipeControlWithPostSyncOperation(*commandStreamReceiver->getExecutionEnvironment().getHardwareInfo());
return 2 * PipeControlHelper<GfxFamily>::getSizeForPipeControlWithPostSyncOperation(*commandStreamReceiver->peekExecutionEnvironment().getHardwareInfo());
}
template <typename GfxFamily>
@@ -73,7 +73,7 @@ void ExperimentalCommandBuffer::addTimeStampPipeControl() {
uint64_t timeStampAddress = timestamps->getGpuAddress() + timestampsOffset;
PipeControlHelper<GfxFamily>::obtainPipeControlAndProgramPostSyncOperation(*currentStream,
PIPE_CONTROL::POST_SYNC_OPERATION_WRITE_TIMESTAMP, timeStampAddress, 0llu, false, *commandStreamReceiver->getExecutionEnvironment().getHardwareInfo());
PIPE_CONTROL::POST_SYNC_OPERATION_WRITE_TIMESTAMP, timeStampAddress, 0llu, false, *commandStreamReceiver->peekExecutionEnvironment().getHardwareInfo());
//moving to next chunk
timestampsOffset += sizeof(uint64_t);