Revert "fix: Remove UC PAT override for shared images on BMG"
This reverts commit 4d31ec72fd
.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
parent
d8ea5516b2
commit
df33eda6e8
|
@ -41,5 +41,14 @@ bool ProductHelperHw<gfxProduct>::isStagingBuffersEnabled() const {
|
|||
return true;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint64_t ProductHelperHw<gfxProduct>::overridePatIndex(bool isUncachedType, uint64_t patIndex, AllocationType allocationType) const {
|
||||
if (allocationType == AllocationType::sharedImage && patIndex == 8u && debugManager.flags.OverrideUncachedSharedImages.get()) { // L3: UC
|
||||
return 13; // L3, L4: WB, Non coh
|
||||
}
|
||||
|
||||
return patIndex;
|
||||
}
|
||||
|
||||
template class ProductHelperHw<gfxProduct>;
|
||||
} // namespace NEO
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/memory_manager/allocation_type.h"
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
#include "shared/source/xe2_hpg_core/hw_cmds_bmg.h"
|
||||
#include "shared/source/xe2_hpg_core/hw_info_xe2_hpg_core.h"
|
||||
|
@ -24,4 +25,28 @@ BMGTEST_F(BmgProductHelperWindows, givenProductHelperWhenCheckDirectSubmissionSu
|
|||
|
||||
BMGTEST_F(BmgProductHelperWindows, givenProductHelperWhenIsStagingBuffersEnabledThenTrueIsReturned) {
|
||||
EXPECT_TRUE(productHelper->isStagingBuffersEnabled());
|
||||
}
|
||||
|
||||
BMGTEST_F(BmgProductHelperWindows, givenProductHelperWhenOverridePatIndexCalledThenCorrectValueIsReturned) {
|
||||
DebugManagerStateRestore restorer;
|
||||
|
||||
uint64_t expectedPatIndex = 2u;
|
||||
for (int i = 0; i < static_cast<int>(AllocationType::count); ++i) {
|
||||
EXPECT_EQ(expectedPatIndex, productHelper->overridePatIndex(0u, expectedPatIndex, static_cast<AllocationType>(i)));
|
||||
}
|
||||
|
||||
expectedPatIndex = 8u;
|
||||
for (int i = 0; i < static_cast<int>(AllocationType::count); ++i) {
|
||||
if (static_cast<AllocationType>(i) == AllocationType::sharedImage) {
|
||||
EXPECT_EQ(13u, productHelper->overridePatIndex(0u, expectedPatIndex, static_cast<AllocationType>(i)));
|
||||
} else {
|
||||
EXPECT_EQ(expectedPatIndex, productHelper->overridePatIndex(0u, expectedPatIndex, static_cast<AllocationType>(i)));
|
||||
}
|
||||
}
|
||||
|
||||
debugManager.flags.OverrideUncachedSharedImages.set(0);
|
||||
|
||||
for (int i = 0; i < static_cast<int>(AllocationType::count); ++i) {
|
||||
EXPECT_EQ(expectedPatIndex, productHelper->overridePatIndex(0u, expectedPatIndex, static_cast<AllocationType>(i)));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue