Add helper isBankOverrideRequired

Change-Id: I13b7a77ff029f47091a27704a61704ca8cc46ef2
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
Related-To: NEO-4882
This commit is contained in:
Kamil Kopryk
2020-07-21 17:24:26 +02:00
committed by sys_ocldev
parent af8fdfce62
commit 9b2e5274d2
4 changed files with 17 additions and 1 deletions

View File

@ -854,6 +854,11 @@ HWTEST_F(HwHelperTest, WhenAllowRenderCompressionIsCalledThenTrueIsReturned) {
EXPECT_TRUE(hwHelper.allowRenderCompression(hardwareInfo));
}
HWTEST_F(HwHelperTest, WhenIsBankOverrideRequiredIsCalledThenFalseIsReturned) {
auto &hwHelper = HwHelper::get(hardwareInfo.platform.eRenderCoreFamily);
EXPECT_FALSE(hwHelper.isBankOverrideRequired(hardwareInfo));
}
HWCMDTEST_F(IGFX_GEN8_CORE, HwHelperTest, GivenVariousValuesWhenCallingGetBarriersCountFromHasBarrierThenCorrectValueIsReturned) {
auto &hwHelper = HwHelper::get(hardwareInfo.platform.eRenderCoreFamily);
EXPECT_EQ(0u, hwHelper.getBarriersCountFromHasBarriers(0u));

View File

@ -99,7 +99,7 @@ class HwHelper {
virtual uint64_t getGpuTimeStampInNS(uint64_t timeStamp, double frequency) const = 0;
virtual uint32_t getBindlessSurfaceExtendedMessageDescriptorValue(uint32_t surfStateOffset) const = 0;
virtual void setExtraAllocationData(AllocationData &allocationData, const AllocationProperties &properties, const HardwareInfo &hwInfo) const = 0;
virtual bool isBankOverrideRequired(const HardwareInfo &hwInfo) const = 0;
virtual bool isSpecialWorkgroupSizeRequired(const HardwareInfo &hwInfo, bool isSimulation) const = 0;
virtual uint32_t getGlobalTimeStampBits() const = 0;
@ -273,6 +273,8 @@ class HwHelperHw : public HwHelper {
bool isBlitCopyRequiredForLocalMemory(const HardwareInfo &hwInfo) const override;
bool isBankOverrideRequired(const HardwareInfo &hwInfo) const override;
protected:
static const AuxTranslationMode defaultAuxTranslationMode;
HwHelperHw() = default;

View File

@ -429,4 +429,9 @@ const StackVec<uint32_t, 6> HwHelperHw<GfxFamily>::getThreadsPerEUConfigs() cons
template <typename GfxFamily>
void HwHelperHw<GfxFamily>::setExtraAllocationData(AllocationData &allocationData, const AllocationProperties &properties, const HardwareInfo &hwInfo) const {}
template <typename GfxFamily>
bool HwHelperHw<GfxFamily>::isBankOverrideRequired(const HardwareInfo &hwInfo) const {
return false;
}
} // namespace NEO

View File

@ -102,6 +102,10 @@ class Drm {
return memoryInfo.get();
}
RootDeviceEnvironment &getRootDeviceEnvironment() {
return rootDeviceEnvironment;
}
static inline uint32_t createMemoryRegionId(uint16_t type, uint16_t instance) {
return (1u << (type + 16)) | (1u << instance);
}