mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 22:43:00 +08:00
[2/n] Move Hardware Info to Execution Environment
- remove hwInfo from the csr functions where it was passed as a parameter, now csr functions have access to hwInfo by Execution Environment Change-Id: I756ae63d9728c9c963571147bab97f9e1c15797b Signed-off-by: Adam Stefanowski <adam.stefanowski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
ca4b47f7f4
commit
16aee8cc46
@@ -71,14 +71,14 @@ struct KmdNotifyTests : public ::testing::Test {
|
||||
template <typename Family>
|
||||
class MockKmdNotifyCsr : public UltCommandStreamReceiver<Family> {
|
||||
public:
|
||||
MockKmdNotifyCsr(const HardwareInfo &hwInfo, const ExecutionEnvironment &executionEnvironment) : UltCommandStreamReceiver<Family>(hwInfo, const_cast<ExecutionEnvironment &>(executionEnvironment)) {}
|
||||
MockKmdNotifyCsr(const ExecutionEnvironment &executionEnvironment) : UltCommandStreamReceiver<Family>(const_cast<ExecutionEnvironment &>(executionEnvironment)) {}
|
||||
MOCK_METHOD1(waitForFlushStamp, bool(FlushStamp &flushStampToWait));
|
||||
MOCK_METHOD3(waitForCompletionWithTimeout, bool(bool enableTimeout, int64_t timeoutMs, uint32_t taskCountToWait));
|
||||
};
|
||||
|
||||
template <typename Family>
|
||||
MockKmdNotifyCsr<Family> *createMockCsr() {
|
||||
auto csr = new ::testing::NiceMock<MockKmdNotifyCsr<Family>>(device->getHardwareInfo(), *device->executionEnvironment);
|
||||
auto csr = new ::testing::NiceMock<MockKmdNotifyCsr<Family>>(*device->executionEnvironment);
|
||||
device->resetCommandStreamReceiver(csr);
|
||||
|
||||
mockKmdNotifyHelper = new MockKmdNotifyHelper(&device->getHardwareInfo().capabilityTable.kmdNotifyProperties);
|
||||
|
||||
@@ -253,7 +253,7 @@ TEST_F(TimestampPacketSimpleTests, whenAskedForStampAddressThenReturnWithValidOf
|
||||
}
|
||||
|
||||
HWTEST_F(TimestampPacketTests, givenCommandStreamReceiverHwWhenObtainingPreferredTagPoolSizeThenReturnCorrectValue) {
|
||||
CommandStreamReceiverHw<FamilyType> csr(*platformDevices[0], *executionEnvironment);
|
||||
CommandStreamReceiverHw<FamilyType> csr(*executionEnvironment);
|
||||
EXPECT_EQ(512u, csr.getPreferredTagPoolSize());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user