From: Jason Ekstrand Date: Tue, 2 Oct 2018 03:18:00 +0000 (-0500) Subject: iris: Don't lower image formats for write-only images X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d9aee25a466ba73a78a47e32f89777179e519931;p=mesa.git iris: Don't lower image formats for write-only images --- 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 = {