mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 09:58:55 +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
@@ -278,17 +278,16 @@ HWTEST_F(CommandStreamReceiverTest, givenDebugVariableEnabledWhenCreatingCsrThen
|
||||
DebugManagerStateRestore restore;
|
||||
|
||||
DebugManager.flags.EnableTimestampPacket.set(true);
|
||||
ExecutionEnvironment executionEnvironment;
|
||||
CommandStreamReceiverHw<FamilyType> csr1(*platformDevices[0], executionEnvironment);
|
||||
CommandStreamReceiverHw<FamilyType> csr1(*pDevice->executionEnvironment);
|
||||
EXPECT_TRUE(csr1.peekTimestampPacketWriteEnabled());
|
||||
|
||||
DebugManager.flags.EnableTimestampPacket.set(false);
|
||||
CommandStreamReceiverHw<FamilyType> csr2(*platformDevices[0], executionEnvironment);
|
||||
CommandStreamReceiverHw<FamilyType> csr2(*pDevice->executionEnvironment);
|
||||
EXPECT_FALSE(csr2.peekTimestampPacketWriteEnabled());
|
||||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverTest, whenCsrIsCreatedThenUseTimestampPacketWriteIfPossible) {
|
||||
CommandStreamReceiverHw<FamilyType> csr(*platformDevices[0], *pDevice->executionEnvironment);
|
||||
CommandStreamReceiverHw<FamilyType> csr(*pDevice->executionEnvironment);
|
||||
EXPECT_EQ(UnitTestHelper<FamilyType>::isTimestampPacketWriteSupported(), csr.peekTimestampPacketWriteEnabled());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user