mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Move isPageTableManagerSupported function from HwHelper to HwInfoConfig
Signed-off-by: Rafal Maziejuk <rafal.maziejuk@intel.com> Related-To: NEO-4541
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
78fa40fac0
commit
c6ee7065db
@ -13,6 +13,7 @@
|
||||
#include "shared/source/helpers/get_info.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/source/memory_manager/memory_manager.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
|
||||
#include "opencl/source/cl_device/cl_device.h"
|
||||
#include "opencl/source/context/context.h"
|
||||
@ -117,8 +118,9 @@ Image *D3DTexture<D3D>::create2d(Context *context, D3DTexture2d *d3dTexture, cl_
|
||||
}
|
||||
|
||||
if (alloc->getDefaultGmm()->unifiedAuxTranslationCapable()) {
|
||||
alloc->getDefaultGmm()->isCompressionEnabled = hwHelper.isPageTableManagerSupported(*hwInfo) ? memoryManager->mapAuxGpuVA(alloc)
|
||||
: true;
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo->platform.eProductFamily);
|
||||
alloc->getDefaultGmm()->isCompressionEnabled = hwInfoConfig.isPageTableManagerSupported(*hwInfo) ? memoryManager->mapAuxGpuVA(alloc)
|
||||
: true;
|
||||
}
|
||||
auto multiGraphicsAllocation = MultiGraphicsAllocation(rootDeviceIndex);
|
||||
multiGraphicsAllocation.addAllocation(alloc);
|
||||
@ -203,8 +205,9 @@ Image *D3DTexture<D3D>::create3d(Context *context, D3DTexture3d *d3dTexture, cl_
|
||||
imgInfo.surfaceFormat = &clSurfaceFormat->surfaceFormat;
|
||||
|
||||
if (alloc->getDefaultGmm()->unifiedAuxTranslationCapable()) {
|
||||
alloc->getDefaultGmm()->isCompressionEnabled = hwHelper.isPageTableManagerSupported(*hwInfo) ? memoryManager->mapAuxGpuVA(alloc)
|
||||
: true;
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo->platform.eProductFamily);
|
||||
alloc->getDefaultGmm()->isCompressionEnabled = hwInfoConfig.isPageTableManagerSupported(*hwInfo) ? memoryManager->mapAuxGpuVA(alloc)
|
||||
: true;
|
||||
}
|
||||
auto multiGraphicsAllocation = MultiGraphicsAllocation(rootDeviceIndex);
|
||||
multiGraphicsAllocation.addAllocation(alloc);
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/memory_manager/memory_manager.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
|
||||
#include "opencl/extensions/public/cl_gl_private_intel.h"
|
||||
#include "opencl/source/cl_device/cl_device.h"
|
||||
@ -147,10 +148,10 @@ Image *GlTexture::createSharedGlTexture(Context *context, cl_mem_flags flags, cl
|
||||
auto glTexture = new GlTexture(sharingFunctions, getClGlObjectType(target), texture, texInfo, target, std::max(miplevel, 0));
|
||||
|
||||
if (texInfo.isAuxEnabled && alloc->getDefaultGmm()->unifiedAuxTranslationCapable()) {
|
||||
auto &hwInfo = context->getDevice(0)->getHardwareInfo();
|
||||
auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
alloc->getDefaultGmm()->isCompressionEnabled = hwHelper.isPageTableManagerSupported(hwInfo) ? memoryManager->mapAuxGpuVA(alloc)
|
||||
: true;
|
||||
const auto &hwInfo = context->getDevice(0)->getHardwareInfo();
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
alloc->getDefaultGmm()->isCompressionEnabled = hwInfoConfig.isPageTableManagerSupported(hwInfo) ? memoryManager->mapAuxGpuVA(alloc)
|
||||
: true;
|
||||
}
|
||||
auto multiGraphicsAllocation = MultiGraphicsAllocation(context->getDevice(0)->getRootDeviceIndex());
|
||||
multiGraphicsAllocation.addAllocation(alloc);
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/source/memory_manager/graphics_allocation.h"
|
||||
#include "shared/source/memory_manager/memory_manager.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
|
||||
#include "opencl/source/cl_device/cl_device.h"
|
||||
#include "opencl/source/context/context.h"
|
||||
@ -42,8 +43,8 @@ Image *UnifiedImage::createSharedUnifiedImage(Context *context, cl_mem_flags fla
|
||||
auto &memoryManager = *context->getMemoryManager();
|
||||
if (graphicsAllocation->getDefaultGmm()->unifiedAuxTranslationCapable()) {
|
||||
const auto &hwInfo = context->getDevice(0)->getHardwareInfo();
|
||||
const auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
graphicsAllocation->getDefaultGmm()->isCompressionEnabled = hwHelper.isPageTableManagerSupported(hwInfo) ? memoryManager.mapAuxGpuVA(graphicsAllocation) : true;
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
graphicsAllocation->getDefaultGmm()->isCompressionEnabled = hwInfoConfig.isPageTableManagerSupported(hwInfo) ? memoryManager.mapAuxGpuVA(graphicsAllocation) : true;
|
||||
}
|
||||
|
||||
const uint32_t baseMipmapIndex = 0u;
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "shared/source/memory_manager/memory_manager.h"
|
||||
#include "shared/source/memory_manager/surface.h"
|
||||
#include "shared/source/os_interface/device_factory.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/source/utilities/tag_allocator.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/helpers/engine_descriptor_helper.h"
|
||||
@ -1487,7 +1488,7 @@ TEST_F(CommandStreamReceiverPageTableManagerTest, givenDefaultEngineTypeAndNonEx
|
||||
MockCommandStreamReceiver commandStreamReceiver(executionEnvironment, 0u, deviceBitfield);
|
||||
auto hwInfo = executionEnvironment.rootDeviceEnvironments[0]->getHardwareInfo();
|
||||
auto defaultEngineType = getChosenEngineType(*hwInfo);
|
||||
bool supportsPageTableManager = HwHelper::get(hwInfo->platform.eRenderCoreFamily).isPageTableManagerSupported(*hwInfo);
|
||||
bool supportsPageTableManager = HwInfoConfig::get(hwInfo->platform.eProductFamily)->isPageTableManagerSupported(*hwInfo);
|
||||
EXPECT_EQ(nullptr, executionEnvironment.rootDeviceEnvironments[0]->pageTableManager.get());
|
||||
|
||||
EXPECT_EQ(supportsPageTableManager, commandStreamReceiver.needsPageTableManager(defaultEngineType));
|
||||
|
@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/memory_manager/os_agnostic_memory_manager.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/source/utilities/arrayref.h"
|
||||
|
||||
#include "opencl/source/api/api.h"
|
||||
@ -37,9 +38,9 @@ TYPED_TEST_P(D3DAuxTests, given2dSharableTextureWithUnifiedAuxFlagsWhenCreatingT
|
||||
auto image = std::unique_ptr<Image>(D3DTexture<TypeParam>::create2d(this->context, (D3DTexture2d *)&this->dummyD3DTexture, CL_MEM_READ_WRITE, 4, nullptr));
|
||||
ASSERT_NE(nullptr, image.get());
|
||||
|
||||
auto hwInfo = context->getDevice(0)->getHardwareInfo();
|
||||
auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
uint32_t expectedMapAuxGpuVaCalls = hwHelper.isPageTableManagerSupported(hwInfo) ? 1 : 0;
|
||||
const auto &hwInfo = context->getDevice(0)->getHardwareInfo();
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
uint32_t expectedMapAuxGpuVaCalls = hwInfoConfig.isPageTableManagerSupported(hwInfo) ? 1 : 0;
|
||||
|
||||
EXPECT_EQ(expectedMapAuxGpuVaCalls, mockMM->mapAuxGpuVACalled);
|
||||
EXPECT_TRUE(gmm->isCompressionEnabled);
|
||||
@ -57,12 +58,12 @@ TYPED_TEST_P(D3DAuxTests, given2dSharableTextureWithUnifiedAuxFlagsWhenFailOnAux
|
||||
auto image = std::unique_ptr<Image>(D3DTexture<TypeParam>::create2d(this->context, (D3DTexture2d *)&this->dummyD3DTexture, CL_MEM_READ_WRITE, 4, nullptr));
|
||||
ASSERT_NE(nullptr, image.get());
|
||||
|
||||
auto hwInfo = context->getDevice(0)->getHardwareInfo();
|
||||
auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
uint32_t expectedMapAuxGpuVaCalls = hwHelper.isPageTableManagerSupported(hwInfo) ? 1 : 0;
|
||||
const auto &hwInfo = context->getDevice(0)->getHardwareInfo();
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
uint32_t expectedMapAuxGpuVaCalls = hwInfoConfig.isPageTableManagerSupported(hwInfo) ? 1 : 0;
|
||||
|
||||
EXPECT_EQ(expectedMapAuxGpuVaCalls, mockMM->mapAuxGpuVACalled);
|
||||
EXPECT_EQ(!hwHelper.isPageTableManagerSupported(hwInfo), gmm->isCompressionEnabled);
|
||||
EXPECT_EQ(!hwInfoConfig.isPageTableManagerSupported(hwInfo), gmm->isCompressionEnabled);
|
||||
}
|
||||
|
||||
TYPED_TEST_P(D3DAuxTests, given2dSharableTextureWithoutUnifiedAuxFlagsWhenCreatingThenDontMapAuxTable) {
|
||||
@ -89,9 +90,9 @@ TYPED_TEST_P(D3DAuxTests, given2dNonSharableTextureWithUnifiedAuxFlagsWhenCreati
|
||||
auto image = std::unique_ptr<Image>(D3DTexture<TypeParam>::create2d(this->context, (D3DTexture2d *)&this->dummyD3DTexture, CL_MEM_READ_WRITE, 1, nullptr));
|
||||
ASSERT_NE(nullptr, image.get());
|
||||
|
||||
auto hwInfo = context->getDevice(0)->getHardwareInfo();
|
||||
auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
uint32_t expectedMapAuxGpuVaCalls = hwHelper.isPageTableManagerSupported(hwInfo) ? 1 : 0;
|
||||
const auto &hwInfo = context->getDevice(0)->getHardwareInfo();
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
uint32_t expectedMapAuxGpuVaCalls = hwInfoConfig.isPageTableManagerSupported(hwInfo) ? 1 : 0;
|
||||
|
||||
EXPECT_EQ(expectedMapAuxGpuVaCalls, mockMM->mapAuxGpuVACalled);
|
||||
EXPECT_TRUE(gmm->isCompressionEnabled);
|
||||
@ -106,9 +107,9 @@ TYPED_TEST_P(D3DAuxTests, given3dSharableTextureWithUnifiedAuxFlagsWhenCreatingT
|
||||
std::unique_ptr<Image> image(D3DTexture<TypeParam>::create3d(this->context, (D3DTexture3d *)&this->dummyD3DTexture, CL_MEM_READ_WRITE, 1, nullptr));
|
||||
ASSERT_NE(nullptr, image.get());
|
||||
|
||||
auto hwInfo = context->getDevice(0)->getHardwareInfo();
|
||||
auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
uint32_t expectedMapAuxGpuVaCalls = hwHelper.isPageTableManagerSupported(hwInfo) ? 1 : 0;
|
||||
const auto &hwInfo = context->getDevice(0)->getHardwareInfo();
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
uint32_t expectedMapAuxGpuVaCalls = hwInfoConfig.isPageTableManagerSupported(hwInfo) ? 1 : 0;
|
||||
|
||||
EXPECT_EQ(expectedMapAuxGpuVaCalls, mockMM->mapAuxGpuVACalled);
|
||||
EXPECT_TRUE(gmm->isCompressionEnabled);
|
||||
@ -124,12 +125,12 @@ TYPED_TEST_P(D3DAuxTests, given3dSharableTextureWithUnifiedAuxFlagsWhenFailOnAux
|
||||
std::unique_ptr<Image> image(D3DTexture<TypeParam>::create3d(this->context, (D3DTexture3d *)&this->dummyD3DTexture, CL_MEM_READ_WRITE, 1, nullptr));
|
||||
ASSERT_NE(nullptr, image.get());
|
||||
|
||||
auto hwInfo = context->getDevice(0)->getHardwareInfo();
|
||||
auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
uint32_t expectedMapAuxGpuVaCalls = hwHelper.isPageTableManagerSupported(hwInfo) ? 1 : 0;
|
||||
const auto &hwInfo = context->getDevice(0)->getHardwareInfo();
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
uint32_t expectedMapAuxGpuVaCalls = hwInfoConfig.isPageTableManagerSupported(hwInfo) ? 1 : 0;
|
||||
|
||||
EXPECT_EQ(expectedMapAuxGpuVaCalls, mockMM->mapAuxGpuVACalled);
|
||||
EXPECT_EQ(!hwHelper.isPageTableManagerSupported(hwInfo), gmm->isCompressionEnabled);
|
||||
EXPECT_EQ(!hwInfoConfig.isPageTableManagerSupported(hwInfo), gmm->isCompressionEnabled);
|
||||
}
|
||||
|
||||
TYPED_TEST_P(D3DAuxTests, given3dSharableTextureWithoutUnifiedAuxFlagsWhenCreatingThenDontMapAuxTable) {
|
||||
@ -154,9 +155,9 @@ TYPED_TEST_P(D3DAuxTests, given3dNonSharableTextureWithUnifiedAuxFlagsWhenCreati
|
||||
std::unique_ptr<Image> image(D3DTexture<TypeParam>::create3d(this->context, (D3DTexture3d *)&this->dummyD3DTexture, CL_MEM_READ_WRITE, 1, nullptr));
|
||||
ASSERT_NE(nullptr, image.get());
|
||||
|
||||
auto hwInfo = context->getDevice(0)->getHardwareInfo();
|
||||
auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
uint32_t expectedMapAuxGpuVaCalls = hwHelper.isPageTableManagerSupported(hwInfo) ? 1 : 0;
|
||||
const auto &hwInfo = context->getDevice(0)->getHardwareInfo();
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
uint32_t expectedMapAuxGpuVaCalls = hwInfoConfig.isPageTableManagerSupported(hwInfo) ? 1 : 0;
|
||||
|
||||
EXPECT_EQ(expectedMapAuxGpuVaCalls, mockMM->mapAuxGpuVACalled);
|
||||
EXPECT_TRUE(gmm->isCompressionEnabled);
|
||||
|
@ -91,26 +91,6 @@ GEN12LPTEST_F(HwHelperTestGen12Lp, givenGen12LpPlatformWhenSetupHardwareCapabili
|
||||
EXPECT_TRUE(hwCaps.isStatelesToStatefullWithOffsetSupported);
|
||||
}
|
||||
|
||||
GEN12LPTEST_F(HwHelperTestGen12Lp, givenCompressionFtrEnabledWhenAskingForPageTableManagerThenReturnCorrectValue) {
|
||||
auto &helper = HwHelper::get(renderCoreFamily);
|
||||
|
||||
hardwareInfo.capabilityTable.ftrRenderCompressedBuffers = false;
|
||||
hardwareInfo.capabilityTable.ftrRenderCompressedImages = false;
|
||||
EXPECT_FALSE(helper.isPageTableManagerSupported(hardwareInfo));
|
||||
|
||||
hardwareInfo.capabilityTable.ftrRenderCompressedBuffers = true;
|
||||
hardwareInfo.capabilityTable.ftrRenderCompressedImages = false;
|
||||
EXPECT_TRUE(helper.isPageTableManagerSupported(hardwareInfo));
|
||||
|
||||
hardwareInfo.capabilityTable.ftrRenderCompressedBuffers = false;
|
||||
hardwareInfo.capabilityTable.ftrRenderCompressedImages = true;
|
||||
EXPECT_TRUE(helper.isPageTableManagerSupported(hardwareInfo));
|
||||
|
||||
hardwareInfo.capabilityTable.ftrRenderCompressedBuffers = true;
|
||||
hardwareInfo.capabilityTable.ftrRenderCompressedImages = true;
|
||||
EXPECT_TRUE(helper.isPageTableManagerSupported(hardwareInfo));
|
||||
}
|
||||
|
||||
GEN12LPTEST_F(HwHelperTestGen12Lp, givenDifferentSizesOfAllocationWhenCheckingCompressionPreferenceThenReturnCorrectValue) {
|
||||
auto &helper = HwHelper::get(renderCoreFamily);
|
||||
|
||||
|
@ -15,9 +15,9 @@
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using HwInfoConfigTestWindowsGen12lp = HwInfoConfigTestLinux;
|
||||
using HwInfoConfigTestLinuxGen12lp = HwInfoConfigTestLinux;
|
||||
|
||||
GEN12LPTEST_F(HwInfoConfigTestWindowsGen12lp, givenGen12LpProductWhenAdjustPlatformForProductFamilyCalledThenOverrideWithCorrectFamily) {
|
||||
GEN12LPTEST_F(HwInfoConfigTestLinuxGen12lp, givenGen12LpProductWhenAdjustPlatformForProductFamilyCalledThenOverrideWithCorrectFamily) {
|
||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
||||
|
||||
PLATFORM *testPlatform = &outHwInfo.platform;
|
||||
@ -28,3 +28,23 @@ GEN12LPTEST_F(HwInfoConfigTestWindowsGen12lp, givenGen12LpProductWhenAdjustPlatf
|
||||
EXPECT_EQ(IGFX_GEN12LP_CORE, testPlatform->eRenderCoreFamily);
|
||||
EXPECT_EQ(IGFX_GEN12LP_CORE, testPlatform->eDisplayCoreFamily);
|
||||
}
|
||||
|
||||
GEN12LPTEST_F(HwInfoConfigTestLinuxGen12lp, givenCompressionFtrEnabledWhenAskingForPageTableManagerThenReturnCorrectValue) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(productFamily);
|
||||
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedBuffers = false;
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedImages = false;
|
||||
EXPECT_FALSE(hwInfoConfig.isPageTableManagerSupported(outHwInfo));
|
||||
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedBuffers = true;
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedImages = false;
|
||||
EXPECT_TRUE(hwInfoConfig.isPageTableManagerSupported(outHwInfo));
|
||||
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedBuffers = false;
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedImages = true;
|
||||
EXPECT_TRUE(hwInfoConfig.isPageTableManagerSupported(outHwInfo));
|
||||
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedBuffers = true;
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedImages = true;
|
||||
EXPECT_TRUE(hwInfoConfig.isPageTableManagerSupported(outHwInfo));
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ GEN12LPTEST_F(HwInfoConfigTestWindowsGen12lp, givenE2ECSetByKmdWhenConfiguringHw
|
||||
EXPECT_FALSE(outHwInfo.capabilityTable.ftrRenderCompressedImages);
|
||||
}
|
||||
|
||||
GEN12LPTEST_F(HwInfoConfigTestWindows, givenGen12LpProductWhenAdjustPlatformForProductFamilyCalledThenOverrideWithCorrectFamily) {
|
||||
GEN12LPTEST_F(HwInfoConfigTestWindowsGen12lp, givenGen12LpProductWhenAdjustPlatformForProductFamilyCalledThenOverrideWithCorrectFamily) {
|
||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
||||
|
||||
PLATFORM *testPlatform = &outHwInfo.platform;
|
||||
@ -42,3 +42,23 @@ GEN12LPTEST_F(HwInfoConfigTestWindows, givenGen12LpProductWhenAdjustPlatformForP
|
||||
EXPECT_EQ(IGFX_GEN12LP_CORE, testPlatform->eRenderCoreFamily);
|
||||
EXPECT_EQ(IGFX_GEN12LP_CORE, testPlatform->eDisplayCoreFamily);
|
||||
}
|
||||
|
||||
GEN12LPTEST_F(HwInfoConfigTestWindowsGen12lp, givenCompressionFtrEnabledWhenAskingForPageTableManagerThenReturnCorrectValue) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(productFamily);
|
||||
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedBuffers = false;
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedImages = false;
|
||||
EXPECT_FALSE(hwInfoConfig.isPageTableManagerSupported(outHwInfo));
|
||||
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedBuffers = true;
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedImages = false;
|
||||
EXPECT_TRUE(hwInfoConfig.isPageTableManagerSupported(outHwInfo));
|
||||
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedBuffers = false;
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedImages = true;
|
||||
EXPECT_TRUE(hwInfoConfig.isPageTableManagerSupported(outHwInfo));
|
||||
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedBuffers = true;
|
||||
outHwInfo.capabilityTable.ftrRenderCompressedImages = true;
|
||||
EXPECT_TRUE(hwInfoConfig.isPageTableManagerSupported(outHwInfo));
|
||||
}
|
||||
|
@ -184,11 +184,6 @@ HWTEST2_F(HwHelperTest, givenHwHelperWhenGettingThreadsPerEUConfigsThenNoConfigs
|
||||
EXPECT_EQ(0U, configs.size());
|
||||
}
|
||||
|
||||
HWTEST_F(HwHelperTest, givenHwHelperWhenAskedForPageTableManagerSupportThenReturnCorrectValue) {
|
||||
auto &helper = HwHelper::get(renderCoreFamily);
|
||||
EXPECT_EQ(helper.isPageTableManagerSupported(hardwareInfo), UnitTestHelper<FamilyType>::isPageTableManagerSupported(hardwareInfo));
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, HwHelperTest, givenHwHelperWhenGetGpuTimeStampInNSIsCalledThenCorrectValueIsReturned) {
|
||||
|
||||
auto &helper = HwHelper::get(renderCoreFamily);
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "shared/source/memory_manager/graphics_allocation.h"
|
||||
#include "shared/source/memory_manager/internal_allocation_storage.h"
|
||||
#include "shared/source/memory_manager/residency.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/source/os_interface/os_context.h"
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
#include "shared/source/program/program_initialization.h"
|
||||
@ -2769,7 +2770,7 @@ HWTEST_F(PageTableManagerTest, givenMemoryManagerThatSupportsPageTableManagerWhe
|
||||
bool mapped = memoryManager->mapAuxGpuVA(&allocation);
|
||||
auto hwInfo = executionEnvironment->rootDeviceEnvironments[allocation.getRootDeviceIndex()]->getHardwareInfo();
|
||||
|
||||
EXPECT_EQ(HwHelper::get(hwInfo->platform.eRenderCoreFamily).isPageTableManagerSupported(*hwInfo), mapped);
|
||||
EXPECT_EQ(HwInfoConfig::get(hwInfo->platform.eProductFamily)->isPageTableManagerSupported(*hwInfo), mapped);
|
||||
}
|
||||
|
||||
TEST(MemoryManagerTest, givenDebugModuleAreaAllocationTypeWhenCallingGetAllocationDataThenUse32BitFrontWindowsIsSet) {
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/helpers/unit_test_helper.h"
|
||||
#include "shared/test/unit_test/utilities/base_object_utils.h"
|
||||
|
||||
#include "opencl/source/cl_device/cl_device.h"
|
||||
@ -153,3 +154,8 @@ HWTEST_F(HwInfoConfigTest, givenHardwareInfoWhenCallingIsMaxThreadsForWorkgroupW
|
||||
|
||||
EXPECT_FALSE(ret);
|
||||
}
|
||||
|
||||
HWTEST_F(HwInfoConfigTest, givenHwInfoConfigWhenAskedForPageTableManagerSupportThenReturnCorrectValue) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(pInHwInfo.platform.eProductFamily);
|
||||
EXPECT_EQ(hwInfoConfig.isPageTableManagerSupported(pInHwInfo), UnitTestHelper<FamilyType>::isPageTableManagerSupported(pInHwInfo));
|
||||
}
|
||||
|
@ -116,6 +116,11 @@ template <>
|
||||
bool HwInfoConfigHw<IGFX_UNKNOWN>::obtainBlitterPreference(const HardwareInfo &hwInfo) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool HwInfoConfigHw<IGFX_UNKNOWN>::isPageTableManagerSupported(const HardwareInfo &hwInfo) const {
|
||||
return false;
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
struct DummyHwConfig : HwInfoConfigHw<IGFX_UNKNOWN> {
|
||||
@ -636,3 +641,8 @@ HWTEST_F(HwInfoConfigTestLinuxDummy, givenHardwareInfoWhenCallingObtainBlitterPr
|
||||
bool ret = hwConfig.obtainBlitterPreference(outHwInfo);
|
||||
EXPECT_FALSE(ret);
|
||||
}
|
||||
|
||||
HWTEST_F(HwInfoConfigTestLinuxDummy, givenHardwareInfoWhenCallingIsPageTableManagerSupportedThenFalseIsReturned) {
|
||||
bool ret = hwConfig.isPageTableManagerSupported(outHwInfo);
|
||||
EXPECT_FALSE(ret);
|
||||
}
|
||||
|
32
opencl/test/unit_test/os_interface/raii_hw_info_config.h
Normal file
32
opencl/test/unit_test/os_interface/raii_hw_info_config.h
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
|
||||
namespace NEO {
|
||||
extern HwInfoConfig *hwInfoConfigFactory[IGFX_MAX_PRODUCT];
|
||||
|
||||
template <typename MockHwInfoConfig>
|
||||
class RAIIHwInfoConfigFactory {
|
||||
public:
|
||||
PRODUCT_FAMILY productFamily;
|
||||
HwInfoConfig *hwInfoConfig;
|
||||
MockHwInfoConfig mockHwInfoConfig;
|
||||
|
||||
RAIIHwInfoConfigFactory(PRODUCT_FAMILY productFamily) {
|
||||
this->productFamily = productFamily;
|
||||
hwInfoConfig = hwInfoConfigFactory[this->productFamily];
|
||||
hwInfoConfigFactory[this->productFamily] = &mockHwInfoConfig;
|
||||
}
|
||||
|
||||
~RAIIHwInfoConfigFactory() {
|
||||
hwInfoConfigFactory[this->productFamily] = hwInfoConfig;
|
||||
}
|
||||
};
|
||||
} // namespace NEO
|
@ -9,6 +9,7 @@
|
||||
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
#include "shared/source/os_interface/windows/wddm/wddm.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
@ -95,6 +96,11 @@ bool HwInfoConfigHw<IGFX_UNKNOWN>::obtainBlitterPreference(const HardwareInfo &h
|
||||
return false;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool HwInfoConfigHw<IGFX_UNKNOWN>::isPageTableManagerSupported(const HardwareInfo &hwInfo) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
HwInfoConfigTestWindows::HwInfoConfigTestWindows() {
|
||||
this->executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
this->rootDeviceEnvironment = std::make_unique<RootDeviceEnvironment>(*executionEnvironment);
|
||||
@ -177,4 +183,9 @@ HWTEST_F(HwInfoConfigTestWindows, givenHardwareInfoWhenCallingObtainBlitterPrefe
|
||||
EXPECT_FALSE(ret);
|
||||
}
|
||||
|
||||
HWTEST_F(HwInfoConfigTestWindows, givenHardwareInfoWhenCallingIsPageTableManagerSupportedThenFalseIsReturned) {
|
||||
bool ret = hwConfig.isPageTableManagerSupported(outHwInfo);
|
||||
EXPECT_FALSE(ret);
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
@ -5,6 +5,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
|
||||
#include "opencl/source/helpers/gmm_types_converter.h"
|
||||
#include "opencl/source/mem_obj/image.h"
|
||||
#include "opencl/source/platform/platform.h"
|
||||
@ -541,9 +543,9 @@ TEST_F(GlSharingTextureTests, givenMockGlWhenGlTextureIsCreatedWithUnifiedAuxSur
|
||||
|
||||
auto glTexture = std::unique_ptr<Image>(GlTexture::createSharedGlTexture(clContext.get(), CL_MEM_WRITE_ONLY, GL_SRGB8_ALPHA8, 0, textureId, &retVal));
|
||||
|
||||
auto hwInfo = clContext->getDevice(0)->getHardwareInfo();
|
||||
auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
uint32_t expectedMapAuxGpuVaCalls = hwHelper.isPageTableManagerSupported(hwInfo) ? 1 : 0;
|
||||
const auto &hwInfo = clContext->getDevice(0)->getHardwareInfo();
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
uint32_t expectedMapAuxGpuVaCalls = hwInfoConfig.isPageTableManagerSupported(hwInfo) ? 1 : 0;
|
||||
|
||||
EXPECT_EQ(expectedMapAuxGpuVaCalls, tempMM->mapAuxGpuVACalled);
|
||||
}
|
||||
|
@ -9,8 +9,8 @@
|
||||
|
||||
#include "opencl/source/mem_obj/image.h"
|
||||
#include "opencl/source/sharings/unified/unified_image.h"
|
||||
#include "opencl/test/unit_test/helpers/raii_hw_helper.h"
|
||||
#include "opencl/test/unit_test/mocks/mock_gmm_resource_info.h"
|
||||
#include "opencl/test/unit_test/os_interface/raii_hw_info_config.h"
|
||||
#include "opencl/test/unit_test/sharings/unified/unified_sharing_fixtures.h"
|
||||
#include "opencl/test/unit_test/sharings/unified/unified_sharing_mocks.h"
|
||||
|
||||
@ -96,8 +96,8 @@ TEST_F(UnifiedSharingImageTestsWithMemoryManager, givenPassedFormatWhenCreatingU
|
||||
EXPECT_EQ(GFX3DSTATE_SURFACEFORMAT_R16G16_FLOAT, image->getSurfaceFormatInfo().surfaceFormat.GenxSurfaceFormat);
|
||||
}
|
||||
|
||||
template <typename GfxFamily, bool pageTableManagerSupported>
|
||||
class MockHwHelper : public HwHelperHw<GfxFamily> {
|
||||
template <bool pageTableManagerSupported>
|
||||
class MockHwInfoConfig : public HwInfoConfigHw<IGFX_UNKNOWN> {
|
||||
public:
|
||||
bool isPageTableManagerSupported(const HardwareInfo &hwInfo) const override {
|
||||
return pageTableManagerSupported;
|
||||
@ -128,8 +128,8 @@ struct MemoryManagerReturningCompressedAllocations : UnifiedSharingMockMemoryMan
|
||||
HWTEST_F(UnifiedSharingImageTestsWithMemoryManager, givenCompressedImageAndNoPageTableManagerWhenCreatingUnifiedImageThenSetCorrespondingFieldInGmmAndDoNotUsePageTableManager) {
|
||||
MemoryManagerReturningCompressedAllocations memoryManager{};
|
||||
VariableBackup<MemoryManager *> memoryManagerBackup{&this->context->memoryManager, &memoryManager};
|
||||
using HwHelperNotSupportingPageTableManager = MockHwHelper<FamilyType, false>;
|
||||
RAIIHwHelperFactory<HwHelperNotSupportingPageTableManager> hwHelperBackup{this->context->getDevice(0)->getHardwareInfo().platform.eRenderCoreFamily};
|
||||
using HwInfoConfigNotSupportingPageTableManager = MockHwInfoConfig<false>;
|
||||
RAIIHwInfoConfigFactory<HwInfoConfigNotSupportingPageTableManager> hwInfoConfigBackup{this->context->getDevice(0)->getHardwareInfo().platform.eProductFamily};
|
||||
|
||||
cl_mem_flags flags{};
|
||||
cl_int retVal{};
|
||||
@ -145,8 +145,8 @@ HWTEST_F(UnifiedSharingImageTestsWithMemoryManager, givenCompressedImageAndNoPag
|
||||
HWTEST_F(UnifiedSharingImageTestsWithMemoryManager, givenCompressedImageAndPageTableManagerWhenCreatingUnifiedImageThenSetCorrespondingFieldInGmmBasedOnAuxGpuVaMappingResult) {
|
||||
MemoryManagerReturningCompressedAllocations memoryManager{};
|
||||
VariableBackup<MemoryManager *> memoryManagerBackup{&this->context->memoryManager, &memoryManager};
|
||||
using HwHelperSupportingPageTableManager = MockHwHelper<FamilyType, true>;
|
||||
RAIIHwHelperFactory<HwHelperSupportingPageTableManager> hwHelperBackup{this->context->getDevice(0)->getHardwareInfo().platform.eRenderCoreFamily};
|
||||
using HwInfoConfigNotSupportingPageTableManager = MockHwInfoConfig<true>;
|
||||
RAIIHwInfoConfigFactory<HwInfoConfigNotSupportingPageTableManager> hwInfoConfigBackup{this->context->getDevice(0)->getHardwareInfo().platform.eProductFamily};
|
||||
|
||||
cl_mem_flags flags{};
|
||||
cl_int retVal{};
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "shared/source/memory_manager/internal_allocation_storage.h"
|
||||
#include "shared/source/memory_manager/memory_manager.h"
|
||||
#include "shared/source/memory_manager/surface.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
#include "shared/source/os_interface/os_context.h"
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
#include "shared/source/utilities/cpuintrinsics.h"
|
||||
@ -665,7 +666,7 @@ bool CommandStreamReceiver::needsPageTableManager(aub_stream::EngineType engineT
|
||||
if (rootDeviceEnvironment->pageTableManager.get() != nullptr) {
|
||||
return false;
|
||||
}
|
||||
return HwHelper::get(hwInfo->platform.eRenderCoreFamily).isPageTableManagerSupported(*hwInfo);
|
||||
return HwInfoConfig::get(hwInfo->platform.eProductFamily)->isPageTableManagerSupported(*hwInfo);
|
||||
}
|
||||
|
||||
void CommandStreamReceiver::printDeviceIndex() {
|
||||
|
@ -69,11 +69,6 @@ bool HwHelperHw<Family>::isLocalMemoryEnabled(const HardwareInfo &hwInfo) const
|
||||
return Gen12LPHelpers::isLocalMemoryEnabled(hwInfo);
|
||||
}
|
||||
|
||||
template <>
|
||||
bool HwHelperHw<Family>::isPageTableManagerSupported(const HardwareInfo &hwInfo) const {
|
||||
return hwInfo.capabilityTable.ftrRenderCompressedBuffers || hwInfo.capabilityTable.ftrRenderCompressedImages;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t HwHelperHw<Family>::getHwRevIdFromStepping(uint32_t stepping, const HardwareInfo &hwInfo) const {
|
||||
if (hwInfo.platform.eProductFamily == PRODUCT_FAMILY::IGFX_TIGERLAKE_LP) {
|
||||
|
@ -11,6 +11,9 @@
|
||||
#include "shared/source/os_interface/hw_info_config_bdw_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
constexpr static auto gfxProduct = IGFX_ALDERLAKE_P;
|
||||
|
||||
#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl"
|
||||
|
||||
template <>
|
||||
void HwInfoConfigHw<IGFX_ALDERLAKE_P>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
|
||||
|
@ -12,6 +12,9 @@
|
||||
#include "shared/source/os_interface/hw_info_config_bdw_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
constexpr static auto gfxProduct = IGFX_ALDERLAKE_S;
|
||||
|
||||
#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl"
|
||||
|
||||
template <>
|
||||
void HwInfoConfigHw<IGFX_ALDERLAKE_S>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
|
||||
|
@ -12,6 +12,9 @@
|
||||
#include "shared/source/os_interface/hw_info_config_bdw_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
constexpr static auto gfxProduct = IGFX_DG1;
|
||||
|
||||
#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl"
|
||||
|
||||
template <>
|
||||
void HwInfoConfigHw<IGFX_DG1>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
|
||||
|
@ -12,6 +12,9 @@
|
||||
#include "shared/source/os_interface/hw_info_config_bdw_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
constexpr static auto gfxProduct = IGFX_ROCKETLAKE;
|
||||
|
||||
#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl"
|
||||
|
||||
template <>
|
||||
void HwInfoConfigHw<IGFX_ROCKETLAKE>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
|
||||
|
@ -12,6 +12,9 @@
|
||||
#include "shared/source/os_interface/hw_info_config_bdw_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
constexpr static auto gfxProduct = IGFX_TIGERLAKE_LP;
|
||||
|
||||
#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl"
|
||||
|
||||
template <>
|
||||
void HwInfoConfigHw<IGFX_TIGERLAKE_LP>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
|
||||
|
11
shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl
Normal file
11
shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl
Normal file
@ -0,0 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
template <>
|
||||
bool HwInfoConfigHw<gfxProduct>::isPageTableManagerSupported(const HardwareInfo &hwInfo) const {
|
||||
return hwInfo.capabilityTable.ftrRenderCompressedBuffers || hwInfo.capabilityTable.ftrRenderCompressedImages;
|
||||
}
|
@ -11,6 +11,9 @@
|
||||
#include "shared/source/os_interface/hw_info_config_bdw_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
constexpr static auto gfxProduct = IGFX_ALDERLAKE_P;
|
||||
|
||||
#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl"
|
||||
|
||||
template <>
|
||||
void HwInfoConfigHw<IGFX_ALDERLAKE_P>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
|
||||
|
@ -12,6 +12,9 @@
|
||||
#include "shared/source/os_interface/hw_info_config_bdw_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
constexpr static auto gfxProduct = IGFX_ALDERLAKE_S;
|
||||
|
||||
#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl"
|
||||
|
||||
template <>
|
||||
void HwInfoConfigHw<IGFX_ALDERLAKE_S>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
|
||||
|
@ -12,6 +12,9 @@
|
||||
#include "shared/source/os_interface/hw_info_config_bdw_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
constexpr static auto gfxProduct = IGFX_DG1;
|
||||
|
||||
#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl"
|
||||
|
||||
template <>
|
||||
void HwInfoConfigHw<IGFX_DG1>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
|
||||
|
@ -12,6 +12,9 @@
|
||||
#include "shared/source/os_interface/hw_info_config_bdw_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
constexpr static auto gfxProduct = IGFX_ROCKETLAKE;
|
||||
|
||||
#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl"
|
||||
|
||||
template <>
|
||||
void HwInfoConfigHw<IGFX_ROCKETLAKE>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
|
||||
|
@ -12,6 +12,9 @@
|
||||
#include "shared/source/os_interface/hw_info_config_bdw_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
constexpr static auto gfxProduct = IGFX_TIGERLAKE_LP;
|
||||
|
||||
#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl"
|
||||
|
||||
template <>
|
||||
void HwInfoConfigHw<IGFX_TIGERLAKE_LP>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
|
||||
|
@ -60,7 +60,6 @@ class HwHelper {
|
||||
virtual bool isL3Configurable(const HardwareInfo &hwInfo) = 0;
|
||||
virtual SipKernelType getSipKernelType(bool debuggingActive) const = 0;
|
||||
virtual bool isLocalMemoryEnabled(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isPageTableManagerSupported(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool is1MbAlignmentSupported(const HardwareInfo &hwInfo, bool isCompressionEnabled) const = 0;
|
||||
virtual bool isFenceAllocationRequired(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual const AubMemDump::LrcaHelper &getCsTraits(aub_stream::EngineType engineType) const = 0;
|
||||
@ -238,8 +237,6 @@ class HwHelperHw : public HwHelper {
|
||||
|
||||
bool timestampPacketWriteSupported() const override;
|
||||
|
||||
bool isPageTableManagerSupported(const HardwareInfo &hwInfo) const override;
|
||||
|
||||
bool is1MbAlignmentSupported(const HardwareInfo &hwInfo, bool isCompressionEnabled) const override;
|
||||
|
||||
bool isFenceAllocationRequired(const HardwareInfo &hwInfo) const override;
|
||||
|
@ -81,11 +81,6 @@ const AubMemDump::LrcaHelper &HwHelperHw<Family>::getCsTraits(aub_stream::Engine
|
||||
return *AUBFamilyMapper<Family>::csTraits[engineType];
|
||||
}
|
||||
|
||||
template <typename Family>
|
||||
bool HwHelperHw<Family>::isPageTableManagerSupported(const HardwareInfo &hwInfo) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <typename Family>
|
||||
bool HwHelperHw<Family>::isFenceAllocationRequired(const HardwareInfo &hwInfo) const {
|
||||
return false;
|
||||
|
@ -45,6 +45,7 @@ class HwInfoConfig {
|
||||
virtual uint32_t getMaxThreadsForWorkgroup(const HardwareInfo &hwInfo, uint32_t maxNumEUsPerSubSlice) const = 0;
|
||||
virtual void setForceNonCoherent(void *const commandPtr, const StateComputeModeProperties &properties) = 0;
|
||||
virtual bool obtainBlitterPreference(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isPageTableManagerSupported(const HardwareInfo &hwInfo) const = 0;
|
||||
|
||||
uint32_t threadsPerEu;
|
||||
};
|
||||
@ -73,6 +74,7 @@ class HwInfoConfigHw : public HwInfoConfig {
|
||||
uint32_t getMaxThreadsForWorkgroup(const HardwareInfo &hwInfo, uint32_t maxNumEUsPerSubSlice) const override;
|
||||
void setForceNonCoherent(void *const commandPtr, const StateComputeModeProperties &properties) override;
|
||||
bool obtainBlitterPreference(const HardwareInfo &hwInfo) const override;
|
||||
bool isPageTableManagerSupported(const HardwareInfo &hwInfo) const override;
|
||||
|
||||
protected:
|
||||
HwInfoConfigHw() = default;
|
||||
|
@ -98,4 +98,9 @@ uint32_t HwInfoConfigHw<gfxProduct>::getMaxThreadsForWorkgroup(const HardwareInf
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
void HwInfoConfigHw<gfxProduct>::setForceNonCoherent(void *const commandPtr, const StateComputeModeProperties &properties) {}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool HwInfoConfigHw<gfxProduct>::isPageTableManagerSupported(const HardwareInfo &hwInfo) const {
|
||||
return false;
|
||||
}
|
||||
} // namespace NEO
|
||||
|
@ -47,11 +47,6 @@ inline bool HwHelperHw<Family>::isSpecialWorkgroupSizeRequired(const HardwareInf
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
bool HwHelperHw<Family>::isPageTableManagerSupported(const HardwareInfo &hwInfo) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool HwHelperHw<Family>::isNewResidencyModelSupported() const {
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user