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, givenHwInfoConfigWhenAskedIfImagePitchAlignmentWAIsRequiredThenFalseIsReturned, IGFX_DG1);
|
||||||
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfForceEmuInt32DivRemSPWAIsRequiredThenFalseIsReturned, IGFX_DG1);
|
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfForceEmuInt32DivRemSPWAIsRequiredThenFalseIsReturned, IGFX_DG1);
|
||||||
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIf3DPipelineSelectWAIsRequiredThenFalseIsReturned, 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) {
|
DG1TEST_F(Dg1HwInfoConfig, givenHwInfoConfigWhenAskedIf3DPipelineSelectWAIsRequiredThenTrueIsReturned) {
|
||||||
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||||
EXPECT_TRUE(hwInfoConfig.is3DPipelineSelectWARequired());
|
EXPECT_TRUE(hwInfoConfig.is3DPipelineSelectWARequired());
|
||||||
|
|
|
@ -331,3 +331,8 @@ HWTEST_F(HwInfoConfigTest, givenHwInfoConfigWhenAskedIf3DPipelineSelectWAIsRequi
|
||||||
const auto &hwInfoConfig = *HwInfoConfig::get(pInHwInfo.platform.eProductFamily);
|
const auto &hwInfoConfig = *HwInfoConfig::get(pInHwInfo.platform.eProductFamily);
|
||||||
EXPECT_FALSE(hwInfoConfig.is3DPipelineSelectWARequired());
|
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 <>
|
template <>
|
||||||
bool MemorySynchronizationCommands<TGLLPFamily>::isPipeControlWArequired(const HardwareInfo &hwInfo) {
|
bool MemorySynchronizationCommands<Family>::isPipeControlWArequired(const HardwareInfo &hwInfo) {
|
||||||
return HwInfoConfig::get(hwInfo.platform.eProductFamily)->pipeControlWARequired(hwInfo);
|
return HwInfoConfig::get(hwInfo.platform.eProductFamily)->pipeControlWARequired(hwInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
bool MemorySynchronizationCommands<TGLLPFamily>::isPipeControlPriorToPipelineSelectWArequired(const HardwareInfo &hwInfo) {
|
bool MemorySynchronizationCommands<Family>::isPipeControlPriorToPipelineSelectWArequired(const HardwareInfo &hwInfo) {
|
||||||
return MemorySynchronizationCommands<TGLLPFamily>::isPipeControlWArequired(hwInfo);
|
return MemorySynchronizationCommands<Family>::isPipeControlWArequired(hwInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
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);
|
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||||
if (hwInfoConfig.getLocalMemoryAccessMode(hwInfo) == LocalMemoryAccessMode::CpuAccessDisallowed) {
|
if (hwInfoConfig.getLocalMemoryAccessMode(hwInfo) == LocalMemoryAccessMode::CpuAccessDisallowed) {
|
||||||
if (GraphicsAllocation::isCpuAccessRequired(properties.allocationType)) {
|
if (GraphicsAllocation::isCpuAccessRequired(properties.allocationType)) {
|
||||||
allocationData.flags.useSystemMemory = true;
|
allocationData.flags.useSystemMemory = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (IGFX_DG1 == hwInfo.platform.eProductFamily) {
|
if (HwInfoConfig::get(hwInfo.platform.eProductFamily)->isStorageInfoAdjustmentRequired()) {
|
||||||
if (properties.allocationType == GraphicsAllocation::AllocationType::BUFFER) {
|
if (properties.allocationType == GraphicsAllocation::AllocationType::BUFFER) {
|
||||||
allocationData.storageInfo.isLockable = true;
|
allocationData.storageInfo.isLockable = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,3 +46,8 @@ template <>
|
||||||
bool HwInfoConfigHw<gfxProduct>::is3DPipelineSelectWARequired() const {
|
bool HwInfoConfigHw<gfxProduct>::is3DPipelineSelectWARequired() const {
|
||||||
return true;
|
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 imagePitchAlignmentWARequired(const HardwareInfo &hwInfo) const = 0;
|
||||||
virtual bool isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo) const = 0;
|
virtual bool isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo) const = 0;
|
||||||
virtual bool is3DPipelineSelectWARequired() const = 0;
|
virtual bool is3DPipelineSelectWARequired() const = 0;
|
||||||
|
virtual bool isStorageInfoAdjustmentRequired() const = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual LocalMemoryAccessMode getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo) const = 0;
|
virtual LocalMemoryAccessMode getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo) const = 0;
|
||||||
|
@ -131,6 +132,7 @@ class HwInfoConfigHw : public HwInfoConfig {
|
||||||
bool imagePitchAlignmentWARequired(const HardwareInfo &hwInfo) const override;
|
bool imagePitchAlignmentWARequired(const HardwareInfo &hwInfo) const override;
|
||||||
bool isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo) const override;
|
bool isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo) const override;
|
||||||
bool is3DPipelineSelectWARequired() const override;
|
bool is3DPipelineSelectWARequired() const override;
|
||||||
|
bool isStorageInfoAdjustmentRequired() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
HwInfoConfigHw() = default;
|
HwInfoConfigHw() = default;
|
||||||
|
|
|
@ -246,4 +246,9 @@ bool HwInfoConfigHw<gfxProduct>::is3DPipelineSelectWARequired() const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <PRODUCT_FAMILY gfxProduct>
|
||||||
|
bool HwInfoConfigHw<gfxProduct>::isStorageInfoAdjustmentRequired() const {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
|
|
@ -232,4 +232,9 @@ bool HwInfoConfigHw<IGFX_UNKNOWN>::is3DPipelineSelectWARequired() const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
bool HwInfoConfigHw<IGFX_UNKNOWN>::isStorageInfoAdjustmentRequired() const {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
} //namespace NEO
|
} //namespace NEO
|
||||||
|
|
Loading…
Reference in New Issue