zink: try getting sparse page size again without storage bit on fail
only certain formats are required to have the storage bit, so be more tolerant of failure in the case where drivers actually check flags and reject storage usage when it's actually unsupported cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28115>
This commit is contained in:
committed by
Marge Bot
parent
80eac1337d
commit
61e5b6ad9d
@@ -2653,11 +2653,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) {
|
||||
|
||||
Reference in New Issue
Block a user