summaryrefslogtreecommitdiffstats
path: root/src/intel/isl/isl.h
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-06-22 11:51:55 -0700
committerJason Ekstrand <[email protected]>2017-07-22 20:59:22 -0700
commitfb86ac94cb4973fb62699896be2c9ff8f9d90ce5 (patch)
treea59fcc62c64c2e66e9d1a057d059ebe8fe2d9b27 /src/intel/isl/isl.h
parent44e9d65757640c2bbab73a7260ee1a53eefd799c (diff)
intel/isl/format: Add an srgb_to_linear helper
Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/intel/isl/isl.h')
-rw-r--r--src/intel/isl/isl.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h
index b9f9fb60d07..b61a0dd8619 100644
--- a/src/intel/isl/isl.h
+++ b/src/intel/isl/isl.h
@@ -1499,6 +1499,14 @@ isl_format_block_is_1x1x1(enum isl_format fmt)
}
static inline bool
+isl_format_is_srgb(enum isl_format fmt)
+{
+ return isl_format_layouts[fmt].colorspace == ISL_COLORSPACE_SRGB;
+}
+
+enum isl_format isl_format_srgb_to_linear(enum isl_format fmt);
+
+static inline bool
isl_format_is_rgb(enum isl_format fmt)
{
return isl_format_layouts[fmt].channels.r.bits > 0 &&