From 68197e8c67b6976f2ad5b98a79d4bc64201c5205 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 18 Feb 2021 23:34:41 +0100 Subject: [PATCH] radv: set correct value for OFFCHIP_BUFFERING on GFX10+ Higher values break tessellation. I was only able to reproduce this by switching back/from AMDVLK which was really weird... According to Marek (1c6eca23fdd8), it looks like it's related to register shadowing and PAL enables it, that probably explains a bit. Copied from PAL and RadeonSI. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4207 Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2498 Fixes: 74d69299d16 ("radv/gfx10: double the number of tessellation offchip buffers per SE") Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Part-of: (cherry picked from commit e3bdf815b790be61f5141afe630bb8eb1453a0ce) --- .pick_status.json | 2 +- src/amd/vulkan/radv_device.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index bbbcfc1c9ee..6a1a7bbe1b4 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3343,7 +3343,7 @@ "description": "radv: set correct value for OFFCHIP_BUFFERING on GFX10+", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "74d69299d167cdd88bf8582266ab4fa8b845f53e" }, diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index e49245e7ad3..65e376aadee 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -3373,7 +3373,7 @@ radv_get_hs_offchip_param(struct radv_device *device, uint32_t *max_offchip_buff * Follow AMDVLK here. */ if (device->physical_device->rad_info.chip_class >= GFX10) { - max_offchip_buffers_per_se = 256; + max_offchip_buffers_per_se = 128; } else if (device->physical_device->rad_info.family == CHIP_VEGA10 || device->physical_device->rad_info.chip_class == GFX7 || device->physical_device->rad_info.chip_class == GFX6)