enable CL_RG + CL_UNORM_INT8 for image

Submitted by Guo Yejun on June 16, 2015, 3:05 a.m.

Details

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

Not browsing as part of any series.

Commit Message

Guo Yejun June 16, 2015, 3:05 a.m.
Signed-off-by: Guo Yejun <yejun.guo@intel.com>
---
 src/cl_image.c | 5 +++++
 1 file changed, 5 insertions(+)

Patch hide | download patch | download mbox

diff --git a/src/cl_image.c b/src/cl_image.c
index 9907f90..3a4be82 100644
--- a/src/cl_image.c
+++ b/src/cl_image.c
@@ -134,6 +134,11 @@  cl_image_get_intel_format(const cl_image_format *fmt)
         case CL_UNSIGNED_INT32: return I965_SURFACEFORMAT_R32_UINT;
         default: return INTEL_UNSUPPORTED_FORMAT;
       };
+    case CL_RG:
+      switch (type) {
+        case CL_UNORM_INT8:     return I965_SURFACEFORMAT_R8G8_UNORM;
+        default: return INTEL_UNSUPPORTED_FORMAT;
+      };
 #if 0
     case CL_RG:
     case CL_RA:

Comments

LGTM, will push later.

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

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

> Guo Yejun

> Sent: Tuesday, June 16, 2015 11:05

> To: beignet@lists.freedesktop.org

> Cc: Guo, Yejun

> Subject: [Beignet] [PATCH] enable CL_RG + CL_UNORM_INT8 for image

> 

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

> ---

>  src/cl_image.c | 5 +++++

>  1 file changed, 5 insertions(+)

> 

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

> --- a/src/cl_image.c

> +++ b/src/cl_image.c

> @@ -134,6 +134,11 @@ cl_image_get_intel_format(const cl_image_format

> *fmt)

>          case CL_UNSIGNED_INT32: return I965_SURFACEFORMAT_R32_UINT;

>          default: return INTEL_UNSUPPORTED_FORMAT;

>        };

> +    case CL_RG:

> +      switch (type) {

> +        case CL_UNORM_INT8:     return

> I965_SURFACEFORMAT_R8G8_UNORM;

> +        default: return INTEL_UNSUPPORTED_FORMAT;

> +      };

>  #if 0

>      case CL_RG:

>      case CL_RA:

> --

> 1.9.1

> 

> _______________________________________________

> Beignet mailing list

> Beignet@lists.freedesktop.org

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