Add storage info adjustment check
Signed-off-by: Rafal Maziejuk <rafal.maziejuk@intel.com> Related-To: NEO-4541
This commit is contained in:
parent
ad97bd32de
commit
f5be28e45f
|
@ -13,3 +13,4 @@ HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfPipeControl
|
|||
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfImagePitchAlignmentWAIsRequiredThenFalseIsReturned, IGFX_DG1);
|
||||
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfForceEmuInt32DivRemSPWAIsRequiredThenFalseIsReturned, IGFX_DG1);
|
||||
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIf3DPipelineSelectWAIsRequiredThenFalseIsReturned, IGFX_DG1);
|
||||
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfStorageInfoAdjustmentIsRequiredThenFalseIsReturned, IGFX_DG1);
|
||||
|
|
|
@ -47,6 +47,11 @@ DG1TEST_F(Dg1HwInfoConfig, givenA0SteppingAndDg1PlatformWhenAskingIfWAIsRequired
|
|||
}
|
||||
}
|
||||
|
||||
DG1TEST_F(Dg1HwInfoConfig, givenHwInfoConfigWhenAskedIfStorageInfoAdjustmentIsRequiredThenTrueIsReturned) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
EXPECT_TRUE(hwInfoConfig.isStorageInfoAdjustmentRequired());
|
||||
}
|
||||
|
||||
DG1TEST_F(Dg1HwInfoConfig, givenHwInfoConfigWhenAskedIf3DPipelineSelectWAIsRequiredThenTrueIsReturned) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||
EXPECT_TRUE(hwInfoConfig.is3DPipelineSelectWARequired());
|
||||
|
|
|
@ -331,3 +331,8 @@ HWTEST_F(HwInfoConfigTest, givenHwInfoConfigWhenAskedIf3DPipelineSelectWAIsRequi
|
|||
const auto &hwInfoConfig = *HwInfoConfig::get(pInHwInfo.platform.eProductFamily);
|
||||
EXPECT_FALSE(hwInfoConfig.is3DPipelineSelectWARequired());
|
||||
}
|
||||
|
||||
HWTEST_F(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfStorageInfoAdjustmentIsRequiredThenFalseIsReturned) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(pInHwInfo.platform.eProductFamily);
|
||||
EXPECT_FALSE(hwInfoConfig.isStorageInfoAdjustmentRequired());
|
||||
}
|
||||
|
|
|
@ -179,24 +179,24 @@ uint32_t HwHelperHw<Family>::getMocsIndex(const GmmHelper &gmmHelper, bool l3ena
|
|||
}
|
||||
|
||||
template <>
|
||||
bool MemorySynchronizationCommands<TGLLPFamily>::isPipeControlWArequired(const HardwareInfo &hwInfo) {
|
||||
bool MemorySynchronizationCommands<Family>::isPipeControlWArequired(const HardwareInfo &hwInfo) {
|
||||
return HwInfoConfig::get(hwInfo.platform.eProductFamily)->pipeControlWARequired(hwInfo);
|
||||
}
|
||||
|
||||
template <>
|
||||
bool MemorySynchronizationCommands<TGLLPFamily>::isPipeControlPriorToPipelineSelectWArequired(const HardwareInfo &hwInfo) {
|
||||
return MemorySynchronizationCommands<TGLLPFamily>::isPipeControlWArequired(hwInfo);
|
||||
bool MemorySynchronizationCommands<Family>::isPipeControlPriorToPipelineSelectWArequired(const HardwareInfo &hwInfo) {
|
||||
return MemorySynchronizationCommands<Family>::isPipeControlWArequired(hwInfo);
|
||||
}
|
||||
|
||||
template <>
|
||||
void HwHelperHw<TGLLPFamily>::setExtraAllocationData(AllocationData &allocationData, const AllocationProperties &properties, const HardwareInfo &hwInfo) const {
|
||||
void HwHelperHw<Family>::setExtraAllocationData(AllocationData &allocationData, const AllocationProperties &properties, const HardwareInfo &hwInfo) const {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
if (hwInfoConfig.getLocalMemoryAccessMode(hwInfo) == LocalMemoryAccessMode::CpuAccessDisallowed) {
|
||||
if (GraphicsAllocation::isCpuAccessRequired(properties.allocationType)) {
|
||||
allocationData.flags.useSystemMemory = true;
|
||||
}
|
||||
}
|
||||
if (IGFX_DG1 == hwInfo.platform.eProductFamily) {
|
||||
if (HwInfoConfig::get(hwInfo.platform.eProductFamily)->isStorageInfoAdjustmentRequired()) {
|
||||
if (properties.allocationType == GraphicsAllocation::AllocationType::BUFFER) {
|
||||
allocationData.storageInfo.isLockable = true;
|
||||
}
|
||||
|
|
|
@ -46,3 +46,8 @@ template <>
|
|||
bool HwInfoConfigHw<gfxProduct>::is3DPipelineSelectWARequired() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool HwInfoConfigHw<gfxProduct>::isStorageInfoAdjustmentRequired() const {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -73,6 +73,7 @@ class HwInfoConfig {
|
|||
virtual bool imagePitchAlignmentWARequired(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool is3DPipelineSelectWARequired() const = 0;
|
||||
virtual bool isStorageInfoAdjustmentRequired() const = 0;
|
||||
|
||||
protected:
|
||||
virtual LocalMemoryAccessMode getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo) const = 0;
|
||||
|
@ -131,6 +132,7 @@ class HwInfoConfigHw : public HwInfoConfig {
|
|||
bool imagePitchAlignmentWARequired(const HardwareInfo &hwInfo) const override;
|
||||
bool isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo) const override;
|
||||
bool is3DPipelineSelectWARequired() const override;
|
||||
bool isStorageInfoAdjustmentRequired() const override;
|
||||
|
||||
protected:
|
||||
HwInfoConfigHw() = default;
|
||||
|
|
|
@ -246,4 +246,9 @@ bool HwInfoConfigHw<gfxProduct>::is3DPipelineSelectWARequired() const {
|
|||
return false;
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool HwInfoConfigHw<gfxProduct>::isStorageInfoAdjustmentRequired() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
|
|
@ -232,4 +232,9 @@ bool HwInfoConfigHw<IGFX_UNKNOWN>::is3DPipelineSelectWARequired() const {
|
|||
return false;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool HwInfoConfigHw<IGFX_UNKNOWN>::isStorageInfoAdjustmentRequired() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
} //namespace NEO
|
||||
|
|
Loading…
Reference in New Issue