Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions sycl/include/sycl/ext/oneapi/bindless_images.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1036,19 +1036,15 @@ DataT fetch_image(const sampled_image_handle &imageHandle [[maybe_unused]],
"HintT must always be a recognized standard type");

#ifdef __SYCL_DEVICE_ONLY__
// Convert the raw handle to an image and use FETCH_UNSAMPLED_IMAGE since
// fetch_image should not use the sampler
if constexpr (detail::is_recognized_standard_type<DataT>()) {
return FETCH_UNSAMPLED_IMAGE(
return FETCH_SAMPLED_IMAGE(
DataT,
CONVERT_HANDLE_TO_IMAGE(imageHandle.raw_handle,
detail::OCLImageTyRead<coordSize>),
CONVERT_HANDLE_TO_SAMPLED_IMAGE(imageHandle.raw_handle, coordSize),
coords);
} else {
return sycl::bit_cast<DataT>(FETCH_UNSAMPLED_IMAGE(
return sycl::bit_cast<DataT>(FETCH_SAMPLED_IMAGE(
HintT,
CONVERT_HANDLE_TO_IMAGE(imageHandle.raw_handle,
detail::OCLImageTyRead<coordSize>),
CONVERT_HANDLE_TO_SAMPLED_IMAGE(imageHandle.raw_handle, coordSize),
coords));
}
#else
Expand Down
Loading