mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Fix zero size allocation look up
Signed-off-by: Jemale Lockett <jemale.lockett@intel.com> Related-To: LOCI-2537
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f0cb1cc388
commit
a2401299a0
@@ -735,6 +735,38 @@ HWTEST2_F(CommandListCreate, givenCommandListWhenMemoryCopyRegionWithSignalAndIn
|
||||
EXPECT_EQ(ZE_RESULT_ERROR_INVALID_ARGUMENT, result);
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenCommandListWhenMemoryCopyRegionHasEmptyRegionWithSignalAndWaitEventsUsingCopyEngineThenSuccessIsReturned, Platforms) {
|
||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||
|
||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::Copy, 0u, result));
|
||||
|
||||
void *srcBuffer = reinterpret_cast<void *>(0x1234);
|
||||
void *dstBuffer = reinterpret_cast<void *>(0x2345);
|
||||
|
||||
ze_event_pool_desc_t eventPoolDesc = {};
|
||||
eventPoolDesc.count = 2;
|
||||
auto eventPool = std::unique_ptr<L0::EventPool>(L0::EventPool::create(driverHandle.get(), context, 0, nullptr, &eventPoolDesc, result));
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
std::vector<ze_event_handle_t> events;
|
||||
|
||||
ze_event_desc_t eventDesc = {};
|
||||
eventDesc.index = 0;
|
||||
eventDesc.wait = ZE_EVENT_SCOPE_FLAG_HOST;
|
||||
auto event = std::unique_ptr<L0::Event>(L0::Event::create<uint32_t>(eventPool.get(), &eventDesc, device));
|
||||
events.push_back(event.get());
|
||||
eventDesc.index = 1;
|
||||
auto event1 = std::unique_ptr<L0::Event>(L0::Event::create<uint32_t>(eventPool.get(), &eventDesc, device));
|
||||
events.push_back(event1.get());
|
||||
|
||||
// set regions to 0
|
||||
ze_copy_region_t sr = {0U, 0U, 0U, 0U, 0U, 0U};
|
||||
ze_copy_region_t dr = {0U, 0U, 0U, 0U, 0U, 0U};
|
||||
result = commandList->appendMemoryCopyRegion(dstBuffer, &dr, 0, 0,
|
||||
srcBuffer, &sr, 0, 0, events[0], 1u, &events[1]);
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenImmediateCommandListWhenMemoryCopyRegionWithSignalAndWaitEventsUsingRenderEngineThenSuccessIsReturned, Platforms) {
|
||||
const ze_command_queue_desc_t desc = {};
|
||||
bool internalEngine = true;
|
||||
|
||||
Reference in New Issue
Block a user