Refactor: reduce global productHelper getter usage

Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2023-01-04 09:45:07 +00:00
committed by Compute-Runtime-Automation
parent fca4fbb0c0
commit 0dbf92d401
59 changed files with 191 additions and 186 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022 Intel Corporation
* Copyright (C) 2022-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -291,22 +291,6 @@ HWTEST_F(ProductHelperTest, WhenAllowRenderCompressionIsCalledThenTrueIsReturned
EXPECT_TRUE(productHelper->allowCompression(pInHwInfo));
}
HWTEST_F(ProductHelperTest, WhenAllowStatelessCompressionIsCalledThenReturnCorrectValue) {
DebugManagerStateRestore restore;
EXPECT_FALSE(productHelper->allowStatelessCompression(pInHwInfo));
for (auto enable : {-1, 0, 1}) {
DebugManager.flags.EnableStatelessCompression.set(enable);
if (enable > 0) {
EXPECT_TRUE(productHelper->allowStatelessCompression(pInHwInfo));
} else {
EXPECT_FALSE(productHelper->allowStatelessCompression(pInHwInfo));
}
}
}
HWTEST_F(ProductHelperTest, givenVariousDebugKeyValuesWhenGettingLocalMemoryAccessModeThenCorrectValueIsReturned) {
DebugManagerStateRestore restore{};

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022 Intel Corporation
* Copyright (C) 2022-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -1108,7 +1108,7 @@ HWTEST_F(DrmMemoryManagerLocalMemoryPrelimTest, givenNotSetUseSystemMemoryWhenGr
MemoryManager::AllocationStatus status = MemoryManager::AllocationStatus::Success;
allocData.flags.preferCompressed = CompressionSelector::preferCompressedAllocation(properties, *defaultHwInfo);
allocData.flags.preferCompressed = CompressionSelector::preferCompressedAllocation(properties);
auto buffer = memoryManager->allocateGraphicsMemoryInDevicePool(allocData, status);
ASSERT_NE(nullptr, buffer);
EXPECT_EQ(0u, buffer->getDefaultGmm()->resourceParams.Flags.Info.RenderCompressed);