Move some logic to separate helper

Change-Id: I09cf50b44b38b193d1491f6dcea6b4dd6987dd5e
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
Maciej Dziuban
2019-10-28 14:12:50 +01:00
committed by sys_ocldev
parent d408b82a19
commit ec87330fe7
3 changed files with 12 additions and 4 deletions

View File

@ -11,6 +11,10 @@
namespace NEO {
bool SpecialUltHelperGen12lp::shouldCompressionBeEnabledAfterConfigureHardwareCustom(const HardwareInfo &hwInfo) {
return hwInfo.featureTable.ftrE2ECompression;
}
bool SpecialUltHelperGen12lp::shouldEnableHdcFlush(PRODUCT_FAMILY productFamily) {
return true;
}

View File

@ -15,6 +15,7 @@ namespace NEO {
struct HardwareInfo;
struct SpecialUltHelperGen12lp {
static bool shouldCompressionBeEnabledAfterConfigureHardwareCustom(const HardwareInfo &hwInfo);
static bool shouldEnableHdcFlush(PRODUCT_FAMILY productFamily);
static bool additionalCoherencyCheck(PRODUCT_FAMILY productFamily, bool coherency);
static bool shouldPerformimagePitchAlignment(PRODUCT_FAMILY productFamily);

View File

@ -7,6 +7,7 @@
#include "core/unit_tests/helpers/debug_manager_state_restore.h"
#include "runtime/os_interface/windows/os_interface.h"
#include "unit_tests/gen12lp/special_ult_helper_gen12lp.h"
#include "unit_tests/os_interface/windows/hw_info_config_win_tests.h"
using namespace NEO;
@ -21,11 +22,13 @@ GEN12LPTEST_F(HwInfoConfigTestWindowsGen12lp, givenE2ECSetByKmdWhenConfiguringHw
localFeatureTable.ftrE2ECompression = true;
hwInfoConfig->configureHardwareCustom(&outHwInfo, nullptr);
EXPECT_TRUE(outHwInfo.capabilityTable.ftrRenderCompressedBuffers);
EXPECT_TRUE(outHwInfo.capabilityTable.ftrRenderCompressedImages);
bool expectedValue = SpecialUltHelperGen12lp::shouldCompressionBeEnabledAfterConfigureHardwareCustom(outHwInfo);
EXPECT_EQ(expectedValue, outHwInfo.capabilityTable.ftrRenderCompressedBuffers);
EXPECT_EQ(expectedValue, outHwInfo.capabilityTable.ftrRenderCompressedImages);
localFeatureTable.ftrE2ECompression = false;
hwInfoConfig->configureHardwareCustom(&outHwInfo, nullptr);
EXPECT_FALSE(outHwInfo.capabilityTable.ftrRenderCompressedBuffers);
EXPECT_FALSE(outHwInfo.capabilityTable.ftrRenderCompressedImages);
expectedValue = SpecialUltHelperGen12lp::shouldCompressionBeEnabledAfterConfigureHardwareCustom(outHwInfo);
EXPECT_EQ(expectedValue, outHwInfo.capabilityTable.ftrRenderCompressedBuffers);
EXPECT_EQ(expectedValue, outHwInfo.capabilityTable.ftrRenderCompressedImages);
}