Skip to content

Commit 338b4ed

Browse files
authored
[SYCL][CUDA][libclc] Fix the casting of image coordinates (#6335)
This patch fix the casting of integer coordinates in image samplers. This solves #6285, allowing to re-enable the tests disabled in intel/llvm-test-suite#1052.
1 parent 54857b9 commit 338b4ed

File tree

1 file changed

+2
-1
lines changed
  • libclc/ptx-nvidiacl/libspirv/images

1 file changed

+2
-1
lines changed

libclc/ptx-nvidiacl/libspirv/images/image.cl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,8 @@ _DEFINE_SAMPLED_LOADS(half, 16)
889889
/* Sampling algorithms are implemented assu__spirv_ocl_s_ming an \
890890
* unnormalized floating point coordinate as input. Need to transform as \
891891
* appropriate. */ \
892-
sampling_coord_t sampling_coord = as_##sampling_coord_t(input_coord); \
892+
sampling_coord_t sampling_coord = \
893+
cast_##input_coord_t##_to_##sampling_coord_t(input_coord); \
893894
if (is_normalized_coords(sampler)) { \
894895
sampling_coord = unnormalized_coord_##dims##d(sampling_coord, image); \
895896
} \

0 commit comments

Comments
 (0)