mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
nvk: Re-emit sample locations when rasterization samples changes
We need them for the case where explicit sample locations are not enabled. While we're at it, fix the case where rasterization_samples=0. This can happen when rasterizer discard is enabled. This fixes MSAA resolves with NVK+Zink. In particular, it fixes MSAA for the Unigine Heaven and Valley benchmark. This also fixes all of the spec@arb_texture_float@multisample-formats piglit tests. Fixes:41d094c2cc("nvk: Support dynamic state for enabling sample locations") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10786 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29147> (cherry picked from commita160c2a14e)
This commit is contained in:
parent
ce7e1ca1fa
commit
0a312787cd
2 changed files with 5 additions and 3 deletions
|
|
@ -494,7 +494,7 @@
|
|||
"description": "nvk: Re-emit sample locations when rasterization samples changes",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "41d094c2cc1da09444830dca866d2be7f03ae5b4",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -1438,13 +1438,15 @@ nvk_flush_ms_state(struct nvk_cmd_buffer *cmd)
|
|||
});
|
||||
}
|
||||
|
||||
if (BITSET_TEST(dyn->dirty, MESA_VK_DYNAMIC_MS_SAMPLE_LOCATIONS) ||
|
||||
if (BITSET_TEST(dyn->dirty, MESA_VK_DYNAMIC_MS_RASTERIZATION_SAMPLES) ||
|
||||
BITSET_TEST(dyn->dirty, MESA_VK_DYNAMIC_MS_SAMPLE_LOCATIONS) ||
|
||||
BITSET_TEST(dyn->dirty, MESA_VK_DYNAMIC_MS_SAMPLE_LOCATIONS_ENABLE)) {
|
||||
const struct vk_sample_locations_state *sl;
|
||||
if (dyn->ms.sample_locations_enable) {
|
||||
sl = dyn->ms.sample_locations;
|
||||
} else {
|
||||
sl = vk_standard_sample_locations_state(dyn->ms.rasterization_samples);
|
||||
const uint32_t samples = MAX2(1, dyn->ms.rasterization_samples);
|
||||
sl = vk_standard_sample_locations_state(samples);
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < sl->per_pixel; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue