Skip to content

Commit a90270c

Browse files
Extract functions to state_base_address_bdw_plus.inl
Change-Id: I577488aa18b7ca53e87c5e05c383d9879c545fbb Related-To: NEO-3016 Signed-off-by: Maciej Dziuban <[email protected]>
1 parent 3d3e6b9 commit a90270c

File tree

7 files changed

+39
-26
lines changed

7 files changed

+39
-26
lines changed

runtime/gen10/state_base_address_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/helpers/state_base_address.h"
9-
#include "runtime/helpers/state_base_address.inl"
9+
#include "runtime/helpers/state_base_address_bdw_plus.inl"
1010

1111
namespace NEO {
1212
template struct StateBaseAddressHelper<CNLFamily>;

runtime/gen11/state_base_address_gen11.cpp

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

88
#include "runtime/helpers/state_base_address.h"
9-
#include "runtime/helpers/state_base_address.inl"
9+
#include "runtime/helpers/state_base_address_bdw_plus.inl"
1010

1111
namespace NEO {
1212
template struct StateBaseAddressHelper<ICLFamily>;

runtime/gen8/state_base_address_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/helpers/state_base_address.h"
9-
#include "runtime/helpers/state_base_address.inl"
9+
#include "runtime/helpers/state_base_address_bdw_plus.inl"
1010

1111
namespace NEO {
1212
template struct StateBaseAddressHelper<BDWFamily>;

runtime/gen9/state_base_address_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/helpers/state_base_address.h"
9-
#include "runtime/helpers/state_base_address.inl"
9+
#include "runtime/helpers/state_base_address_bdw_plus.inl"
1010

1111
namespace NEO {
1212
template struct StateBaseAddressHelper<SKLFamily>;

runtime/helpers/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ set(RUNTIME_SRCS_HELPERS_BASE
7676
${CMAKE_CURRENT_SOURCE_DIR}/queue_helpers.h
7777
${CMAKE_CURRENT_SOURCE_DIR}/sampler_helpers.h
7878
${CMAKE_CURRENT_SOURCE_DIR}/state_base_address.h
79-
${CMAKE_CURRENT_SOURCE_DIR}/state_base_address.inl
79+
${CMAKE_CURRENT_SOURCE_DIR}/state_base_address_base.inl
80+
${CMAKE_CURRENT_SOURCE_DIR}/state_base_address_bdw_plus.inl
8081
${CMAKE_CURRENT_SOURCE_DIR}/stdio.h
8182
${CMAKE_CURRENT_SOURCE_DIR}/string.h
8283
${CMAKE_CURRENT_SOURCE_DIR}/string_helpers.h

runtime/helpers/state_base_address.inl renamed to runtime/helpers/state_base_address_base.inl

Lines changed: 1 addition & 21 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
*
@@ -62,24 +62,4 @@ void StateBaseAddressHelper<GfxFamily>::programStateBaseAddress(
6262
appendStateBaseAddressParameters(pCmd, dsh, ioh, ssh, generalStateBase, internalHeapBase, gmmHelper, dispatchFlags);
6363
}
6464

65-
template <typename GfxFamily>
66-
void StateBaseAddressHelper<GfxFamily>::appendStateBaseAddressParameters(
67-
STATE_BASE_ADDRESS *stateBaseAddress,
68-
const IndirectHeap &dsh,
69-
const IndirectHeap &ioh,
70-
const IndirectHeap &ssh,
71-
uint64_t generalStateBase,
72-
uint64_t internalHeapBase,
73-
GmmHelper *gmmHelper,
74-
DispatchFlags &dispatchFlags) {
75-
}
76-
77-
template <typename GfxFamily>
78-
void StateBaseAddressHelper<GfxFamily>::programBindingTableBaseAddress(LinearStream &commandStream, const IndirectHeap &ssh,
79-
size_t stateBaseAddressCmdOffset, GmmHelper *gmmHelper) {
80-
81-
auto sbaCommand = static_cast<STATE_BASE_ADDRESS *>(ptrOffset(commandStream.getCpuBase(), stateBaseAddressCmdOffset));
82-
UNRECOVERABLE_IF(sbaCommand->getSurfaceStateBaseAddress() != ssh.getGraphicsAllocation()->getGpuAddress());
83-
}
84-
8565
} // namespace NEO
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Copyright (C) 2019 Intel Corporation
3+
*
4+
* SPDX-License-Identifier: MIT
5+
*
6+
*/
7+
8+
#include "runtime/helpers/state_base_address_base.inl"
9+
10+
namespace NEO {
11+
12+
template <typename GfxFamily>
13+
void StateBaseAddressHelper<GfxFamily>::appendStateBaseAddressParameters(
14+
STATE_BASE_ADDRESS *stateBaseAddress,
15+
const IndirectHeap &dsh,
16+
const IndirectHeap &ioh,
17+
const IndirectHeap &ssh,
18+
uint64_t generalStateBase,
19+
uint64_t internalHeapBase,
20+
GmmHelper *gmmHelper,
21+
DispatchFlags &dispatchFlags) {
22+
}
23+
24+
template <typename GfxFamily>
25+
void StateBaseAddressHelper<GfxFamily>::programBindingTableBaseAddress(LinearStream &commandStream, const IndirectHeap &ssh,
26+
size_t stateBaseAddressCmdOffset, GmmHelper *gmmHelper) {
27+
28+
auto sbaCommand = static_cast<STATE_BASE_ADDRESS *>(ptrOffset(commandStream.getCpuBase(), stateBaseAddressCmdOffset));
29+
UNRECOVERABLE_IF(sbaCommand->getSurfaceStateBaseAddress() != ssh.getGraphicsAllocation()->getGpuAddress());
30+
}
31+
32+
} // namespace NEO

0 commit comments

Comments
 (0)