Mesa (master): radv: only set WRITE_COMPRESS_ENABLE for storage image descriptors

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Mar 31 15:53:37 UTC 2021


Module: Mesa
Branch: master
Commit: 5c8a7fa63183928db83aa2d7bde50bb52dca4152
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5c8a7fa63183928db83aa2d7bde50bb52dca4152

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Tue Mar 30 17:55:10 2021 +0200

radv: only set WRITE_COMPRESS_ENABLE for storage image descriptors

This will allow us to reduce the number of situations where the
compiler workaround is needed on GFX10.3.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9924>

---

 src/amd/vulkan/radv_image.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index 45b7706999a..a78034abcd2 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -781,7 +781,8 @@ si_set_mutable_tex_desc_fields(struct radv_device *device,
 			if (plane->surface.dcc_offset)
 				meta = plane->surface.u.gfx9.dcc;
 
-			if (radv_dcc_enabled(image, first_level) && enable_write_compression)
+			if (radv_dcc_enabled(image, first_level) &&
+			    is_storage_image && enable_write_compression)
 				state[6] |= S_00A018_WRITE_COMPRESS_ENABLE(1);
 
 			state[6] |= S_00A018_META_PIPE_ALIGNED(meta.pipe_aligned) |



More information about the mesa-commit mailing list