From 425a33530891c60dc94d99620b76ae27e90d414d Mon Sep 17 00:00:00 2001 From: "Denis P. Shamonin" Date: Fri, 27 Sep 2024 15:52:28 +0200 Subject: [PATCH] COMP: fixed the error in OpenCLImageTest.cl. The __write_only should be used for images created with itk::OpenCLMemoryObject::WriteOnly --- Testing/OpenCLImageTest.cl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Testing/OpenCLImageTest.cl b/Testing/OpenCLImageTest.cl index ba38d38cd..f0bf713cd 100644 --- a/Testing/OpenCLImageTest.cl +++ b/Testing/OpenCLImageTest.cl @@ -19,7 +19,7 @@ __constant sampler_t imageSampler = CLK_NORMALIZED_COORDS_FALSE | CLK_ADDRESS_CLAMP | CLK_FILTER_NEAREST; /* Copy input 2D image to output 2D image */ -__kernel void Image2DCopy( __read_only image2d_t input, image2d_t output ) +__kernel void Image2DCopy( __read_only image2d_t input, __write_only image2d_t output ) { int2 coord = (int2)( get_global_id( 0 ), get_global_id( 1 ) ); uint4 temp = read_imageui( input, imageSampler, coord ); @@ -29,7 +29,7 @@ __kernel void Image2DCopy( __read_only image2d_t input, image2d_t output ) /* Copy input 3D image to 2D image */ -__kernel void Image3DCopy( __read_only image3d_t input, image2d_t output ) +__kernel void Image3DCopy( __read_only image3d_t input, __write_only image2d_t output ) { int2 coord = (int2)( get_global_id( 0 ), get_global_id( 1 ) );