[Mesa-dev] [PATCH v4 03/12] isl: check whether a format is rgb if colorspace is yuv

Lionel Landwerlin lionel.g.landwerlin at intel.com
Thu Oct 5 16:30:19 UTC 2017


Suggested by Chad.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
---
 src/intel/isl/isl.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h
index 98de4c0f57f..e3acb0ec280 100644
--- a/src/intel/isl/isl.h
+++ b/src/intel/isl/isl.h
@@ -1512,6 +1512,8 @@ enum isl_format isl_format_srgb_to_linear(enum isl_format fmt);
 static inline bool
 isl_format_is_rgb(enum isl_format fmt)
 {
+   if (isl_format_is_yuv(fmt))
+      return false;
    return isl_format_layouts[fmt].channels.r.bits > 0 &&
           isl_format_layouts[fmt].channels.g.bits > 0 &&
           isl_format_layouts[fmt].channels.b.bits > 0 &&
-- 
2.14.2



More information about the mesa-dev mailing list