mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-10 12:53:42 +08:00
Remove not used isSimulation functions
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
17d87a4c69
commit
cfe51ff2ba
@ -197,24 +197,6 @@ TEST_F(DeviceTest, givenDeviceWithThreadsPerEUConfigsWhenQueryingEuThreadCountsT
|
||||
EXPECT_EQ(456U, euThreadCounts[1]);
|
||||
}
|
||||
|
||||
HWTEST_F(DeviceTest, givenNoHwCsrTypeAndModifiedDefaultEngineIndexWhenIsSimulationIsCalledThenTrueIsReturned) {
|
||||
EXPECT_FALSE(pDevice->isSimulation());
|
||||
auto csr = TbxCommandStreamReceiver::create("", false, *pDevice->executionEnvironment, 0, 1);
|
||||
pDevice->defaultEngineIndex = 1;
|
||||
pDevice->resetCommandStreamReceiver(csr);
|
||||
|
||||
EXPECT_TRUE(pDevice->isSimulation());
|
||||
|
||||
std::array<CommandStreamReceiverType, 3> exptectedEngineTypes = {CommandStreamReceiverType::CSR_HW,
|
||||
CommandStreamReceiverType::CSR_TBX,
|
||||
CommandStreamReceiverType::CSR_HW};
|
||||
|
||||
for (uint32_t i = 0u; i < 3u; ++i) {
|
||||
auto engineType = pDevice->allEngines[i].commandStreamReceiver->getType();
|
||||
EXPECT_EQ(exptectedEngineTypes[i], engineType);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(DeviceTest, givenRootDeviceWithSubDevicesWhenCreatingThenRootDeviceContextIsInitialized) {
|
||||
DebugManagerStateRestore restore{};
|
||||
DebugManager.flags.DeferOsContextInitialization.set(1);
|
||||
@ -281,49 +263,6 @@ TEST(DeviceCreation, GiveNonExistingFclWhenCreatingDeviceThenCompilerInterfaceIs
|
||||
ASSERT_EQ(nullptr, compilerInterface);
|
||||
}
|
||||
|
||||
TEST(DeviceCreation, givenSelectedAubCsrInDebugVarsWhenDeviceIsCreatedThenIsSimulationReturnsTrue) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.SetCommandStreamReceiver.set(CommandStreamReceiverType::CSR_AUB);
|
||||
|
||||
VariableBackup<UltHwConfig> backup(&ultHwConfig);
|
||||
ultHwConfig.useHwCsr = true;
|
||||
auto mockDevice = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<Device>(nullptr));
|
||||
EXPECT_TRUE(mockDevice->isSimulation());
|
||||
}
|
||||
|
||||
TEST(DeviceCreation, givenSelectedTbxCsrInDebugVarsWhenDeviceIsCreatedThenIsSimulationReturnsTrue) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.SetCommandStreamReceiver.set(CommandStreamReceiverType::CSR_TBX);
|
||||
|
||||
VariableBackup<UltHwConfig> backup(&ultHwConfig);
|
||||
ultHwConfig.useHwCsr = true;
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<Device>(nullptr));
|
||||
EXPECT_TRUE(device->isSimulation());
|
||||
}
|
||||
|
||||
TEST(DeviceCreation, givenSelectedTbxWithAubCsrInDebugVarsWhenDeviceIsCreatedThenIsSimulationReturnsTrue) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.SetCommandStreamReceiver.set(CommandStreamReceiverType::CSR_TBX_WITH_AUB);
|
||||
|
||||
VariableBackup<UltHwConfig> backup(&ultHwConfig);
|
||||
ultHwConfig.useHwCsr = true;
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<Device>(nullptr));
|
||||
EXPECT_TRUE(device->isSimulation());
|
||||
}
|
||||
|
||||
TEST(DeviceCreation, givenHwWithAubCsrInDebugVarsWhenDeviceIsCreatedThenIsSimulationReturnsFalse) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.SetCommandStreamReceiver.set(CommandStreamReceiverType::CSR_HW_WITH_AUB);
|
||||
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<Device>(nullptr));
|
||||
EXPECT_FALSE(device->isSimulation());
|
||||
}
|
||||
|
||||
TEST(DeviceCreation, givenDefaultHwCsrInDebugVarsWhenDeviceIsCreatedThenIsSimulationReturnsFalse) {
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<Device>(nullptr));
|
||||
EXPECT_FALSE(device->isSimulation());
|
||||
}
|
||||
|
||||
TEST(DeviceCreation, givenDeviceWhenItIsCreatedThenOsContextIsRegistredInMemoryManager) {
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
hwInfo.capabilityTable.blitterOperationsSupported = true;
|
||||
@ -509,17 +448,6 @@ HWTEST_F(DeviceTest, givenDebugFlagWhenCreatingRootDeviceWithoutSubDevicesThenWo
|
||||
}
|
||||
}
|
||||
|
||||
TEST(DeviceCreation, givenFtrSimulationModeFlagTrueWhenNoOtherSimulationFlagsArePresentThenIsSimulationReturnsTrue) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
hwInfo.featureTable.flags.ftrSimulationMode = true;
|
||||
|
||||
bool simulationFromDeviceId = hwInfo.capabilityTable.isSimulation(hwInfo.platform.usDeviceID);
|
||||
EXPECT_FALSE(simulationFromDeviceId);
|
||||
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<Device>(&hwInfo));
|
||||
EXPECT_TRUE(device->isSimulation());
|
||||
}
|
||||
|
||||
TEST(DeviceCreation, givenDeviceWhenCheckingGpgpuEnginesCountThenNumberGreaterThanZeroIsReturned) {
|
||||
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<Device>(nullptr));
|
||||
auto &hwHelper = HwHelper::get(renderCoreFamily);
|
||||
|
@ -6,32 +6,13 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/gen11/hw_cmds_ehl.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using EhlTest = Test<ClDeviceFixture>;
|
||||
|
||||
EHLTEST_F(EhlTest, givenDeviceIdWhenAskingForSimulationThenReturnValidValue) {
|
||||
unsigned short ehlSimulationIds[2] = {
|
||||
IEHL_1x4x8_SUPERSKU_DEVICE_A0_ID,
|
||||
0, // default, non-simulation
|
||||
};
|
||||
|
||||
for (auto id : ehlSimulationIds) {
|
||||
auto mockDevice = std::unique_ptr<MockDevice>(createWithUsDeviceId(id));
|
||||
EXPECT_NE(nullptr, mockDevice);
|
||||
|
||||
if (id == 0) {
|
||||
EXPECT_FALSE(mockDevice->isSimulation());
|
||||
} else {
|
||||
EXPECT_TRUE(mockDevice->isSimulation());
|
||||
}
|
||||
}
|
||||
}
|
||||
using EhlTest = Test<DeviceFixture>;
|
||||
|
||||
EHLTEST_F(EhlTest, givenEhlWhenSlmSizeIsRequiredThenReturnCorrectValue) {
|
||||
EXPECT_EQ(64u, pDevice->getHardwareInfo().capabilityTable.slmSize);
|
||||
|
@ -40,25 +40,6 @@ ICLLPTEST_F(IcllpTest, WhenCheckingCapsThenCorrectlyRoundedDivideSqrtIsNotSuppor
|
||||
EXPECT_EQ(0u, caps.singleFpConfig & CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT);
|
||||
}
|
||||
|
||||
ICLLPTEST_F(IcllpTest, WhenCheckingSimulationCapThenResultIsCorrect) {
|
||||
unsigned short iclLpSimulationIds[2] = {
|
||||
IICL_LP_GT1_MOB_DEVICE_F0_ID,
|
||||
0, // default, non-simulation
|
||||
};
|
||||
NEO::MockDevice *mockDevice = nullptr;
|
||||
|
||||
for (auto id : iclLpSimulationIds) {
|
||||
mockDevice = createWithUsDeviceId(id);
|
||||
ASSERT_NE(mockDevice, nullptr);
|
||||
|
||||
if (id == 0)
|
||||
EXPECT_FALSE(mockDevice->isSimulation());
|
||||
else
|
||||
EXPECT_TRUE(mockDevice->isSimulation());
|
||||
delete mockDevice;
|
||||
}
|
||||
}
|
||||
|
||||
ICLLPTEST_F(IcllpTest, GivenICLLPWhenCheckftr64KBpagesThenFalse) {
|
||||
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.ftr64KBpages);
|
||||
}
|
||||
|
@ -36,22 +36,3 @@ LKFTEST_F(LkfTest, givenLkfWhenExtensionStringIsCheckedThenFP64IsNotReported) {
|
||||
EXPECT_EQ(std::string::npos, extensionString.find(std::string("cl_khr_fp64")));
|
||||
EXPECT_EQ(0u, caps.doubleFpConfig);
|
||||
}
|
||||
|
||||
LKFTEST_F(LkfTest, WhenCheckingIsSimulationThenTrueReturnedOnlyForSimulationId) {
|
||||
unsigned short lkfSimulationIds[2] = {
|
||||
ILKF_1x8x8_DESK_DEVICE_F0_ID,
|
||||
0, // default, non-simulation
|
||||
};
|
||||
NEO::MockDevice *mockDevice = nullptr;
|
||||
|
||||
for (auto id : lkfSimulationIds) {
|
||||
mockDevice = createWithUsDeviceId(id);
|
||||
ASSERT_NE(mockDevice, nullptr);
|
||||
|
||||
if (id == 0)
|
||||
EXPECT_FALSE(mockDevice->isSimulation());
|
||||
else
|
||||
EXPECT_TRUE(mockDevice->isSimulation());
|
||||
delete mockDevice;
|
||||
}
|
||||
}
|
||||
|
@ -6,31 +6,13 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/gen12lp/hw_cmds_adlp.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using AdlpUsDeviceIdTest = Test<ClDeviceFixture>;
|
||||
|
||||
ADLPTEST_F(AdlpUsDeviceIdTest, GivenNonZeroIdThenIsSimulationIsTrue) {
|
||||
unsigned short simulationIds[] = {
|
||||
0, // default, non-simulation
|
||||
};
|
||||
|
||||
for (auto id : simulationIds) {
|
||||
auto mockDevice = std::unique_ptr<MockDevice>(createWithUsDeviceId(id));
|
||||
ASSERT_NE(mockDevice.get(), nullptr);
|
||||
|
||||
if (id == 0) {
|
||||
EXPECT_FALSE(mockDevice->isSimulation());
|
||||
} else {
|
||||
EXPECT_TRUE(mockDevice->isSimulation());
|
||||
}
|
||||
}
|
||||
}
|
||||
using AdlpUsDeviceIdTest = Test<DeviceFixture>;
|
||||
|
||||
ADLPTEST_F(AdlpUsDeviceIdTest, givenADLPWhenCheckFtrSupportsInteger64BitAtomicsThenReturnFalse) {
|
||||
EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics);
|
||||
|
@ -15,21 +15,6 @@ using namespace NEO;
|
||||
|
||||
using AdlsUsDeviceIdTest = Test<ClDeviceFixture>;
|
||||
|
||||
ADLSTEST_F(AdlsUsDeviceIdTest, WhenCheckingIsSimulationThenTrueReturnedOnlyForSimulationId) {
|
||||
unsigned short adlsSimulationIds[1] = {
|
||||
0, // default, non-simulation
|
||||
};
|
||||
NEO::MockDevice *mockDevice = nullptr;
|
||||
|
||||
for (auto id : adlsSimulationIds) {
|
||||
mockDevice = createWithUsDeviceId(id);
|
||||
ASSERT_NE(mockDevice, nullptr);
|
||||
|
||||
EXPECT_FALSE(mockDevice->isSimulation());
|
||||
delete mockDevice;
|
||||
}
|
||||
}
|
||||
|
||||
ADLSTEST_F(AdlsUsDeviceIdTest, givenAdlsWhenCheckFtrSupportsInteger64BitAtomicsThenReturnFalse) {
|
||||
EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics);
|
||||
}
|
||||
|
@ -113,31 +113,10 @@ GEN12LPTEST_F(Gen12LpDeviceCaps, givenGen12LpDeviceWhenCheckingPipesSupportThenF
|
||||
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.supportsPipes);
|
||||
}
|
||||
|
||||
using TglLpUsDeviceIdTest = Test<ClDeviceFixture>;
|
||||
|
||||
HWTEST2_F(TglLpUsDeviceIdTest, WhenCheckingSimulationCapThenResultIsCorrect, IsTGLLP) {
|
||||
unsigned short tglLpSimulationIds[2] = {
|
||||
0xFF20,
|
||||
0, // default, non-simulation
|
||||
};
|
||||
NEO::MockDevice *mockDevice = nullptr;
|
||||
|
||||
for (auto id : tglLpSimulationIds) {
|
||||
mockDevice = createWithUsDeviceId(id);
|
||||
ASSERT_NE(mockDevice, nullptr);
|
||||
|
||||
if (id == 0)
|
||||
EXPECT_FALSE(mockDevice->isSimulation());
|
||||
else
|
||||
EXPECT_TRUE(mockDevice->isSimulation());
|
||||
delete mockDevice;
|
||||
}
|
||||
}
|
||||
|
||||
HWTEST2_F(TglLpUsDeviceIdTest, GivenTGLLPWhenCheckftr64KBpagesThenTrue, IsTGLLP) {
|
||||
HWTEST2_F(Gen12LpDeviceCaps, GivenTGLLPWhenCheckftr64KBpagesThenTrue, IsTGLLP) {
|
||||
EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftr64KBpages);
|
||||
}
|
||||
|
||||
HWTEST2_F(TglLpUsDeviceIdTest, givenGen12lpWhenCheckFtrSupportsInteger64BitAtomicsThenReturnTrue, IsTGLLP) {
|
||||
HWTEST2_F(Gen12LpDeviceCaps, givenGen12lpWhenCheckFtrSupportsInteger64BitAtomicsThenReturnTrue, IsTGLLP) {
|
||||
EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics);
|
||||
}
|
||||
|
@ -44,25 +44,3 @@ BXTTEST_F(BxtDeviceCaps, WhenCheckftr64KBpagesThenFalse) {
|
||||
BXTTEST_F(BxtDeviceCaps, WhenCheckFtrSupportsInteger64BitAtomicsThenReturnFalse) {
|
||||
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics);
|
||||
}
|
||||
|
||||
typedef Test<ClDeviceFixture> BxtUsDeviceIdTest;
|
||||
|
||||
BXTTEST_F(BxtUsDeviceIdTest, WhenCheckingIsSimulationThenTrueReturnedOnlyForSimulationId) {
|
||||
unsigned short bxtSimulationIds[3] = {
|
||||
0x9906,
|
||||
0x9907,
|
||||
0, // default, non-simulation
|
||||
};
|
||||
NEO::MockDevice *mockDevice = nullptr;
|
||||
|
||||
for (auto id : bxtSimulationIds) {
|
||||
mockDevice = createWithUsDeviceId(id);
|
||||
ASSERT_NE(mockDevice, nullptr);
|
||||
|
||||
if (id == 0)
|
||||
EXPECT_FALSE(mockDevice->isSimulation());
|
||||
else
|
||||
EXPECT_TRUE(mockDevice->isSimulation());
|
||||
delete mockDevice;
|
||||
}
|
||||
}
|
||||
|
@ -6,25 +6,24 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/hw_cmds_glk.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
typedef Test<ClDeviceFixture> Gen9DeviceCaps;
|
||||
using GlkDeviceCaps = Test<DeviceFixture>;
|
||||
|
||||
GLKTEST_F(Gen9DeviceCaps, WhenCheckingProfilingTimerResolutionThenCorrectResolutionIsReturned) {
|
||||
GLKTEST_F(GlkDeviceCaps, WhenCheckingProfilingTimerResolutionThenCorrectResolutionIsReturned) {
|
||||
const auto &caps = pDevice->getDeviceInfo();
|
||||
EXPECT_EQ(52u, caps.outProfilingTimerResolution);
|
||||
}
|
||||
|
||||
GLKTEST_F(Gen9DeviceCaps, givenGlkDeviceWhenAskedForDoubleSupportThenTrueIsReturned) {
|
||||
GLKTEST_F(GlkDeviceCaps, givenGlkDeviceWhenAskedForDoubleSupportThenTrueIsReturned) {
|
||||
EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsFP64);
|
||||
}
|
||||
|
||||
GLKTEST_F(Gen9DeviceCaps, GlkIs32BitOsAllocatorAvailable) {
|
||||
GLKTEST_F(GlkDeviceCaps, GlkIs32BitOsAllocatorAvailable) {
|
||||
const auto &caps = pDevice->getDeviceInfo();
|
||||
auto memoryManager = pDevice->getMemoryManager();
|
||||
if constexpr (is64bit) {
|
||||
@ -36,27 +35,10 @@ GLKTEST_F(Gen9DeviceCaps, GlkIs32BitOsAllocatorAvailable) {
|
||||
}
|
||||
}
|
||||
|
||||
typedef Test<ClDeviceFixture> GlkUsDeviceIdTest;
|
||||
|
||||
GLKTEST_F(GlkUsDeviceIdTest, WhenCheckingIsSimulationThenTrueReturnedOnlyForSimulationId) {
|
||||
unsigned short glkSimulationIds[3] = {
|
||||
0x3184,
|
||||
0x3185,
|
||||
0, // default, non-simulation
|
||||
};
|
||||
NEO::MockDevice *mockDevice = nullptr;
|
||||
for (auto id : glkSimulationIds) {
|
||||
mockDevice = createWithUsDeviceId(id);
|
||||
ASSERT_NE(mockDevice, nullptr);
|
||||
EXPECT_FALSE(mockDevice->isSimulation());
|
||||
delete mockDevice;
|
||||
}
|
||||
}
|
||||
|
||||
GLKTEST_F(GlkUsDeviceIdTest, GivenGLKWhenCheckftr64KBpagesThenFalse) {
|
||||
GLKTEST_F(GlkDeviceCaps, GivenGLKWhenCheckftr64KBpagesThenFalse) {
|
||||
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.ftr64KBpages);
|
||||
}
|
||||
|
||||
GLKTEST_F(GlkUsDeviceIdTest, givenGlkWhenCheckFtrSupportsInteger64BitAtomicsThenReturnFalse) {
|
||||
GLKTEST_F(GlkDeviceCaps, givenGlkWhenCheckFtrSupportsInteger64BitAtomicsThenReturnFalse) {
|
||||
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics);
|
||||
}
|
||||
|
@ -35,35 +35,10 @@ SKLTEST_F(SklDeviceCaps, WhenCheckingCapabilitiesThenSvmIsEnabled) {
|
||||
EXPECT_EQ(expectedCaps, caps.svmCapabilities);
|
||||
}
|
||||
|
||||
typedef Test<ClDeviceFixture> SklUsDeviceIdTest;
|
||||
|
||||
SKLTEST_F(SklUsDeviceIdTest, WhenCheckingIsSimulationThenTrueReturnedOnlyForSimulationId) {
|
||||
unsigned short sklSimulationIds[6] = {
|
||||
0x0900,
|
||||
0x0901,
|
||||
0x0902,
|
||||
0x0903,
|
||||
0x0904,
|
||||
0, // default, non-simulation
|
||||
};
|
||||
NEO::MockDevice *mockDevice = nullptr;
|
||||
|
||||
for (auto id : sklSimulationIds) {
|
||||
mockDevice = createWithUsDeviceId(id);
|
||||
ASSERT_NE(mockDevice, nullptr);
|
||||
|
||||
if (id == 0)
|
||||
EXPECT_FALSE(mockDevice->isSimulation());
|
||||
else
|
||||
EXPECT_TRUE(mockDevice->isSimulation());
|
||||
delete mockDevice;
|
||||
}
|
||||
}
|
||||
|
||||
SKLTEST_F(SklUsDeviceIdTest, GivenSKLWhenCheckftr64KBpagesThenTrue) {
|
||||
SKLTEST_F(SklDeviceCaps, GivenSKLWhenCheckftr64KBpagesThenTrue) {
|
||||
EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftr64KBpages);
|
||||
}
|
||||
|
||||
SKLTEST_F(SklUsDeviceIdTest, givenSklWhenCheckFtrSupportsInteger64BitAtomicsThenReturnTrue) {
|
||||
SKLTEST_F(SklDeviceCaps, givenSklWhenCheckFtrSupportsInteger64BitAtomicsThenReturnTrue) {
|
||||
EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics);
|
||||
}
|
||||
|
@ -24,10 +24,6 @@ XEHPTEST_F(XeHPUsDeviceIdTest, givenXeHPWhenCheckftr64KBpagesThenTrue) {
|
||||
EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftr64KBpages);
|
||||
}
|
||||
|
||||
XEHPTEST_F(XeHPUsDeviceIdTest, WheCheckingIsSimulationThenFalseIsReturned) {
|
||||
EXPECT_FALSE(pDevice->isSimulation());
|
||||
}
|
||||
|
||||
XEHPTEST_F(XeHPUsDeviceIdTest, givenXeHPSkusThenItSupportCorrectlyRoundedDivSqrtBit) {
|
||||
EXPECT_TRUE(pClDevice->getHardwareInfo().capabilityTable.ftrSupports64BitMath);
|
||||
cl_device_fp_config actual = pClDevice->getDeviceInfo().singleFpConfig & CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT;
|
||||
|
@ -407,22 +407,6 @@ bool Device::isBcsSplitSupported() {
|
||||
return bcsSplit;
|
||||
}
|
||||
|
||||
bool Device::isSimulation() const {
|
||||
auto &hwInfo = getHardwareInfo();
|
||||
|
||||
bool simulation = hwInfo.capabilityTable.isSimulation(hwInfo.platform.usDeviceID);
|
||||
for (const auto &engine : allEngines) {
|
||||
if (engine.commandStreamReceiver->getType() != CommandStreamReceiverType::CSR_HW) {
|
||||
simulation = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (hwInfo.featureTable.flags.ftrSimulationMode) {
|
||||
simulation = true;
|
||||
}
|
||||
return simulation;
|
||||
}
|
||||
|
||||
double Device::getPlatformHostTimerResolution() const {
|
||||
if (getOSTime()) {
|
||||
return getOSTime()->getHostTimerResolution();
|
||||
|
@ -89,7 +89,6 @@ class Device : public ReferenceTrackedObject<Device> {
|
||||
double getProfilingTimerResolution();
|
||||
uint64_t getProfilingTimerClock();
|
||||
double getPlatformHostTimerResolution() const;
|
||||
bool isSimulation() const;
|
||||
GFXCORE_FAMILY getRenderCoreFamily() const;
|
||||
PerformanceCounters *getPerformanceCounters() { return performanceCounters.get(); }
|
||||
PreemptionMode getPreemptionMode() const { return preemptionMode; }
|
||||
|
@ -15,13 +15,6 @@ namespace NEO {
|
||||
|
||||
const char *HwMapper<IGFX_ELKHARTLAKE>::abbreviation = "ehl";
|
||||
|
||||
bool isSimulationEHL(unsigned short deviceId) {
|
||||
switch (deviceId) {
|
||||
case IEHL_1x4x8_SUPERSKU_DEVICE_A0_ID:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
const PLATFORM EHL::platform = {
|
||||
IGFX_ELKHARTLAKE,
|
||||
PCH_UNKNOWN,
|
||||
@ -42,7 +35,6 @@ const RuntimeCapabilityTable EHL::capabilityTable{
|
||||
0, // sharedSystemMemCapabilities
|
||||
83.333, // defaultProfilingTimerResolution
|
||||
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
|
||||
&isSimulationEHL, // isSimulation
|
||||
"lp", // platformType
|
||||
"", // deviceName
|
||||
PreemptionMode::MidThread, // defaultPreemptionMode
|
||||
|
@ -15,14 +15,6 @@ namespace NEO {
|
||||
|
||||
const char *HwMapper<IGFX_ICELAKE_LP>::abbreviation = "icllp";
|
||||
|
||||
bool isSimulationICLLP(unsigned short deviceId) {
|
||||
switch (deviceId) {
|
||||
case IICL_LP_GT1_MOB_DEVICE_F0_ID:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
const PLATFORM ICLLP::platform = {
|
||||
IGFX_ICELAKE_LP,
|
||||
PCH_UNKNOWN,
|
||||
@ -43,7 +35,6 @@ const RuntimeCapabilityTable ICLLP::capabilityTable{
|
||||
0, // sharedSystemMemCapabilities
|
||||
83.333, // defaultProfilingTimerResolution
|
||||
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
|
||||
&isSimulationICLLP, // isSimulation
|
||||
"lp", // platformType
|
||||
"", // deviceName
|
||||
PreemptionMode::MidThread, // defaultPreemptionMode
|
||||
|
@ -15,13 +15,6 @@ namespace NEO {
|
||||
|
||||
const char *HwMapper<IGFX_LAKEFIELD>::abbreviation = "lkf";
|
||||
|
||||
bool isSimulationLKF(unsigned short deviceId) {
|
||||
switch (deviceId) {
|
||||
case ILKF_1x8x8_DESK_DEVICE_F0_ID:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
const PLATFORM LKF::platform = {
|
||||
IGFX_LAKEFIELD,
|
||||
PCH_UNKNOWN,
|
||||
@ -42,7 +35,6 @@ const RuntimeCapabilityTable LKF::capabilityTable{
|
||||
0, // sharedSystemMemCapabilities
|
||||
83.333, // defaultProfilingTimerResolution
|
||||
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
|
||||
&isSimulationLKF, // isSimulation
|
||||
"lp", // platformType
|
||||
"", // deviceName
|
||||
PreemptionMode::MidThread, // defaultPreemptionMode
|
||||
|
@ -15,10 +15,6 @@ namespace NEO {
|
||||
|
||||
const char *HwMapper<IGFX_ALDERLAKE_N>::abbreviation = "adln";
|
||||
|
||||
bool isSimulationADLN(unsigned short deviceId) {
|
||||
return false;
|
||||
};
|
||||
|
||||
const PLATFORM ADLN::platform = {
|
||||
IGFX_ALDERLAKE_N,
|
||||
PCH_UNKNOWN,
|
||||
@ -40,7 +36,6 @@ const RuntimeCapabilityTable ADLN::capabilityTable{
|
||||
0, // sharedSystemMemCapabilities
|
||||
83.333, // defaultProfilingTimerResolution
|
||||
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
|
||||
&isSimulationADLN, // isSimulation
|
||||
"lp", // platformType
|
||||
"", // deviceName
|
||||
PreemptionMode::MidThread, // defaultPreemptionMode
|
||||
|
@ -15,10 +15,6 @@ namespace NEO {
|
||||
|
||||
const char *HwMapper<IGFX_ALDERLAKE_P>::abbreviation = "adlp";
|
||||
|
||||
bool isSimulationADLP(unsigned short deviceId) {
|
||||
return false;
|
||||
};
|
||||
|
||||
const PLATFORM ADLP::platform = {
|
||||
IGFX_ALDERLAKE_P,
|
||||
PCH_UNKNOWN,
|
||||
@ -40,7 +36,6 @@ const RuntimeCapabilityTable ADLP::capabilityTable{
|
||||
0, // sharedSystemMemCapabilities
|
||||
83.333, // defaultProfilingTimerResolution
|
||||
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
|
||||
&isSimulationADLP, // isSimulation
|
||||
"lp", // platformType
|
||||
"", // deviceName
|
||||
PreemptionMode::MidThread, // defaultPreemptionMode
|
||||
|
@ -15,10 +15,6 @@ namespace NEO {
|
||||
|
||||
const char *HwMapper<IGFX_ALDERLAKE_S>::abbreviation = "adls";
|
||||
|
||||
bool isSimulationADLS(unsigned short deviceId) {
|
||||
return false;
|
||||
};
|
||||
|
||||
const PLATFORM ADLS::platform = {
|
||||
IGFX_ALDERLAKE_S,
|
||||
PCH_UNKNOWN,
|
||||
@ -40,7 +36,6 @@ const RuntimeCapabilityTable ADLS::capabilityTable{
|
||||
0, // sharedSystemMemCapabilities
|
||||
83.333, // defaultProfilingTimerResolution
|
||||
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
|
||||
&isSimulationADLS, // isSimulation
|
||||
"lp", // platformType
|
||||
"", // deviceName
|
||||
PreemptionMode::MidThread, // defaultPreemptionMode
|
||||
|
@ -16,17 +16,6 @@ namespace NEO {
|
||||
|
||||
const char *HwMapper<IGFX_DG1>::abbreviation = "dg1";
|
||||
|
||||
bool isSimulationDG1(unsigned short deviceId) {
|
||||
switch (deviceId) {
|
||||
case 0x4905:
|
||||
case 0x4906:
|
||||
case 0x4907:
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
const PLATFORM DG1::platform = {
|
||||
IGFX_DG1,
|
||||
PCH_UNKNOWN,
|
||||
@ -48,7 +37,6 @@ const RuntimeCapabilityTable DG1::capabilityTable{
|
||||
0, // sharedSystemMemCapabilities
|
||||
83.333, // defaultProfilingTimerResolution
|
||||
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
|
||||
&isSimulationDG1, // isSimulation
|
||||
"lp", // platformType
|
||||
"", // deviceName
|
||||
PreemptionMode::MidThread, // defaultPreemptionMode
|
||||
|
@ -15,10 +15,6 @@ namespace NEO {
|
||||
|
||||
const char *HwMapper<IGFX_ROCKETLAKE>::abbreviation = "rkl";
|
||||
|
||||
bool isSimulationRKL(unsigned short deviceId) {
|
||||
return false;
|
||||
};
|
||||
|
||||
const PLATFORM RKL::platform = {
|
||||
IGFX_ROCKETLAKE,
|
||||
PCH_UNKNOWN,
|
||||
@ -40,7 +36,6 @@ const RuntimeCapabilityTable RKL::capabilityTable{
|
||||
0, // sharedSystemMemCapabilities
|
||||
83.333, // defaultProfilingTimerResolution
|
||||
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
|
||||
&isSimulationRKL, // isSimulation
|
||||
"lp", // platformType
|
||||
"", // deviceName
|
||||
PreemptionMode::MidThread, // defaultPreemptionMode
|
||||
|
@ -15,14 +15,6 @@ namespace NEO {
|
||||
|
||||
const char *HwMapper<IGFX_TIGERLAKE_LP>::abbreviation = "tgllp";
|
||||
|
||||
bool isSimulationTGLLP(unsigned short deviceId) {
|
||||
switch (deviceId) {
|
||||
case 0xFF20:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
const PLATFORM TGLLP::platform = {
|
||||
IGFX_TIGERLAKE_LP,
|
||||
PCH_UNKNOWN,
|
||||
@ -44,7 +36,6 @@ const RuntimeCapabilityTable TGLLP::capabilityTable{
|
||||
0, // sharedSystemMemCapabilities
|
||||
83.333, // defaultProfilingTimerResolution
|
||||
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
|
||||
&isSimulationTGLLP, // isSimulation
|
||||
"lp", // platformType
|
||||
"", // deviceName
|
||||
PreemptionMode::MidThread, // defaultPreemptionMode
|
||||
|
@ -15,18 +15,6 @@ namespace NEO {
|
||||
|
||||
const char *HwMapper<IGFX_BROADWELL>::abbreviation = "bdw";
|
||||
|
||||
bool isSimulationBDW(unsigned short deviceId) {
|
||||
switch (deviceId) {
|
||||
case IBDW_GT0_DESK_DEVICE_F0_ID:
|
||||
case IBDW_GT1_DESK_DEVICE_F0_ID:
|
||||
case IBDW_GT2_DESK_DEVICE_F0_ID:
|
||||
case IBDW_GT3_DESK_DEVICE_F0_ID:
|
||||
case IBDW_GT4_DESK_DEVICE_F0_ID:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
const PLATFORM BDW::platform = {
|
||||
IGFX_BROADWELL,
|
||||
PCH_UNKNOWN,
|
||||
@ -47,7 +35,6 @@ const RuntimeCapabilityTable BDW::capabilityTable{
|
||||
0, // sharedSystemMemCapabilities
|
||||
80, // defaultProfilingTimerResolution
|
||||
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
|
||||
&isSimulationBDW, // isSimulation
|
||||
"core", // platformType
|
||||
"", // deviceName
|
||||
PreemptionMode::Disabled, // defaultPreemptionMode
|
||||
|
@ -15,15 +15,6 @@ namespace NEO {
|
||||
|
||||
const char *HwMapper<IGFX_BROXTON>::abbreviation = "bxt";
|
||||
|
||||
bool isSimulationBXT(unsigned short deviceId) {
|
||||
switch (deviceId) {
|
||||
case IBXT_A_DEVICE_F0_ID:
|
||||
case IBXT_C_DEVICE_F0_ID:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
const PLATFORM BXT::platform = {
|
||||
IGFX_BROXTON,
|
||||
PCH_UNKNOWN,
|
||||
@ -44,7 +35,6 @@ const RuntimeCapabilityTable BXT::capabilityTable{
|
||||
0, // sharedSystemMemCapabilities
|
||||
52.083, // defaultProfilingTimerResolution
|
||||
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
|
||||
&isSimulationBXT, // isSimulation
|
||||
"lp", // platformType
|
||||
"", // deviceName
|
||||
PreemptionMode::MidThread, // defaultPreemptionMode
|
||||
|
@ -15,10 +15,6 @@ namespace NEO {
|
||||
|
||||
const char *HwMapper<IGFX_COFFEELAKE>::abbreviation = "cfl";
|
||||
|
||||
bool isSimulationCFL(unsigned short deviceId) {
|
||||
return false;
|
||||
};
|
||||
|
||||
const PLATFORM CFL::platform = {
|
||||
IGFX_COFFEELAKE,
|
||||
PCH_UNKNOWN,
|
||||
@ -39,7 +35,6 @@ const RuntimeCapabilityTable CFL::capabilityTable{
|
||||
0, // sharedSystemMemCapabilities
|
||||
83.333, // defaultProfilingTimerResolution
|
||||
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
|
||||
&isSimulationCFL, // isSimulation
|
||||
"core", // platformType
|
||||
"", // deviceName
|
||||
PreemptionMode::MidThread, // defaultPreemptionMode
|
||||
|
@ -15,10 +15,6 @@ namespace NEO {
|
||||
|
||||
const char *HwMapper<IGFX_GEMINILAKE>::abbreviation = "glk";
|
||||
|
||||
bool isSimulationGLK(unsigned short deviceId) {
|
||||
return false;
|
||||
};
|
||||
|
||||
const PLATFORM GLK::platform = {
|
||||
IGFX_GEMINILAKE,
|
||||
PCH_UNKNOWN,
|
||||
@ -39,7 +35,6 @@ const RuntimeCapabilityTable GLK::capabilityTable{
|
||||
0, // sharedSystemMemCapabilities
|
||||
52.083, // defaultProfilingTimerResolution
|
||||
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
|
||||
&isSimulationGLK, // isSimulation
|
||||
"lp", // platformType
|
||||
"", // deviceName
|
||||
PreemptionMode::MidThread, // defaultPreemptionMode
|
||||
|
@ -15,10 +15,6 @@ namespace NEO {
|
||||
|
||||
const char *HwMapper<IGFX_KABYLAKE>::abbreviation = "kbl";
|
||||
|
||||
bool isSimulationKBL(unsigned short deviceId) {
|
||||
return false;
|
||||
};
|
||||
|
||||
const PLATFORM KBL::platform = {
|
||||
IGFX_KABYLAKE,
|
||||
PCH_UNKNOWN,
|
||||
@ -39,7 +35,6 @@ const RuntimeCapabilityTable KBL::capabilityTable{
|
||||
0, // sharedSystemMemCapabilities
|
||||
83.333, // defaultProfilingTimerResolution
|
||||
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
|
||||
&isSimulationKBL, // isSimulation
|
||||
"core", // platformType
|
||||
"", // deviceName
|
||||
PreemptionMode::MidThread, // defaultPreemptionMode
|
||||
|
@ -15,18 +15,6 @@ namespace NEO {
|
||||
|
||||
const char *HwMapper<IGFX_SKYLAKE>::abbreviation = "skl";
|
||||
|
||||
bool isSimulationSKL(unsigned short deviceId) {
|
||||
switch (deviceId) {
|
||||
case ISKL_GT0_DESK_DEVICE_F0_ID:
|
||||
case ISKL_GT1_DESK_DEVICE_F0_ID:
|
||||
case ISKL_GT2_DESK_DEVICE_F0_ID:
|
||||
case ISKL_GT3_DESK_DEVICE_F0_ID:
|
||||
case ISKL_GT4_DESK_DEVICE_F0_ID:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
const PLATFORM SKL::platform = {
|
||||
IGFX_SKYLAKE,
|
||||
PCH_UNKNOWN,
|
||||
@ -47,7 +35,6 @@ const RuntimeCapabilityTable SKL::capabilityTable{
|
||||
0, // sharedSystemMemCapabilities
|
||||
83.333, // defaultProfilingTimerResolution
|
||||
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
|
||||
&isSimulationSKL, // isSimulation
|
||||
"core", // platformType
|
||||
"", // deviceName
|
||||
PreemptionMode::MidThread, // defaultPreemptionMode
|
||||
|
@ -27,7 +27,6 @@ struct RuntimeCapabilityTable {
|
||||
uint64_t sharedSystemMemCapabilities;
|
||||
double defaultProfilingTimerResolution;
|
||||
size_t requiredPreemptionSurfaceSize;
|
||||
bool (*isSimulation)(unsigned short);
|
||||
const char *platformType;
|
||||
const char *deviceName;
|
||||
PreemptionMode defaultPreemptionMode;
|
||||
@ -95,7 +94,6 @@ inline bool operator==(const RuntimeCapabilityTable &lhs, const RuntimeCapabilit
|
||||
result &= (lhs.sharedSystemMemCapabilities == rhs.sharedSystemMemCapabilities);
|
||||
result &= (lhs.defaultProfilingTimerResolution == rhs.defaultProfilingTimerResolution);
|
||||
result &= (lhs.requiredPreemptionSurfaceSize == rhs.requiredPreemptionSurfaceSize);
|
||||
result &= (lhs.isSimulation == rhs.isSimulation);
|
||||
result &= (lhs.defaultPreemptionMode == rhs.defaultPreemptionMode);
|
||||
result &= (lhs.defaultEngineType == rhs.defaultEngineType);
|
||||
result &= (lhs.maxRenderFrequency == rhs.maxRenderFrequency);
|
||||
|
@ -17,10 +17,6 @@ namespace NEO {
|
||||
|
||||
const char *HwMapper<IGFX_XE_HP_SDV>::abbreviation = "xe_hp_sdv";
|
||||
|
||||
bool isSimulationXEHP(unsigned short deviceId) {
|
||||
return false;
|
||||
};
|
||||
|
||||
const PLATFORM XE_HP_SDV::platform = {
|
||||
IGFX_XE_HP_SDV,
|
||||
PCH_UNKNOWN,
|
||||
@ -44,7 +40,6 @@ const RuntimeCapabilityTable XE_HP_SDV::capabilityTable{
|
||||
0, // sharedSystemMemCapabilities
|
||||
83.333, // defaultProfilingTimerResolution
|
||||
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
|
||||
&isSimulationXEHP, // isSimulation
|
||||
"core", // platformType
|
||||
"", // deviceName
|
||||
PreemptionMode::ThreadGroup, // defaultPreemptionMode
|
||||
|
@ -17,10 +17,6 @@ namespace NEO {
|
||||
|
||||
const char *HwMapper<IGFX_PVC>::abbreviation = "pvc";
|
||||
|
||||
bool isSimulationPVC(unsigned short deviceId) {
|
||||
return false;
|
||||
};
|
||||
|
||||
const PLATFORM PVC::platform = {
|
||||
IGFX_PVC,
|
||||
PCH_UNKNOWN,
|
||||
@ -53,7 +49,6 @@ const RuntimeCapabilityTable PVC::capabilityTable{
|
||||
0, // sharedSystemMemCapabilities
|
||||
83.333, // defaultProfilingTimerResolution
|
||||
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
|
||||
&isSimulationPVC, // isSimulation
|
||||
"pvc", // platformType
|
||||
"", // deviceName
|
||||
PreemptionMode::ThreadGroup, // defaultPreemptionMode
|
||||
|
@ -16,10 +16,6 @@ namespace NEO {
|
||||
|
||||
const char *HwMapper<IGFX_DG2>::abbreviation = "dg2";
|
||||
|
||||
bool isSimulationDG2(unsigned short deviceId) {
|
||||
return false;
|
||||
};
|
||||
|
||||
const PLATFORM DG2::platform = {
|
||||
IGFX_DG2,
|
||||
PCH_UNKNOWN,
|
||||
@ -44,7 +40,6 @@ const RuntimeCapabilityTable DG2::capabilityTable{
|
||||
0, // sharedSystemMemCapabilities
|
||||
83.333, // defaultProfilingTimerResolution
|
||||
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
|
||||
&isSimulationDG2, // isSimulation
|
||||
"dg2", // platformType
|
||||
"", // deviceName
|
||||
PreemptionMode::ThreadGroup, // defaultPreemptionMode
|
||||
|
@ -14,24 +14,6 @@ using namespace NEO;
|
||||
|
||||
using AdlnUsDeviceIdTest = Test<DeviceFixture>;
|
||||
|
||||
ADLNTEST_F(AdlnUsDeviceIdTest, WhenCheckingIsSimulationThenTrueReturnedOnlyForSimulationId) {
|
||||
unsigned short adlnSimulationIds[1] = {
|
||||
0, // default, non-simulation
|
||||
};
|
||||
NEO::MockDevice *mockDevice = nullptr;
|
||||
|
||||
for (auto id : adlnSimulationIds) {
|
||||
mockDevice = createWithUsDeviceIdRevId(id, 0u);
|
||||
ASSERT_NE(mockDevice, nullptr);
|
||||
|
||||
if (id == 0)
|
||||
EXPECT_FALSE(mockDevice->isSimulation());
|
||||
else
|
||||
EXPECT_TRUE(mockDevice->isSimulation());
|
||||
delete mockDevice;
|
||||
}
|
||||
}
|
||||
|
||||
ADLNTEST_F(AdlnUsDeviceIdTest, givenAdlnWhenCheckFtrSupportsInteger64BitAtomicsThenReturnFalse) {
|
||||
EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsInteger64BitAtomics);
|
||||
}
|
||||
|
@ -7,7 +7,6 @@
|
||||
if(TESTS_BDW)
|
||||
target_sources(neo_shared_tests PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_bdw.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_bdw.cpp
|
||||
)
|
||||
|
||||
|
@ -1,37 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen8/hw_cmds_bdw.h"
|
||||
#include "shared/test/common/mocks/mock_device.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
using namespace NEO;
|
||||
using BdwUsDeviceIdTest = ::testing::Test;
|
||||
|
||||
BDWTEST_F(BdwUsDeviceIdTest, WhenCheckingIsSimulationThenTrueReturnedOnlyForSimulationId) {
|
||||
unsigned short bdwSimulationIds[6] = {
|
||||
0x0BD0,
|
||||
0x0BD1,
|
||||
0x0BD2,
|
||||
0x0BD3,
|
||||
0x0BD4,
|
||||
0, // default, non-simulation
|
||||
};
|
||||
|
||||
for (auto &id : bdwSimulationIds) {
|
||||
auto hardwareInfo = *defaultHwInfo;
|
||||
hardwareInfo.platform.usDeviceID = id;
|
||||
std::unique_ptr<MockDevice> mockDevice(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hardwareInfo, 0u /*rootDeviceIndex*/));
|
||||
ASSERT_NE(mockDevice.get(), nullptr);
|
||||
|
||||
if (id == 0)
|
||||
EXPECT_FALSE(mockDevice->isSimulation());
|
||||
else
|
||||
EXPECT_TRUE(mockDevice->isSimulation());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user