diff --git a/shared/source/command_stream/definitions/stream_properties.inl b/shared/source/command_stream/definitions/stream_properties.inl index c916f12822..157460acbf 100644 --- a/shared/source/command_stream/definitions/stream_properties.inl +++ b/shared/source/command_stream/definitions/stream_properties.inl @@ -91,4 +91,35 @@ struct PipelineSelectProperties { bool propertiesSupportLoaded = false; }; +struct StateBaseAddressPropertiesSupport { + bool globalAtomics = false; + bool statelessMocs = false; + bool bindingTablePoolBaseAddress = false; +}; + +struct StateBaseAddressProperties { + StreamProperty64 bindingTablePoolBaseAddress{}; + StreamProperty64 surfaceStateBaseAddress{}; + StreamProperty64 dynamicStateBaseAddress{}; + StreamProperty64 indirectObjectBaseAddress{}; + StreamPropertySizeT surfaceStateSize{}; + StreamPropertySizeT dynamicStateSize{}; + StreamPropertySizeT indirectObjectSize{}; + StreamProperty globalAtomics{}; + StreamProperty statelessMocs{}; + + void setProperties(bool globalAtomics, int32_t statelessMocs, int64_t bindingTablePoolBaseAddress, + int64_t surfaceStateBaseAddress, size_t surfaceStateSize, + int64_t dynamicStateBaseAddress, size_t dynamicStateSize, + int64_t indirectObjectBaseAddress, size_t indirectObjectSize, const HardwareInfo &hwInfo); + void setProperties(const StateBaseAddressProperties &properties); + bool isDirty() const; + + protected: + void clearIsDirty(); + + StateBaseAddressPropertiesSupport stateBaseAddressPropertiesSupport = {}; + bool propertiesSupportLoaded = false; +}; + } // namespace NEO diff --git a/shared/source/command_stream/stream_properties.cpp b/shared/source/command_stream/stream_properties.cpp index f58d87b85e..6cf16edd66 100644 --- a/shared/source/command_stream/stream_properties.cpp +++ b/shared/source/command_stream/stream_properties.cpp @@ -201,3 +201,69 @@ void PipelineSelectProperties::clearIsDirty() { mediaSamplerDopClockGate.isDirty = false; systolicMode.isDirty = false; } + +void StateBaseAddressProperties::setProperties(bool globalAtomics, int32_t statelessMocs, int64_t bindingTablePoolBaseAddress, + int64_t surfaceStateBaseAddress, size_t surfaceStateSize, + int64_t dynamicStateBaseAddress, size_t dynamicStateSize, + int64_t indirectObjectBaseAddress, size_t indirectObjectSize, const HardwareInfo &hwInfo) { + if (this->propertiesSupportLoaded == false) { + auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily); + hwInfoConfig.fillStateBaseAddressPropertiesSupportStructure(this->stateBaseAddressPropertiesSupport, hwInfo); + this->propertiesSupportLoaded = true; + } + + clearIsDirty(); + + if (this->stateBaseAddressPropertiesSupport.globalAtomics) { + this->globalAtomics.set(globalAtomics); + } + + if (this->stateBaseAddressPropertiesSupport.statelessMocs) { + this->statelessMocs.set(statelessMocs); + } + + if (this->stateBaseAddressPropertiesSupport.bindingTablePoolBaseAddress) { + this->bindingTablePoolBaseAddress.set(bindingTablePoolBaseAddress); + } + + this->surfaceStateBaseAddress.set(surfaceStateBaseAddress); + this->surfaceStateSize.set(surfaceStateSize); + this->dynamicStateBaseAddress.set(dynamicStateBaseAddress); + this->dynamicStateSize.set(dynamicStateSize); + this->indirectObjectBaseAddress.set(indirectObjectBaseAddress); + this->indirectObjectSize.set(indirectObjectSize); +} + +void StateBaseAddressProperties::setProperties(const StateBaseAddressProperties &properties) { + clearIsDirty(); + + globalAtomics.set(properties.globalAtomics.value); + statelessMocs.set(properties.statelessMocs.value); + bindingTablePoolBaseAddress.set(properties.bindingTablePoolBaseAddress.value); + + surfaceStateBaseAddress.set(properties.surfaceStateBaseAddress.value); + surfaceStateSize.set(properties.surfaceStateSize.value); + dynamicStateBaseAddress.set(properties.dynamicStateBaseAddress.value); + dynamicStateSize.set(properties.dynamicStateSize.value); + indirectObjectBaseAddress.set(properties.indirectObjectBaseAddress.value); + indirectObjectSize.set(properties.indirectObjectSize.value); +} + +bool StateBaseAddressProperties::isDirty() const { + return globalAtomics.isDirty || statelessMocs.isDirty || bindingTablePoolBaseAddress.isDirty || + surfaceStateBaseAddress.isDirty || surfaceStateSize.isDirty || + dynamicStateBaseAddress.isDirty || dynamicStateSize.isDirty || + indirectObjectBaseAddress.isDirty || indirectObjectSize.isDirty; +} + +void StateBaseAddressProperties::clearIsDirty() { + globalAtomics.isDirty = false; + statelessMocs.isDirty = false; + bindingTablePoolBaseAddress.isDirty = false; + surfaceStateBaseAddress.isDirty = false; + surfaceStateSize.isDirty = false; + dynamicStateBaseAddress.isDirty = false; + dynamicStateSize.isDirty = false; + indirectObjectBaseAddress.isDirty = false; + indirectObjectSize.isDirty = false; +} diff --git a/shared/source/command_stream/stream_properties.h b/shared/source/command_stream/stream_properties.h index 6d6071322b..d8e3c4eace 100644 --- a/shared/source/command_stream/stream_properties.h +++ b/shared/source/command_stream/stream_properties.h @@ -15,6 +15,7 @@ struct StreamProperties { StateComputeModeProperties stateComputeMode{}; FrontEndProperties frontEndState{}; PipelineSelectProperties pipelineSelect{}; + StateBaseAddressProperties stateBaseAddress{}; }; } // namespace NEO diff --git a/shared/source/command_stream/stream_property.h b/shared/source/command_stream/stream_property.h index 2c210c372d..279419e252 100644 --- a/shared/source/command_stream/stream_property.h +++ b/shared/source/command_stream/stream_property.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,18 +8,28 @@ #pragma once #include +#include namespace NEO { -struct StreamProperty { - int32_t value = -1; +template +struct StreamPropertyType { + static constexpr Type initValue = static_cast(-1); + + Type value = initValue; bool isDirty = false; - void set(int32_t newValue) { - if ((value != newValue) && (newValue != -1)) { + void set(Type newValue) { + if ((value != newValue) && (newValue != initValue)) { value = newValue; isDirty = true; } } }; +using StreamProperty32 = StreamPropertyType; +using StreamProperty64 = StreamPropertyType; +using StreamPropertySizeT = StreamPropertyType; + +using StreamProperty = StreamProperty32; + } // namespace NEO diff --git a/shared/source/gen11/hw_cmds_base.h b/shared/source/gen11/hw_cmds_base.h index 7c29b7c28b..a2d72c4bc9 100644 --- a/shared/source/gen11/hw_cmds_base.h +++ b/shared/source/gen11/hw_cmds_base.h @@ -47,6 +47,7 @@ struct Gen11 { struct StateBaseAddressStateSupport { static constexpr bool globalAtomics = false; static constexpr bool statelessMocs = true; + static constexpr bool bindingTablePoolBaseAddress = false; }; struct PipelineSelectStateSupport { diff --git a/shared/source/gen12lp/hw_cmds_base.h b/shared/source/gen12lp/hw_cmds_base.h index 8f4cbf53ec..3a38513952 100644 --- a/shared/source/gen12lp/hw_cmds_base.h +++ b/shared/source/gen12lp/hw_cmds_base.h @@ -49,6 +49,7 @@ struct Gen12Lp { struct StateBaseAddressStateSupport { static constexpr bool globalAtomics = false; static constexpr bool statelessMocs = true; + static constexpr bool bindingTablePoolBaseAddress = false; }; struct PipelineSelectStateSupport { diff --git a/shared/source/gen8/hw_cmds_base.h b/shared/source/gen8/hw_cmds_base.h index 695e6c89f8..e1b16cdbc2 100644 --- a/shared/source/gen8/hw_cmds_base.h +++ b/shared/source/gen8/hw_cmds_base.h @@ -49,6 +49,7 @@ struct Gen8 { struct StateBaseAddressStateSupport { static constexpr bool globalAtomics = false; static constexpr bool statelessMocs = true; + static constexpr bool bindingTablePoolBaseAddress = false; }; struct PipelineSelectStateSupport { diff --git a/shared/source/gen9/hw_cmds_base.h b/shared/source/gen9/hw_cmds_base.h index 543cf5b16b..56cb2a3226 100644 --- a/shared/source/gen9/hw_cmds_base.h +++ b/shared/source/gen9/hw_cmds_base.h @@ -48,6 +48,7 @@ struct Gen9 { struct StateBaseAddressStateSupport { static constexpr bool globalAtomics = false; static constexpr bool statelessMocs = true; + static constexpr bool bindingTablePoolBaseAddress = false; }; struct PipelineSelectStateSupport { diff --git a/shared/source/os_interface/hw_info_config.h b/shared/source/os_interface/hw_info_config.h index 507c3803e7..847c991940 100644 --- a/shared/source/os_interface/hw_info_config.h +++ b/shared/source/os_interface/hw_info_config.h @@ -29,6 +29,7 @@ struct FrontEndPropertiesSupport; struct HardwareInfo; struct PipelineSelectArgs; struct PipelineSelectPropertiesSupport; +struct StateBaseAddressPropertiesSupport; struct StateComputeModeProperties; struct StateComputeModePropertiesSupport; class HwInfoConfig; @@ -163,8 +164,9 @@ class HwInfoConfig { virtual bool getScmPropertyLargeGrfModeSupport() const = 0; virtual bool getScmPropertyDevicePreemptionModeSupport() const = 0; - virtual bool getSbaPropertyGlobalAtomicsSupport() const = 0; - virtual bool getSbaPropertyStatelessMocsSupport() const = 0; + virtual bool getStateBaseAddressPropertyGlobalAtomicsSupport() const = 0; + virtual bool getStateBaseAddressPropertyStatelessMocsSupport() const = 0; + virtual bool getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport() const = 0; virtual bool getPreemptionDbgPropertyPreemptionModeSupport() const = 0; virtual bool getPreemptionDbgPropertyStateSipSupport() const = 0; @@ -177,6 +179,7 @@ class HwInfoConfig { virtual void fillScmPropertiesSupportStructure(StateComputeModePropertiesSupport &propertiesSupport) = 0; virtual void fillFrontEndPropertiesSupportStructure(FrontEndPropertiesSupport &propertiesSupport, const HardwareInfo &hwInfo) = 0; virtual void fillPipelineSelectPropertiesSupportStructure(PipelineSelectPropertiesSupport &propertiesSupport, const HardwareInfo &hwInfo) = 0; + virtual void fillStateBaseAddressPropertiesSupportStructure(StateBaseAddressPropertiesSupport &propertiesSupport, const HardwareInfo &hwInfo) = 0; MOCKABLE_VIRTUAL ~HwInfoConfig() = default; @@ -301,8 +304,9 @@ class HwInfoConfigHw : public HwInfoConfig { bool getScmPropertyLargeGrfModeSupport() const override; bool getScmPropertyDevicePreemptionModeSupport() const override; - bool getSbaPropertyGlobalAtomicsSupport() const override; - bool getSbaPropertyStatelessMocsSupport() const override; + bool getStateBaseAddressPropertyGlobalAtomicsSupport() const override; + bool getStateBaseAddressPropertyStatelessMocsSupport() const override; + bool getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport() const override; bool getPreemptionDbgPropertyPreemptionModeSupport() const override; bool getPreemptionDbgPropertyStateSipSupport() const override; @@ -314,6 +318,8 @@ class HwInfoConfigHw : public HwInfoConfig { void fillScmPropertiesSupportStructure(StateComputeModePropertiesSupport &propertiesSupport) override; void fillFrontEndPropertiesSupportStructure(FrontEndPropertiesSupport &propertiesSupport, const HardwareInfo &hwInfo) override; + void fillPipelineSelectPropertiesSupportStructure(PipelineSelectPropertiesSupport &propertiesSupport, const HardwareInfo &hwInfo) override; + void fillStateBaseAddressPropertiesSupportStructure(StateBaseAddressPropertiesSupport &propertiesSupport, const HardwareInfo &hwInfo) override; protected: HwInfoConfigHw() = default; @@ -325,7 +331,6 @@ class HwInfoConfigHw : public HwInfoConfig { bool getHostMemCapabilitiesSupported(const HardwareInfo *hwInfo); LocalMemoryAccessMode getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo) const override; void fillScmPropertiesSupportStructureBase(StateComputeModePropertiesSupport &propertiesSupport) override; - void fillPipelineSelectPropertiesSupportStructure(PipelineSelectPropertiesSupport &propertiesSupport, const HardwareInfo &hwInfo) override; }; template diff --git a/shared/source/os_interface/hw_info_config.inl b/shared/source/os_interface/hw_info_config.inl index c3a16cda86..c4b5acea4c 100644 --- a/shared/source/os_interface/hw_info_config.inl +++ b/shared/source/os_interface/hw_info_config.inl @@ -568,17 +568,30 @@ bool HwInfoConfigHw::getScmPropertyDevicePreemptionModeSupport() con } template -bool HwInfoConfigHw::getSbaPropertyGlobalAtomicsSupport() const { +bool HwInfoConfigHw::getStateBaseAddressPropertyGlobalAtomicsSupport() const { using GfxProduct = typename HwMapper::GfxProduct; return GfxProduct::StateBaseAddressStateSupport::globalAtomics; } template -bool HwInfoConfigHw::getSbaPropertyStatelessMocsSupport() const { +bool HwInfoConfigHw::getStateBaseAddressPropertyStatelessMocsSupport() const { using GfxProduct = typename HwMapper::GfxProduct; return GfxProduct::StateBaseAddressStateSupport::statelessMocs; } +template +bool HwInfoConfigHw::getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport() const { + using GfxProduct = typename HwMapper::GfxProduct; + return GfxProduct::StateBaseAddressStateSupport::bindingTablePoolBaseAddress; +} + +template +void HwInfoConfigHw::fillStateBaseAddressPropertiesSupportStructure(StateBaseAddressPropertiesSupport &propertiesSupport, const HardwareInfo &hwInfo) { + propertiesSupport.globalAtomics = getStateBaseAddressPropertyGlobalAtomicsSupport(); + propertiesSupport.statelessMocs = getStateBaseAddressPropertyStatelessMocsSupport(); + propertiesSupport.bindingTablePoolBaseAddress = getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport(); +} + template bool HwInfoConfigHw::getPreemptionDbgPropertyPreemptionModeSupport() const { using GfxProduct = typename HwMapper::GfxProduct; diff --git a/shared/source/xe_hp_core/hw_cmds_base.h b/shared/source/xe_hp_core/hw_cmds_base.h index 5192c75ad4..ec3b65ad3d 100644 --- a/shared/source/xe_hp_core/hw_cmds_base.h +++ b/shared/source/xe_hp_core/hw_cmds_base.h @@ -55,6 +55,7 @@ struct XeHpCore { struct StateBaseAddressStateSupport { static constexpr bool globalAtomics = true; static constexpr bool statelessMocs = true; + static constexpr bool bindingTablePoolBaseAddress = true; }; struct PipelineSelectStateSupport { diff --git a/shared/source/xe_hpc_core/hw_cmds_pvc.h b/shared/source/xe_hpc_core/hw_cmds_pvc.h index 20c74ab367..70fe657a53 100644 --- a/shared/source/xe_hpc_core/hw_cmds_pvc.h +++ b/shared/source/xe_hpc_core/hw_cmds_pvc.h @@ -46,23 +46,6 @@ struct PVC : public XeHpcCoreFamily { static constexpr bool devicePreemptionMode = false; }; - struct StateBaseAddressStateSupport { - static constexpr bool globalAtomics = false; - static constexpr bool statelessMocs = true; - }; - - struct PipelineSelectStateSupport { - static constexpr bool modeSelected = true; - static constexpr bool mediaSamplerDopClockGate = false; - static constexpr bool systolicMode = true; - }; - - struct PreemptionDebugSupport { - static constexpr bool preemptionMode = true; - static constexpr bool stateSip = true; - static constexpr bool csrSurface = false; - }; - static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig); static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo); static void setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable); diff --git a/shared/source/xe_hpc_core/hw_cmds_xe_hpc_core_base.h b/shared/source/xe_hpc_core/hw_cmds_xe_hpc_core_base.h index 66db7548b7..32fb112064 100644 --- a/shared/source/xe_hpc_core/hw_cmds_xe_hpc_core_base.h +++ b/shared/source/xe_hpc_core/hw_cmds_xe_hpc_core_base.h @@ -34,6 +34,24 @@ struct XeHpcCore { static constexpr bool isUsingMiMemFence = true; static constexpr bool isUsingMiSetPredicate = true; + struct StateBaseAddressStateSupport { + static constexpr bool globalAtomics = false; + static constexpr bool statelessMocs = true; + static constexpr bool bindingTablePoolBaseAddress = true; + }; + + struct PipelineSelectStateSupport { + static constexpr bool modeSelected = true; + static constexpr bool mediaSamplerDopClockGate = false; + static constexpr bool systolicMode = true; + }; + + struct PreemptionDebugSupport { + static constexpr bool preemptionMode = true; + static constexpr bool stateSip = true; + static constexpr bool csrSurface = false; + }; + struct DataPortBindlessSurfaceExtendedMessageDescriptor { union { struct { diff --git a/shared/source/xe_hpg_core/hw_cmds_xe_hpg_core_base.h b/shared/source/xe_hpg_core/hw_cmds_xe_hpg_core_base.h index 0e1eebef2a..cdfa96aae7 100644 --- a/shared/source/xe_hpg_core/hw_cmds_xe_hpg_core_base.h +++ b/shared/source/xe_hpg_core/hw_cmds_xe_hpg_core_base.h @@ -55,6 +55,7 @@ struct XeHpgCore { struct StateBaseAddressStateSupport { static constexpr bool globalAtomics = false; static constexpr bool statelessMocs = true; + static constexpr bool bindingTablePoolBaseAddress = true; }; struct PipelineSelectStateSupport { diff --git a/shared/test/common/mocks/mock_hw_info_config.cpp b/shared/test/common/mocks/mock_hw_info_config.cpp index fa3276182b..d3a0a3cd16 100644 --- a/shared/test/common/mocks/mock_hw_info_config.cpp +++ b/shared/test/common/mocks/mock_hw_info_config.cpp @@ -422,6 +422,7 @@ struct UnknownProduct { struct StateBaseAddressStateSupport { static constexpr bool globalAtomics = false; static constexpr bool statelessMocs = false; + static constexpr bool bindingTablePoolBaseAddress = false; }; struct PipelineSelectStateSupport { diff --git a/shared/test/unit_test/command_stream/stream_properties_tests_common.cpp b/shared/test/unit_test/command_stream/stream_properties_tests_common.cpp index a43b07bac4..3e63ff9efe 100644 --- a/shared/test/unit_test/command_stream/stream_properties_tests_common.cpp +++ b/shared/test/unit_test/command_stream/stream_properties_tests_common.cpp @@ -27,6 +27,11 @@ struct MockPipelineSelectProperties : public PipelineSelectProperties { using PipelineSelectProperties::propertiesSupportLoaded; }; +struct MockStateBaseAddressProperties : public StateBaseAddressProperties { + using StateBaseAddressProperties::propertiesSupportLoaded; + using StateBaseAddressProperties::stateBaseAddressPropertiesSupport; +}; + TEST(StreamPropertiesTests, whenPropertyValueIsChangedThenProperStateIsSet) { NEO::StreamProperty streamProperty; @@ -335,3 +340,181 @@ TEST(StreamPropertiesTests, givenModeSelectPipelineSelectPropertyNotSupportedWhe // expect clean as changed modeSelected is not supported EXPECT_FALSE(pipeProperties.isDirty()); } + +TEST(StreamPropertiesTests, givenStateBaseAddressSupportFlagStateWhenSettingPropertyAndCheckIfDirtyThenExpectCleanStateForNotSupportedAndDirtyForSupported) { + MockStateBaseAddressProperties sbaProperties{}; + sbaProperties.propertiesSupportLoaded = true; + sbaProperties.stateBaseAddressPropertiesSupport.globalAtomics = false; + sbaProperties.stateBaseAddressPropertiesSupport.statelessMocs = false; + sbaProperties.stateBaseAddressPropertiesSupport.bindingTablePoolBaseAddress = false; + + sbaProperties.setProperties(true, 1, 1, -1, -1, -1, -1, -1, -1, *defaultHwInfo); + EXPECT_FALSE(sbaProperties.isDirty()); + + EXPECT_EQ(-1, sbaProperties.globalAtomics.value); + EXPECT_EQ(-1, sbaProperties.statelessMocs.value); + EXPECT_EQ(-1, sbaProperties.bindingTablePoolBaseAddress.value); + + sbaProperties.stateBaseAddressPropertiesSupport.globalAtomics = true; + sbaProperties.setProperties(true, 1, 0, -1, -1, -1, -1, -1, -1, *defaultHwInfo); + EXPECT_TRUE(sbaProperties.isDirty()); + EXPECT_TRUE(sbaProperties.globalAtomics.isDirty); + EXPECT_FALSE(sbaProperties.statelessMocs.isDirty); + EXPECT_FALSE(sbaProperties.bindingTablePoolBaseAddress.isDirty); + + EXPECT_EQ(1, sbaProperties.globalAtomics.value); + EXPECT_EQ(-1, sbaProperties.statelessMocs.value); + EXPECT_EQ(-1, sbaProperties.bindingTablePoolBaseAddress.value); + + sbaProperties.stateBaseAddressPropertiesSupport.globalAtomics = false; + sbaProperties.stateBaseAddressPropertiesSupport.statelessMocs = true; + sbaProperties.setProperties(false, 1, 1, -1, -1, -1, -1, -1, -1, *defaultHwInfo); + EXPECT_TRUE(sbaProperties.isDirty()); + EXPECT_FALSE(sbaProperties.globalAtomics.isDirty); + EXPECT_TRUE(sbaProperties.statelessMocs.isDirty); + EXPECT_FALSE(sbaProperties.bindingTablePoolBaseAddress.isDirty); + + EXPECT_EQ(1, sbaProperties.globalAtomics.value); + EXPECT_EQ(1, sbaProperties.statelessMocs.value); + EXPECT_EQ(-1, sbaProperties.bindingTablePoolBaseAddress.value); + + sbaProperties.stateBaseAddressPropertiesSupport.statelessMocs = false; + sbaProperties.stateBaseAddressPropertiesSupport.bindingTablePoolBaseAddress = true; + sbaProperties.setProperties(true, 2, 2, -1, -1, -1, -1, -1, -1, *defaultHwInfo); + EXPECT_TRUE(sbaProperties.isDirty()); + EXPECT_FALSE(sbaProperties.globalAtomics.isDirty); + EXPECT_FALSE(sbaProperties.statelessMocs.isDirty); + EXPECT_TRUE(sbaProperties.bindingTablePoolBaseAddress.isDirty); + + EXPECT_EQ(1, sbaProperties.globalAtomics.value); + EXPECT_EQ(1, sbaProperties.statelessMocs.value); + EXPECT_EQ(2, sbaProperties.bindingTablePoolBaseAddress.value); + + sbaProperties.stateBaseAddressPropertiesSupport.globalAtomics = true; + sbaProperties.stateBaseAddressPropertiesSupport.statelessMocs = true; + sbaProperties.setProperties(true, 1, 2, -1, -1, -1, -1, -1, -1, *defaultHwInfo); + EXPECT_FALSE(sbaProperties.isDirty()); + + sbaProperties.setProperties(false, 0, 3, -1, -1, -1, -1, -1, -1, *defaultHwInfo); + EXPECT_TRUE(sbaProperties.isDirty()); + + EXPECT_EQ(0, sbaProperties.globalAtomics.value); + EXPECT_EQ(0, sbaProperties.statelessMocs.value); + EXPECT_EQ(3, sbaProperties.bindingTablePoolBaseAddress.value); + + MockStateBaseAddressProperties copySbaProperties{}; + + copySbaProperties.setProperties(sbaProperties); + EXPECT_TRUE(copySbaProperties.isDirty()); + + EXPECT_EQ(0, copySbaProperties.globalAtomics.value); + EXPECT_EQ(0, copySbaProperties.statelessMocs.value); + EXPECT_EQ(3, copySbaProperties.bindingTablePoolBaseAddress.value); + + sbaProperties.setProperties(copySbaProperties); + EXPECT_FALSE(sbaProperties.isDirty()); +} + +TEST(StreamPropertiesTests, givenStateBaseAddressSupportFlagDefaultValueWhenSettingPropertyAndCheckIfDirtyThenExpectValueSetForSupportedAndCleanForNotSupported) { + StateBaseAddressPropertiesSupport sbaPropertiesSupport = {}; + auto hwInfoConfig = HwInfoConfig::get(defaultHwInfo->platform.eProductFamily); + hwInfoConfig->fillStateBaseAddressPropertiesSupportStructure(sbaPropertiesSupport, *defaultHwInfo); + + StateBaseAddressProperties sbaProperties{}; + + sbaProperties.setProperties(true, 2, 3, -1, -1, -1, -1, -1, -1, *defaultHwInfo); + if (sbaPropertiesSupport.globalAtomics) { + EXPECT_EQ(1, sbaProperties.globalAtomics.value); + } else { + EXPECT_EQ(-1, sbaProperties.globalAtomics.value); + } + + if (sbaPropertiesSupport.statelessMocs) { + EXPECT_EQ(2, sbaProperties.statelessMocs.value); + } else { + EXPECT_EQ(-1, sbaProperties.statelessMocs.value); + } + + if (sbaPropertiesSupport.bindingTablePoolBaseAddress) { + EXPECT_EQ(3, sbaProperties.bindingTablePoolBaseAddress.value); + } else { + EXPECT_EQ(-1, sbaProperties.bindingTablePoolBaseAddress.value); + } +} + +TEST(StreamPropertiesTests, givenStateBaseAddressCommonBaseAddressAndSizeWhenSettingAddressSizePropertiesThenExpectCorrectDirtyFlagAndStateValue) { + MockStateBaseAddressProperties sbaProperties{}; + sbaProperties.propertiesSupportLoaded = true; + sbaProperties.stateBaseAddressPropertiesSupport.globalAtomics = false; + sbaProperties.stateBaseAddressPropertiesSupport.statelessMocs = false; + sbaProperties.stateBaseAddressPropertiesSupport.bindingTablePoolBaseAddress = false; + + sbaProperties.setProperties(false, -1, -1, 10, -1, -1, -1, -1, -1, *defaultHwInfo); + EXPECT_TRUE(sbaProperties.isDirty()); + EXPECT_EQ(10, sbaProperties.surfaceStateBaseAddress.value); + + EXPECT_TRUE(sbaProperties.surfaceStateBaseAddress.isDirty); + EXPECT_FALSE(sbaProperties.surfaceStateSize.isDirty); + EXPECT_FALSE(sbaProperties.dynamicStateBaseAddress.isDirty); + EXPECT_FALSE(sbaProperties.dynamicStateSize.isDirty); + EXPECT_FALSE(sbaProperties.indirectObjectBaseAddress.isDirty); + EXPECT_FALSE(sbaProperties.indirectObjectSize.isDirty); + + sbaProperties.setProperties(false, -1, -1, 10, 20, -1, -1, -1, -1, *defaultHwInfo); + EXPECT_TRUE(sbaProperties.isDirty()); + EXPECT_EQ(20u, sbaProperties.surfaceStateSize.value); + + EXPECT_FALSE(sbaProperties.surfaceStateBaseAddress.isDirty); + EXPECT_TRUE(sbaProperties.surfaceStateSize.isDirty); + EXPECT_FALSE(sbaProperties.dynamicStateBaseAddress.isDirty); + EXPECT_FALSE(sbaProperties.dynamicStateSize.isDirty); + EXPECT_FALSE(sbaProperties.indirectObjectBaseAddress.isDirty); + EXPECT_FALSE(sbaProperties.indirectObjectSize.isDirty); + + sbaProperties.setProperties(false, -1, -1, 10, 20, 30, -1, -1, -1, *defaultHwInfo); + EXPECT_TRUE(sbaProperties.isDirty()); + EXPECT_EQ(30, sbaProperties.dynamicStateBaseAddress.value); + + EXPECT_FALSE(sbaProperties.surfaceStateBaseAddress.isDirty); + EXPECT_FALSE(sbaProperties.surfaceStateSize.isDirty); + EXPECT_TRUE(sbaProperties.dynamicStateBaseAddress.isDirty); + EXPECT_FALSE(sbaProperties.dynamicStateSize.isDirty); + EXPECT_FALSE(sbaProperties.indirectObjectBaseAddress.isDirty); + EXPECT_FALSE(sbaProperties.indirectObjectSize.isDirty); + + sbaProperties.setProperties(false, -1, -1, 10, 20, 30, 40, -1, -1, *defaultHwInfo); + EXPECT_TRUE(sbaProperties.isDirty()); + EXPECT_EQ(40u, sbaProperties.dynamicStateSize.value); + + EXPECT_FALSE(sbaProperties.surfaceStateBaseAddress.isDirty); + EXPECT_FALSE(sbaProperties.surfaceStateSize.isDirty); + EXPECT_FALSE(sbaProperties.dynamicStateBaseAddress.isDirty); + EXPECT_TRUE(sbaProperties.dynamicStateSize.isDirty); + EXPECT_FALSE(sbaProperties.indirectObjectBaseAddress.isDirty); + EXPECT_FALSE(sbaProperties.indirectObjectSize.isDirty); + + sbaProperties.setProperties(false, -1, -1, 10, 20, 30, 40, 50, -1, *defaultHwInfo); + EXPECT_TRUE(sbaProperties.isDirty()); + EXPECT_EQ(50, sbaProperties.indirectObjectBaseAddress.value); + + EXPECT_FALSE(sbaProperties.surfaceStateBaseAddress.isDirty); + EXPECT_FALSE(sbaProperties.surfaceStateSize.isDirty); + EXPECT_FALSE(sbaProperties.dynamicStateBaseAddress.isDirty); + EXPECT_FALSE(sbaProperties.dynamicStateSize.isDirty); + EXPECT_TRUE(sbaProperties.indirectObjectBaseAddress.isDirty); + EXPECT_FALSE(sbaProperties.indirectObjectSize.isDirty); + + sbaProperties.setProperties(false, -1, -1, 10, 20, 30, 40, 50, 60, *defaultHwInfo); + EXPECT_TRUE(sbaProperties.isDirty()); + EXPECT_EQ(60u, sbaProperties.indirectObjectSize.value); + + EXPECT_FALSE(sbaProperties.surfaceStateBaseAddress.isDirty); + EXPECT_FALSE(sbaProperties.surfaceStateSize.isDirty); + EXPECT_FALSE(sbaProperties.dynamicStateBaseAddress.isDirty); + EXPECT_FALSE(sbaProperties.dynamicStateSize.isDirty); + EXPECT_FALSE(sbaProperties.indirectObjectBaseAddress.isDirty); + EXPECT_TRUE(sbaProperties.indirectObjectSize.isDirty); + + sbaProperties.setProperties(false, -1, -1, 10, 20, 30, 40, 50, 60, *defaultHwInfo); + EXPECT_FALSE(sbaProperties.isDirty()); +} diff --git a/shared/test/unit_test/command_stream/stream_properties_tests_common.h b/shared/test/unit_test/command_stream/stream_properties_tests_common.h index 5539a6a307..0abd170b9b 100644 --- a/shared/test/unit_test/command_stream/stream_properties_tests_common.h +++ b/shared/test/unit_test/command_stream/stream_properties_tests_common.h @@ -7,6 +7,7 @@ #pragma once +#include #include namespace NEO { @@ -14,7 +15,11 @@ namespace NEO { struct FrontEndProperties; struct PipelineSelectProperties; struct StateComputeModeProperties; -struct StreamProperty; + +template +struct StreamPropertyType; + +using StreamProperty = StreamPropertyType; std::vector getAllStateComputeModeProperties(StateComputeModeProperties &properties); std::vector getAllFrontEndProperties(FrontEndProperties &properties); diff --git a/shared/test/unit_test/gen11/ehl/test_hw_info_config_ehl.cpp b/shared/test/unit_test/gen11/ehl/test_hw_info_config_ehl.cpp index 946b0e67de..6fe621f467 100644 --- a/shared/test/unit_test/gen11/ehl/test_hw_info_config_ehl.cpp +++ b/shared/test/unit_test/gen11/ehl/test_hw_info_config_ehl.cpp @@ -85,8 +85,9 @@ EHLTEST_F(EhlHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThen EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfModeSupport()); EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionModeSupport()); - EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); - EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport()); EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); diff --git a/shared/test/unit_test/gen11/icllp/test_hw_info_config_icllp.cpp b/shared/test/unit_test/gen11/icllp/test_hw_info_config_icllp.cpp index 0ed4e0b49d..6d8dfeb8a4 100644 --- a/shared/test/unit_test/gen11/icllp/test_hw_info_config_icllp.cpp +++ b/shared/test/unit_test/gen11/icllp/test_hw_info_config_icllp.cpp @@ -118,8 +118,9 @@ ICLLPTEST_F(IcllpHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupport EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfModeSupport()); EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionModeSupport()); - EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); - EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport()); EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); diff --git a/shared/test/unit_test/gen11/lkf/test_hw_info_config_lkf.cpp b/shared/test/unit_test/gen11/lkf/test_hw_info_config_lkf.cpp index 2a9dea213f..81bbf870ae 100644 --- a/shared/test/unit_test/gen11/lkf/test_hw_info_config_lkf.cpp +++ b/shared/test/unit_test/gen11/lkf/test_hw_info_config_lkf.cpp @@ -104,8 +104,9 @@ LKFTEST_F(LkfHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThen EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfModeSupport()); EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionModeSupport()); - EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); - EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport()); EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); diff --git a/shared/test/unit_test/gen12lp/adln/test_hw_info_config_adln.cpp b/shared/test/unit_test/gen12lp/adln/test_hw_info_config_adln.cpp index 8fef0f5ba1..45595cda62 100644 --- a/shared/test/unit_test/gen12lp/adln/test_hw_info_config_adln.cpp +++ b/shared/test/unit_test/gen12lp/adln/test_hw_info_config_adln.cpp @@ -94,8 +94,9 @@ ADLNTEST_F(AdlnHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportTh EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfModeSupport()); EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionModeSupport()); - EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); - EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport()); EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); diff --git a/shared/test/unit_test/gen12lp/adlp/test_hw_info_config_adlp.cpp b/shared/test/unit_test/gen12lp/adlp/test_hw_info_config_adlp.cpp index 427d20931d..779c7face7 100644 --- a/shared/test/unit_test/gen12lp/adlp/test_hw_info_config_adlp.cpp +++ b/shared/test/unit_test/gen12lp/adlp/test_hw_info_config_adlp.cpp @@ -99,8 +99,9 @@ ADLPTEST_F(AdlpHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportTh EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfModeSupport()); EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionModeSupport()); - EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); - EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport()); EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); diff --git a/shared/test/unit_test/gen12lp/adls/test_hw_info_config_adls.cpp b/shared/test/unit_test/gen12lp/adls/test_hw_info_config_adls.cpp index 671f16245f..0f09d599d9 100644 --- a/shared/test/unit_test/gen12lp/adls/test_hw_info_config_adls.cpp +++ b/shared/test/unit_test/gen12lp/adls/test_hw_info_config_adls.cpp @@ -93,8 +93,9 @@ ADLSTEST_F(AdlsHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportTh EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfModeSupport()); EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionModeSupport()); - EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); - EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport()); EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); diff --git a/shared/test/unit_test/gen12lp/dg1/test_hw_info_config_dg1.cpp b/shared/test/unit_test/gen12lp/dg1/test_hw_info_config_dg1.cpp index 3364e28958..ec0143a238 100644 --- a/shared/test/unit_test/gen12lp/dg1/test_hw_info_config_dg1.cpp +++ b/shared/test/unit_test/gen12lp/dg1/test_hw_info_config_dg1.cpp @@ -160,8 +160,9 @@ DG1TEST_F(Dg1HwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThen EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfModeSupport()); EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionModeSupport()); - EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); - EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport()); EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); diff --git a/shared/test/unit_test/gen12lp/rkl/test_hw_info_config_rkl.cpp b/shared/test/unit_test/gen12lp/rkl/test_hw_info_config_rkl.cpp index 0cade9b27b..2c1f24d1bf 100644 --- a/shared/test/unit_test/gen12lp/rkl/test_hw_info_config_rkl.cpp +++ b/shared/test/unit_test/gen12lp/rkl/test_hw_info_config_rkl.cpp @@ -99,8 +99,9 @@ RKLTEST_F(RklHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThen EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfModeSupport()); EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionModeSupport()); - EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); - EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport()); EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); diff --git a/shared/test/unit_test/gen12lp/tgllp/hw_info_config_tests_tgllp.cpp b/shared/test/unit_test/gen12lp/tgllp/hw_info_config_tests_tgllp.cpp index 8a4fcee789..7a3255314e 100644 --- a/shared/test/unit_test/gen12lp/tgllp/hw_info_config_tests_tgllp.cpp +++ b/shared/test/unit_test/gen12lp/tgllp/hw_info_config_tests_tgllp.cpp @@ -48,8 +48,9 @@ TGLLPTEST_F(HwInfoConfigTestTgllp, givenHwInfoConfigWhenGetCommandsStreamPropert EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfModeSupport()); EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionModeSupport()); - EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); - EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport()); EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); diff --git a/shared/test/unit_test/gen8/bdw/test_hw_info_config_bdw.cpp b/shared/test/unit_test/gen8/bdw/test_hw_info_config_bdw.cpp index 3bdb0a53f3..dc1f97c99d 100644 --- a/shared/test/unit_test/gen8/bdw/test_hw_info_config_bdw.cpp +++ b/shared/test/unit_test/gen8/bdw/test_hw_info_config_bdw.cpp @@ -113,8 +113,9 @@ BDWTEST_F(BdwHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThen EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfModeSupport()); EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionModeSupport()); - EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); - EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport()); EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); diff --git a/shared/test/unit_test/gen9/bxt/test_hw_info_config_bxt.cpp b/shared/test/unit_test/gen9/bxt/test_hw_info_config_bxt.cpp index ea130a07a9..e8a9a2b09f 100644 --- a/shared/test/unit_test/gen9/bxt/test_hw_info_config_bxt.cpp +++ b/shared/test/unit_test/gen9/bxt/test_hw_info_config_bxt.cpp @@ -107,8 +107,9 @@ BXTTEST_F(BxtHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThen EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfModeSupport()); EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionModeSupport()); - EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); - EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport()); EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); diff --git a/shared/test/unit_test/gen9/cfl/test_hw_info_config_cfl.cpp b/shared/test/unit_test/gen9/cfl/test_hw_info_config_cfl.cpp index e23306707a..0f8a26dee2 100644 --- a/shared/test/unit_test/gen9/cfl/test_hw_info_config_cfl.cpp +++ b/shared/test/unit_test/gen9/cfl/test_hw_info_config_cfl.cpp @@ -122,8 +122,9 @@ CFLTEST_F(CflHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThen EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfModeSupport()); EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionModeSupport()); - EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); - EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport()); EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); diff --git a/shared/test/unit_test/gen9/glk/test_hw_info_config_glk.cpp b/shared/test/unit_test/gen9/glk/test_hw_info_config_glk.cpp index c0e55dab27..e7ee10e527 100644 --- a/shared/test/unit_test/gen9/glk/test_hw_info_config_glk.cpp +++ b/shared/test/unit_test/gen9/glk/test_hw_info_config_glk.cpp @@ -107,8 +107,9 @@ GLKTEST_F(GlkHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThen EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfModeSupport()); EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionModeSupport()); - EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); - EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport()); EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); diff --git a/shared/test/unit_test/gen9/kbl/test_hw_info_config_kbl.cpp b/shared/test/unit_test/gen9/kbl/test_hw_info_config_kbl.cpp index 3db16d073f..5ab04a222d 100644 --- a/shared/test/unit_test/gen9/kbl/test_hw_info_config_kbl.cpp +++ b/shared/test/unit_test/gen9/kbl/test_hw_info_config_kbl.cpp @@ -127,8 +127,9 @@ KBLTEST_F(KblHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThen EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfModeSupport()); EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionModeSupport()); - EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); - EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport()); EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); diff --git a/shared/test/unit_test/gen9/skl/test_hw_info_config_skl.cpp b/shared/test/unit_test/gen9/skl/test_hw_info_config_skl.cpp index 2a5c7789cf..e69967bbd8 100644 --- a/shared/test/unit_test/gen9/skl/test_hw_info_config_skl.cpp +++ b/shared/test/unit_test/gen9/skl/test_hw_info_config_skl.cpp @@ -128,8 +128,9 @@ SKLTEST_F(SklHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThen EXPECT_FALSE(hwInfoConfig.getScmPropertyLargeGrfModeSupport()); EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionModeSupport()); - EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); - EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport()); EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); EXPECT_FALSE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); diff --git a/shared/test/unit_test/os_interface/hw_info_config_tests.cpp b/shared/test/unit_test/os_interface/hw_info_config_tests.cpp index e2ab7ec978..03ec3ac399 100644 --- a/shared/test/unit_test/os_interface/hw_info_config_tests.cpp +++ b/shared/test/unit_test/os_interface/hw_info_config_tests.cpp @@ -547,3 +547,14 @@ HWTEST_F(HwInfoConfigTest, WhenFillingPipelineSelectPropertiesSupportThenExpectU EXPECT_EQ(hwInfoConfig->getPipelineSelectPropertyMediaSamplerDopClockGateSupport(), pipelineSelectPropertiesSupport.mediaSamplerDopClockGate); EXPECT_EQ(hwInfoConfig->isSystolicModeConfigurable(pInHwInfo), pipelineSelectPropertiesSupport.systolicMode); } + +HWTEST_F(HwInfoConfigTest, WhenFillingStateBaseAddressPropertiesSupportThenExpectUseCorrectGetters) { + StateBaseAddressPropertiesSupport stateBaseAddressPropertiesSupport = {}; + + auto hwInfoConfig = HwInfoConfig::get(pInHwInfo.platform.eProductFamily); + + hwInfoConfig->fillStateBaseAddressPropertiesSupportStructure(stateBaseAddressPropertiesSupport, pInHwInfo); + EXPECT_EQ(hwInfoConfig->getStateBaseAddressPropertyGlobalAtomicsSupport(), stateBaseAddressPropertiesSupport.globalAtomics); + EXPECT_EQ(hwInfoConfig->getStateBaseAddressPropertyStatelessMocsSupport(), stateBaseAddressPropertiesSupport.statelessMocs); + EXPECT_EQ(hwInfoConfig->getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport(), stateBaseAddressPropertiesSupport.bindingTablePoolBaseAddress); +} diff --git a/shared/test/unit_test/xe_hp_core/xe_hp_sdv/hw_info_config_tests_xe_hp_sdv.cpp b/shared/test/unit_test/xe_hp_core/xe_hp_sdv/hw_info_config_tests_xe_hp_sdv.cpp index 51dcfc57f0..143b1fb517 100644 --- a/shared/test/unit_test/xe_hp_core/xe_hp_sdv/hw_info_config_tests_xe_hp_sdv.cpp +++ b/shared/test/unit_test/xe_hp_core/xe_hp_sdv/hw_info_config_tests_xe_hp_sdv.cpp @@ -41,8 +41,9 @@ XEHPTEST_F(HwInfoConfigTestXeHpSdv, givenHwInfoConfigWhenGetCommandsStreamProper EXPECT_TRUE(hwInfoConfig.getScmPropertyLargeGrfModeSupport()); EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionModeSupport()); - EXPECT_TRUE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); - EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyStatelessMocsSupport()); + EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport()); EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); diff --git a/shared/test/unit_test/xe_hpc_core/pvc/test_hw_info_config_pvc.cpp b/shared/test/unit_test/xe_hpc_core/pvc/test_hw_info_config_pvc.cpp index 20ec41e708..80e703c838 100644 --- a/shared/test/unit_test/xe_hpc_core/pvc/test_hw_info_config_pvc.cpp +++ b/shared/test/unit_test/xe_hpc_core/pvc/test_hw_info_config_pvc.cpp @@ -114,8 +114,9 @@ PVCTEST_F(PvcHwInfoConfig, givenHwInfoConfigWhenGetCommandsStreamPropertiesSuppo EXPECT_TRUE(hwInfoConfig.getScmPropertyLargeGrfModeSupport()); EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionModeSupport()); - EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); - EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyStatelessMocsSupport()); + EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport()); EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport()); diff --git a/shared/test/unit_test/xe_hpg_core/dg2/test_hw_info_config_dg2.cpp b/shared/test/unit_test/xe_hpg_core/dg2/test_hw_info_config_dg2.cpp index 63135b8097..dbe2de2c10 100644 --- a/shared/test/unit_test/xe_hpg_core/dg2/test_hw_info_config_dg2.cpp +++ b/shared/test/unit_test/xe_hpg_core/dg2/test_hw_info_config_dg2.cpp @@ -82,8 +82,9 @@ DG2TEST_F(TestDg2HwInfoConfig, givenHwInfoConfigWhenGetCommandsStreamPropertiesS EXPECT_TRUE(hwInfoConfig.getScmPropertyLargeGrfModeSupport()); EXPECT_FALSE(hwInfoConfig.getScmPropertyDevicePreemptionModeSupport()); - EXPECT_FALSE(hwInfoConfig.getSbaPropertyGlobalAtomicsSupport()); - EXPECT_TRUE(hwInfoConfig.getSbaPropertyStatelessMocsSupport()); + EXPECT_FALSE(hwInfoConfig.getStateBaseAddressPropertyGlobalAtomicsSupport()); + EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyStatelessMocsSupport()); + EXPECT_TRUE(hwInfoConfig.getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport()); EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyScratchSizeSupport()); EXPECT_TRUE(hwInfoConfig.getFrontEndPropertyPrivateScratchSizeSupport());