Use references instead copy ctors

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2021-11-11 01:35:57 +00:00
committed by Compute-Runtime-Automation
parent edc8f6c1cd
commit f90932cca7
8 changed files with 19 additions and 18 deletions

View File

@@ -56,7 +56,7 @@ size_t CommandStreamReceiverHw<GfxFamily>::getCmdSizeForComputeMode() {
}
size_t size = 0;
auto hwInfo = peekHwInfo();
auto &hwInfo = peekHwInfo();
if (isComputeModeNeeded()) {
auto hwInfoConfig = HwInfoConfig::get(hwInfo.platform.eProductFamily);
if (hwInfoConfig->isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo, isRcs())) {
@@ -168,7 +168,7 @@ void CommandStreamReceiverHw<GfxFamily>::programActivePartitionConfig() {
template <typename GfxFamily>
inline void CommandStreamReceiverHw<GfxFamily>::addPipeControlPriorToNonPipelinedStateCommand(LinearStream &commandStream, PipeControlArgs args) {
auto hwInfo = peekHwInfo();
auto &hwInfo = peekHwInfo();
auto hwInfoConfig = HwInfoConfig::get(hwInfo.platform.eProductFamily);
if (hwInfoConfig->isPipeControlPriorToNonPipelinedStateCommandsWARequired(hwInfo, isRcs())) {
@@ -189,7 +189,7 @@ inline void CommandStreamReceiverHw<GfxFamily>::addPipeControlPriorToNonPipeline
template <typename GfxFamily>
inline void CommandStreamReceiverHw<GfxFamily>::addPipeControlBeforeStateSip(LinearStream &commandStream, Device &device) {
auto hwInfo = peekHwInfo();
auto &hwInfo = peekHwInfo();
HwHelper &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
auto hwInfoConfig = HwInfoConfig::get(hwInfo.platform.eProductFamily);
bool debuggingEnabled = device.getDebugger() != nullptr;

View File

@@ -14,7 +14,7 @@ void PreemptionHelper::programStateSip<GfxFamily>(LinearStream &preambleCmdStrea
using STATE_SIP = typename GfxFamily::STATE_SIP;
using MI_LOAD_REGISTER_IMM = typename GfxFamily::MI_LOAD_REGISTER_IMM;
auto hwInfo = device.getHardwareInfo();
auto &hwInfo = device.getHardwareInfo();
bool debuggingEnabled = device.getDebugger() != nullptr;
if (debuggingEnabled) {
@@ -73,7 +73,7 @@ template <>
size_t PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(Device &device, bool isRcs) {
size_t size = 0;
bool debuggingEnabled = device.getDebugger() != nullptr || device.isDebuggerActive();
auto hwInfo = device.getHardwareInfo();
auto &hwInfo = device.getHardwareInfo();
if (debuggingEnabled) {
HwHelper &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);