Skip to content

Commit f6c893a

Browse files
Pass HardwareInfo to programMemoryPrefetch
Change-Id: I5ed0ae35143ef244e08bc88ba8817ce1cb17369c Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
1 parent 63a801e commit f6c893a

File tree

3 files changed

+5
-18
lines changed

3 files changed

+5
-18
lines changed

shared/source/command_container/command_encoder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ struct EncodeMiFlushDW {
269269

270270
template <typename GfxFamily>
271271
struct EncodeMemoryPrefetch {
272-
static void programMemoryPrefetch(LinearStream &commandStream, const GraphicsAllocation &graphicsAllocation, uint32_t size);
272+
static void programMemoryPrefetch(LinearStream &commandStream, const GraphicsAllocation &graphicsAllocation, uint32_t size, const HardwareInfo &hwInfo);
273273
static size_t getSizeForMemoryPrefetch();
274274
};
275275
} // namespace NEO

shared/source/command_container/command_encoder.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ size_t EncodeMiFlushDW<GfxFamily>::getMiFlushDwCmdSizeForDataWrite() {
496496
}
497497

498498
template <typename GfxFamily>
499-
void EncodeMemoryPrefetch<GfxFamily>::programMemoryPrefetch(LinearStream &commandStream, const GraphicsAllocation &graphicsAllocation, uint32_t size) {}
499+
void EncodeMemoryPrefetch<GfxFamily>::programMemoryPrefetch(LinearStream &commandStream, const GraphicsAllocation &graphicsAllocation, uint32_t size, const HardwareInfo &hwInfo) {}
500500

501501
template <typename GfxFamily>
502502
size_t EncodeMemoryPrefetch<GfxFamily>::getSizeForMemoryPrefetch() { return 0; }

shared/test/unit_test/command_container/command_encoder_tests.cpp

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,13 @@
66
*/
77

88
#include "shared/source/command_container/command_encoder.h"
9-
#include "shared/test/unit_test/fixtures/device_fixture.h"
9+
#include "shared/test/unit_test/helpers/default_hw_info.h"
1010

1111
#include "opencl/test/unit_test/helpers/unit_test_helper.h"
1212
#include "test.h"
1313

1414
using namespace NEO;
15-
16-
class CommandEncoderTests : public DeviceFixture,
17-
public ::testing::Test {
18-
19-
public:
20-
void SetUp() override {
21-
::testing::Test::SetUp();
22-
DeviceFixture::SetUp();
23-
}
24-
void TearDown() override {
25-
DeviceFixture::TearDown();
26-
::testing::Test::TearDown();
27-
}
28-
};
15+
using CommandEncoderTests = ::testing::Test;
2916

3017
HWTEST_F(CommandEncoderTests, givenImmDataWriteWhenProgrammingMiFlushDwThenSetAllRequiredFields) {
3118
using MI_FLUSH_DW = typename FamilyType::MI_FLUSH_DW;
@@ -62,7 +49,7 @@ HWTEST_F(CommandEncoderTests, whenEncodeMemoryPrefetchCalledThenDoNothing) {
6249

6350
GraphicsAllocation allocation(0, GraphicsAllocation::AllocationType::UNKNOWN, nullptr, 123, 456, 789, MemoryPool::LocalMemory);
6451

65-
EncodeMemoryPrefetch<FamilyType>::programMemoryPrefetch(linearStream, allocation, 2);
52+
EncodeMemoryPrefetch<FamilyType>::programMemoryPrefetch(linearStream, allocation, 2, *defaultHwInfo);
6653

6754
EXPECT_EQ(0u, linearStream.getUsed());
6855
EXPECT_EQ(0u, EncodeMemoryPrefetch<FamilyType>::getSizeForMemoryPrefetch());

0 commit comments

Comments
 (0)