enable CL_UNSIGNED_INT8 for CL_RG to fix regression

Submitted by Guo Yejun on July 2, 2015, 6:05 a.m.

Details

Message ID 1435817146-2866-1-git-send-email-yejun.guo@intel.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Guo Yejun July 2, 2015, 6:05 a.m.
the regression is caused when only enable CL_UNORM_INT8 for CL_RG,
the reason is that during the image copy implementation with internal
kernel, all formats are considerd as integer format, it becomes
unknown since CL_UNSIGNED_INT8 is not enabled yet.

Signed-off-by: Guo Yejun <yejun.guo@intel.com>
---
 src/cl_image.c | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/src/cl_image.c b/src/cl_image.c
index 3a4be82..d58bdf3 100644
--- a/src/cl_image.c
+++ b/src/cl_image.c
@@ -137,6 +137,7 @@  cl_image_get_intel_format(const cl_image_format *fmt)
     case CL_RG:
       switch (type) {
         case CL_UNORM_INT8:     return I965_SURFACEFORMAT_R8G8_UNORM;
+        case CL_UNSIGNED_INT8:  return I965_SURFACEFORMAT_R8G8_UINT;
         default: return INTEL_UNSUPPORTED_FORMAT;
       };
 #if 0

Comments

LGTM, pushed, thanks.

> -----Original Message-----

> From: Beignet [mailto:beignet-bounces@lists.freedesktop.org] On Behalf Of

> Guo Yejun

> Sent: Thursday, July 2, 2015 14:06

> To: beignet@lists.freedesktop.org

> Cc: Guo, Yejun

> Subject: [Beignet] [PATCH] enable CL_UNSIGNED_INT8 for CL_RG to fix

> regression

> 

> the regression is caused when only enable CL_UNORM_INT8 for CL_RG, the

> reason is that during the image copy implementation with internal kernel, all

> formats are considerd as integer format, it becomes unknown since

> CL_UNSIGNED_INT8 is not enabled yet.

> 

> Signed-off-by: Guo Yejun <yejun.guo@intel.com>

> ---

>  src/cl_image.c | 1 +

>  1 file changed, 1 insertion(+)

> 

> diff --git a/src/cl_image.c b/src/cl_image.c index 3a4be82..d58bdf3 100644

> --- a/src/cl_image.c

> +++ b/src/cl_image.c

> @@ -137,6 +137,7 @@ cl_image_get_intel_format(const cl_image_format

> *fmt)

>      case CL_RG:

>        switch (type) {

>          case CL_UNORM_INT8:     return I965_SURFACEFORMAT_R8G8_UNORM;

> +        case CL_UNSIGNED_INT8:  return I965_SURFACEFORMAT_R8G8_UINT;

>          default: return INTEL_UNSUPPORTED_FORMAT;

>        };

>  #if 0

> --

> 1.9.1

> 

> _______________________________________________

> Beignet mailing list

> Beignet@lists.freedesktop.org

> http://lists.freedesktop.org/mailman/listinfo/beignet