Refactor: dont use global getters for Product/GfxCore helper in engine helpers

Related-To: NEO-6853
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-12-20 11:23:46 +00:00
committed by Compute-Runtime-Automation
parent 4a87266be1
commit c8b55e38a0
21 changed files with 172 additions and 150 deletions

View File

@@ -269,7 +269,7 @@ CommandStreamReceiver &CommandQueue::selectCsrForBuiltinOperation(const CsrSelec
}
if (preferredBCSType) {
preferredBcsEngineType = EngineHelpers::getBcsEngineType(device->getHardwareInfo(), device->getDeviceBitfield(),
preferredBcsEngineType = EngineHelpers::getBcsEngineType(device->getRootDeviceEnvironment(), device->getDeviceBitfield(),
device->getSelectorCopyEngine(), false);
}
break;
@@ -304,11 +304,10 @@ CommandStreamReceiver &CommandQueue::selectCsrForBuiltinOperation(const CsrSelec
void CommandQueue::constructBcsEngine(bool internalUsage) {
if (bcsAllowed && !bcsInitialized) {
auto &hwInfo = device->getHardwareInfo();
auto &gfxCoreHelper = device->getGfxCoreHelper();
auto &neoDevice = device->getNearestGenericSubDevice(0)->getDevice();
auto &selectorCopyEngine = neoDevice.getSelectorCopyEngine();
auto bcsEngineType = EngineHelpers::getBcsEngineType(hwInfo, device->getDeviceBitfield(), selectorCopyEngine, internalUsage);
auto bcsEngineType = EngineHelpers::getBcsEngineType(device->getRootDeviceEnvironment(), device->getDeviceBitfield(), selectorCopyEngine, internalUsage);
auto bcsIndex = EngineHelpers::getBcsIndex(bcsEngineType);
auto engineUsage = (internalUsage && gfxCoreHelper.preferInternalBcsEngine()) ? EngineUsage::Internal : EngineUsage::Regular;
bcsEngines[bcsIndex] = neoDevice.tryGetEngine(bcsEngineType, engineUsage);

View File

@@ -88,7 +88,7 @@ bool PrintfHandler::printEnqueueOutput() {
if (productHelper.allowStatelessCompression(hwInfo) || productHelper.isBlitCopyRequiredForLocalMemory(hwInfo, *printfSurface)) {
printfOutputDecompressed = std::make_unique<uint8_t[]>(printfOutputSize);
printfOutputBuffer = printfOutputDecompressed.get();
auto &bcsEngine = device.getEngine(EngineHelpers::getBcsEngineType(hwInfo, device.getDeviceBitfield(), device.getSelectorCopyEngine(), true), EngineUsage::Regular);
auto &bcsEngine = device.getEngine(EngineHelpers::getBcsEngineType(device.getRootDeviceEnvironment(), device.getDeviceBitfield(), device.getSelectorCopyEngine(), true), EngineUsage::Regular);
BlitPropertiesContainer blitPropertiesContainer;
blitPropertiesContainer.push_back(