Mesa (17.1): radv: fix MSAA on SI gpus.

Andres Gomez tanty at kemper.freedesktop.org
Mon Aug 21 15:12:58 UTC 2017


Module: Mesa
Branch: 17.1
Commit: 98d54d0c95fd67e56c4de67757a16f612e77c7d5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=98d54d0c95fd67e56c4de67757a16f612e77c7d5

Author: Dave Airlie <airlied at redhat.com>
Date:   Mon Aug  7 07:39:41 2017 +0100

radv: fix MSAA on SI gpus.

This ports the workaround from radeonsi, that was missing in radv.

This fixes Talos rendering when MSAA is enabled on my Tahiti card.

Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Fixes: f4e499ec7 (radv: add initial non-conformant radv vulkan driver)
Signed-off-by: Dave Airlie <airlied at redhat.com>
(cherry picked from commit 8bf39307517a04263532e3c5a49b5be1f4a99032)
[Andres Gomez: resolve trivial conflicts]
Signed-off-by: Andres Gomez <agomez at igalia.com>

Conflicts:
	src/amd/vulkan/radv_device.c

---

 src/amd/vulkan/radv_device.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 33c75c2a3d..aa024c02d8 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -2730,9 +2730,13 @@ radv_initialise_color_surface(struct radv_device *device,
 				    format != V_028C70_COLOR_24_8) |
 		S_028C70_NUMBER_TYPE(ntype) |
 		S_028C70_ENDIAN(endian);
-	if (iview->image->samples > 1)
-		if (iview->image->fmask.size)
-			cb->cb_color_info |= S_028C70_COMPRESSION(1);
+	if ((iview->image->samples > 1) && iview->image->fmask.size) {
+		cb->cb_color_info |= S_028C70_COMPRESSION(1);
+		if (device->physical_device->rad_info.chip_class == SI) {
+			unsigned fmask_bankh = util_logbase2(iview->image->fmask.bank_height);
+			cb->cb_color_attrib |= S_028C74_FMASK_BANK_HEIGHT(fmask_bankh);
+		}
+	}
 
 	if (iview->image->cmask.size &&
 	    !(device->debug_flags & RADV_DEBUG_NO_FAST_CLEARS))




More information about the mesa-commit mailing list