[Beignet] [PATCH 2/3] GBE: remove some image1d_buffer related builtin functions.
Zhigang Gong
zhigang.gong at intel.com
Sun Dec 14 17:02:23 PST 2014
From: Zhigang Gong <zhigang.gong at linux.intel.com>
Per OpenCL spec, image1d buffer only support no sampler access.
Remove those unsupported functions.
Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
---
backend/src/libocl/include/ocl_image.h | 8 --------
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 3637d56..39106cf 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 6da8e90..8777d9f 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.
--
1.8.3.2
More information about the Beignet
mailing list