mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 08:07:19 +08:00
Refactor: reduce global productHelper getter usage
Related-To: NEO-6853 Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
fca4fbb0c0
commit
0dbf92d401
@@ -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{};
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user