mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
Revert "Assign BCS at first blit enqueue"
This reverts commit 5f5a1a6f81.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
652ca907b0
commit
e8e3355a93
@@ -77,22 +77,19 @@ CommandQueue::CommandQueue(Context *context, ClDevice *device, const cl_queue_pr
|
||||
|
||||
UNRECOVERABLE_IF(gpgpuEngine->getEngineType() >= aub_stream::EngineType::NUM_ENGINES);
|
||||
|
||||
bcsAllowed = hwInfoConfig->isBlitterFullySupported(hwInfo) &&
|
||||
hwHelper.isSubDeviceEngineSupported(hwInfo, device->getDeviceBitfield(), aub_stream::EngineType::ENGINE_BCS);
|
||||
bool bcsAllowed = hwInfoConfig->isBlitterFullySupported(hwInfo) &&
|
||||
hwHelper.isSubDeviceEngineSupported(hwInfo, device->getDeviceBitfield(), aub_stream::EngineType::ENGINE_BCS);
|
||||
|
||||
if (bcsAllowed || gpgpuEngine->commandStreamReceiver->peekTimestampPacketWriteEnabled()) {
|
||||
timestampPacketContainer = std::make_unique<TimestampPacketContainer>();
|
||||
deferredTimestampPackets = std::make_unique<TimestampPacketContainer>();
|
||||
}
|
||||
|
||||
auto deferCmdQBcsInitialization = true;
|
||||
|
||||
if (DebugManager.flags.DeferCmdQBcsInitialization.get() != -1) {
|
||||
deferCmdQBcsInitialization = DebugManager.flags.DeferCmdQBcsInitialization.get();
|
||||
}
|
||||
|
||||
if (!deferCmdQBcsInitialization) {
|
||||
this->initializeBcsEngine(internalUsage);
|
||||
if (bcsAllowed) {
|
||||
auto &neoDevice = device->getNearestGenericSubDevice(0)->getDevice();
|
||||
auto &selectorCopyEngine = neoDevice.getSelectorCopyEngine();
|
||||
auto bcsEngineType = EngineHelpers::getBcsEngineType(hwInfo, device->getDeviceBitfield(), selectorCopyEngine, internalUsage);
|
||||
bcsEngines[EngineHelpers::getBcsIndex(bcsEngineType)] = neoDevice.tryGetEngine(bcsEngineType, EngineUsage::Regular);
|
||||
bcsEngineTypes.push_back(bcsEngineType);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,8 +134,7 @@ CommandStreamReceiver &CommandQueue::getGpgpuCommandStreamReceiver() const {
|
||||
return *gpgpuEngine->commandStreamReceiver;
|
||||
}
|
||||
|
||||
CommandStreamReceiver *CommandQueue::getBcsCommandStreamReceiver(aub_stream::EngineType bcsEngineType) {
|
||||
initializeBcsEngine(isSpecial());
|
||||
CommandStreamReceiver *CommandQueue::getBcsCommandStreamReceiver(aub_stream::EngineType bcsEngineType) const {
|
||||
const EngineControl *engine = this->bcsEngines[EngineHelpers::getBcsIndex(bcsEngineType)];
|
||||
if (engine == nullptr) {
|
||||
return nullptr;
|
||||
@@ -147,8 +143,7 @@ CommandStreamReceiver *CommandQueue::getBcsCommandStreamReceiver(aub_stream::Eng
|
||||
}
|
||||
}
|
||||
|
||||
CommandStreamReceiver *CommandQueue::getBcsForAuxTranslation() {
|
||||
initializeBcsEngine(isSpecial());
|
||||
CommandStreamReceiver *CommandQueue::getBcsForAuxTranslation() const {
|
||||
for (const EngineControl *engine : this->bcsEngines) {
|
||||
if (engine != nullptr) {
|
||||
return engine->commandStreamReceiver;
|
||||
@@ -157,8 +152,7 @@ CommandStreamReceiver *CommandQueue::getBcsForAuxTranslation() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CommandStreamReceiver &CommandQueue::selectCsrForBuiltinOperation(const CsrSelectionArgs &args) {
|
||||
initializeBcsEngine(isSpecial());
|
||||
CommandStreamReceiver &CommandQueue::selectCsrForBuiltinOperation(const CsrSelectionArgs &args) const {
|
||||
if (isCopyOnly) {
|
||||
return *getBcsCommandStreamReceiver(bcsEngineTypes[0]);
|
||||
}
|
||||
@@ -226,17 +220,6 @@ CommandStreamReceiver &CommandQueue::selectCsrForBuiltinOperation(const CsrSelec
|
||||
return *selectedCsr;
|
||||
}
|
||||
|
||||
void CommandQueue::initializeBcsEngine(bool internalUsage) {
|
||||
if (bcsAllowed && !bcsInitialized) {
|
||||
auto &neoDevice = device->getNearestGenericSubDevice(0)->getDevice();
|
||||
auto &selectorCopyEngine = neoDevice.getSelectorCopyEngine();
|
||||
auto bcsEngineType = EngineHelpers::getBcsEngineType(device->getHardwareInfo(), device->getDeviceBitfield(), selectorCopyEngine, internalUsage);
|
||||
bcsEngines[EngineHelpers::getBcsIndex(bcsEngineType)] = neoDevice.tryGetEngine(bcsEngineType, EngineUsage::Regular);
|
||||
bcsEngineTypes.push_back(bcsEngineType);
|
||||
bcsInitialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
Device &CommandQueue::getDevice() const noexcept {
|
||||
return device->getDevice();
|
||||
}
|
||||
@@ -250,7 +233,7 @@ volatile uint32_t *CommandQueue::getHwTagAddress() const {
|
||||
return getGpgpuCommandStreamReceiver().getTagAddress();
|
||||
}
|
||||
|
||||
bool CommandQueue::isCompleted(uint32_t gpgpuTaskCount, CopyEngineState bcsState) {
|
||||
bool CommandQueue::isCompleted(uint32_t gpgpuTaskCount, CopyEngineState bcsState) const {
|
||||
DEBUG_BREAK_IF(getHwTag() == CompletionStamp::notReady);
|
||||
|
||||
if (getGpgpuCommandStreamReceiver().testTaskCountReady(getHwTagAddress(), gpgpuTaskCount)) {
|
||||
@@ -998,7 +981,6 @@ void CommandQueue::overrideEngine(aub_stream::EngineType engineType, EngineUsage
|
||||
timestampPacketContainer = std::make_unique<TimestampPacketContainer>();
|
||||
deferredTimestampPackets = std::make_unique<TimestampPacketContainer>();
|
||||
isCopyOnly = true;
|
||||
bcsInitialized = true;
|
||||
} else {
|
||||
gpgpuEngine = &device->getEngine(engineType, engineUsage);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user