diff --git a/.pick_status.json b/.pick_status.json index f081581f4f8..fb9f5e13a36 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -784,7 +784,7 @@ "description": "zink: try getting sparse page size again without storage bit on fail", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index ee2f61d80ce..7089f8041a1 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -2563,11 +2563,21 @@ zink_get_sparse_texture_virtual_page_size(struct pipe_screen *pscreen, VK_IMAGE_TILING_OPTIMAL, &prop_count, props); if (!prop_count) { - if (pformat == PIPE_FORMAT_R9G9B9E5_FLOAT) { - screen->faked_e5sparse = true; - goto hack_it_up; + /* format may not support storage; try without */ + flags &= ~VK_IMAGE_USAGE_STORAGE_BIT; + prop_count = ARRAY_SIZE(props); + VKSCR(GetPhysicalDeviceSparseImageFormatProperties)(screen->pdev, format, type, + multi_sample ? VK_SAMPLE_COUNT_2_BIT : VK_SAMPLE_COUNT_1_BIT, + flags, + VK_IMAGE_TILING_OPTIMAL, + &prop_count, props); + if (!prop_count) { + if (pformat == PIPE_FORMAT_R9G9B9E5_FLOAT) { + screen->faked_e5sparse = true; + goto hack_it_up; + } + return 0; } - return 0; } if (size) {