unsigned level = view->u.tex.level;
unsigned width, height, depth, hw_level;
bool uses_dcc = vi_dcc_enabled(tex, level);
+ unsigned access = view->access;
+
+ /* Clear the write flag when writes can't occur.
+ * Note that DCC_DECOMPRESS for MSAA doesn't work in some cases,
+ * so we don't wanna trigger it.
+ */
+ if (tex->is_depth || tex->resource.b.b.nr_samples >= 2) {
+ assert(!"Z/S and MSAA image stores are not supported");
+ access &= ~PIPE_IMAGE_ACCESS_WRITE;
+ }
assert(!tex->is_depth);
assert(tex->fmask.size == 0);