refactor: don't use global ProductHelper getter 7/n

Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2023-01-23 14:08:25 +00:00
committed by Compute-Runtime-Automation
parent 11764dd9bf
commit 1758f55fe3
19 changed files with 59 additions and 53 deletions

View File

@@ -333,7 +333,7 @@ struct EncodeStoreMMIO {
template <typename GfxFamily>
struct EncodeComputeMode {
static size_t getCmdSizeForComputeMode(const HardwareInfo &hwInfo, bool hasSharedHandles, bool isRcs);
static size_t getCmdSizeForComputeMode(const RootDeviceEnvironment &rootDeviceEnvironment, bool hasSharedHandles, bool isRcs);
static void programComputeModeCommandWithSynchronization(LinearStream &csr, StateComputeModeProperties &properties,
const PipelineSelectArgs &args, bool hasSharedHandles,
const RootDeviceEnvironment &rootDeviceEnvironment, bool isRcs, bool dcFlush, LogicalStateHelper *logicalStateHelper);

View File

@@ -13,9 +13,10 @@
namespace NEO {
template <typename Family>
size_t EncodeComputeMode<Family>::getCmdSizeForComputeMode(const HardwareInfo &hwInfo, bool hasSharedHandles, bool isRcs) {
size_t EncodeComputeMode<Family>::getCmdSizeForComputeMode(const RootDeviceEnvironment &rootDeviceEnvironment, bool hasSharedHandles, bool isRcs) {
size_t size = 0;
auto &productHelper = (*ProductHelper::get(hwInfo.platform.eProductFamily));
auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo();
const auto &[isBasicWARequired, isExtendedWARequired] = productHelper.isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo, isRcs);
std::ignore = isExtendedWARequired;