aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris/iris_resource.c
diff options
context:
space:
mode:
authorJames Xiong <[email protected]>2019-11-20 15:59:00 -0800
committerMarge Bot <[email protected]>2020-02-06 00:43:58 +0000
commitd8569baaed1a38cf3da9e45375fa2267d9a1eeb0 (patch)
tree63b032d799ba2d20e31d468f8d2941dceb1cbcf5 /src/gallium/drivers/iris/iris_resource.c
parent76f300f2e498f101c58e182eac3ece11e527d297 (diff)
iris: handle the failure of converting unsupported yuv formats to isl
Signed-off-by: James Xiong <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3527>
Diffstat (limited to 'src/gallium/drivers/iris/iris_resource.c')
-rw-r--r--src/gallium/drivers/iris/iris_resource.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
index bdd715df2c9..7ca6097840a 100644
--- a/src/gallium/drivers/iris/iris_resource.c
+++ b/src/gallium/drivers/iris/iris_resource.c
@@ -85,7 +85,8 @@ modifier_is_supported(const struct gen_device_info *devinfo,
enum isl_format linear_format = isl_format_srgb_to_linear(rt_format);
- if (!isl_format_supports_ccs_e(devinfo, linear_format))
+ if (linear_format == ISL_FORMAT_UNSUPPORTED ||
+ !isl_format_supports_ccs_e(devinfo, linear_format))
return false;
return devinfo->gen >= 9 && devinfo->gen <= 11;