mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-06 10:26:29 +08:00
Pass engine type to getBcsCommandStreamReceiver in OpenCL
Related-To: NEO-6057 Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
3b4a5c25da
commit
2707618fe3
@@ -130,8 +130,9 @@ CommandStreamReceiver &CommandQueue::getGpgpuCommandStreamReceiver() const {
|
||||
return *gpgpuEngine->commandStreamReceiver;
|
||||
}
|
||||
|
||||
CommandStreamReceiver *CommandQueue::getBcsCommandStreamReceiver() const {
|
||||
CommandStreamReceiver *CommandQueue::getBcsCommandStreamReceiver(aub_stream::EngineType bcsEngineType) const {
|
||||
if (bcsEngine) {
|
||||
UNRECOVERABLE_IF(bcsEngine->getEngineType() != bcsEngineType);
|
||||
return bcsEngine->commandStreamReceiver;
|
||||
}
|
||||
return nullptr;
|
||||
@@ -176,8 +177,7 @@ bool CommandQueue::isCompleted(uint32_t gpgpuTaskCount, CopyEngineState bcsState
|
||||
|
||||
if (gpgpuHwTag >= gpgpuTaskCount) {
|
||||
if (bcsState.isValid()) {
|
||||
DEBUG_BREAK_IF(bcsState.engineType != getBcsCommandStreamReceiver()->getOsContext().getEngineType());
|
||||
return *getBcsCommandStreamReceiver()->getTagAddress() >= bcsTaskCount;
|
||||
return *getBcsCommandStreamReceiver(bcsState.engineType)->getTagAddress() >= bcsTaskCount;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -215,7 +215,8 @@ void CommandQueue::waitUntilComplete(uint32_t gpgpuTaskCountToWait, uint32_t bcs
|
||||
gtpinNotifyTaskCompletion(gpgpuTaskCountToWait);
|
||||
}
|
||||
|
||||
if (auto bcsCsr = getBcsCommandStreamReceiver()) {
|
||||
if (bcsEngine) {
|
||||
auto bcsCsr = getBcsCommandStreamReceiver(bcsEngine->getEngineType());
|
||||
bcsCsr->waitForTaskCountWithKmdNotifyFallback(bcsTaskCountToWait, 0, false, false, 1u, 0u);
|
||||
bcsCsr->waitForTaskCountAndCleanTemporaryAllocationList(bcsTaskCountToWait);
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ class CommandQueue : public BaseObject<_cl_command_queue> {
|
||||
const cl_event *eventWaitList);
|
||||
|
||||
MOCKABLE_VIRTUAL CommandStreamReceiver &getGpgpuCommandStreamReceiver() const;
|
||||
CommandStreamReceiver *getBcsCommandStreamReceiver() const;
|
||||
CommandStreamReceiver *getBcsCommandStreamReceiver(aub_stream::EngineType bcsEngineType) const;
|
||||
CommandStreamReceiver *getBcsForAuxTranslation() const;
|
||||
MOCKABLE_VIRTUAL CommandStreamReceiver &selectCsrForBuiltinOperation(const CsrSelectionArgs &args) const;
|
||||
Device &getDevice() const noexcept;
|
||||
|
||||
Reference in New Issue
Block a user