mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-10 12:53:42 +08:00

committed by
Compute-Runtime-Automation

parent
aa27b4890b
commit
2a8bdaf28c
@ -1203,21 +1203,18 @@ TEST(CommandQueue, givenCopySizeAndOffsetWhenCallingBlitEnqueueImageAllowedThenR
|
||||
auto maxBlitWidth = static_cast<size_t>(BlitterConstants::maxBlitWidth);
|
||||
auto maxBlitHeight = static_cast<size_t>(BlitterConstants::maxBlitHeight);
|
||||
|
||||
std::array<std::tuple<size_t, size_t, size_t, size_t, bool>, 7> testParams{
|
||||
std::make_tuple(1, 1, 0, 0, true),
|
||||
std::make_tuple(maxBlitWidth, maxBlitHeight, 0, 0, true),
|
||||
std::make_tuple(maxBlitWidth + 1, maxBlitHeight, 0, 0, false),
|
||||
std::make_tuple(maxBlitWidth, maxBlitHeight + 1, 0, 0, false),
|
||||
std::make_tuple(maxBlitWidth, maxBlitHeight, 1, 0, false),
|
||||
std::make_tuple(maxBlitWidth, maxBlitHeight, 0, 1, false),
|
||||
std::make_tuple(maxBlitWidth - 1, maxBlitHeight - 1, 1, 1, true)};
|
||||
|
||||
for (auto ¶ms : testParams) {
|
||||
size_t region[3];
|
||||
size_t origin[3];
|
||||
bool expectedResult;
|
||||
std::tie(region[0], region[1], origin[0], origin[1], expectedResult) = params;
|
||||
std::tuple<size_t, size_t, size_t, size_t, bool> testParams[]{
|
||||
{1, 1, 0, 0, true},
|
||||
{maxBlitWidth, maxBlitHeight, 0, 0, true},
|
||||
{maxBlitWidth + 1, maxBlitHeight, 0, 0, false},
|
||||
{maxBlitWidth, maxBlitHeight + 1, 0, 0, false},
|
||||
{maxBlitWidth, maxBlitHeight, 1, 0, false},
|
||||
{maxBlitWidth, maxBlitHeight, 0, 1, false},
|
||||
{maxBlitWidth - 1, maxBlitHeight - 1, 1, 1, true}};
|
||||
|
||||
for (auto &[regionX, regionY, originX, originY, expectedResult] : testParams) {
|
||||
size_t region[3] = {regionX, regionY, 0};
|
||||
size_t origin[3] = {originX, originY, 0};
|
||||
EXPECT_EQ(expectedResult, queue.blitEnqueueImageAllowed(origin, region));
|
||||
}
|
||||
}
|
||||
|
@ -265,22 +265,18 @@ GEN12LPTEST_F(HwHelperTestGen12Lp, givenTgllpWhenIsFusedEuDispatchEnabledIsCalle
|
||||
DebugManagerStateRestore restorer;
|
||||
auto &helper = HwHelper::get(renderCoreFamily);
|
||||
auto &waTable = hardwareInfo.workaroundTable;
|
||||
bool wa;
|
||||
int32_t debugKey;
|
||||
size_t expectedResult;
|
||||
|
||||
const std::array<std::tuple<bool, bool, int32_t>, 6> testParams{std::make_tuple(true, false, -1),
|
||||
std::make_tuple(false, true, -1),
|
||||
std::make_tuple(true, false, 0),
|
||||
std::make_tuple(true, true, 0),
|
||||
std::make_tuple(false, false, 1),
|
||||
std::make_tuple(false, true, 1)};
|
||||
std::tuple<bool, bool, int32_t> testParams[]{
|
||||
{true, false, -1},
|
||||
{false, true, -1},
|
||||
{true, false, 0},
|
||||
{true, true, 0},
|
||||
{false, false, 1},
|
||||
{false, true, 1}};
|
||||
|
||||
for (const auto ¶ms : testParams) {
|
||||
std::tie(expectedResult, wa, debugKey) = params;
|
||||
for (auto &[expectedResult, wa, debugKey] : testParams) {
|
||||
waTable.waDisableFusedThreadScheduling = wa;
|
||||
DebugManager.flags.CFEFusedEUDispatch.set(debugKey);
|
||||
|
||||
EXPECT_EQ(expectedResult, helper.isFusedEuDispatchEnabled(hardwareInfo));
|
||||
}
|
||||
}
|
||||
|
@ -27,31 +27,31 @@ TEST_P(HasAlphaChannelTest, GivenImageFormatWhenCheckingForAlphaChannelThenRetur
|
||||
}
|
||||
|
||||
std::tuple<uint32_t, bool> paramsForAlphaChannelTests[] = {
|
||||
std::make_tuple<uint32_t, bool>(CL_R, false),
|
||||
std::make_tuple<uint32_t, bool>(CL_A, true),
|
||||
std::make_tuple<uint32_t, bool>(CL_RG, false),
|
||||
std::make_tuple<uint32_t, bool>(CL_RA, true),
|
||||
std::make_tuple<uint32_t, bool>(CL_RGB, false),
|
||||
std::make_tuple<uint32_t, bool>(CL_RGBA, true),
|
||||
std::make_tuple<uint32_t, bool>(CL_BGRA, true),
|
||||
std::make_tuple<uint32_t, bool>(CL_ARGB, true),
|
||||
std::make_tuple<uint32_t, bool>(CL_INTENSITY, true),
|
||||
std::make_tuple<uint32_t, bool>(CL_LUMINANCE, false),
|
||||
std::make_tuple<uint32_t, bool>(CL_Rx, true),
|
||||
std::make_tuple<uint32_t, bool>(CL_RGx, true),
|
||||
std::make_tuple<uint32_t, bool>(CL_RGBx, true),
|
||||
std::make_tuple<uint32_t, bool>(CL_DEPTH, false),
|
||||
std::make_tuple<uint32_t, bool>(CL_DEPTH_STENCIL, false),
|
||||
std::make_tuple<uint32_t, bool>(CL_sRGB, false),
|
||||
std::make_tuple<uint32_t, bool>(CL_sRGBx, true),
|
||||
std::make_tuple<uint32_t, bool>(CL_sRGBA, true),
|
||||
std::make_tuple<uint32_t, bool>(CL_sBGRA, true),
|
||||
std::make_tuple<uint32_t, bool>(CL_ABGR, true),
|
||||
std::make_tuple<uint32_t, bool>(CL_NV12_INTEL, false),
|
||||
std::make_tuple<uint32_t, bool>(CL_YUYV_INTEL, false),
|
||||
std::make_tuple<uint32_t, bool>(CL_UYVY_INTEL, false),
|
||||
std::make_tuple<uint32_t, bool>(CL_YVYU_INTEL, false),
|
||||
std::make_tuple<uint32_t, bool>(CL_VYUY_INTEL, false)};
|
||||
{CL_R, false},
|
||||
{CL_A, true},
|
||||
{CL_RG, false},
|
||||
{CL_RA, true},
|
||||
{CL_RGB, false},
|
||||
{CL_RGBA, true},
|
||||
{CL_BGRA, true},
|
||||
{CL_ARGB, true},
|
||||
{CL_INTENSITY, true},
|
||||
{CL_LUMINANCE, false},
|
||||
{CL_Rx, true},
|
||||
{CL_RGx, true},
|
||||
{CL_RGBx, true},
|
||||
{CL_DEPTH, false},
|
||||
{CL_DEPTH_STENCIL, false},
|
||||
{CL_sRGB, false},
|
||||
{CL_sRGBx, true},
|
||||
{CL_sRGBA, true},
|
||||
{CL_sBGRA, true},
|
||||
{CL_ABGR, true},
|
||||
{CL_NV12_INTEL, false},
|
||||
{CL_YUYV_INTEL, false},
|
||||
{CL_UYVY_INTEL, false},
|
||||
{CL_YVYU_INTEL, false},
|
||||
{CL_VYUY_INTEL, false}};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
ImageFormatTests,
|
||||
|
@ -140,18 +140,15 @@ HWTEST2_F(Gen12LpPreambleVfeState, givenCfeFusedEuDispatchFlagsWhenprogramAdditi
|
||||
*pMediaVfeState = FamilyType::cmdInitMediaVfeState;
|
||||
auto &waTable = pHwInfo->workaroundTable;
|
||||
|
||||
const std::array<std::tuple<bool, bool, int32_t>, 6> testParams{{std::make_tuple(false, false, 0),
|
||||
std::make_tuple(false, true, 0),
|
||||
std::make_tuple(false, false, -1),
|
||||
std::make_tuple(true, false, 1),
|
||||
std::make_tuple(true, true, -1),
|
||||
std::make_tuple(true, true, 1)}};
|
||||
|
||||
for (const auto ¶ms : testParams) {
|
||||
bool expectedValue, waDisableFusedThreadScheduling;
|
||||
int32_t debugKeyValue;
|
||||
std::tie(expectedValue, waDisableFusedThreadScheduling, debugKeyValue) = params;
|
||||
std::tuple<bool, bool, int32_t> testParams[]{
|
||||
{false, false, 0},
|
||||
{false, true, 0},
|
||||
{false, false, -1},
|
||||
{true, false, 1},
|
||||
{true, true, -1},
|
||||
{true, true, 1}};
|
||||
|
||||
for (auto &[expectedValue, waDisableFusedThreadScheduling, debugKeyValue] : testParams) {
|
||||
waTable.waDisableFusedThreadScheduling = waDisableFusedThreadScheduling;
|
||||
::DebugManager.flags.CFEFusedEUDispatch.set(debugKeyValue);
|
||||
PreambleHelper<FamilyType>::programAdditionalFieldsInVfeState(pMediaVfeState, *pHwInfo);
|
||||
|
Reference in New Issue
Block a user