Mesa (master): radv: configure the texture descriptor for TC-compat CMASK on GFX10+
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jan 8 07:44:17 UTC 2021
Module: Mesa
Branch: master
Commit: 20683461e3c3a33335a3659c88ad6370303ec2f3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=20683461e3c3a33335a3659c88ad6370303ec2f3
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Wed Jan 6 09:12:43 2021 +0100
radv: configure the texture descriptor for TC-compat CMASK on GFX10+
This was missing, it can be enabled with RADV_PERFTEST=tccompatcmask.
Note that this feature is still experimental.
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/8350>
---
src/amd/vulkan/radv_image.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index 104f5897d36..86cedea8de6 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -897,6 +897,14 @@ gfx10_make_texture_descriptor(struct radv_device *device,
fmask_state[5] = 0;
fmask_state[6] = S_00A018_META_PIPE_ALIGNED(1);
fmask_state[7] = 0;
+
+ if (radv_image_is_tc_compat_cmask(image)) {
+ va = gpu_address + image->offset + image->planes[0].surface.cmask_offset;
+
+ fmask_state[6] |= S_00A018_COMPRESSION_EN(1);
+ fmask_state[6] |= S_00A018_META_DATA_ADDRESS_LO(va >> 8);
+ fmask_state[7] |= va >> 16;
+ }
} else
memset(fmask_state, 0, 8 * 4);
}
More information about the mesa-commit
mailing list