From d9aee25a466ba73a78a47e32f89777179e519931 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Mon, 1 Oct 2018 22:18:00 -0500 Subject: [PATCH] iris: Don't lower image formats for write-only images --- src/gallium/drivers/iris/iris_state.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 3c33d0cc97f..51abda759ee 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -1533,7 +1533,9 @@ iris_set_shader_images(struct pipe_context *ctx, isl_surf_usage_flags_t usage = ISL_SURF_USAGE_STORAGE_BIT; enum isl_format isl_format = iris_format_for_usage(devinfo, img->format, usage).fmt; - isl_format = isl_lower_storage_image_format(devinfo, isl_format); + + if (img->shader_access & PIPE_IMAGE_ACCESS_READ) + isl_format = isl_lower_storage_image_format(devinfo, isl_format); if (res->base.target != PIPE_BUFFER) { struct isl_view view = { -- 2.30.2