Mesa (master): isl: check whether a format is rgb if colorspace is yuv

Lionel Landwerlin llandwerlin at kemper.freedesktop.org
Fri Oct 6 16:14:03 UTC 2017


Module: Mesa
Branch: master
Commit: f86c1b15955d1a20ae0f9ce7bac6012276743bae
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f86c1b15955d1a20ae0f9ce7bac6012276743bae

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Tue Oct  3 19:10:41 2017 +0100

isl: check whether a format is rgb if colorspace is yuv

Suggested by Chad.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

---

 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 98de4c0f57..e3acb0ec28 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 &&




More information about the mesa-commit mailing list