mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 08:53:55 +08:00
Set correct L0 CommandQueue type
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
96f22f55fc
commit
43d5397de6
@@ -53,6 +53,8 @@ struct CommandQueue : _ze_command_queue_handle_t {
|
||||
commandQueuePreemptionMode = newPreemptionMode;
|
||||
}
|
||||
|
||||
bool peekIsCopyOnlyCommandQueue() const { return this->isCopyOnlyCommandQueue; }
|
||||
|
||||
protected:
|
||||
NEO::PreemptionMode commandQueuePreemptionMode = NEO::PreemptionMode::Initial;
|
||||
bool commandQueueDebugCmdsProgrammed = false;
|
||||
|
||||
@@ -76,7 +76,7 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::executeCommandLists(
|
||||
|
||||
for (auto i = 0u; i < numCommandLists; i++) {
|
||||
auto commandList = CommandList::fromHandle(phCommandLists[i]);
|
||||
if (isCopyOnlyCommandQueue != commandList->isCopyOnly()) {
|
||||
if (peekIsCopyOnlyCommandQueue() != commandList->isCopyOnly()) {
|
||||
return ZE_RESULT_ERROR_INVALID_COMMAND_LIST_TYPE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ ze_result_t DeviceImp::createCommandListImmediate(const ze_command_queue_desc_t
|
||||
|
||||
ze_result_t DeviceImp::createCommandQueue(const ze_command_queue_desc_t *desc,
|
||||
ze_command_queue_handle_t *commandQueue) {
|
||||
auto productFamily = neoDevice->getHardwareInfo().platform.eProductFamily;
|
||||
auto &platform = neoDevice->getHardwareInfo().platform;
|
||||
|
||||
NEO::CommandStreamReceiver *csr = nullptr;
|
||||
uint32_t engineGroupIndex = desc->ordinal;
|
||||
@@ -125,7 +125,11 @@ ze_result_t DeviceImp::createCommandQueue(const ze_command_queue_desc_t *desc,
|
||||
UNRECOVERABLE_IF(csr == nullptr);
|
||||
|
||||
ze_result_t returnValue = ZE_RESULT_SUCCESS;
|
||||
*commandQueue = CommandQueue::create(productFamily, this, csr, desc, NEO::EngineGroupType::Copy == static_cast<NEO::EngineGroupType>(engineGroupIndex), false, returnValue);
|
||||
|
||||
auto &hwHelper = NEO::HwHelper::get(platform.eRenderCoreFamily);
|
||||
bool isCopyOnly = hwHelper.isCopyOnlyEngineType(static_cast<NEO::EngineGroupType>(engineGroupIndex));
|
||||
|
||||
*commandQueue = CommandQueue::create(platform.eProductFamily, this, csr, desc, isCopyOnly, false, returnValue);
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user