summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/iris/iris_state.c4
1 files changed, 3 insertions, 1 deletions
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 = {