[Beignet] [PATCH] Runtime: fix the incorrect color type size for CL_Rx.
Zhigang Gong
zhigang.gong at linux.intel.com
Tue Sep 3 23:28:59 PDT 2013
Also remove an unecessary assert.
Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
---
src/cl_image.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/cl_image.c b/src/cl_image.c
index 6ea104b..004885e 100644
--- a/src/cl_image.c
+++ b/src/cl_image.c
@@ -61,17 +61,17 @@ cl_image_byte_per_pixel(const cl_image_format *fmt, uint32_t *bpp)
};
switch (order) {
+ case CL_Rx: break;
case CL_R: break;
case CL_A: break;
case CL_RA: *bpp *= 2; break;
case CL_RG: *bpp *= 2; break;
- case CL_Rx: *bpp *= 2; break;
case CL_INTENSITY:
case CL_LUMINANCE:
- if (type != CL_UNORM_INT8 && type != CL_UNORM_INT16 &&
+ /*if (type != CL_UNORM_INT8 && type != CL_UNORM_INT16 &&
type != CL_SNORM_INT8 && type != CL_SNORM_INT16 &&
type != CL_HALF_FLOAT && type != CL_FLOAT)
- return CL_INVALID_IMAGE_FORMAT_DESCRIPTOR;
+ return CL_INVALID_IMAGE_FORMAT_DESCRIPTOR;*/
break;
case CL_RGB:
case CL_RGBx:
@@ -195,7 +195,6 @@ cl_image_get_supported_fmt(cl_context ctx,
cl_uint *num_image_formats)
{
size_t i, j, n = 0;
- assert(image_formats);
for (i = 0; i < cl_image_order_n; ++i)
for (j = 0; j < cl_image_type_n; ++j) {
const cl_image_format fmt = {
--
1.7.9.5
More information about the Beignet
mailing list