Skip to content

Commit 6ece353

Browse files
Add xe_hpg test macros
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
1 parent d3aecdc commit 6ece353

File tree

1 file changed

+32
-0
lines changed
  • shared/test/common/test_macros/header

1 file changed

+32
-0
lines changed

shared/test/common/test_macros/header/test.h

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ extern GFXCORE_FAMILY renderCoreFamily;
5252
#define XEHP_TYPED_TEST(method)
5353
#define XEHP_SUPPORTED_TEST(cmdSetBase) false
5454
#endif
55+
#ifdef TESTS_XE_HPG_CORE
56+
#define XEHPG_TYPED_TEST(method) method<typename NEO::GfxFamilyMapper<IGFX_XE_HPG_CORE>::GfxFamily>();
57+
#define XEHPG_SUPPORTED_TEST(cmdSetBase) NEO::GfxFamilyMapper<IGFX_XE_HPG_CORE>::GfxFamily::supportsCmdSet(cmdSetBase)
58+
#else
59+
#define XEHPG_TYPED_TEST(method)
60+
#define XEHPG_SUPPORTED_TEST(cmdSetBase) false
61+
#endif
5562

5663
#define FAMILY_SELECTOR(family, methodName) \
5764
switch (family) { \
@@ -70,6 +77,9 @@ extern GFXCORE_FAMILY renderCoreFamily;
7077
case IGFX_XE_HP_CORE: \
7178
XEHP_TYPED_TEST(methodName) \
7279
break; \
80+
case IGFX_XE_HPG_CORE: \
81+
XEHPG_TYPED_TEST(methodName) \
82+
break; \
7383
default: \
7484
ASSERT_TRUE((false && "Unknown hardware family")); \
7585
break; \
@@ -359,6 +369,9 @@ extern GFXCORE_FAMILY renderCoreFamily;
359369
case IGFX_XE_HP_CORE: \
360370
supported = XEHP_SUPPORTED_TEST(cmdSetBase); \
361371
break; \
372+
case IGFX_XE_HPG_CORE: \
373+
supported = XEHPG_SUPPORTED_TEST(cmdSetBase); \
374+
break; \
362375
default: \
363376
ASSERT_TRUE((false && "Unknown hardware family")); \
364377
break; \
@@ -796,6 +809,10 @@ extern GFXCORE_FAMILY renderCoreFamily;
796809
#define XE_HP_CORE_TEST_F(test_fixture, test_name) GENTEST_F(IGFX_XE_HP_CORE, test_fixture, test_name)
797810
#define XE_HP_CORE_TEST_P(test_fixture, test_name) GENTEST_P(IGFX_XE_HP_CORE, test_fixture, test_name)
798811
#endif
812+
#ifdef TESTS_XE_HPG_CORE
813+
#define XE_HPG_CORETEST_F(test_fixture, test_name) GENTEST_F(IGFX_XE_HPG_CORE, test_fixture, test_name)
814+
#define XE_HPG_CORETEST_P(test_fixture, test_name) GENTEST_P(IGFX_XE_HPG_CORE, test_fixture, test_name)
815+
#endif
799816
#ifdef TESTS_GEN8
800817
#define BDWTEST_F(test_fixture, test_name) \
801818
FAMILYTEST_TEST_(test_fixture, test_name, test_fixture, \
@@ -946,6 +963,16 @@ extern GFXCORE_FAMILY renderCoreFamily;
946963
IGFX_XE_HP_CORE, \
947964
IGFX_XE_HP_SDV)
948965
#endif
966+
#ifdef TESTS_DG2
967+
#define DG2TEST_F(test_fixture, test_name) \
968+
FAMILYTEST_TEST_(test_fixture, test_name, test_fixture, \
969+
::testing::internal::GetTypeId<test_fixture>(), \
970+
IGFX_XE_HPG_CORE, IGFX_DG2)
971+
#define DG2TEST_P(test_suite_name, test_name) \
972+
FAMILYTEST_TEST_P(test_suite_name, test_name, \
973+
IGFX_XE_HPG_CORE, \
974+
IGFX_DG2)
975+
#endif
949976
#define HWTEST_TYPED_TEST(CaseName, TestName) \
950977
CHECK_TEST_NAME_LENGTH(CaseName, TestName) \
951978
template <typename gtest_TypeParam_> \
@@ -1106,6 +1133,7 @@ using IsGen11HP = IsGfxCore<IGFX_GEN11_CORE>;
11061133
using IsGen11LP = IsGfxCore<IGFX_GEN11LP_CORE>;
11071134
using IsGen12LP = IsGfxCore<IGFX_GEN12LP_CORE>;
11081135
using IsXeHpCore = IsGfxCore<IGFX_XE_HP_CORE>;
1136+
using IsXeHpgCore = IsGfxCore<IGFX_XE_HPG_CORE>;
11091137

11101138
using IsAtMostGen11 = IsAtMostGfxCore<IGFX_GEN11LP_CORE>;
11111139

@@ -1116,6 +1144,9 @@ using IsAtLeastGen12lp = IsAtLeastGfxCore<IGFX_GEN12LP_CORE>;
11161144
using IsAtLeastXeHpCore = IsAtLeastGfxCore<IGFX_XE_HP_CORE>;
11171145
using IsAtMostXeHpCore = IsAtMostGfxCore<IGFX_XE_HP_CORE>;
11181146

1147+
using IsAtLeastXeHpgCore = IsAtLeastGfxCore<IGFX_XE_HPG_CORE>;
1148+
using IsAtMostXeHpgCore = IsAtMostGfxCore<IGFX_XE_HPG_CORE>;
1149+
11191150
using IsWithinXeGfxFamily = IsWithinGfxCore<IGFX_XE_HP_CORE, IGFX_XE_HP_CORE>;
11201151

11211152
using IsADLS = IsProduct<IGFX_ALDERLAKE_S>;
@@ -1132,3 +1163,4 @@ using IsTGLLP = IsProduct<IGFX_TIGERLAKE_LP>;
11321163
using IsRKL = IsProduct<IGFX_ROCKETLAKE>;
11331164
using IsXEHP = IsProduct<IGFX_XE_HP_SDV>;
11341165
using IsADLP = IsProduct<IGFX_ALDERLAKE_P>;
1166+
using IsDG2 = IsProduct<IGFX_DG2>;

0 commit comments

Comments
 (0)