iris: Don't lower image formats for write-only images
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 2 Oct 2018 03:18:00 +0000 (22:18 -0500)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:09 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_state.c

index 3c33d0cc97f2742a488e45922b7a23eb3fe0013d..51abda759eec5cec7b7f7bff0617f5c0b933bcd9 100644 (file)
@@ -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 = {