mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 12:23:05 +08:00
Remove HardwareCapabilities struct
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
ec1e39bab8
commit
5856c283c5
@@ -810,12 +810,11 @@ TEST_F(DeviceTest, givenCallToDevicePropertiesThenMaximumMemoryToBeAllocatedIsCo
|
||||
deviceProperties.maxMemAllocSize = 0;
|
||||
device->getProperties(&deviceProperties);
|
||||
EXPECT_EQ(deviceProperties.maxMemAllocSize, this->neoDevice->getDeviceInfo().maxMemAllocSize);
|
||||
HardwareCapabilities hwCaps = {0};
|
||||
|
||||
auto &hwHelper = HwHelper::get(defaultHwInfo->platform.eRenderCoreFamily);
|
||||
hwHelper.setupHardwareCapabilities(&hwCaps, *defaultHwInfo);
|
||||
auto expectedSize = this->neoDevice->getDeviceInfo().globalMemSize;
|
||||
if (!this->neoDevice->getDeviceInfo().sharedSystemAllocationsSupport) {
|
||||
expectedSize = std::min(expectedSize, hwCaps.maxMemAllocSize);
|
||||
expectedSize = std::min(expectedSize, hwHelper.getMaxMemAllocSize());
|
||||
}
|
||||
EXPECT_EQ(deviceProperties.maxMemAllocSize, expectedSize);
|
||||
}
|
||||
|
||||
@@ -162,7 +162,6 @@ Debugger *ClDevice::getDebugger() { return device.getDebugger(); }
|
||||
SourceLevelDebugger *ClDevice::getSourceLevelDebugger() { return device.getSourceLevelDebugger(); }
|
||||
ExecutionEnvironment *ClDevice::getExecutionEnvironment() const { return device.getExecutionEnvironment(); }
|
||||
const RootDeviceEnvironment &ClDevice::getRootDeviceEnvironment() const { return device.getRootDeviceEnvironment(); }
|
||||
const HardwareCapabilities &ClDevice::getHardwareCapabilities() const { return device.getHardwareCapabilities(); }
|
||||
bool ClDevice::isFullRangeSvm() const { return device.isFullRangeSvm(); }
|
||||
bool ClDevice::areSharedSystemAllocationsAllowed() const { return device.areSharedSystemAllocationsAllowed(); }
|
||||
uint32_t ClDevice::getRootDeviceIndex() const { return device.getRootDeviceIndex(); }
|
||||
|
||||
@@ -33,7 +33,6 @@ class Platform;
|
||||
class SourceLevelDebugger;
|
||||
struct DeviceInfo;
|
||||
struct EngineControl;
|
||||
struct HardwareCapabilities;
|
||||
struct HardwareInfo;
|
||||
struct RootDeviceEnvironment;
|
||||
struct SelectorCopyEngine;
|
||||
@@ -85,7 +84,6 @@ class ClDevice : public BaseObject<_cl_device_id> {
|
||||
SourceLevelDebugger *getSourceLevelDebugger();
|
||||
ExecutionEnvironment *getExecutionEnvironment() const;
|
||||
const RootDeviceEnvironment &getRootDeviceEnvironment() const;
|
||||
const HardwareCapabilities &getHardwareCapabilities() const;
|
||||
bool isFullRangeSvm() const;
|
||||
bool areSharedSystemAllocationsAllowed() const;
|
||||
uint32_t getRootDeviceIndex() const;
|
||||
|
||||
@@ -331,8 +331,8 @@ void ClDevice::initializeCaps() {
|
||||
|
||||
deviceInfo.localMemType = CL_LOCAL;
|
||||
|
||||
deviceInfo.image3DMaxWidth = this->getHardwareCapabilities().image3DMaxWidth;
|
||||
deviceInfo.image3DMaxHeight = this->getHardwareCapabilities().image3DMaxHeight;
|
||||
deviceInfo.image3DMaxWidth = hwHelper.getMax3dImageWidthOrHeight();
|
||||
deviceInfo.image3DMaxHeight = hwHelper.getMax3dImageWidthOrHeight();
|
||||
|
||||
// cl_khr_image2d_from_buffer
|
||||
deviceInfo.imagePitchAlignment = hwHelper.getPitchAlignmentForImage(&hwInfo);
|
||||
|
||||
@@ -83,7 +83,7 @@ void Program::initInternalOptions(std::string &internalOptions) const {
|
||||
CompilerOptions::concatenateAppend(internalOptions, CompilerOptions::bindlessMode);
|
||||
}
|
||||
|
||||
auto enableStatelessToStatefullWithOffset = pClDevice->getHardwareCapabilities().isStatelesToStatefullWithOffsetSupported;
|
||||
auto enableStatelessToStatefullWithOffset = HwHelper::get(pClDevice->getHardwareInfo().platform.eRenderCoreFamily).isStatelesToStatefullWithOffsetSupported();
|
||||
if (DebugManager.flags.EnableStatelessToStatefulBufferOffsetOpt.get() != -1) {
|
||||
enableStatelessToStatefullWithOffset = DebugManager.flags.EnableStatelessToStatefulBufferOffsetOpt.get() != 0;
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ struct CommandQueueStateful : public CommandQueueHw<FamilyType> {
|
||||
auto &device = dispatchInfo.begin()->getClDevice();
|
||||
if (!device.areSharedSystemAllocationsAllowed()) {
|
||||
EXPECT_FALSE(kernel->getKernelInfo().kernelDescriptor.kernelAttributes.supportsBuffersBiggerThan4Gb());
|
||||
if (device.getHardwareCapabilities().isStatelesToStatefullWithOffsetSupported) {
|
||||
if (HwHelperHw<FamilyType>::get().isStatelesToStatefullWithOffsetSupported()) {
|
||||
EXPECT_TRUE(kernel->allBufferArgsStateful);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -504,18 +504,14 @@ TEST_F(DeviceGetCapsTest, givenDeviceCapsWhenLocalMemoryIsEnabledThenCalculateGl
|
||||
EXPECT_EQ(sharedCaps.globalMemSize, expectedSize);
|
||||
}
|
||||
|
||||
TEST_F(DeviceGetCapsTest, givenGlobalMemSizeAndSharedSystemAllocationsNotSupportedWhenCalculatingMaxAllocSizeThenAdjustToHWCap) {
|
||||
HWTEST_F(DeviceGetCapsTest, givenGlobalMemSizeAndSharedSystemAllocationsNotSupportedWhenCalculatingMaxAllocSizeThenAdjustToHWCap) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.EnableSharedSystemUsmSupport.set(0);
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));
|
||||
const auto &caps = device->getSharedDeviceInfo();
|
||||
|
||||
HardwareCapabilities hwCaps = {0};
|
||||
auto &hwHelper = HwHelper::get(defaultHwInfo->platform.eRenderCoreFamily);
|
||||
hwHelper.setupHardwareCapabilities(&hwCaps, *defaultHwInfo);
|
||||
|
||||
uint64_t expectedSize = std::max((caps.globalMemSize / 2), static_cast<uint64_t>(128ULL * MemoryConstants::megaByte));
|
||||
expectedSize = std::min(expectedSize, hwCaps.maxMemAllocSize);
|
||||
expectedSize = std::min(expectedSize, HwHelperHw<FamilyType>::get().getMaxMemAllocSize());
|
||||
EXPECT_EQ(caps.maxMemAllocSize, expectedSize);
|
||||
}
|
||||
|
||||
|
||||
@@ -31,13 +31,6 @@ GEN11TEST_F(HwHelperTestGen11, WhenAdjustingDefaultEngineTypeThenEngineTypeIsSet
|
||||
EXPECT_EQ(engineType, hardwareInfo.capabilityTable.defaultEngineType);
|
||||
}
|
||||
|
||||
GEN11TEST_F(HwHelperTestGen11, givenGen11PlatformWhenSetupHardwareCapabilitiesIsCalledThenDefaultImplementationIsUsed) {
|
||||
auto &helper = HwHelper::get(renderCoreFamily);
|
||||
|
||||
// Test default method implementation
|
||||
testDefaultImplementationOfSetupHardwareCapabilities(helper, hardwareInfo);
|
||||
}
|
||||
|
||||
GEN11TEST_F(HwHelperTestGen11, whenGetGpgpuEnginesThenReturnThreeRcsEngines) {
|
||||
whenGetGpgpuEnginesThenReturnTwoRcsEngines<FamilyType>(pDevice->getHardwareInfo());
|
||||
EXPECT_EQ(3u, pDevice->engines.size());
|
||||
|
||||
@@ -14,18 +14,6 @@
|
||||
|
||||
using HwHelperTestDg1 = HwHelperTest;
|
||||
|
||||
DG1TEST_F(HwHelperTestDg1, givenDg1PlatformWhenSetupHardwareCapabilitiesIsCalledThenThenSpecificImplementationIsUsed) {
|
||||
hardwareInfo.featureTable.ftrLocalMemory = true;
|
||||
|
||||
HardwareCapabilities hwCaps = {0};
|
||||
auto &helper = HwHelper::get(renderCoreFamily);
|
||||
helper.setupHardwareCapabilities(&hwCaps, hardwareInfo);
|
||||
|
||||
EXPECT_EQ(2048u, hwCaps.image3DMaxHeight);
|
||||
EXPECT_EQ(2048u, hwCaps.image3DMaxWidth);
|
||||
EXPECT_TRUE(hwCaps.isStatelesToStatefullWithOffsetSupported);
|
||||
}
|
||||
|
||||
DG1TEST_F(HwHelperTestDg1, givenDg1A0WhenAdjustDefaultEngineTypeCalledThenRcsIsReturned) {
|
||||
auto &helper = HwHelper::get(renderCoreFamily);
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(productFamily);
|
||||
|
||||
@@ -58,17 +58,6 @@ GEN12LPTEST_F(HwHelperTestGen12Lp, WhenAdjustingDefaultEngineTypeThenRcsIsSet) {
|
||||
EXPECT_EQ(aub_stream::ENGINE_RCS, hardwareInfo.capabilityTable.defaultEngineType);
|
||||
}
|
||||
|
||||
GEN12LPTEST_F(HwHelperTestGen12Lp, givenGen12LpPlatformWhenSetupHardwareCapabilitiesIsCalledThenShouldSetCorrectValues) {
|
||||
HardwareCapabilities hwCaps = {0};
|
||||
|
||||
auto &hwHelper = HwHelper::get(renderCoreFamily);
|
||||
hwHelper.setupHardwareCapabilities(&hwCaps, hardwareInfo);
|
||||
|
||||
EXPECT_EQ(2048u, hwCaps.image3DMaxHeight);
|
||||
EXPECT_EQ(2048u, hwCaps.image3DMaxWidth);
|
||||
EXPECT_TRUE(hwCaps.isStatelesToStatefullWithOffsetSupported);
|
||||
}
|
||||
|
||||
GEN12LPTEST_F(HwHelperTestGen12Lp, givenDifferentSizesOfAllocationWhenCheckingCompressionPreferenceThenReturnCorrectValue) {
|
||||
auto &helper = HwHelper::get(renderCoreFamily);
|
||||
|
||||
|
||||
@@ -34,17 +34,6 @@ GEN8TEST_F(HwHelperTestGen8, WhenAdjustingDefaultEngineTypeThenEngineTypeIsSet)
|
||||
EXPECT_EQ(engineType, hardwareInfo.capabilityTable.defaultEngineType);
|
||||
}
|
||||
|
||||
GEN8TEST_F(HwHelperTestGen8, givenGen8PlatformWhenSetupHardwareCapabilitiesIsCalledThenSpecificImplementationIsUsed) {
|
||||
auto &helper = HwHelper::get(renderCoreFamily);
|
||||
HardwareCapabilities hwCaps = {0};
|
||||
helper.setupHardwareCapabilities(&hwCaps, hardwareInfo);
|
||||
|
||||
EXPECT_EQ(2048u, hwCaps.image3DMaxHeight);
|
||||
EXPECT_EQ(2048u, hwCaps.image3DMaxWidth);
|
||||
EXPECT_EQ(2 * MemoryConstants::gigaByte - 8 * MemoryConstants::megaByte, hwCaps.maxMemAllocSize);
|
||||
EXPECT_FALSE(hwCaps.isStatelesToStatefullWithOffsetSupported);
|
||||
}
|
||||
|
||||
GEN8TEST_F(HwHelperTestGen8, whenGetGpgpuEnginesThenReturnThreeEngines) {
|
||||
whenGetGpgpuEnginesThenReturnTwoRcsEngines<FamilyType>(pDevice->getHardwareInfo());
|
||||
EXPECT_EQ(3u, pDevice->engines.size());
|
||||
|
||||
@@ -36,13 +36,6 @@ GEN9TEST_F(HwHelperTestGen9, WhenAdjustingDefaultEngineTypeThenEngineTypeIsSet)
|
||||
EXPECT_EQ(engineType, hardwareInfo.capabilityTable.defaultEngineType);
|
||||
}
|
||||
|
||||
GEN9TEST_F(HwHelperTestGen9, givenGen9PlatformWhenSetupHardwareCapabilitiesIsCalledThenDefaultImplementationIsUsed) {
|
||||
auto &helper = HwHelper::get(renderCoreFamily);
|
||||
|
||||
// Test default method implementation
|
||||
testDefaultImplementationOfSetupHardwareCapabilities(helper, hardwareInfo);
|
||||
}
|
||||
|
||||
GEN9TEST_F(HwHelperTestGen9, givenDebuggingActiveWhenSipKernelTypeIsQueriedThenDbgCsrLocalTypeIsReturned) {
|
||||
auto &helper = HwHelper::get(renderCoreFamily);
|
||||
|
||||
|
||||
@@ -9,16 +9,6 @@
|
||||
|
||||
#include "opencl/test/unit_test/helpers/hw_helper_tests.h"
|
||||
|
||||
void testDefaultImplementationOfSetupHardwareCapabilities(HwHelper &hwHelper, const HardwareInfo &hwInfo) {
|
||||
HardwareCapabilities hwCaps = {0};
|
||||
|
||||
hwHelper.setupHardwareCapabilities(&hwCaps, hwInfo);
|
||||
|
||||
EXPECT_EQ(16384u, hwCaps.image3DMaxHeight);
|
||||
EXPECT_EQ(16384u, hwCaps.image3DMaxWidth);
|
||||
EXPECT_TRUE(hwCaps.isStatelesToStatefullWithOffsetSupported);
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_GEN8_CORE, HwHelperTest, givenHwHelperWhenAskedForHvAlign4RequiredThenReturnTrue) {
|
||||
auto &hwHelper = HwHelper::get(pDevice->getHardwareInfo().platform.eRenderCoreFamily);
|
||||
EXPECT_TRUE(hwHelper.hvAlign4Required());
|
||||
|
||||
@@ -18,8 +18,6 @@ using namespace NEO;
|
||||
|
||||
using HwHelperTest = Test<ClDeviceFixture>;
|
||||
|
||||
void testDefaultImplementationOfSetupHardwareCapabilities(HwHelper &hwHelper, const HardwareInfo &hwInfo);
|
||||
|
||||
struct ComputeSlmTestInput {
|
||||
uint32_t expected;
|
||||
uint32_t slmSize;
|
||||
|
||||
@@ -57,18 +57,6 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, HwHelperTestXeHPAndLater, GiveCcsNodeThenDefaultEng
|
||||
EXPECT_EQ(aub_stream::ENGINE_CCS, hardwareInfo.capabilityTable.defaultEngineType);
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, HwHelperTestXeHPAndLater, givenXeHPAndLaterPlatformWhenSetupHardwareCapabilitiesIsCalledThenThenSpecificImplementationIsUsed) {
|
||||
hardwareInfo.featureTable.ftrLocalMemory = true;
|
||||
|
||||
HardwareCapabilities hwCaps = {0};
|
||||
auto &helper = HwHelper::get(renderCoreFamily);
|
||||
helper.setupHardwareCapabilities(&hwCaps, hardwareInfo);
|
||||
|
||||
EXPECT_EQ(16384u, hwCaps.image3DMaxHeight);
|
||||
EXPECT_EQ(16384u, hwCaps.image3DMaxWidth);
|
||||
EXPECT_TRUE(hwCaps.isStatelesToStatefullWithOffsetSupported);
|
||||
}
|
||||
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, HwHelperTestXeHPAndLater, givenXeHPAndLaterPlatformWithLocalMemoryFeatureWhenIsLocalMemoryEnabledIsCalledThenTrueIsReturned) {
|
||||
hardwareInfo.featureTable.ftrLocalMemory = true;
|
||||
|
||||
|
||||
@@ -2210,13 +2210,11 @@ TEST_F(Program32BitTests, givenDeviceWithForce32BitAddressingOnWhenProgramIsCrea
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(ProgramTests, givenNewProgramThenStatelessToStatefulBufferOffsetOptimizationIsMatchingThePlatformEnablingStatus) {
|
||||
HWTEST_F(ProgramTests, givenNewProgramThenStatelessToStatefulBufferOffsetOptimizationIsMatchingThePlatformEnablingStatus) {
|
||||
MockProgram program(pContext, false, toClDeviceVector(*pClDevice));
|
||||
auto internalOptions = program.getInitInternalOptions();
|
||||
|
||||
HardwareCapabilities hwCaps = {0};
|
||||
HwHelper::get(pDevice->getHardwareInfo().platform.eRenderCoreFamily).setupHardwareCapabilities(&hwCaps, pDevice->getHardwareInfo());
|
||||
if (hwCaps.isStatelesToStatefullWithOffsetSupported) {
|
||||
if (HwHelperHw<FamilyType>::get().isStatelesToStatefullWithOffsetSupported()) {
|
||||
EXPECT_TRUE(CompilerOptions::contains(internalOptions, CompilerOptions::hasBufferOffsetArg));
|
||||
} else {
|
||||
EXPECT_FALSE(CompilerOptions::contains(internalOptions, CompilerOptions::hasBufferOffsetArg));
|
||||
|
||||
@@ -204,8 +204,6 @@ bool Device::createDeviceImpl() {
|
||||
auto &hwInfo = getHardwareInfo();
|
||||
preemptionMode = PreemptionHelper::getDefaultPreemptionMode(hwInfo);
|
||||
|
||||
auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
hwHelper.setupHardwareCapabilities(&this->hardwareCapabilities, hwInfo);
|
||||
executionEnvironment->rootDeviceEnvironments[getRootDeviceIndex()]->initGmm();
|
||||
|
||||
if (!getDebugger()) {
|
||||
|
||||
@@ -88,7 +88,6 @@ class Device : public ReferenceTrackedObject<Device> {
|
||||
ExecutionEnvironment *getExecutionEnvironment() const { return executionEnvironment; }
|
||||
const RootDeviceEnvironment &getRootDeviceEnvironment() const { return *executionEnvironment->rootDeviceEnvironments[getRootDeviceIndex()]; }
|
||||
RootDeviceEnvironment &getRootDeviceEnvironmentRef() const { return *executionEnvironment->rootDeviceEnvironments[getRootDeviceIndex()]; }
|
||||
const HardwareCapabilities &getHardwareCapabilities() const { return hardwareCapabilities; }
|
||||
bool isFullRangeSvm() const {
|
||||
return getRootDeviceEnvironment().isFullRangeSvm();
|
||||
}
|
||||
@@ -161,7 +160,6 @@ class Device : public ReferenceTrackedObject<Device> {
|
||||
|
||||
DeviceInfo deviceInfo = {};
|
||||
|
||||
HardwareCapabilities hardwareCapabilities = {};
|
||||
std::unique_ptr<PerformanceCounters> performanceCounters;
|
||||
std::vector<std::unique_ptr<CommandStreamReceiver>> commandStreamReceivers;
|
||||
std::vector<EngineControl> engines;
|
||||
|
||||
@@ -74,7 +74,7 @@ void Device::initializeCaps() {
|
||||
|
||||
if (!deviceInfo.sharedSystemAllocationsSupport) {
|
||||
deviceInfo.maxMemAllocSize = ApiSpecificConfig::getReducedMaxAllocSize(deviceInfo.maxMemAllocSize);
|
||||
deviceInfo.maxMemAllocSize = std::min(deviceInfo.maxMemAllocSize, this->hardwareCapabilities.maxMemAllocSize);
|
||||
deviceInfo.maxMemAllocSize = std::min(deviceInfo.maxMemAllocSize, hwHelper.getMaxMemAllocSize());
|
||||
}
|
||||
|
||||
// Some specific driver model configurations may impose additional limitations
|
||||
|
||||
@@ -21,13 +21,8 @@ using Family = NEO::TGLLPFamily;
|
||||
namespace NEO {
|
||||
|
||||
template <>
|
||||
void HwHelperHw<Family>::setupHardwareCapabilities(HardwareCapabilities *caps, const HardwareInfo &hwInfo) {
|
||||
caps->image3DMaxHeight = 2048;
|
||||
caps->image3DMaxWidth = 2048;
|
||||
//With statefull messages we have an allocation cap of 4GB
|
||||
//Reason to subtract 8KB is that driver may pad the buffer with addition pages for over fetching..
|
||||
caps->maxMemAllocSize = (4ULL * MemoryConstants::gigaByte) - (8ULL * MemoryConstants::kiloByte);
|
||||
caps->isStatelesToStatefullWithOffsetSupported = true;
|
||||
size_t HwHelperHw<Family>::getMax3dImageWidthOrHeight() const {
|
||||
return 2048;
|
||||
}
|
||||
|
||||
template <>
|
||||
|
||||
@@ -42,11 +42,18 @@ size_t HwHelperHw<Family>::getMaxBarrierRegisterPerSlice() const {
|
||||
}
|
||||
|
||||
template <>
|
||||
void HwHelperHw<Family>::setupHardwareCapabilities(HardwareCapabilities *caps, const HardwareInfo &hwInfo) {
|
||||
caps->image3DMaxHeight = 2048;
|
||||
caps->image3DMaxWidth = 2048;
|
||||
caps->maxMemAllocSize = 2 * MemoryConstants::gigaByte - 8 * MemoryConstants::megaByte;
|
||||
caps->isStatelesToStatefullWithOffsetSupported = false;
|
||||
size_t HwHelperHw<Family>::getMax3dImageWidthOrHeight() const {
|
||||
return 2048;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint64_t HwHelperHw<Family>::getMaxMemAllocSize() const {
|
||||
return (2 * MemoryConstants::gigaByte) - (8 * MemoryConstants::kiloByte);
|
||||
}
|
||||
|
||||
template <>
|
||||
bool HwHelperHw<Family>::isStatelesToStatefullWithOffsetSupported() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <>
|
||||
|
||||
@@ -32,7 +32,6 @@ class Gmm;
|
||||
struct AllocationData;
|
||||
struct AllocationProperties;
|
||||
struct EngineControl;
|
||||
struct HardwareCapabilities;
|
||||
struct RootDeviceEnvironment;
|
||||
struct PipeControlArgs;
|
||||
|
||||
@@ -49,7 +48,6 @@ class HwHelper {
|
||||
virtual uint32_t getPitchAlignmentForImage(const HardwareInfo *hwInfo) const = 0;
|
||||
virtual uint32_t getMaxNumSamplers() const = 0;
|
||||
virtual void adjustDefaultEngineType(HardwareInfo *pHwInfo) = 0;
|
||||
virtual void setupHardwareCapabilities(HardwareCapabilities *caps, const HardwareInfo &hwInfo) = 0;
|
||||
virtual bool isL3Configurable(const HardwareInfo &hwInfo) = 0;
|
||||
virtual SipKernelType getSipKernelType(bool debuggingActive) const = 0;
|
||||
virtual bool isLocalMemoryEnabled(const HardwareInfo &hwInfo) const = 0;
|
||||
@@ -147,6 +145,9 @@ class HwHelper {
|
||||
|
||||
virtual bool isScratchSpaceSurfaceStateAccessible() const = 0;
|
||||
virtual uint64_t getRenderSurfaceStateBaseAddress(void *renderSurfaceState) const = 0;
|
||||
virtual size_t getMax3dImageWidthOrHeight() const = 0;
|
||||
virtual uint64_t getMaxMemAllocSize() const = 0;
|
||||
virtual bool isStatelesToStatefullWithOffsetSupported() const = 0;
|
||||
|
||||
protected:
|
||||
HwHelper() = default;
|
||||
@@ -213,8 +214,6 @@ class HwHelperHw : public HwHelper {
|
||||
|
||||
void adjustDefaultEngineType(HardwareInfo *pHwInfo) override;
|
||||
|
||||
void setupHardwareCapabilities(HardwareCapabilities *caps, const HardwareInfo &hwInfo) override;
|
||||
|
||||
bool isL3Configurable(const HardwareInfo &hwInfo) override;
|
||||
|
||||
SipKernelType getSipKernelType(bool debuggingActive) const override;
|
||||
@@ -370,6 +369,10 @@ class HwHelperHw : public HwHelper {
|
||||
bool isScratchSpaceSurfaceStateAccessible() const override;
|
||||
uint64_t getRenderSurfaceStateBaseAddress(void *renderSurfaceState) const override;
|
||||
|
||||
size_t getMax3dImageWidthOrHeight() const override;
|
||||
uint64_t getMaxMemAllocSize() const override;
|
||||
bool isStatelesToStatefullWithOffsetSupported() const override;
|
||||
|
||||
protected:
|
||||
static const AuxTranslationMode defaultAuxTranslationMode;
|
||||
HwHelperHw() = default;
|
||||
|
||||
@@ -38,13 +38,20 @@ bool HwHelperHw<Family>::isBufferSizeSuitableForRenderCompression(const size_t s
|
||||
}
|
||||
|
||||
template <typename Family>
|
||||
void HwHelperHw<Family>::setupHardwareCapabilities(HardwareCapabilities *caps, const HardwareInfo &hwInfo) {
|
||||
caps->image3DMaxHeight = 16384;
|
||||
caps->image3DMaxWidth = 16384;
|
||||
size_t HwHelperHw<Family>::getMax3dImageWidthOrHeight() const {
|
||||
return 16384;
|
||||
}
|
||||
|
||||
template <typename Family>
|
||||
uint64_t HwHelperHw<Family>::getMaxMemAllocSize() const {
|
||||
//With statefull messages we have an allocation cap of 4GB
|
||||
//Reason to subtract 8KB is that driver may pad the buffer with addition pages for over fetching..
|
||||
caps->maxMemAllocSize = (4ULL * MemoryConstants::gigaByte) - (8ULL * MemoryConstants::kiloByte);
|
||||
caps->isStatelesToStatefullWithOffsetSupported = true;
|
||||
return (4ULL * MemoryConstants::gigaByte) - (8ULL * MemoryConstants::kiloByte);
|
||||
}
|
||||
|
||||
template <typename Family>
|
||||
bool HwHelperHw<Family>::isStatelesToStatefullWithOffsetSupported() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <typename Family>
|
||||
|
||||
@@ -68,13 +68,6 @@ struct RuntimeCapabilityTable {
|
||||
bool fusedEuEnabled;
|
||||
};
|
||||
|
||||
struct HardwareCapabilities {
|
||||
size_t image3DMaxWidth;
|
||||
size_t image3DMaxHeight;
|
||||
uint64_t maxMemAllocSize;
|
||||
bool isStatelesToStatefullWithOffsetSupported;
|
||||
};
|
||||
|
||||
struct HardwareInfo {
|
||||
HardwareInfo() = default;
|
||||
HardwareInfo(const PLATFORM *platform, const FeatureTable *featureTable, const WorkaroundTable *workaroundTable,
|
||||
|
||||
Reference in New Issue
Block a user