From 3f9f4d79d387791c80f91e54a452daad87611fc5 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Wed, 22 Oct 2025 16:23:48 -0400 Subject: [PATCH] nvk: Disable sampleLocationsSampleCounts for 1x MSAA Suggested-by: Mel Henning Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14108 Fixes: a34edc7500c8 ("nvk: Fill out sample locations on Maxwell B+") (cherry picked from commit aa0f404f7b7d2d0b10f5a7d8b9a98006a6b5835b) Part-of: --- .pick_status.json | 2 +- src/nouveau/vulkan/nvk_physical_device.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 38a2107fddd..31c3ff77320 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -954,7 +954,7 @@ "description": "nvk: Disable sampleLocationsSampleCounts for 1x MSAA", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "a34edc7500c84bfd52cf71cb78db46c34d436ae2", "notes": null diff --git a/src/nouveau/vulkan/nvk_physical_device.c b/src/nouveau/vulkan/nvk_physical_device.c index e1ded347316..a3923b62f97 100644 --- a/src/nouveau/vulkan/nvk_physical_device.c +++ b/src/nouveau/vulkan/nvk_physical_device.c @@ -1141,8 +1141,13 @@ nvk_get_device_properties(const struct nvk_instance *instance, .robustStorageBufferAccessSizeAlignment = NVK_SSBO_BOUNDS_CHECK_ALIGNMENT, .robustUniformBufferAccessSizeAlignment = nvk_min_cbuf_alignment(info), - /* VK_EXT_sample_locations */ - .sampleLocationSampleCounts = sample_counts, + /* VK_EXT_sample_locations + * + * There's a weird HW issue with per-sample interpolation for 1x. It + * always interpolates at (0.5, 0.5) so we just disable custom sample + * locations for 1x. + */ + .sampleLocationSampleCounts = sample_counts & ~VK_SAMPLE_COUNT_1_BIT, .maxSampleLocationGridSize = (VkExtent2D){ 1, 1 }, .sampleLocationCoordinateRange[0] = 0.0f, .sampleLocationCoordinateRange[1] = 0.9375f,