diff options
author | Marek Olšák <[email protected]> | 2017-11-24 00:19:56 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-11-29 18:21:30 +0100 |
commit | d1f65e5e99cf4e8384dce2dd1602248fd459e15b (patch) | |
tree | c1bb23e161c1a31dd8566b48702f32cb144a0601 | |
parent | e3c0a5b6e807b9c8ee7273fbbc06f4991b719b01 (diff) |
radeonsi: clear PIPE_IMAGE_ACCESS_WRITE when it's invalid to be on the safe side
Tested-by: Dieter Nützel <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
-rw-r--r-- | src/gallium/drivers/radeonsi/si_descriptors.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c index 69371ea8910..5fbca541952 100644 --- a/src/gallium/drivers/radeonsi/si_descriptors.c +++ b/src/gallium/drivers/radeonsi/si_descriptors.c @@ -688,6 +688,16 @@ static void si_set_shader_image_desc(struct si_context *ctx, 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); |