mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
refactor: extract common logic from wddm and drm product helpers
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
400f2d03dc
commit
585caab757
@@ -213,7 +213,7 @@ bool ProductHelperHw<IGFX_UNKNOWN>::heapInLocalMem(const HardwareInfo &hwInfo) c
|
||||
}
|
||||
|
||||
template <>
|
||||
void ProductHelperHw<IGFX_UNKNOWN>::setCapabilityCoherencyFlag(const HardwareInfo &hwInfo, bool &coherencyFlag) {
|
||||
void ProductHelperHw<IGFX_UNKNOWN>::setCapabilityCoherencyFlag(const HardwareInfo &hwInfo, bool &coherencyFlag) const {
|
||||
}
|
||||
|
||||
template <>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -80,17 +80,16 @@ TEST_F(ProductHelperTestWindows, givenInstrumentationForHardwareIsEnabledOrDisab
|
||||
}
|
||||
|
||||
HWTEST_F(ProductHelperTestWindows, givenFtrIaCoherencyFlagWhenConfiguringHwInfoThenSetCoherencySupportCorrectly) {
|
||||
HardwareInfo initialHwInfo = *defaultHwInfo;
|
||||
|
||||
bool initialCoherencyStatus = false;
|
||||
productHelper->setCapabilityCoherencyFlag(outHwInfo, initialCoherencyStatus);
|
||||
|
||||
initialHwInfo.featureTable.flags.ftrL3IACoherency = false;
|
||||
productHelper->configureHwInfoWddm(&initialHwInfo, &outHwInfo, *rootDeviceEnvironment.get());
|
||||
outHwInfo.featureTable.flags.ftrL3IACoherency = false;
|
||||
productHelper->configureHwInfoWddm(&outHwInfo, &outHwInfo, *rootDeviceEnvironment.get());
|
||||
EXPECT_FALSE(outHwInfo.capabilityTable.ftrSupportsCoherency);
|
||||
|
||||
initialHwInfo.featureTable.flags.ftrL3IACoherency = true;
|
||||
productHelper->configureHwInfoWddm(&initialHwInfo, &outHwInfo, *rootDeviceEnvironment.get());
|
||||
outHwInfo.featureTable.flags.ftrL3IACoherency = true;
|
||||
productHelper->configureHwInfoWddm(&outHwInfo, &outHwInfo, *rootDeviceEnvironment.get());
|
||||
EXPECT_EQ(initialCoherencyStatus, outHwInfo.capabilityTable.ftrSupportsCoherency);
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user