diff options
author | Zhigang Gong <zhigang.gong@linux.intel.com> | 2014-12-13 19:31:52 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@linux.intel.com> | 2014-12-13 19:31:52 +0800 |
commit | 1268bb1c7394d8a75482102a5ea9e6fc2a7421cc (patch) | |
tree | dbde454bfa565bc20cf035e25ea2f58e0524c691 | |
parent | fb5b0678745de48d48927882ffe8bd31596aae76 (diff) |
GBE: remove some image1d_buffer related builtin functions.
Per OpenCL spec, image1d buffer only support no sampler access.
Remove those unsupported functions.
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
-rw-r--r-- | backend/src/libocl/include/ocl_image.h | 8 | ||||
-rw-r--r-- | backend/src/libocl/src/ocl_image.cl | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/backend/src/libocl/include/ocl_image.h b/backend/src/libocl/include/ocl_image.h index 3637d560..39106cf6 100644 --- a/backend/src/libocl/include/ocl_image.h +++ b/backend/src/libocl/include/ocl_image.h @@ -35,21 +35,13 @@ OVERLOADABLE float4 read_imagef(image1d_t cl_image, const sampler_t sampler, flo OVERLOADABLE float4 read_imagef(image1d_t cl_image, int coord); OVERLOADABLE void write_imagef(image1d_t cl_image, int coord, float4 color); OVERLOADABLE void write_imagef(image1d_t cl_image, float coord, float4 color); -OVERLOADABLE int4 read_imagei(image1d_buffer_t cl_image, const sampler_t sampler, int coord); -OVERLOADABLE int4 read_imagei(image1d_buffer_t cl_image, const sampler_t sampler, float coord); OVERLOADABLE int4 read_imagei(image1d_buffer_t cl_image, int coord); OVERLOADABLE void write_imagei(image1d_buffer_t cl_image, int coord, int4 color); -OVERLOADABLE void write_imagei(image1d_buffer_t cl_image, float coord, int4 color); -OVERLOADABLE uint4 read_imageui(image1d_buffer_t cl_image, const sampler_t sampler, int coord); -OVERLOADABLE uint4 read_imageui(image1d_buffer_t cl_image, const sampler_t sampler, float coord); OVERLOADABLE uint4 read_imageui(image1d_buffer_t cl_image, int coord); OVERLOADABLE void write_imageui(image1d_buffer_t cl_image, int coord, uint4 color); OVERLOADABLE void write_imageui(image1d_buffer_t cl_image, float coord, uint4 color); -OVERLOADABLE float4 read_imagef(image1d_buffer_t cl_image, const sampler_t sampler, int coord); -OVERLOADABLE float4 read_imagef(image1d_buffer_t cl_image, const sampler_t sampler, float coord); OVERLOADABLE float4 read_imagef(image1d_buffer_t cl_image, int coord); OVERLOADABLE void write_imagef(image1d_buffer_t cl_image, int coord, float4 color); -OVERLOADABLE void write_imagef(image1d_buffer_t cl_image, float coord, float4 color); OVERLOADABLE int get_image_channel_data_type(image1d_t image); OVERLOADABLE int get_image_channel_order(image1d_t image); diff --git a/backend/src/libocl/src/ocl_image.cl b/backend/src/libocl/src/ocl_image.cl index 6da8e90a..8777d9fc 100644 --- a/backend/src/libocl/src/ocl_image.cl +++ b/backend/src/libocl/src/ocl_image.cl @@ -364,13 +364,21 @@ INLINE_OVERLOADABLE float3 __gen_fixup_neg_boundary(float3 coord) DECL_IMAGE(0, image_type, float4, f, n) DECL_IMAGE_TYPE(image1d_t, 1) -DECL_IMAGE_TYPE(image1d_buffer_t, 1) DECL_IMAGE_TYPE(image2d_t, 2) DECL_IMAGE_TYPE(image3d_t, 4) DECL_IMAGE_TYPE(image3d_t, 3) DECL_IMAGE_TYPE(image2d_array_t, 4) DECL_IMAGE_TYPE(image2d_array_t, 3) +#define DECL_IMAGE_1DBuffer(int_clamping_fix, image_data_type, suffix) \ + DECL_READ_IMAGE_NOSAMPLER(image1d_buffer_t, image_data_type, \ + suffix, int) \ + DECL_WRITE_IMAGE(image1d_buffer_t, image_data_type, suffix, int) + +DECL_IMAGE_1DBuffer(GEN_FIX_INT_CLAMPING, int4, i) +DECL_IMAGE_1DBuffer(GEN_FIX_INT_CLAMPING, uint4, ui) +DECL_IMAGE_1DBuffer(0, float4, f) + // For 1D Array: // fixup_1darray_coord functions are to convert 1d array coord to 2d array coord // and the caller must set the sampler offset to 2 by using this converted coord. |