Reduce usage of global gfx core helper getter [5/n]

Related-To: NEO-6853
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-12-19 12:25:44 +00:00
committed by Compute-Runtime-Automation
parent f50ea2903c
commit 8cf93c23a4
17 changed files with 64 additions and 43 deletions

View File

@@ -9,6 +9,7 @@
#include "shared/source/command_stream/thread_arbitration_policy.h"
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/helpers/hw_helper.h"
#include "shared/source/kernel/grf_config.h"
#include "shared/source/os_interface/hw_info_config.h"
@@ -16,15 +17,15 @@
using namespace NEO;
void StateComputeModeProperties::setProperties(bool requiresCoherency, uint32_t numGrfRequired, int32_t threadArbitrationPolicy, PreemptionMode devicePreemptionMode,
const HardwareInfo &hwInfo) {
const RootDeviceEnvironment &rootDeviceEnvironment) {
if (this->propertiesSupportLoaded == false) {
auto &productHelper = *ProductHelper::get(hwInfo.platform.eProductFamily);
auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
productHelper.fillScmPropertiesSupportStructure(this->scmPropertiesSupport);
this->propertiesSupportLoaded = true;
}
auto &gfxCoreHelper = GfxCoreHelper::get(hwInfo.platform.eRenderCoreFamily);
auto &gfxCoreHelper = rootDeviceEnvironment.getHelper<GfxCoreHelper>();
clearIsDirty();
if (this->scmPropertiesSupport.coherencyRequired) {