Move SBA related WAs logic from CSR to EncodeWA

Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
Krzysztof Gibala
2022-03-18 11:06:51 +00:00
committed by Compute-Runtime-Automation
parent 52da8f7260
commit ebc006ad53
24 changed files with 117 additions and 54 deletions

View File

@@ -35,14 +35,10 @@ void CommandQueueHw<gfxCoreFamily>::programStateBaseAddress(uint64_t gsba, bool
using STATE_BASE_ADDRESS = typename GfxFamily::STATE_BASE_ADDRESS;
const auto &hwInfo = this->device->getHwInfo();
NEO::PipeControlArgs pcArgs;
pcArgs.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(true, hwInfo);
pcArgs.textureCacheInvalidationEnable = true;
NEO::MemorySynchronizationCommands<GfxFamily>::addPipeControl(commandStream, pcArgs);
NEO::Device *neoDevice = device->getNEODevice();
bool isRcs = this->getCsr()->isRcs();
NEO::EncodeWA<GfxFamily>::addPipeControlBeforeStateBaseAddress(commandStream, hwInfo, isRcs);
NEO::EncodeWA<GfxFamily>::encodeAdditionalPipelineSelect(commandStream, {}, true, hwInfo, isRcs);
auto pSbaCmd = static_cast<STATE_BASE_ADDRESS *>(commandStream.getSpace(sizeof(STATE_BASE_ADDRESS)));

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -28,9 +28,9 @@ void CommandQueueHw<gfxCoreFamily>::programStateBaseAddress(uint64_t gsba, bool
NEO::Device *neoDevice = device->getNEODevice();
auto globalHeapsBase = neoDevice->getBindlessHeapsHelper()->getGlobalHeapsBase();
auto &hwInfo = neoDevice->getHardwareInfo();
NEO::PipeControlArgs args;
args.dcFlushEnable = NEO::MemorySynchronizationCommands<GfxFamily>::getDcFlushEnable(true, hwInfo);
NEO::MemorySynchronizationCommands<GfxFamily>::addPipeControl(commandStream, args);
bool isRcs = this->getCsr()->isRcs();
NEO::EncodeWA<GfxFamily>::addPipeControlBeforeStateBaseAddress(commandStream, hwInfo, isRcs);
auto pSbaCmd = static_cast<STATE_BASE_ADDRESS *>(commandStream.getSpace(sizeof(STATE_BASE_ADDRESS)));
STATE_BASE_ADDRESS sbaCmd;
bool multiOsContextCapable = device->isImplicitScalingCapable();