fix(ocl): finish in release ogl object if needed

Finish cache flushes before exiting api call if releasing displayable
ogl object or dcflush is mitigated.

Related-To: NEO-11694

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2024-07-16 10:18:29 +00:00
committed by Compute-Runtime-Automation
parent 585caab757
commit fc9de71feb
6 changed files with 66 additions and 38 deletions

View File

@@ -230,7 +230,10 @@ class MockCommandQueue : public CommandQueue {
cl_int enqueueResourceBarrier(BarrierCommand *resourceBarrier, cl_uint numEventsInWaitList, const cl_event *eventWaitList,
cl_event *event) override { return CL_SUCCESS; }
cl_int finish() override { return CL_SUCCESS; }
cl_int finish() override {
++finishCalledCount;
return CL_SUCCESS;
}
cl_int flush() override { return CL_SUCCESS; }
@@ -253,6 +256,7 @@ class MockCommandQueue : public CommandQueue {
bool releaseIndirectHeapCalled = false;
bool waitForTimestampsCalled = false;
cl_int writeBufferRetValue = CL_SUCCESS;
uint32_t finishCalledCount = 0;
uint32_t isCompletedCalled = 0;
uint32_t writeBufferCounter = 0;
bool writeBufferBlocking = false;