[Beignet] [PATCH OCL20 3/5] Runtime: Add suport for sRGB to clEnqueueCopyImage

Xiuli Pan xiuli.pan at intel.com
Fri Mar 4 02:05:22 UTC 2016


From: Pan Xiuli <xiuli.pan at intel.com>

Signed-off-by: Pan Xiuli <xiuli.pan at intel.com>
---
 src/cl_mem.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/cl_mem.c b/src/cl_mem.c
index 0922e0a..6e5488e 100644
--- a/src/cl_mem.c
+++ b/src/cl_mem.c
@@ -1922,7 +1922,9 @@ cl_mem_kernel_copy_image(cl_command_queue queue, struct _cl_mem_image* src_image
 
   if (fixupDataType) {
     cl_image_format fmt;
-    if (src_image->fmt.image_channel_order != CL_BGRA)
+    if (src_image->fmt.image_channel_order != CL_BGRA &&
+        src_image->fmt.image_channel_order != CL_sBGRA &&
+        src_image->fmt.image_channel_order != CL_sRGBA)
       fmt.image_channel_order = src_image->fmt.image_channel_order;
     else
       fmt.image_channel_order = CL_RGBA;
-- 
2.5.0



More information about the Beignet mailing list