Skip to content

Commit

Permalink
[CMDBUF] Fix coverity issue in command buffers
Browse files Browse the repository at this point in the history
- Fix incorrect conditions for copy engine usage that were reported on coverity.
  • Loading branch information
Bensuo authored and callumfare committed Jun 28, 2024
1 parent a1c9e89 commit aaf0810
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/adapters/level_zero/command_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendMemBufferCopyExp(
UR_CALL(DstBuffer->getZeHandle(ZeHandleDst, ur_mem_handle_t_::write_only,
CommandBuffer->Device));

bool PreferCopyEngine = (SrcBuffer->OnHost || SrcBuffer->OnHost);
bool PreferCopyEngine = (SrcBuffer->OnHost || DstBuffer->OnHost);

PreferCopyEngine |= UseCopyEngineForD2DCopy;

Expand Down Expand Up @@ -917,7 +917,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendMemBufferCopyRectExp(
UR_CALL(DstBuffer->getZeHandle(ZeHandleDst, ur_mem_handle_t_::write_only,
CommandBuffer->Device));

bool PreferCopyEngine = (SrcBuffer->OnHost || SrcBuffer->OnHost);
bool PreferCopyEngine = (SrcBuffer->OnHost || DstBuffer->OnHost);

PreferCopyEngine |= UseCopyEngineForD2DCopy;

Expand Down

0 comments on commit aaf0810

Please sign in to comment.