mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
vulkan: filter duplicate pNext struct at device creation
Recently, Indiana Jones and The Great Circle messed up this by adding duplicates and this was causing the game to crash at launch. Of course, this was an application bug that VVL was also able to catch but I think maybe Mesa should ignore those instead of failing to create the logical device. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33705>
This commit is contained in:
parent
eb1f163848
commit
c58655b999
1 changed files with 9 additions and 1 deletions
|
|
@ -265,8 +265,16 @@ vk_physical_device_check_device_features(struct vk_physical_device *physical_dev
|
|||
if (!supported)
|
||||
continue;
|
||||
|
||||
/* Ignore duplicated structs instead of failing to create the device. */
|
||||
if (supported->sType != 0) {
|
||||
vk_logw(VK_LOG_OBJS(physical_device),
|
||||
"WARNING: Duplicate sType %s in the device creation chain.\\n",
|
||||
vk_StructureType_to_str(features->sType));
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Check for cycles in the list */
|
||||
if (supported->pNext != NULL || supported->sType != 0)
|
||||
if (supported->pNext != NULL)
|
||||
return VK_ERROR_UNKNOWN;
|
||||
|
||||
supported->sType = features->sType;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue