mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +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
@@ -696,7 +696,7 @@ HWTEST2_F(PerformanceHintTest, given64bitCompressedBufferWhenItsCreatedThenPrope
|
||||
snprintf(expectedHint, DriverDiagnostics::maxHintStringSize, DriverDiagnostics::hintFormat[BUFFER_IS_COMPRESSED], buffer.get());
|
||||
|
||||
auto &gfxCoreHelper = device->getGfxCoreHelper();
|
||||
auto compressionSupported = gfxCoreHelper.isBufferSizeSuitableForCompression(size, hwInfo) &&
|
||||
auto compressionSupported = gfxCoreHelper.isBufferSizeSuitableForCompression(size) &&
|
||||
GfxCoreHelper::compressedBuffersSupported(hwInfo);
|
||||
if (compressionSupported) {
|
||||
EXPECT_TRUE(containsHint(expectedHint, userData));
|
||||
@@ -730,7 +730,7 @@ TEST_F(PerformanceHintTest, givenUncompressedBufferWhenItsCreatedThenProperPerfo
|
||||
isCompressed = MemObjHelper::isSuitableForCompression(
|
||||
GfxCoreHelper::compressedBuffersSupported(hwInfo),
|
||||
memoryProperties, *context,
|
||||
gfxCoreHelper.isBufferSizeSuitableForCompression(size, hwInfo)) &&
|
||||
gfxCoreHelper.isBufferSizeSuitableForCompression(size)) &&
|
||||
!is32bit && !context->isSharedContext &&
|
||||
(!memoryProperties.flags.useHostPtr || context->getMemoryManager()->isLocalMemorySupported(device->getRootDeviceIndex())) &&
|
||||
!memoryProperties.flags.forceHostMemory;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -1125,9 +1125,8 @@ struct DeviceAttributeQueryTest : public ::testing::TestWithParam<uint32_t /*cl_
|
||||
}
|
||||
case CL_DEVICE_FEATURE_CAPABILITIES_INTEL: {
|
||||
auto pCapabilities = reinterpret_cast<cl_device_feature_capabilities_intel *>(object.get());
|
||||
auto &hwInfo = device.getHardwareInfo();
|
||||
auto &clGfxCoreHelper = device.getRootDeviceEnvironment().getHelper<ClGfxCoreHelper>();
|
||||
EXPECT_EQ(clGfxCoreHelper.getSupportedDeviceFeatureCapabilities(hwInfo), *pCapabilities);
|
||||
EXPECT_EQ(clGfxCoreHelper.getSupportedDeviceFeatureCapabilities(device.getRootDeviceEnvironment()), *pCapabilities);
|
||||
EXPECT_EQ(sizeof(cl_device_feature_capabilities_intel), sizeReturned);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 Intel Corporation
|
||||
* Copyright (C) 2019-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -22,5 +22,5 @@ GEN11TEST_F(ClGfxCoreHelperTestGen11, WhenGettingDeviceIpVersionThenMakeCorrectD
|
||||
|
||||
GEN11TEST_F(ClGfxCoreHelperTestGen11, WhenGettingSupportedDeviceFeatureCapabilitiesThenReturnCorrectValue) {
|
||||
auto &clGfxCoreHelper = getHelper<ClGfxCoreHelper>();
|
||||
EXPECT_EQ(0u, clGfxCoreHelper.getSupportedDeviceFeatureCapabilities(*defaultHwInfo));
|
||||
EXPECT_EQ(0u, clGfxCoreHelper.getSupportedDeviceFeatureCapabilities(getRootDeviceEnvironment()));
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ GEN12LPTEST_F(ClGfxCoreHelperTestsGen12Lp, givenTglLpThenAuxTranslationIsRequire
|
||||
arg.as<ArgDescPointer>(true).accessedUsingStatelessAddressingMode = accessedUsingStatelessAddressingMode;
|
||||
kernelInfo.kernelDescriptor.payloadMappings.explicitArgs.push_back(std::move(arg));
|
||||
|
||||
EXPECT_EQ(accessedUsingStatelessAddressingMode, clGfxCoreHelper.requiresAuxResolves(kernelInfo, getRootDeviceEnvironment()));
|
||||
EXPECT_EQ(accessedUsingStatelessAddressingMode, clGfxCoreHelper.requiresAuxResolves(kernelInfo));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ HWTEST2_F(ClGfxCoreHelperTestsGen12Lp, WhenGettingDeviceIpVersionThenMakeCorrect
|
||||
GEN12LPTEST_F(ClGfxCoreHelperTestsGen12Lp, WhenGettingSupportedDeviceFeatureCapabilitiesThenReturnCorrectValue) {
|
||||
auto &clGfxCoreHelper = getHelper<ClGfxCoreHelper>();
|
||||
cl_device_feature_capabilities_intel expectedCapabilities = CL_DEVICE_FEATURE_FLAG_DP4A_INTEL;
|
||||
EXPECT_EQ(expectedCapabilities, clGfxCoreHelper.getSupportedDeviceFeatureCapabilities(hardwareInfo));
|
||||
EXPECT_EQ(expectedCapabilities, clGfxCoreHelper.getSupportedDeviceFeatureCapabilities(getRootDeviceEnvironment()));
|
||||
}
|
||||
|
||||
using GfxCoreHelperTestGen12Lp = GfxCoreHelperTest;
|
||||
@@ -98,7 +98,7 @@ GEN12LPTEST_F(GfxCoreHelperTestGen12Lp, givenDifferentSizesOfAllocationWhenCheck
|
||||
|
||||
const size_t sizesToCheck[] = {128, 256, 512, 1023, 1024, 1025};
|
||||
for (size_t size : sizesToCheck) {
|
||||
EXPECT_FALSE(gfxCoreHelper.isBufferSizeSuitableForCompression(size, *defaultHwInfo));
|
||||
EXPECT_FALSE(gfxCoreHelper.isBufferSizeSuitableForCompression(size));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -25,5 +25,5 @@ GEN8TEST_F(ClGfxCoreHelperTestGen8, WhenGettingDeviceIpVersionThenMakeCorrectDev
|
||||
|
||||
GEN8TEST_F(ClGfxCoreHelperTestGen8, WhenGettingSupportedDeviceFeatureCapabilitiesThenReturnCorrectValue) {
|
||||
auto &clGfxCoreHelper = getHelper<ClGfxCoreHelper>();
|
||||
EXPECT_EQ(0u, clGfxCoreHelper.getSupportedDeviceFeatureCapabilities(*defaultHwInfo));
|
||||
EXPECT_EQ(0u, clGfxCoreHelper.getSupportedDeviceFeatureCapabilities(getRootDeviceEnvironment()));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -21,5 +21,5 @@ GEN9TEST_F(ClGfxCoreHelperTestGen9, WhenGettingDeviceIpVersionThenMakeCorrectDev
|
||||
|
||||
GEN9TEST_F(ClGfxCoreHelperTestGen9, WhenGettingSupportedDeviceFeatureCapabilitiesThenReturnCorrectValue) {
|
||||
auto &clGfxCoreHelper = getHelper<ClGfxCoreHelper>();
|
||||
EXPECT_EQ(0u, clGfxCoreHelper.getSupportedDeviceFeatureCapabilities(*defaultHwInfo));
|
||||
EXPECT_EQ(0u, clGfxCoreHelper.getSupportedDeviceFeatureCapabilities(getRootDeviceEnvironment()));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -59,7 +59,7 @@ TEST(ApiSpecificConfigOclTests, givenEnableStatelessCompressionWhenProvidingSvmG
|
||||
AllocationType::SVM_GPU,
|
||||
deviceBitfield);
|
||||
|
||||
EXPECT_TRUE(NEO::CompressionSelector::preferCompressedAllocation(properties, *defaultHwInfo));
|
||||
EXPECT_TRUE(NEO::CompressionSelector::preferCompressedAllocation(properties));
|
||||
}
|
||||
|
||||
TEST(ApiSpecificConfigOclTests, givenEnableStatelessCompressionWhenProvidingPrintfSurfaceThenPreferCompressedBuffer) {
|
||||
@@ -72,6 +72,6 @@ TEST(ApiSpecificConfigOclTests, givenEnableStatelessCompressionWhenProvidingPrin
|
||||
AllocationType::PRINTF_SURFACE,
|
||||
deviceBitfield);
|
||||
|
||||
EXPECT_TRUE(NEO::CompressionSelector::preferCompressedAllocation(properties, *defaultHwInfo));
|
||||
EXPECT_TRUE(NEO::CompressionSelector::preferCompressedAllocation(properties));
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -114,12 +114,12 @@ HWTEST_F(ClGfxCoreHelperTest, givenKernelInfoWhenCheckingRequiresAuxResolvesThen
|
||||
|
||||
ArgDescriptor argDescriptorValue(ArgDescriptor::ArgType::ArgTValue);
|
||||
kernelInfo.kernelDescriptor.payloadMappings.explicitArgs.push_back(argDescriptorValue);
|
||||
EXPECT_FALSE(clGfxCoreHelper.requiresAuxResolves(kernelInfo, getRootDeviceEnvironment()));
|
||||
EXPECT_FALSE(clGfxCoreHelper.requiresAuxResolves(kernelInfo));
|
||||
|
||||
ArgDescriptor argDescriptorPointer(ArgDescriptor::ArgType::ArgTPointer);
|
||||
argDescriptorPointer.as<ArgDescPointer>().accessedUsingStatelessAddressingMode = true;
|
||||
kernelInfo.kernelDescriptor.payloadMappings.explicitArgs.push_back(argDescriptorPointer);
|
||||
EXPECT_TRUE(clGfxCoreHelper.requiresAuxResolves(kernelInfo, getRootDeviceEnvironment()));
|
||||
EXPECT_TRUE(clGfxCoreHelper.requiresAuxResolves(kernelInfo));
|
||||
}
|
||||
|
||||
TEST_F(ClGfxCoreHelperTest, givenGenHelperWhenKernelArgumentIsNotPureStatefulThenRequireNonAuxMode) {
|
||||
@@ -129,7 +129,7 @@ TEST_F(ClGfxCoreHelperTest, givenGenHelperWhenKernelArgumentIsNotPureStatefulThe
|
||||
ArgDescPointer argAsPtr{};
|
||||
argAsPtr.accessedUsingStatelessAddressingMode = !isPureStateful;
|
||||
|
||||
EXPECT_EQ(!argAsPtr.isPureStateful(), clGfxCoreHelper.requiresNonAuxMode(argAsPtr, getRootDeviceEnvironment()));
|
||||
EXPECT_EQ(!argAsPtr.isPureStateful(), clGfxCoreHelper.requiresNonAuxMode(argAsPtr));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -32,5 +32,5 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ClGfxCoreHelperTestXeHpAndLater, givenCLImageFormat
|
||||
HWTEST2_F(ClGfxCoreHelperTestXeHpAndLater, WhenGettingSupportedDeviceFeatureCapabilitiesThenReturnCorrectValue, IsAtLeastXeHpCore) {
|
||||
cl_device_feature_capabilities_intel expectedCapabilities = CL_DEVICE_FEATURE_FLAG_DPAS_INTEL | CL_DEVICE_FEATURE_FLAG_DP4A_INTEL;
|
||||
auto &clGfxCoreHelper = getHelper<ClGfxCoreHelper>();
|
||||
EXPECT_EQ(expectedCapabilities, clGfxCoreHelper.getSupportedDeviceFeatureCapabilities(*defaultHwInfo));
|
||||
EXPECT_EQ(expectedCapabilities, clGfxCoreHelper.getSupportedDeviceFeatureCapabilities(getRootDeviceEnvironment()));
|
||||
}
|
||||
|
||||
@@ -512,7 +512,7 @@ class CommandStreamReceiverMock : public CommandStreamReceiver {
|
||||
|
||||
bool isMultiOsContextCapable() const override { return false; }
|
||||
|
||||
MemoryCompressionState getMemoryCompressionState(bool auxTranslationRequired, const HardwareInfo &hwInfo) const override {
|
||||
MemoryCompressionState getMemoryCompressionState(bool auxTranslationRequired) const override {
|
||||
return MemoryCompressionState::NotApplicable;
|
||||
}
|
||||
|
||||
@@ -2542,11 +2542,11 @@ TEST(KernelTest, givenFtrRenderCompressedBuffersWhenInitializingArgsWithNonState
|
||||
|
||||
auto &rootDeviceEnvironment = device->getRootDeviceEnvironment();
|
||||
auto &clGfxCoreHelper = rootDeviceEnvironment.getHelper<ClGfxCoreHelper>();
|
||||
EXPECT_EQ(clGfxCoreHelper.requiresAuxResolves(kernel.kernelInfo, rootDeviceEnvironment), kernel.mockKernel->isAuxTranslationRequired());
|
||||
EXPECT_EQ(clGfxCoreHelper.requiresAuxResolves(kernel.kernelInfo), kernel.mockKernel->isAuxTranslationRequired());
|
||||
|
||||
DebugManager.flags.ForceAuxTranslationEnabled.set(-1);
|
||||
kernel.mockKernel->initialize();
|
||||
EXPECT_EQ(clGfxCoreHelper.requiresAuxResolves(kernel.kernelInfo, rootDeviceEnvironment), kernel.mockKernel->isAuxTranslationRequired());
|
||||
EXPECT_EQ(clGfxCoreHelper.requiresAuxResolves(kernel.kernelInfo), kernel.mockKernel->isAuxTranslationRequired());
|
||||
|
||||
DebugManager.flags.ForceAuxTranslationEnabled.set(0);
|
||||
kernel.mockKernel->initialize();
|
||||
@@ -2572,7 +2572,7 @@ TEST(KernelTest, WhenAuxTranslationIsRequiredThenKernelSetsRequiredResolvesInCon
|
||||
auto &rootDeviceEnvironment = device->getRootDeviceEnvironment();
|
||||
auto &clGfxCoreHelper = rootDeviceEnvironment.getHelper<ClGfxCoreHelper>();
|
||||
|
||||
if (clGfxCoreHelper.requiresAuxResolves(kernel.kernelInfo, rootDeviceEnvironment)) {
|
||||
if (clGfxCoreHelper.requiresAuxResolves(kernel.kernelInfo)) {
|
||||
EXPECT_TRUE(context->getResolvesRequiredInKernels());
|
||||
} else {
|
||||
EXPECT_FALSE(context->getResolvesRequiredInKernels());
|
||||
@@ -2618,7 +2618,7 @@ TEST(KernelTest, givenDebugVariableSetWhenKernelHasStatefulBufferAccessThenMarkK
|
||||
auto &rootDeviceEnvironment = device->getRootDeviceEnvironment();
|
||||
auto &clGfxCoreHelper = rootDeviceEnvironment.getHelper<ClGfxCoreHelper>();
|
||||
|
||||
if (clGfxCoreHelper.requiresAuxResolves(kernel.kernelInfo, rootDeviceEnvironment)) {
|
||||
if (clGfxCoreHelper.requiresAuxResolves(kernel.kernelInfo)) {
|
||||
EXPECT_TRUE(kernel.mockKernel->isAuxTranslationRequired());
|
||||
} else {
|
||||
EXPECT_FALSE(kernel.mockKernel->isAuxTranslationRequired());
|
||||
|
||||
@@ -707,7 +707,7 @@ TEST_F(CompressedBuffersTests, givenBufferNotCompressedAllocationAndNoHostPtrWhe
|
||||
buffer.reset(Buffer::create(context.get(), 0, bufferSize, nullptr, retVal));
|
||||
allocation = buffer->getGraphicsAllocation(device->getRootDeviceIndex());
|
||||
auto &gfxCoreHelper = context->getDevice(0)->getGfxCoreHelper();
|
||||
if (gfxCoreHelper.isBufferSizeSuitableForCompression(bufferSize, *hwInfo)) {
|
||||
if (gfxCoreHelper.isBufferSizeSuitableForCompression(bufferSize)) {
|
||||
EXPECT_FALSE(buffer->isMemObjZeroCopy());
|
||||
EXPECT_EQ(allocation->getAllocationType(), AllocationType::BUFFER);
|
||||
EXPECT_EQ(!memoryManager->allocate32BitGraphicsMemoryImplCalled, allocation->isCompressionEnabled());
|
||||
@@ -726,7 +726,7 @@ TEST_F(CompressedBuffersTests, givenBufferCompressedAllocationWhenSharedContextI
|
||||
buffer.reset(Buffer::create(context.get(), CL_MEM_READ_WRITE, bufferSize, nullptr, retVal));
|
||||
auto graphicsAllocation = buffer->getGraphicsAllocation(context->getDevice(0)->getRootDeviceIndex());
|
||||
auto &gfxCoreHelper = context->getDevice(0)->getGfxCoreHelper();
|
||||
if (gfxCoreHelper.isBufferSizeSuitableForCompression(bufferSize, *hwInfo)) {
|
||||
if (gfxCoreHelper.isBufferSizeSuitableForCompression(bufferSize)) {
|
||||
EXPECT_EQ(graphicsAllocation->getAllocationType(), AllocationType::BUFFER);
|
||||
EXPECT_EQ(!memoryManager->allocate32BitGraphicsMemoryImplCalled, graphicsAllocation->isCompressionEnabled());
|
||||
} else {
|
||||
@@ -749,7 +749,7 @@ TEST_F(CompressedBuffersTests, givenDebugVariableSetWhenHwFlagIsNotSetThenSelect
|
||||
buffer.reset(Buffer::create(context.get(), 0, bufferSize, nullptr, retVal));
|
||||
auto graphicsAllocation = buffer->getGraphicsAllocation(context->getDevice(0)->getRootDeviceIndex());
|
||||
auto &gfxCoreHelper = context->getDevice(0)->getGfxCoreHelper();
|
||||
if (gfxCoreHelper.isBufferSizeSuitableForCompression(bufferSize, *hwInfo)) {
|
||||
if (gfxCoreHelper.isBufferSizeSuitableForCompression(bufferSize)) {
|
||||
EXPECT_EQ(graphicsAllocation->getAllocationType(), AllocationType::BUFFER);
|
||||
EXPECT_EQ(!memoryManager->allocate32BitGraphicsMemoryImplCalled, graphicsAllocation->isCompressionEnabled());
|
||||
} else {
|
||||
@@ -808,7 +808,7 @@ TEST_F(CompressedBuffersCopyHostMemoryTests, givenCompressedBufferWhenCopyFromHo
|
||||
buffer.reset(Buffer::create(context.get(), CL_MEM_COPY_HOST_PTR, bufferSize, hostPtr, retVal));
|
||||
auto graphicsAllocation = buffer->getGraphicsAllocation(context->getDevice(0)->getRootDeviceIndex());
|
||||
auto &gfxCoreHelper = context->getDevice(0)->getGfxCoreHelper();
|
||||
if (gfxCoreHelper.isBufferSizeSuitableForCompression(bufferSize, *hwInfo)) {
|
||||
if (gfxCoreHelper.isBufferSizeSuitableForCompression(bufferSize)) {
|
||||
EXPECT_TRUE(graphicsAllocation->isCompressionEnabled());
|
||||
EXPECT_EQ(1u, mockCmdQ->writeBufferCounter);
|
||||
EXPECT_TRUE(mockCmdQ->writeBufferBlocking);
|
||||
@@ -849,7 +849,7 @@ TEST_F(CompressedBuffersCopyHostMemoryTests, givenNonCompressedBufferWhenCopyFro
|
||||
|
||||
TEST_F(CompressedBuffersCopyHostMemoryTests, givenCompressedBufferWhenWriteBufferFailsThenReturnErrorCode) {
|
||||
auto &gfxCoreHelper = context->getDevice(0)->getGfxCoreHelper();
|
||||
if (is32bit || !gfxCoreHelper.isBufferSizeSuitableForCompression(bufferSize, *hwInfo)) {
|
||||
if (is32bit || !gfxCoreHelper.isBufferSizeSuitableForCompression(bufferSize)) {
|
||||
return;
|
||||
}
|
||||
hwInfo->capabilityTable.ftrRenderCompressedBuffers = true;
|
||||
|
||||
@@ -42,5 +42,5 @@ bool TestChecks::supportsAuxResolves(const RootDeviceEnvironment &rootDeviceEnvi
|
||||
kernelInfo.kernelDescriptor.payloadMappings.explicitArgs[0].as<ArgDescPointer>(true).accessedUsingStatelessAddressingMode = true;
|
||||
|
||||
auto &clGfxCoreHelper = rootDeviceEnvironment.getHelper<ClGfxCoreHelper>();
|
||||
return clGfxCoreHelper.requiresAuxResolves(kernelInfo, rootDeviceEnvironment);
|
||||
return clGfxCoreHelper.requiresAuxResolves(kernelInfo);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ XE_HPC_CORETEST_F(ClGfxCoreHelperTestsXeHpcCore, givenXeHpcThenAuxTranslationIsN
|
||||
auto &clGfxCoreHelper = getHelper<ClGfxCoreHelper>();
|
||||
KernelInfo kernelInfo{};
|
||||
|
||||
EXPECT_FALSE(clGfxCoreHelper.requiresAuxResolves(kernelInfo, getRootDeviceEnvironment()));
|
||||
EXPECT_FALSE(clGfxCoreHelper.requiresAuxResolves(kernelInfo));
|
||||
}
|
||||
|
||||
XE_HPC_CORETEST_F(ClGfxCoreHelperTestsXeHpcCore, WhenCheckingPreferenceForBlitterForLocalToLocalTransfersThenReturnFalse) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -39,7 +39,7 @@ XE_HPG_CORETEST_F(ClGfxCoreHelperTestsXeHpgCore, givenGenHelperWhenKernelArgumen
|
||||
ArgDescPointer argAsPtr{};
|
||||
argAsPtr.accessedUsingStatelessAddressingMode = !isPureStateful;
|
||||
|
||||
EXPECT_EQ(!argAsPtr.isPureStateful(), clGfxCoreHelper.requiresNonAuxMode(argAsPtr, getRootDeviceEnvironment()));
|
||||
EXPECT_EQ(!argAsPtr.isPureStateful(), clGfxCoreHelper.requiresNonAuxMode(argAsPtr));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ XE_HPG_CORETEST_F(ClGfxCoreHelperTestsXeHpgCore, givenGenHelperWhenEnableStatele
|
||||
for (auto isPureStateful : ::testing::Bool()) {
|
||||
ArgDescPointer argAsPtr{};
|
||||
argAsPtr.accessedUsingStatelessAddressingMode = !isPureStateful;
|
||||
EXPECT_FALSE(clGfxCoreHelper.requiresNonAuxMode(argAsPtr, getRootDeviceEnvironment()));
|
||||
EXPECT_FALSE(clGfxCoreHelper.requiresNonAuxMode(argAsPtr));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ XE_HPG_CORETEST_F(ClGfxCoreHelperTestsXeHpgCore, givenGenHelperWhenCheckAuxTrans
|
||||
KernelInfo kernelInfo{};
|
||||
kernelInfo.kernelDescriptor.payloadMappings.explicitArgs.resize(1);
|
||||
kernelInfo.kernelDescriptor.payloadMappings.explicitArgs[0].as<ArgDescPointer>(true).accessedUsingStatelessAddressingMode = !isPureStateful;
|
||||
EXPECT_EQ(!isPureStateful, clGfxCoreHelper.requiresAuxResolves(kernelInfo, getRootDeviceEnvironment()));
|
||||
EXPECT_EQ(!isPureStateful, clGfxCoreHelper.requiresAuxResolves(kernelInfo));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ XE_HPG_CORETEST_F(ClGfxCoreHelperTestsXeHpgCore, givenGenHelperWhenEnableStatele
|
||||
auto &clGfxCoreHelper = getHelper<ClGfxCoreHelper>();
|
||||
KernelInfo kernelInfo{};
|
||||
|
||||
EXPECT_FALSE(clGfxCoreHelper.requiresAuxResolves(kernelInfo, getRootDeviceEnvironment()));
|
||||
EXPECT_FALSE(clGfxCoreHelper.requiresAuxResolves(kernelInfo));
|
||||
}
|
||||
|
||||
XE_HPG_CORETEST_F(ClGfxCoreHelperTestsXeHpgCore, givenDifferentCLImageFormatsWhenCallingAllowImageCompressionThenCorrectValueReturned) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -36,13 +36,13 @@ XE_HPG_CORETEST_F(CommandStreamReceiverHwTestXeHpgCore, givenEnableStatelessComp
|
||||
|
||||
DebugManager.flags.EnableStatelessCompression.set(0);
|
||||
for (bool auxTranslationRequired : {false, true}) {
|
||||
auto memoryCompressionState = commandStreamReceiver.getMemoryCompressionState(auxTranslationRequired, pDevice->getHardwareInfo());
|
||||
auto memoryCompressionState = commandStreamReceiver.getMemoryCompressionState(auxTranslationRequired);
|
||||
EXPECT_EQ(MemoryCompressionState::NotApplicable, memoryCompressionState);
|
||||
}
|
||||
|
||||
DebugManager.flags.EnableStatelessCompression.set(1);
|
||||
for (bool auxTranslationRequired : {false, true}) {
|
||||
auto memoryCompressionState = commandStreamReceiver.getMemoryCompressionState(auxTranslationRequired, pDevice->getHardwareInfo());
|
||||
auto memoryCompressionState = commandStreamReceiver.getMemoryCompressionState(auxTranslationRequired);
|
||||
if (auxTranslationRequired) {
|
||||
EXPECT_EQ(MemoryCompressionState::Disabled, memoryCompressionState);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user