mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 05:24:02 +08:00
Add logic for Events in multi-thread scenario
- inc refCount when enqueue is blocked and dec after flushing Change-Id: I9e8f8d226897124a7e51f2473939d53868bef7a2
This commit is contained in:
committed by
sys_ocldev
parent
0c2dc1b438
commit
1001f76085
@@ -110,11 +110,16 @@ TEST(CommandTest, givenWaitlistRequestWhenCommandComputeKernelIsCreatedThenMakeL
|
||||
std::vector<Surface *> surfaces;
|
||||
auto kernelOperation = new KernelOperation(std::unique_ptr<LinearStream>(cmdStream), UniqueIH(ih1), UniqueIH(ih2), UniqueIH(ih3),
|
||||
*device->getDefaultEngine().commandStreamReceiver->getInternalAllocationStorage());
|
||||
MockCommandComputeKernel command(cmdQ, kernelOperation, surfaces, kernel);
|
||||
|
||||
UserEvent event1, event2, event3;
|
||||
cl_event waitlist[] = {&event1, &event2};
|
||||
EventsRequest eventsRequest(2, waitlist, nullptr);
|
||||
|
||||
MockCommandComputeKernel command(cmdQ, kernelOperation, surfaces, kernel);
|
||||
|
||||
event1.incRefInternal();
|
||||
event2.incRefInternal();
|
||||
|
||||
command.setEventsRequest(eventsRequest);
|
||||
|
||||
waitlist[1] = &event3;
|
||||
|
||||
Reference in New Issue
Block a user