Add error messages for unhandled extensions

Print missing structure information before calling abort.

Reviewed-by: Aaron Ruby <aruby@blackberry.com>
Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
This commit is contained in:
Serdar Kocdemir
2024-07-31 16:30:27 +01:00
committed by Marge Bot
parent eb6124d6bf
commit 7f9783c8f5
2 changed files with 6 additions and 2 deletions

View File

@@ -936,7 +936,9 @@ class VulkanMarshaling(VulkanWrapperGenerator):
cgen.stmt("(void)pNext_placeholder")
def fatalDefault(cgen):
cgen.line("// fatal; the switch is only taken if the extension struct is known");
cgen.line("// fatal; the switch is only taken if the extension struct is known")
if self.variant != "guest":
cgen.stmt("fprintf(stderr, \" %s, Unhandled Vulkan structure type %s [%d], aborting.\\n\", __func__, string_VkStructureType(VkStructureType(structType)), structType)")
cgen.stmt("abort()")
pass

View File

@@ -1013,7 +1013,9 @@ class VulkanReservedMarshaling(VulkanWrapperGenerator):
cgen.stmt("(void)pNext_placeholder")
def fatalDefault(cgen):
cgen.line("// fatal; the switch is only taken if the extension struct is known");
cgen.line("// fatal; the switch is only taken if the extension struct is known")
if self.variant != "guest":
cgen.stmt("fprintf(stderr, \" %s, Unhandled Vulkan structure type %s [%d], aborting.\\n\", __func__, string_VkStructureType(VkStructureType(structType)), structType)")
cgen.stmt("abort()")
pass