diff options
author | Lionel Landwerlin <[email protected]> | 2017-10-03 19:10:41 +0100 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2017-10-06 11:45:49 +0100 |
commit | f86c1b15955d1a20ae0f9ce7bac6012276743bae (patch) | |
tree | e9332991fa6396878339d796449a2f01ed4085a6 /src/intel/isl/isl.h | |
parent | 5e9f52ff4dec2cb3479083666a4edd94d30d77e9 (diff) |
isl: check whether a format is rgb if colorspace is yuv
Suggested by Chad.
Signed-off-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/isl/isl.h')
-rw-r--r-- | src/intel/isl/isl.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 && |