Skip to content

Commit 69c3304

Browse files
Extract methods to aub_command_stream_receiver_hw_base.inl
Related-To: NEO-3016 Change-Id: I6efcd9cb1f2470c17b8caec2e8fb54d7ca45b448 Signed-off-by: Maciej Dziuban <[email protected]>
1 parent 67d39b1 commit 69c3304

7 files changed

+43
-29
lines changed

runtime/command_stream/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ set(RUNTIME_SRCS_COMMAND_STREAM
99
${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver.cpp
1010
${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver.h
1111
${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_hw.h
12-
${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_hw.inl
12+
${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_hw_base.inl
13+
${CMAKE_CURRENT_SOURCE_DIR}/aub_command_stream_receiver_hw_bdw_plus.inl
1314
${CMAKE_CURRENT_SOURCE_DIR}/aub_stream_provider.h
14-
${CMAKE_CURRENT_SOURCE_DIR}/aub_subcapture.h
1515
${CMAKE_CURRENT_SOURCE_DIR}/aub_subcapture.cpp
16+
${CMAKE_CURRENT_SOURCE_DIR}/aub_subcapture.h
1617
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver.cpp
1718
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver.h
1819
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_hw.h

runtime/command_stream/aub_command_stream_receiver_hw.inl renamed to runtime/command_stream/aub_command_stream_receiver_hw_base.inl

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2017-2019 Intel Corporation
2+
* Copyright (C) 2019 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -579,11 +579,6 @@ inline void AUBCommandStreamReceiverHw<GfxFamily>::waitForTaskCountWithKmdNotify
579579
pollForCompletion();
580580
}
581581

582-
template <typename GfxFamily>
583-
constexpr uint32_t AUBCommandStreamReceiverHw<GfxFamily>::getMaskAndValueForPollForCompletion() {
584-
return 0x100;
585-
}
586-
587582
template <typename GfxFamily>
588583
void AUBCommandStreamReceiverHw<GfxFamily>::makeResidentExternal(AllocationView &allocationView) {
589584
externalAllocations.push_back(allocationView);
@@ -784,12 +779,6 @@ uint32_t AUBCommandStreamReceiverHw<GfxFamily>::getDumpHandle() {
784779
return hashPtrToU32(this);
785780
}
786781

787-
template <typename GfxFamily>
788-
void AUBCommandStreamReceiverHw<GfxFamily>::addContextToken(uint32_t dumpHandle) {
789-
// Some simulator versions don't support adding the context token.
790-
// This hook allows specialization for those that do.
791-
}
792-
793782
template <typename GfxFamily>
794783
void AUBCommandStreamReceiverHw<GfxFamily>::addGUCStartMessage(uint64_t batchBufferAddress) {
795784
typedef typename GfxFamily::MI_BATCH_BUFFER_START MI_BATCH_BUFFER_START;
@@ -828,15 +817,4 @@ void AUBCommandStreamReceiverHw<GfxFamily>::addGUCStartMessage(uint64_t batchBuf
828817
this->flatBatchBufferHelper->setPatchInfoData(patchInfoData);
829818
}
830819

831-
template <typename GfxFamily>
832-
uint32_t AUBCommandStreamReceiverHw<GfxFamily>::getGUCWorkQueueItemHeader() {
833-
uint32_t GUCWorkQueueItemHeader = 0x00030001;
834-
return GUCWorkQueueItemHeader;
835-
}
836-
837-
template <typename GfxFamily>
838-
int AUBCommandStreamReceiverHw<GfxFamily>::getAddressSpaceFromPTEBits(uint64_t entryBits) const {
839-
return AubMemDump::AddressSpaceValues::TraceNonlocal;
840-
}
841-
842820
} // namespace NEO
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Copyright (C) 2019 Intel Corporation
3+
*
4+
* SPDX-License-Identifier: MIT
5+
*
6+
*/
7+
8+
#include "runtime/command_stream/aub_command_stream_receiver_hw_base.inl"
9+
10+
namespace NEO {
11+
12+
template <typename GfxFamily>
13+
constexpr uint32_t AUBCommandStreamReceiverHw<GfxFamily>::getMaskAndValueForPollForCompletion() {
14+
return 0x100;
15+
}
16+
17+
template <typename GfxFamily>
18+
void AUBCommandStreamReceiverHw<GfxFamily>::addContextToken(uint32_t dumpHandle) {
19+
// Some simulator versions don't support adding the context token.
20+
// This hook allows specialization for those that do.
21+
}
22+
23+
template <typename GfxFamily>
24+
uint32_t AUBCommandStreamReceiverHw<GfxFamily>::getGUCWorkQueueItemHeader() {
25+
uint32_t GUCWorkQueueItemHeader = 0x00030001;
26+
return GUCWorkQueueItemHeader;
27+
}
28+
29+
template <typename GfxFamily>
30+
int AUBCommandStreamReceiverHw<GfxFamily>::getAddressSpaceFromPTEBits(uint64_t entryBits) const {
31+
return AubMemDump::AddressSpaceValues::TraceNonlocal;
32+
}
33+
34+
} // namespace NEO

runtime/gen10/aub_command_stream_receiver_gen10.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
#include "runtime/command_stream/aub_command_stream_receiver_hw.h"
9-
#include "runtime/command_stream/aub_command_stream_receiver_hw.inl"
9+
#include "runtime/command_stream/aub_command_stream_receiver_hw_bdw_plus.inl"
1010
#include "runtime/helpers/array_count.h"
1111
#include "runtime/helpers/base_object.h"
1212

runtime/gen11/aub_command_stream_receiver_gen11.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
*/
77

88
#include "runtime/command_stream/aub_command_stream_receiver_hw.h"
9-
#include "runtime/command_stream/aub_command_stream_receiver_hw.inl"
9+
#include "runtime/command_stream/aub_command_stream_receiver_hw_bdw_plus.inl"
1010
#include "runtime/helpers/array_count.h"
1111
#include "runtime/helpers/base_object.h"
1212

1313
namespace NEO {
14+
1415
typedef ICLFamily Family;
1516
static auto gfxCore = IGFX_GEN11_CORE;
1617

runtime/gen8/aub_command_stream_receiver_gen8.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
#include "runtime/command_stream/aub_command_stream_receiver_hw.h"
9-
#include "runtime/command_stream/aub_command_stream_receiver_hw.inl"
9+
#include "runtime/command_stream/aub_command_stream_receiver_hw_bdw_plus.inl"
1010
#include "runtime/helpers/array_count.h"
1111
#include "runtime/helpers/base_object.h"
1212

runtime/gen9/aub_command_stream_receiver_gen9.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
#include "runtime/command_stream/aub_command_stream_receiver_hw.h"
9-
#include "runtime/command_stream/aub_command_stream_receiver_hw.inl"
9+
#include "runtime/command_stream/aub_command_stream_receiver_hw_bdw_plus.inl"
1010
#include "runtime/helpers/array_count.h"
1111
#include "runtime/helpers/base_object.h"
1212

0 commit comments

Comments
 (0)