From 8cc6bbdc5703d8d8b318d236cc17166f85fa7617 Mon Sep 17 00:00:00 2001 From: "Denis P. Shamonin" Date: Fri, 27 Sep 2024 15:09:07 +0200 Subject: [PATCH] COMP: remove __write_only from all OpenCL*.cl kernels Fixing #1245 --- Testing/OpenCLBufferTest.cl | 2 +- Testing/OpenCLImageTest.cl | 4 ++-- Testing/OpenCLKernelToImageBridgeTest.cl | 2 +- Testing/OpenCLSimpleTest1.cl | 2 +- Testing/OpenCLSimpleTest2.cl | 2 +- Testing/OpenCLVectorTest.cl | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Testing/OpenCLBufferTest.cl b/Testing/OpenCLBufferTest.cl index f3114a19c..e7af7f851 100644 --- a/Testing/OpenCLBufferTest.cl +++ b/Testing/OpenCLBufferTest.cl @@ -16,7 +16,7 @@ * *=========================================================================*/ -__kernel void SetFloat( __global __write_only float *output, float input ) +__kernel void SetFloat( __global float *output, float input ) { uint index = get_global_id( 0 ); diff --git a/Testing/OpenCLImageTest.cl b/Testing/OpenCLImageTest.cl index f0bf713cd..ba38d38cd 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, __write_only image2d_t output ) +__kernel void Image2DCopy( __read_only image2d_t input, 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, __write_only image2d_t o /* Copy input 3D image to 2D image */ -__kernel void Image3DCopy( __read_only image3d_t input, __write_only image2d_t output ) +__kernel void Image3DCopy( __read_only image3d_t input, image2d_t output ) { int2 coord = (int2)( get_global_id( 0 ), get_global_id( 1 ) ); diff --git a/Testing/OpenCLKernelToImageBridgeTest.cl b/Testing/OpenCLKernelToImageBridgeTest.cl index b5c07fb71..55701bfd2 100644 --- a/Testing/OpenCLKernelToImageBridgeTest.cl +++ b/Testing/OpenCLKernelToImageBridgeTest.cl @@ -16,7 +16,7 @@ * *=========================================================================*/ -__kernel void SetDirection( float4 input, __global __write_only float *output ) +__kernel void SetDirection( float4 input, __global float *output ) { output[0] = input.x; output[1] = input.y; diff --git a/Testing/OpenCLSimpleTest1.cl b/Testing/OpenCLSimpleTest1.cl index db97d6be3..749993377 100644 --- a/Testing/OpenCLSimpleTest1.cl +++ b/Testing/OpenCLSimpleTest1.cl @@ -16,7 +16,7 @@ * *=========================================================================*/ -__kernel void SimpleKernel1( __global __write_only float *output, float input ) +__kernel void SimpleKernel1( __global float *output, float input ) { output[0] = input; } diff --git a/Testing/OpenCLSimpleTest2.cl b/Testing/OpenCLSimpleTest2.cl index b33718296..1793da021 100644 --- a/Testing/OpenCLSimpleTest2.cl +++ b/Testing/OpenCLSimpleTest2.cl @@ -16,7 +16,7 @@ * *=========================================================================*/ -__kernel void SimpleKernel2( __global __write_only float *output, float input ) +__kernel void SimpleKernel2( __global float *output, float input ) { output[0] = input; } diff --git a/Testing/OpenCLVectorTest.cl b/Testing/OpenCLVectorTest.cl index 0bcf033b3..63ba5d9d2 100644 --- a/Testing/OpenCLVectorTest.cl +++ b/Testing/OpenCLVectorTest.cl @@ -16,7 +16,7 @@ * *=========================================================================*/ -__kernel void SetUChar( __global __write_only uchar *output, uchar input ) +__kernel void SetUChar( __global uchar *output, uchar input ) { uint index = get_global_id( 0 ); @@ -24,7 +24,7 @@ __kernel void SetUChar( __global __write_only uchar *output, uchar input ) } -__kernel void SetFloat( __global __write_only float *output, float input ) +__kernel void SetFloat( __global float *output, float input ) { uint index = get_global_id( 0 );