mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-28 00:03:14 +08:00
fix: fallback empty counter based pool flags to immediate mode
Related-To: NEO-8145 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9b52d52062
commit
2082038475
@@ -217,6 +217,9 @@ void EventPool::setupDescriptorFlags(const ze_event_pool_desc_t *desc) {
|
||||
if (pNext && pNext->stype == ZE_STRUCTURE_TYPE_COUNTER_BASED_EVENT_POOL_EXP_DESC) {
|
||||
auto counterBasedDesc = reinterpret_cast<const ze_event_pool_counter_based_exp_desc_t *>(pNext);
|
||||
counterBasedFlags = counterBasedDesc->flags;
|
||||
if (counterBasedFlags == 0) {
|
||||
counterBasedFlags = ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_IMMEDIATE;
|
||||
}
|
||||
counterBased = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -831,8 +831,9 @@ HWTEST2_F(InOrderCmdListTests, givenIncorrectFlagsWhenCreatingCounterBasedEvents
|
||||
|
||||
counterBasedExtension.flags = 0;
|
||||
auto eventPool = EventPool::create(driverHandle.get(), context, 0, nullptr, &eventPoolDesc, returnValue);
|
||||
EXPECT_EQ(nullptr, eventPool);
|
||||
EXPECT_EQ(ZE_RESULT_ERROR_INVALID_ARGUMENT, returnValue);
|
||||
EXPECT_EQ(static_cast<uint32_t>(ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_IMMEDIATE), eventPool->getCounterBasedFlags());
|
||||
EXPECT_NE(nullptr, eventPool);
|
||||
eventPool->destroy();
|
||||
|
||||
counterBasedExtension.flags = static_cast<uint32_t>(ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_NON_IMMEDIATE) << 1;
|
||||
eventPool = EventPool::create(driverHandle.get(), context, 0, nullptr, &eventPoolDesc, returnValue);
|
||||
|
||||
Reference in New Issue
Block a user