Skip to content

Commit

Permalink
[Coverity][L0] Remove overlapping mem copy in urBindlessImagesSampled…
Browse files Browse the repository at this point in the history
…ImageCreateExp
  • Loading branch information
wenju-he authored and kbenzie committed Mar 11, 2024
1 parent 91c9e91 commit 2b3d016
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions source/adapters/level_zero/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -738,13 +738,12 @@ UR_APIEXPORT ur_result_t UR_APICALL urBindlessImagesSampledImageCreateExp(
hContext, hDevice, hImageMem, pImageFormat, pImageDesc, phMem, phImage));

struct combined_sampled_image_handle {
uint64_t raw_image_handle;
uint64_t raw_sampler_handle;
uint64_t RawImageHandle;
uint64_t RawSamplerHandle;
};
combined_sampled_image_handle *sampledImageHandle =
auto *SampledImageHandle =
reinterpret_cast<combined_sampled_image_handle *>(phImage);
sampledImageHandle->raw_image_handle = reinterpret_cast<uint64_t>(*phImage);
sampledImageHandle->raw_sampler_handle =
SampledImageHandle->RawSamplerHandle =
reinterpret_cast<uint64_t>(hSampler->ZeSampler);

return UR_RESULT_SUCCESS;
Expand Down

0 comments on commit 2b3d016

Please sign in to comment.