Lock csr inside executeCommandLists() to make submissions thread safe

Change-Id: I9326ee5bb835f01015668e66d2582df9ed02d66f
This commit is contained in:
Vinod Tipparaju
2020-07-17 22:03:16 +05:30
committed by sys_ocldev
parent 5dbf7d5f8c
commit bf57f2d696
3 changed files with 6 additions and 4 deletions

View File

@@ -69,6 +69,8 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::executeCommandLists(
using PIPE_CONTROL = typename GfxFamily::PIPE_CONTROL;
using POST_SYNC_OPERATION = typename PIPE_CONTROL::POST_SYNC_OPERATION;
auto lockCSR = csr->obtainUniqueOwnership();
for (auto i = 0u; i < numCommandLists; i++) {
auto commandList = CommandList::fromHandle(phCommandLists[i]);
if (isCopyOnlyCommandQueue != commandList->isCopyOnly()) {