Refactor Gen12LP helpers

Signed-off-by: Rafal Maziejuk <rafal.maziejuk@intel.com>
Related-To: NEO-4541
This commit is contained in:
Rafal Maziejuk 2021-09-24 14:29:49 +00:00 committed by Compute-Runtime-Automation
parent ed06bcdc65
commit 82f27e882d
33 changed files with 270 additions and 205 deletions

View File

@ -22,6 +22,7 @@
#include "shared/source/helpers/string.h"
#include "shared/source/memory_manager/memory_manager.h"
#include "shared/source/memory_manager/unified_memory_manager.h"
#include "shared/source/os_interface/hw_info_config.h"
#include "shared/source/os_interface/os_context.h"
#include "opencl/source/cl_device/cl_device.h"
@ -94,8 +95,8 @@ void Program::initInternalOptions(std::string &internalOptions) const {
}
auto &hwInfo = pClDevice->getHardwareInfo();
auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
if (hwHelper.isForceEmuInt32DivRemSPWARequired(hwInfo)) {
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
if (hwInfoConfig.isForceEmuInt32DivRemSPWARequired(hwInfo)) {
CompilerOptions::concatenateAppend(internalOptions, CompilerOptions::forceEmuInt32DivRemSP);
}

View File

@ -771,8 +771,8 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenPreambleSentAndMediaSamplerRe
flushTask(commandStreamReceiver);
parseCommands<FamilyType>(commandStreamReceiver.commandStream, 0);
auto &hwHelper = HwHelper::get(pDevice->getHardwareInfo().platform.eRenderCoreFamily);
if (hwHelper.is3DPipelineSelectWARequired(pDevice->getHardwareInfo())) {
const auto &hwInfoConfig = *HwInfoConfig::get(pDevice->getHardwareInfo().platform.eProductFamily);
if (hwInfoConfig.is3DPipelineSelectWARequired()) {
EXPECT_NE(nullptr, getCommand<typename FamilyType::PIPELINE_SELECT>());
} else {
EXPECT_EQ(nullptr, getCommand<typename FamilyType::PIPELINE_SELECT>());

View File

@ -13,6 +13,7 @@
#include "shared/test/common/helpers/dispatch_flags_helper.h"
#include "shared/test/common/mocks/mock_device.h"
#include "opencl/test/unit_test/gen12lp/special_ult_helper_gen12lp.h"
#include "test.h"
using namespace NEO;
@ -62,10 +63,10 @@ struct Gen12LpCoherencyRequirements : public ::testing::Test {
GEN12LPTEST_F(Gen12LpCoherencyRequirements, GivenNoSharedHandlesWhenGettingCmdSizeThenSizeIsCorrect) {
auto cmdsSize = sizeof(STATE_COMPUTE_MODE);
auto &hwHelper = HwHelper::get(device->getHardwareInfo().platform.eRenderCoreFamily);
if (hwHelper.is3DPipelineSelectWARequired(device->getHardwareInfo())) {
const auto &hwInfoConfig = *HwInfoConfig::get(device->getHardwareInfo().platform.eProductFamily);
if (hwInfoConfig.is3DPipelineSelectWARequired()) {
cmdsSize += 2 * sizeof(PIPELINE_SELECT);
if (Gen12LPHelpers::pipeControlWaRequired(device->getHardwareInfo().platform.eProductFamily)) {
if (SpecialUltHelperGen12lp::isPipeControlWArequired(device->getHardwareInfo().platform.eProductFamily)) {
cmdsSize += 2 * sizeof(PIPE_CONTROL);
}
}
@ -89,10 +90,10 @@ GEN12LPTEST_F(Gen12LpCoherencyRequirements, GivenNoSharedHandlesWhenGettingCmdSi
GEN12LPTEST_F(Gen12LpCoherencyRequirements, GivenSharedHandlesWhenGettingCmdSizeThenSizeIsCorrect) {
auto cmdsSize = sizeof(STATE_COMPUTE_MODE) + sizeof(PIPE_CONTROL);
auto &hwHelper = HwHelper::get(device->getHardwareInfo().platform.eRenderCoreFamily);
if (hwHelper.is3DPipelineSelectWARequired(device->getHardwareInfo())) {
const auto &hwInfoConfig = *HwInfoConfig::get(device->getHardwareInfo().platform.eProductFamily);
if (hwInfoConfig.is3DPipelineSelectWARequired()) {
cmdsSize += 2 * sizeof(PIPELINE_SELECT);
if (Gen12LPHelpers::pipeControlWaRequired(device->getHardwareInfo().platform.eProductFamily)) {
if (SpecialUltHelperGen12lp::isPipeControlWArequired(device->getHardwareInfo().platform.eProductFamily)) {
cmdsSize += 2 * sizeof(PIPE_CONTROL);
}
}
@ -117,11 +118,11 @@ GEN12LPTEST_F(Gen12LpCoherencyRequirements, GivenSharedHandlesWhenGettingCmdSize
GEN12LPTEST_F(Gen12LpCoherencyRequirements, GivenNoSharedHandlesThenCoherencyCmdValuesAreCorrect) {
auto cmdsSize = sizeof(STATE_COMPUTE_MODE);
auto cmdsSizeWABeginOffset = 0;
auto &hwHelper = HwHelper::get(device->getHardwareInfo().platform.eRenderCoreFamily);
if (hwHelper.is3DPipelineSelectWARequired(device->getHardwareInfo())) {
const auto &hwInfoConfig = *HwInfoConfig::get(device->getHardwareInfo().platform.eProductFamily);
if (hwInfoConfig.is3DPipelineSelectWARequired()) {
cmdsSizeWABeginOffset += sizeof(PIPELINE_SELECT);
cmdsSize += sizeof(PIPELINE_SELECT);
if (Gen12LPHelpers::pipeControlWaRequired(device->getHardwareInfo().platform.eProductFamily)) {
if (SpecialUltHelperGen12lp::isPipeControlWArequired(device->getHardwareInfo().platform.eProductFamily)) {
cmdsSizeWABeginOffset += sizeof(PIPE_CONTROL);
cmdsSize += sizeof(PIPE_CONTROL);
}
@ -157,11 +158,11 @@ GEN12LPTEST_F(Gen12LpCoherencyRequirements, GivenNoSharedHandlesThenCoherencyCmd
GEN12LPTEST_F(Gen12LpCoherencyRequirements, GivenSharedHandlesThenCoherencyCmdValuesAreCorrect) {
auto cmdsSize = sizeof(STATE_COMPUTE_MODE) + sizeof(PIPE_CONTROL);
auto cmdsSizeWABeginOffset = 0;
auto &hwHelper = HwHelper::get(device->getHardwareInfo().platform.eRenderCoreFamily);
if (hwHelper.is3DPipelineSelectWARequired(device->getHardwareInfo())) {
const auto &hwInfoConfig = *HwInfoConfig::get(device->getHardwareInfo().platform.eProductFamily);
if (hwInfoConfig.is3DPipelineSelectWARequired()) {
cmdsSizeWABeginOffset += sizeof(PIPELINE_SELECT);
cmdsSize += sizeof(PIPELINE_SELECT);
if (Gen12LPHelpers::pipeControlWaRequired(device->getHardwareInfo().platform.eProductFamily)) {
if (SpecialUltHelperGen12lp::isPipeControlWArequired(device->getHardwareInfo().platform.eProductFamily)) {
cmdsSizeWABeginOffset += sizeof(PIPE_CONTROL);
cmdsSize += sizeof(PIPE_CONTROL);
}
@ -230,7 +231,7 @@ GEN12LPTEST_F(Gen12LpCoherencyRequirements, givenCoherencyRequirementWithoutShar
EXPECT_FALSE(foundOne);
foundOne = true;
auto pc = genCmdCast<PIPE_CONTROL *>(*(++it));
if (!expectPipeControl && !Gen12LPHelpers::pipeControlWaRequired(device->getHardwareInfo().platform.eProductFamily)) {
if (!expectPipeControl && !SpecialUltHelperGen12lp::isPipeControlWArequired(device->getHardwareInfo().platform.eProductFamily)) {
EXPECT_EQ(nullptr, pc);
} else {
EXPECT_NE(nullptr, pc);

View File

@ -9,3 +9,7 @@
HWTEST_EXCLUDE_PRODUCT(BufferSetSurfaceTests, givenBufferSetSurfaceThatMemoryIsUnalignedToCachelineButReadOnlyThenL3CacheShouldBeStillOn, IGFX_DG1)
HWTEST_EXCLUDE_PRODUCT(BufferSetSurfaceTests, givenAlignedCacheableReadOnlyBufferThenChoseOclBufferPolicy, IGFX_DG1);
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfPipeControlWAIsRequiredThenFalseIsReturned, IGFX_DG1);
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfImagePitchAlignmentWAIsRequiredThenFalseIsReturned, IGFX_DG1);
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfForceEmuInt32DivRemSPWAIsRequiredThenFalseIsReturned, IGFX_DG1);
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIf3DPipelineSelectWAIsRequiredThenFalseIsReturned, IGFX_DG1);

View File

@ -14,20 +14,6 @@
using HwHelperTestDg1 = HwHelperTest;
DG1TEST_F(HwHelperTestDg1, givenDg1PlatformWhenIsLocalMemoryEnabledIsCalledThenTrueIsReturned) {
hardwareInfo.featureTable.ftrLocalMemory = true;
auto &helper = reinterpret_cast<HwHelperHw<FamilyType> &>(HwHelperHw<FamilyType>::get());
EXPECT_TRUE(helper.isLocalMemoryEnabled(hardwareInfo));
}
DG1TEST_F(HwHelperTestDg1, givenDg1PlatformWithoutLocalMemoryFeatureWhenIsLocalMemoryEnabledIsCalledThenFalseIsReturned) {
hardwareInfo.featureTable.ftrLocalMemory = false;
auto &helper = reinterpret_cast<HwHelperHw<FamilyType> &>(HwHelperHw<FamilyType>::get());
EXPECT_FALSE(helper.isLocalMemoryEnabled(hardwareInfo));
}
DG1TEST_F(HwHelperTestDg1, givenDg1PlatformWhenSetupHardwareCapabilitiesIsCalledThenThenSpecificImplementationIsUsed) {
hardwareInfo.featureTable.ftrLocalMemory = true;
@ -82,21 +68,6 @@ DG1TEST_F(HwHelperTestDg1, givenDg1AndVariousSteppingsWhenGettingIsWorkaroundReq
}
}
DG1TEST_F(HwHelperTestDg1, givenDg1WhenSteppingA0ThenIntegerDivisionEmulationIsEnabled) {
const auto &hwInfoConfig = *HwInfoConfig::get(hardwareInfo.platform.eProductFamily);
uint32_t stepping = REVISION_A0;
hardwareInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(stepping, hardwareInfo);
auto &helper = HwHelper::get(renderCoreFamily);
EXPECT_TRUE(helper.isForceEmuInt32DivRemSPWARequired(hardwareInfo));
}
DG1TEST_F(HwHelperTestDg1, givenDg1WhenSteppingB0ThenIntegerDivisionEmulationIsNotEnabled) {
const auto &hwInfoConfig = *HwInfoConfig::get(hardwareInfo.platform.eProductFamily);
hardwareInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_B, hardwareInfo);
auto &helper = HwHelper::get(renderCoreFamily);
EXPECT_FALSE(helper.isForceEmuInt32DivRemSPWARequired(hardwareInfo));
}
DG1TEST_F(HwHelperTestDg1, givenBufferAllocationTypeWhenSetExtraAllocationDataIsCalledThenIsLockableIsSet) {
auto &hwHelper = HwHelper::get(renderCoreFamily);
AllocationData allocData{};

View File

@ -29,6 +29,29 @@ DG1TEST_F(Dg1HwInfoConfig, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpe
EXPECT_EQ(0u, gtSystemInfo.EUCount);
}
DG1TEST_F(Dg1HwInfoConfig, givenA0SteppingAndDg1PlatformWhenAskingIfWAIsRequiredThenReturnTrue) {
auto hwInfoConfig = HwInfoConfig::get(productFamily);
std::array<std::pair<uint32_t, bool>, 2> revisions = {
{{REVISION_A0, true},
{REVISION_B, false}}};
for (const auto &[revision, paramBool] : revisions) {
auto hwInfo = *defaultHwInfo;
hwInfo.platform.usRevId = hwInfoConfig->getHwRevIdFromStepping(revision, hwInfo);
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
EXPECT_EQ(paramBool, hwInfoConfig->pipeControlWARequired(hwInfo));
EXPECT_EQ(paramBool, hwInfoConfig->imagePitchAlignmentWARequired(hwInfo));
EXPECT_EQ(paramBool, hwInfoConfig->isForceEmuInt32DivRemSPWARequired(hwInfo));
}
}
DG1TEST_F(Dg1HwInfoConfig, givenHwInfoConfigWhenAskedIf3DPipelineSelectWAIsRequiredThenTrueIsReturned) {
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
EXPECT_TRUE(hwInfoConfig.is3DPipelineSelectWARequired());
}
using Dg1HwInfo = ::testing::Test;
DG1TEST_F(Dg1HwInfo, givenBoolWhenCallDg1HardwareInfoSetupThenFeatureTableAndWorkaroundTableAreSetCorrect) {

View File

@ -425,3 +425,17 @@ GEN12LPTEST_F(HwHelperTestGen12Lp, WhenGettingSupportedDeviceFeatureCapabilities
cl_device_feature_capabilities_intel expectedCapabilities = CL_DEVICE_FEATURE_FLAG_DP4A_INTEL;
EXPECT_EQ(expectedCapabilities, ClHwHelper::get(renderCoreFamily).getSupportedDeviceFeatureCapabilities());
}
GEN12LPTEST_F(HwHelperTestGen12Lp, givenLocalMemoryFeatureDisabledWhenIsLocalMemoryEnabledIsCalledThenTrueIsReturned) {
hardwareInfo.featureTable.ftrLocalMemory = true;
auto &helper = reinterpret_cast<HwHelperHw<FamilyType> &>(HwHelperHw<FamilyType>::get());
EXPECT_TRUE(helper.isLocalMemoryEnabled(hardwareInfo));
}
GEN12LPTEST_F(HwHelperTestGen12Lp, givenLocalMemoryFeatureEnabledWhenIsLocalMemoryEnabledIsCalledThenFalseIsReturned) {
hardwareInfo.featureTable.ftrLocalMemory = false;
auto &helper = reinterpret_cast<HwHelperHw<FamilyType> &>(HwHelperHw<FamilyType>::get());
EXPECT_FALSE(helper.isLocalMemoryEnabled(hardwareInfo));
}

View File

@ -14,6 +14,7 @@ if(TESTS_RKL)
${IGDRCL_SRCS_tests_gen12lp_rkl_excludes}
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_helper_rkl.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_rkl.cpp
)
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen12lp_rkl})
add_subdirectories()

View File

@ -10,3 +10,5 @@
HWTEST_EXCLUDE_PRODUCT(DeviceFactoryTest, givenInvalidHwConfigStringWhenPrepareDeviceEnvironmentsForProductFamilyOverrideThenThrowsException, IGFX_ROCKETLAKE);
HWTEST_EXCLUDE_PRODUCT(BufferSetSurfaceTests, givenBufferSetSurfaceThatMemoryIsUnalignedToCachelineButReadOnlyThenL3CacheShouldBeStillOn, IGFX_ROCKETLAKE)
HWTEST_EXCLUDE_PRODUCT(BufferSetSurfaceTests, givenAlignedCacheableReadOnlyBufferThenChoseOclBufferPolicy, IGFX_ROCKETLAKE);
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfForceEmuInt32DivRemSPWAIsRequiredThenFalseIsReturned, IGFX_ROCKETLAKE);
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIf3DPipelineSelectWAIsRequiredThenFalseIsReturned, IGFX_ROCKETLAKE);

View File

@ -36,23 +36,3 @@ RKLTEST_F(HwHelperTestRkl, givenRklWhenRequestedVmeFlagsThenReturnFalse) {
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsVmeAvcTextureSampler);
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.ftrSupportsVmeAvcPreemption);
}
RKLTEST_F(HwHelperTestRkl, givenRklWhenSteppingA0OrB0ThenIntegerDivisionEmulationIsEnabled) {
const auto &hwInfoConfig = *HwInfoConfig::get(hardwareInfo.platform.eProductFamily);
uint32_t steppings[] = {
REVISION_A0,
REVISION_B};
for (auto stepping : steppings) {
hardwareInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(stepping, hardwareInfo);
auto &helper = HwHelper::get(renderCoreFamily);
EXPECT_TRUE(helper.isForceEmuInt32DivRemSPWARequired(hardwareInfo));
}
}
RKLTEST_F(HwHelperTestRkl, givenRklWhenSteppingC0ThenIntegerDivisionEmulationIsNotEnabled) {
const auto &hwInfoConfig = *HwInfoConfig::get(hardwareInfo.platform.eProductFamily);
hardwareInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_C, hardwareInfo);
auto &helper = HwHelper::get(renderCoreFamily);
EXPECT_FALSE(helper.isForceEmuInt32DivRemSPWARequired(hardwareInfo));
}

View File

@ -0,0 +1,39 @@
/*
* Copyright (C) 2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/os_interface/hw_info_config.h"
#include "shared/test/common/helpers/default_hw_info.h"
#include "test.h"
#include <array>
using namespace NEO;
using RklHwInfoConfig = ::testing::Test;
RKLTEST_F(RklHwInfoConfig, givenA0OrBSteppingAndRklPlatformWhenAskingIfWAIsRequiredThenReturnTrue) {
auto hwInfoConfig = HwInfoConfig::get(productFamily);
std::array<std::pair<uint32_t, bool>, 3> revisions = {
{{REVISION_A0, true},
{REVISION_B, true},
{REVISION_C, false}}};
for (const auto &[revision, paramBool] : revisions) {
auto hwInfo = *defaultHwInfo;
hwInfo.platform.usRevId = hwInfoConfig->getHwRevIdFromStepping(revision, hwInfo);
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
EXPECT_EQ(paramBool, hwInfoConfig->isForceEmuInt32DivRemSPWARequired(hwInfo));
}
}
RKLTEST_F(RklHwInfoConfig, givenHwInfoConfigWhenAskedIf3DPipelineSelectWAIsRequiredThenTrueIsReturned) {
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
EXPECT_TRUE(hwInfoConfig.is3DPipelineSelectWARequired());
}

View File

@ -9,3 +9,7 @@
HWTEST_EXCLUDE_PRODUCT(BufferSetSurfaceTests, givenBufferSetSurfaceThatMemoryIsUnalignedToCachelineButReadOnlyThenL3CacheShouldBeStillOn, IGFX_TIGERLAKE_LP)
HWTEST_EXCLUDE_PRODUCT(BufferSetSurfaceTests, givenAlignedCacheableReadOnlyBufferThenChoseOclBufferPolicy, IGFX_TIGERLAKE_LP);
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfPipeControlWAIsRequiredThenFalseIsReturned, IGFX_TIGERLAKE_LP);
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfImagePitchAlignmentWAIsRequiredThenFalseIsReturned, IGFX_TIGERLAKE_LP);
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfForceEmuInt32DivRemSPWAIsRequiredThenFalseIsReturned, IGFX_TIGERLAKE_LP);
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIf3DPipelineSelectWAIsRequiredThenFalseIsReturned, IGFX_TIGERLAKE_LP);

View File

@ -43,20 +43,6 @@ TGLLPTEST_F(HwHelperTestGen12Lp, givenTgllWhenWaForDefaultEngineIsNotAppliedThen
EXPECT_EQ(aub_stream::ENGINE_RCS, hardwareInfo.capabilityTable.defaultEngineType);
}
TGLLPTEST_F(HwHelperTestGen12Lp, givenTgllpWhenSteppingBellowBThenIntegerDivisionEmulationIsEnabled) {
const auto &hwInfoConfig = *HwInfoConfig::get(hardwareInfo.platform.eProductFamily);
hardwareInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_A0, hardwareInfo);
auto &helper = HwHelper::get(renderCoreFamily);
EXPECT_TRUE(helper.isForceEmuInt32DivRemSPWARequired(hardwareInfo));
}
TGLLPTEST_F(HwHelperTestGen12Lp, givenTgllpWhenSteppingBThenIntegerDivisionEmulationIsEnabled) {
const auto &hwInfoConfig = *HwInfoConfig::get(hardwareInfo.platform.eProductFamily);
hardwareInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(REVISION_A1, hardwareInfo);
auto &helper = HwHelper::get(renderCoreFamily);
EXPECT_FALSE(helper.isForceEmuInt32DivRemSPWARequired(hardwareInfo));
}
TGLLPTEST_F(HwHelperTestGen12Lp, givenTgllpAndVariousSteppingsWhenGettingIsWorkaroundRequiredThenCorrectValueIsReturned) {
auto &hwHelper = HwHelper::get(hardwareInfo.platform.eRenderCoreFamily);
const auto &hwInfoConfig = *HwInfoConfig::get(hardwareInfo.platform.eProductFamily);

View File

@ -48,6 +48,30 @@ TGLLPTEST_F(TgllpHwInfoConfig, whenUsingCorrectConfigValueThenCorrectHwInfoIsRet
EXPECT_EQ(2u, gtSystemInfo.DualSubSliceCount);
}
TGLLPTEST_F(TgllpHwInfoConfig, givenA0SteppingAndTgllpPlatformWhenAskingIfWAIsRequiredThenReturnTrue) {
auto hwInfoConfig = HwInfoConfig::get(productFamily);
std::array<std::pair<uint32_t, bool>, 3> revisions = {
{{REVISION_A0, true},
{REVISION_B, false},
{REVISION_C, false}}};
for (const auto &[revision, paramBool] : revisions) {
auto hwInfo = *defaultHwInfo;
hwInfo.platform.usRevId = hwInfoConfig->getHwRevIdFromStepping(revision, hwInfo);
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
EXPECT_EQ(paramBool, hwInfoConfig->pipeControlWARequired(hwInfo));
EXPECT_EQ(paramBool, hwInfoConfig->imagePitchAlignmentWARequired(hwInfo));
EXPECT_EQ(paramBool, hwInfoConfig->isForceEmuInt32DivRemSPWARequired(hwInfo));
}
}
TGLLPTEST_F(TgllpHwInfoConfig, givenHwInfoConfigWhenAskedIf3DPipelineSelectWAIsRequiredThenTrueIsReturned) {
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
EXPECT_TRUE(hwInfoConfig.is3DPipelineSelectWARequired());
}
using TgllpHwInfo = ::testing::Test;
TGLLPTEST_F(TgllpHwInfo, givenBoolWhenCallTgllpHardwareInfoSetupThenFeatureTableAndWorkaroundTableAreSetCorrect) {

View File

@ -937,14 +937,6 @@ HWCMDTEST_F(IGFX_GEN8_CORE, HwHelperTest, givenDefaultHwHelperHwWhenIsWorkaround
EXPECT_FALSE(helper.isWorkaroundRequired(REVISION_A0, REVISION_B, hardwareInfo));
}
HWTEST_F(HwHelperTest, givenDefaultHwHelperHwWhenIsForceEmuInt32DivRemSPWARequiredCalledThenFalseIsReturned) {
if (hardwareInfo.platform.eRenderCoreFamily == IGFX_GEN12LP_CORE) {
GTEST_SKIP();
}
auto &helper = HwHelper::get(renderCoreFamily);
EXPECT_FALSE(helper.isForceEmuInt32DivRemSPWARequired(hardwareInfo));
}
HWTEST_F(HwHelperTest, givenDefaultHwHelperHwWhenMinimalSIMDSizeIsQueriedThen8IsReturned) {
auto &helper = HwHelper::get(renderCoreFamily);
EXPECT_EQ(8u, helper.getMinimalSIMDSize());

View File

@ -311,3 +311,23 @@ HWTEST_F(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfExtraParametersAreInvalid
const auto &hwInfoConfig = *HwInfoConfig::get(pInHwInfo.platform.eProductFamily);
EXPECT_FALSE(hwInfoConfig.extraParametersInvalid(pInHwInfo));
}
HWTEST_F(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfPipeControlWAIsRequiredThenFalseIsReturned) {
const auto &hwInfoConfig = *HwInfoConfig::get(pInHwInfo.platform.eProductFamily);
EXPECT_FALSE(hwInfoConfig.pipeControlWARequired(pInHwInfo));
}
HWTEST_F(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfImagePitchAlignmentWAIsRequiredThenFalseIsReturned) {
const auto &hwInfoConfig = *HwInfoConfig::get(pInHwInfo.platform.eProductFamily);
EXPECT_FALSE(hwInfoConfig.imagePitchAlignmentWARequired(pInHwInfo));
}
HWTEST_F(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfForceEmuInt32DivRemSPWAIsRequiredThenFalseIsReturned) {
const auto &hwInfoConfig = *HwInfoConfig::get(pInHwInfo.platform.eProductFamily);
EXPECT_FALSE(hwInfoConfig.isForceEmuInt32DivRemSPWARequired(pInHwInfo));
}
HWTEST_F(HwInfoConfigTest, givenHwInfoConfigWhenAskedIf3DPipelineSelectWAIsRequiredThenFalseIsReturned) {
const auto &hwInfoConfig = *HwInfoConfig::get(pInHwInfo.platform.eProductFamily);
EXPECT_FALSE(hwInfoConfig.is3DPipelineSelectWARequired());
}

View File

@ -1332,8 +1332,8 @@ inline void CommandStreamReceiverHw<GfxFamily>::updateTagFromWait() {
template <typename GfxFamily>
inline void CommandStreamReceiverHw<GfxFamily>::programAdditionalPipelineSelect(LinearStream &csr, PipelineSelectArgs &pipelineSelectArgs, bool is3DPipeline) {
auto &hwHelper = HwHelper::get(peekHwInfo().platform.eRenderCoreFamily);
if (hwHelper.is3DPipelineSelectWARequired(peekHwInfo()) && isRcs()) {
const auto &hwInfoConfig = *HwInfoConfig::get(peekHwInfo().platform.eProductFamily);
if (hwInfoConfig.is3DPipelineSelectWARequired() && isRcs()) {
auto localPipelineSelectArgs = pipelineSelectArgs;
localPipelineSelectArgs.is3DPipelineRequired = is3DPipeline;
PreambleHelper<GfxFamily>::programPipelineSelect(&csr, localPipelineSelectArgs, peekHwInfo());
@ -1355,8 +1355,8 @@ inline MemoryCompressionState CommandStreamReceiverHw<GfxFamily>::getMemoryCompr
template <typename GfxFamily>
inline bool CommandStreamReceiverHw<GfxFamily>::isPipelineSelectAlreadyProgrammed() const {
auto &hwHelper = HwHelper::get(peekHwInfo().platform.eRenderCoreFamily);
return isComputeModeNeeded() && hwHelper.is3DPipelineSelectWARequired(peekHwInfo()) && isRcs();
const auto &hwInfoConfig = *HwInfoConfig::get(peekHwInfo().platform.eProductFamily);
return isComputeModeNeeded() && hwInfoConfig.is3DPipelineSelectWARequired() && isRcs();
}
template <typename GfxFamily>

View File

@ -39,8 +39,8 @@ size_t CommandStreamReceiverHw<GfxFamily>::getRequiredStateBaseAddressSize(const
using PIPELINE_SELECT = typename GfxFamily::PIPELINE_SELECT;
size_t size = 0;
auto &hwHelper = HwHelper::get(peekHwInfo().platform.eRenderCoreFamily);
if (hwHelper.is3DPipelineSelectWARequired(peekHwInfo())) {
const auto &hwInfoConfig = *HwInfoConfig::get(peekHwInfo().platform.eProductFamily);
if (hwInfoConfig.is3DPipelineSelectWARequired()) {
size += (2 * PreambleHelper<GfxFamily>::getCmdSizeForPipelineSelect(peekHwInfo()));
}
size += sizeof(typename GfxFamily::STATE_BASE_ADDRESS) + sizeof(PIPE_CONTROL);

View File

@ -45,8 +45,8 @@ size_t CommandStreamReceiverHw<Family>::getCmdSizeForComputeMode() {
size += sizeof(typename Family::PIPE_CONTROL);
}
auto &hwHelper = HwHelper::get(peekHwInfo().platform.eRenderCoreFamily);
if (hwHelper.is3DPipelineSelectWARequired(peekHwInfo()) && isRcs()) {
const auto &hwInfoConfig = *HwInfoConfig::get(peekHwInfo().platform.eProductFamily);
if (hwInfoConfig.is3DPipelineSelectWARequired() && isRcs()) {
size += (2 * PreambleHelper<Family>::getCmdSizeForPipelineSelect(peekHwInfo()));
}
}

View File

@ -14,28 +14,8 @@
namespace NEO {
namespace Gen12LPHelpers {
bool pipeControlWaRequired(PRODUCT_FAMILY productFamily) {
return (productFamily == PRODUCT_FAMILY::IGFX_TIGERLAKE_LP);
}
uint32_t getHwRevIdFromStepping(uint32_t stepping, const HardwareInfo &hwInfo) {
return CommonConstants::invalidStepping;
}
uint32_t getSteppingFromHwRevId(const HardwareInfo &hwInfo) {
return CommonConstants::invalidStepping;
}
bool imagePitchAlignmentWaRequired(PRODUCT_FAMILY productFamily) {
return (productFamily == PRODUCT_FAMILY::IGFX_TIGERLAKE_LP);
}
void adjustCoherencyFlag(PRODUCT_FAMILY productFamily, bool &coherencyFlag) {}
bool isLocalMemoryEnabled(const HardwareInfo &hwInfo) {
return false;
}
void initAdditionalGlobalMMIO(const CommandStreamReceiver &commandStreamReceiver, AubMemDump::AubStream &stream) {}
uint64_t getPPGTTAdditionalBits(GraphicsAllocation *graphicsAllocation) {
@ -49,15 +29,5 @@ bool isOffsetToSkipSetFFIDGPWARequired(const HardwareInfo &hwInfo) {
return hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_B, hwInfo);
}
bool isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo) {
HwHelper &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
return (((hwInfo.platform.eProductFamily == IGFX_TIGERLAKE_LP) & (hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_B, hwInfo))) ||
((hwInfo.platform.eProductFamily == IGFX_ROCKETLAKE) & (hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_C, hwInfo))));
}
bool is3DPipelineSelectWARequired(const HardwareInfo &hwInfo) {
return (hwInfo.platform.eProductFamily == IGFX_TIGERLAKE_LP || hwInfo.platform.eProductFamily == IGFX_ROCKETLAKE);
}
} // namespace Gen12LPHelpers
} // namespace NEO

View File

@ -23,19 +23,9 @@ class Image;
enum class LocalMemoryAccessMode;
namespace Gen12LPHelpers {
bool pipeControlWaRequired(PRODUCT_FAMILY productFamily);
bool imagePitchAlignmentWaRequired(PRODUCT_FAMILY productFamily);
bool isLocalMemoryEnabled(const HardwareInfo &hwInfo);
void initAdditionalGlobalMMIO(const CommandStreamReceiver &commandStreamReceiver, AubMemDump::AubStream &stream);
uint64_t getPPGTTAdditionalBits(GraphicsAllocation *graphicsAllocation);
void adjustAubGTTData(const CommandStreamReceiver &commandStreamReceiver, AubGTTData &data);
bool isOffsetToSkipSetFFIDGPWARequired(const HardwareInfo &hwInfo);
bool isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo);
bool is3DPipelineSelectWARequired(const HardwareInfo &hwInfo);
inline void adjustPlatformForProductFamily(PLATFORM &platform, GFXCORE_FAMILY newCoreFamily) {
platform.eRenderCoreFamily = IGFX_GEN12LP_CORE;
platform.eDisplayCoreFamily = IGFX_GEN12LP_CORE;
}
} // namespace Gen12LPHelpers
} // namespace NEO

View File

@ -13,18 +13,6 @@
namespace NEO {
namespace Gen12LPHelpers {
bool pipeControlWaRequired(PRODUCT_FAMILY productFamily) {
return (productFamily == IGFX_TIGERLAKE_LP) || (productFamily == IGFX_DG1);
}
bool imagePitchAlignmentWaRequired(PRODUCT_FAMILY productFamily) {
return (productFamily == IGFX_TIGERLAKE_LP) || (productFamily == IGFX_DG1);
}
bool isLocalMemoryEnabled(const HardwareInfo &hwInfo) {
return hwInfo.featureTable.ftrLocalMemory;
}
void initAdditionalGlobalMMIO(const CommandStreamReceiver &commandStreamReceiver, AubMemDump::AubStream &stream) {}
uint64_t getPPGTTAdditionalBits(GraphicsAllocation *graphicsAllocation) {
@ -43,16 +31,5 @@ bool isOffsetToSkipSetFFIDGPWARequired(const HardwareInfo &hwInfo) {
return hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_B, hwInfo);
}
bool isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo) {
HwHelper &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
return (((hwInfo.platform.eProductFamily == IGFX_TIGERLAKE_LP) & (hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_B, hwInfo))) ||
((hwInfo.platform.eProductFamily == IGFX_DG1) & (hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_B, hwInfo))) ||
((hwInfo.platform.eProductFamily == IGFX_ROCKETLAKE) & (hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_C, hwInfo))));
}
bool is3DPipelineSelectWARequired(const HardwareInfo &hwInfo) {
return (hwInfo.platform.eProductFamily == IGFX_TIGERLAKE_LP || hwInfo.platform.eProductFamily == IGFX_DG1 || hwInfo.platform.eProductFamily == IGFX_ROCKETLAKE);
}
} // namespace Gen12LPHelpers
} // namespace NEO

View File

@ -36,16 +36,6 @@ bool HwHelperHw<Family>::isOffsetToSkipSetFFIDGPWARequired(const HardwareInfo &h
return Gen12LPHelpers::isOffsetToSkipSetFFIDGPWARequired(hwInfo);
}
template <>
bool HwHelperHw<Family>::is3DPipelineSelectWARequired(const HardwareInfo &hwInfo) const {
return Gen12LPHelpers::is3DPipelineSelectWARequired(hwInfo);
}
template <>
bool HwHelperHw<Family>::isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo) {
return Gen12LPHelpers::isForceEmuInt32DivRemSPWARequired(hwInfo);
}
template <>
bool HwHelperHw<Family>::isWaDisableRccRhwoOptimizationRequired() const {
return true;
@ -66,7 +56,7 @@ uint32_t HwHelperHw<Family>::getComputeUnitsUsedForScratch(const HardwareInfo *p
template <>
bool HwHelperHw<Family>::isLocalMemoryEnabled(const HardwareInfo &hwInfo) const {
return Gen12LPHelpers::isLocalMemoryEnabled(hwInfo);
return hwInfo.featureTable.ftrLocalMemory;
}
template <>
@ -87,14 +77,10 @@ bool HwHelperHw<Family>::checkResourceCompatibility(GraphicsAllocation &graphics
template <>
uint32_t HwHelperHw<Family>::getPitchAlignmentForImage(const HardwareInfo *hwInfo) const {
if (Gen12LPHelpers::imagePitchAlignmentWaRequired(hwInfo->platform.eProductFamily)) {
HwHelper &hwHelper = HwHelper::get(hwInfo->platform.eRenderCoreFamily);
if (hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_B, *hwInfo)) {
if (HwInfoConfig::get(hwInfo->platform.eProductFamily)->imagePitchAlignmentWARequired(*hwInfo)) {
return 64u;
}
return 4u;
}
return 4u;
}
template <>
@ -140,15 +126,12 @@ EngineGroupType HwHelperHw<Family>::getEngineGroupType(aub_stream::EngineType en
template <>
void MemorySynchronizationCommands<Family>::addPipeControlWA(LinearStream &commandStream, uint64_t gpuAddress, const HardwareInfo &hwInfo) {
using PIPE_CONTROL = typename Family::PIPE_CONTROL;
if (Gen12LPHelpers::pipeControlWaRequired(hwInfo.platform.eProductFamily)) {
HwHelper &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
if (hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_B, hwInfo)) {
if (HwInfoConfig::get(hwInfo.platform.eProductFamily)->pipeControlWARequired(hwInfo)) {
PIPE_CONTROL cmd = Family::cmdInitPipeControl;
cmd.setCommandStreamerStallEnable(true);
auto pipeControl = static_cast<Family::PIPE_CONTROL *>(commandStream.getSpace(sizeof(PIPE_CONTROL)));
*pipeControl = cmd;
}
}
}
template <>
@ -198,8 +181,7 @@ uint32_t HwHelperHw<Family>::getMocsIndex(const GmmHelper &gmmHelper, bool l3ena
template <>
bool MemorySynchronizationCommands<TGLLPFamily>::isPipeControlWArequired(const HardwareInfo &hwInfo) {
HwHelper &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
return (Gen12LPHelpers::pipeControlWaRequired(hwInfo.platform.eProductFamily)) && hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_B, hwInfo);
return HwInfoConfig::get(hwInfo.platform.eProductFamily)->pipeControlWARequired(hwInfo);
}
template <>

View File

@ -26,3 +26,23 @@ uint32_t HwInfoConfigHw<gfxProduct>::getSteppingFromHwRevId(const HardwareInfo &
}
return CommonConstants::invalidStepping;
}
template <>
bool HwInfoConfigHw<gfxProduct>::pipeControlWARequired(const HardwareInfo &hwInfo) const {
return HwHelper::get(hwInfo.platform.eRenderCoreFamily).isWorkaroundRequired(REVISION_A0, REVISION_B, hwInfo);
}
template <>
bool HwInfoConfigHw<gfxProduct>::imagePitchAlignmentWARequired(const HardwareInfo &hwInfo) const {
return HwHelper::get(hwInfo.platform.eRenderCoreFamily).isWorkaroundRequired(REVISION_A0, REVISION_B, hwInfo);
}
template <>
bool HwInfoConfigHw<gfxProduct>::isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo) const {
return HwHelper::get(hwInfo.platform.eRenderCoreFamily).isWorkaroundRequired(REVISION_A0, REVISION_B, hwInfo);
}
template <>
bool HwInfoConfigHw<gfxProduct>::is3DPipelineSelectWARequired() const {
return true;
}

View File

@ -7,7 +7,8 @@
template <>
void HwInfoConfigHw<gfxProduct>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
Gen12LPHelpers::adjustPlatformForProductFamily(hwInfo->platform, GFXCORE_FAMILY::IGFX_GEN12LP_CORE);
hwInfo->platform.eRenderCoreFamily = GFXCORE_FAMILY::IGFX_GEN12LP_CORE;
hwInfo->platform.eDisplayCoreFamily = GFXCORE_FAMILY::IGFX_GEN12LP_CORE;
}
template <>

View File

@ -30,3 +30,13 @@ uint32_t HwInfoConfigHw<gfxProduct>::getSteppingFromHwRevId(const HardwareInfo &
}
return CommonConstants::invalidStepping;
}
template <>
bool HwInfoConfigHw<gfxProduct>::isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo) const {
return HwHelper::get(hwInfo.platform.eRenderCoreFamily).isWorkaroundRequired(REVISION_A0, REVISION_C, hwInfo);
}
template <>
bool HwInfoConfigHw<gfxProduct>::is3DPipelineSelectWARequired() const {
return true;
}

View File

@ -30,3 +30,23 @@ uint32_t HwInfoConfigHw<gfxProduct>::getSteppingFromHwRevId(const HardwareInfo &
}
return CommonConstants::invalidStepping;
}
template <>
bool HwInfoConfigHw<gfxProduct>::pipeControlWARequired(const HardwareInfo &hwInfo) const {
return HwHelper::get(hwInfo.platform.eRenderCoreFamily).isWorkaroundRequired(REVISION_A0, REVISION_B, hwInfo);
}
template <>
bool HwInfoConfigHw<gfxProduct>::imagePitchAlignmentWARequired(const HardwareInfo &hwInfo) const {
return HwHelper::get(hwInfo.platform.eRenderCoreFamily).isWorkaroundRequired(REVISION_A0, REVISION_B, hwInfo);
}
template <>
bool HwInfoConfigHw<gfxProduct>::isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo) const {
return HwHelper::get(hwInfo.platform.eRenderCoreFamily).isWorkaroundRequired(REVISION_A0, REVISION_B, hwInfo);
}
template <>
bool HwInfoConfigHw<gfxProduct>::is3DPipelineSelectWARequired() const {
return true;
}

View File

@ -93,13 +93,11 @@ class HwHelper {
virtual uint32_t alignSlmSize(uint32_t slmSize) = 0;
virtual uint32_t computeSlmValues(const HardwareInfo &hwInfo, uint32_t slmSize) = 0;
virtual bool isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo) = 0;
virtual bool isWaDisableRccRhwoOptimizationRequired() const = 0;
virtual bool isAdditionalFeatureFlagRequired(const FeatureTable *featureTable) const = 0;
virtual uint32_t getMinimalSIMDSize() = 0;
virtual bool isWorkaroundRequired(uint32_t lowestSteppingWithBug, uint32_t steppingWithFix, const HardwareInfo &hwInfo) const = 0;
virtual bool isOffsetToSkipSetFFIDGPWARequired(const HardwareInfo &hwInfo) const = 0;
virtual bool is3DPipelineSelectWARequired(const HardwareInfo &hwInfo) const = 0;
virtual bool isFusedEuDispatchEnabled(const HardwareInfo &hwInfo) const = 0;
virtual uint64_t getGpuTimeStampInNS(uint64_t timeStamp, double frequency) const = 0;
virtual uint32_t getBindlessSurfaceExtendedMessageDescriptorValue(uint32_t surfStateOffset) const = 0;
@ -273,14 +271,10 @@ class HwHelperHw : public HwHelper {
bool isOffsetToSkipSetFFIDGPWARequired(const HardwareInfo &hwInfo) const override;
bool is3DPipelineSelectWARequired(const HardwareInfo &hwInfo) const override;
bool isFusedEuDispatchEnabled(const HardwareInfo &hwInfo) const override;
static bool isForceDefaultRCSEngineWARequired(const HardwareInfo &hwInfo);
bool isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo) override;
bool isWaDisableRccRhwoOptimizationRequired() const override;
bool isAdditionalFeatureFlagRequired(const FeatureTable *featureTable) const override;

View File

@ -383,21 +383,11 @@ bool HwHelperHw<GfxFamily>::isWorkaroundRequired(uint32_t lowestSteppingWithBug,
return (lowestHwRevIdWithBug <= hwInfo.platform.usRevId && hwInfo.platform.usRevId < hwRevIdWithFix);
}
template <typename GfxFamily>
bool HwHelperHw<GfxFamily>::is3DPipelineSelectWARequired(const HardwareInfo &hwInfo) const {
return false;
}
template <typename GfxFamily>
bool HwHelperHw<GfxFamily>::isForceDefaultRCSEngineWARequired(const HardwareInfo &hwInfo) {
return false;
}
template <typename GfxFamily>
bool HwHelperHw<GfxFamily>::isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo) {
return false;
}
template <typename GfxFamily>
bool HwHelperHw<GfxFamily>::isWaDisableRccRhwoOptimizationRequired() const {
return false;

View File

@ -69,6 +69,10 @@ class HwInfoConfig {
virtual bool isInitialFlagsProgrammingRequired() const = 0;
virtual bool isReturnedCmdSizeForMediaSamplerAdjustmentRequired() const = 0;
virtual bool extraParametersInvalid(const HardwareInfo &hwInfo) const = 0;
virtual bool pipeControlWARequired(const HardwareInfo &hwInfo) const = 0;
virtual bool imagePitchAlignmentWARequired(const HardwareInfo &hwInfo) const = 0;
virtual bool isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo) const = 0;
virtual bool is3DPipelineSelectWARequired() const = 0;
protected:
virtual LocalMemoryAccessMode getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo) const = 0;
@ -123,6 +127,10 @@ class HwInfoConfigHw : public HwInfoConfig {
bool isInitialFlagsProgrammingRequired() const override;
bool isReturnedCmdSizeForMediaSamplerAdjustmentRequired() const override;
bool extraParametersInvalid(const HardwareInfo &hwInfo) const override;
bool pipeControlWARequired(const HardwareInfo &hwInfo) const override;
bool imagePitchAlignmentWARequired(const HardwareInfo &hwInfo) const override;
bool isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo) const override;
bool is3DPipelineSelectWARequired() const override;
protected:
HwInfoConfigHw() = default;

View File

@ -226,4 +226,24 @@ bool HwInfoConfigHw<gfxProduct>::extraParametersInvalid(const HardwareInfo &hwIn
return false;
}
template <PRODUCT_FAMILY gfxProduct>
bool HwInfoConfigHw<gfxProduct>::pipeControlWARequired(const HardwareInfo &hwInfo) const {
return false;
}
template <PRODUCT_FAMILY gfxProduct>
bool HwInfoConfigHw<gfxProduct>::imagePitchAlignmentWARequired(const HardwareInfo &hwInfo) const {
return false;
}
template <PRODUCT_FAMILY gfxProduct>
bool HwInfoConfigHw<gfxProduct>::isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo) const {
return false;
}
template <PRODUCT_FAMILY gfxProduct>
bool HwInfoConfigHw<gfxProduct>::is3DPipelineSelectWARequired() const {
return false;
}
} // namespace NEO

View File

@ -10,6 +10,7 @@
#include "shared/source/command_stream/linear_stream.h"
#include "shared/source/helpers/pipeline_select_helper.h"
#include "shared/source/helpers/ptr_math.h"
#include "shared/source/os_interface/hw_info_config.h"
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
#include "shared/test/common/helpers/default_hw_info.h"
@ -164,8 +165,8 @@ struct HardwareParse {
}
itorCmd = find<PIPELINE_SELECT *>(++itorCmd, cmdList.end());
}
auto &hwHelper = HwHelper::get(defaultHwInfo->platform.eRenderCoreFamily);
if (hwHelper.is3DPipelineSelectWARequired(*defaultHwInfo)) {
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
if (hwInfoConfig.is3DPipelineSelectWARequired()) {
auto maximalNumberOf3dSelectsRequired = 2;
EXPECT_LE(numberOf3dSelects, maximalNumberOf3dSelectsRequired);
EXPECT_EQ(numberOf3dSelects, numberOfGpgpuSelects);

View File

@ -212,4 +212,24 @@ bool HwInfoConfigHw<IGFX_UNKNOWN>::extraParametersInvalid(const HardwareInfo &hw
return false;
}
template <>
bool HwInfoConfigHw<IGFX_UNKNOWN>::pipeControlWARequired(const HardwareInfo &hwInfo) const {
return false;
}
template <>
bool HwInfoConfigHw<IGFX_UNKNOWN>::imagePitchAlignmentWARequired(const HardwareInfo &hwInfo) const {
return false;
}
template <>
bool HwInfoConfigHw<IGFX_UNKNOWN>::isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo) const {
return false;
}
template <>
bool HwInfoConfigHw<IGFX_UNKNOWN>::is3DPipelineSelectWARequired() const {
return false;
}
} //namespace NEO