tu: Treat viewFormatCount==0 as no format list.
"If viewFormatCount is zero, pViewFormats is ignored and the image is created as if the VkImageFormatListCreateInfo structure were not included in the pNext chain of VkImageCreateInfo." Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17900>
This commit is contained in:
@@ -352,7 +352,7 @@ format_list_reinterprets_r8g8_r16(enum pipe_format format, const VkImageFormatLi
|
||||
/* If there's no format list, then the app may reinterpret to any compatible
|
||||
* format.
|
||||
*/
|
||||
if (!fmt_list)
|
||||
if (!fmt_list || !fmt_list->viewFormatCount)
|
||||
return true;
|
||||
|
||||
bool has_r8g8 = false;
|
||||
@@ -374,7 +374,7 @@ format_list_has_swaps(const VkImageFormatListCreateInfo *fmt_list)
|
||||
/* If there's no format list, then the app may reinterpret to any compatible
|
||||
* format, and presumably one would have the swap set.
|
||||
*/
|
||||
if (!fmt_list)
|
||||
if (!fmt_list || !fmt_list->viewFormatCount)
|
||||
return true;
|
||||
|
||||
for (uint32_t i = 0; i < fmt_list->viewFormatCount; i++) {
|
||||
|
||||
Reference in New Issue
Block a user