gfxstream: [vulkan snapshot]: update codegen to handle failed api calls

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35323>
This commit is contained in:
Bo Hu
2025-05-19 08:57:51 -07:00
committed by Marge Bot
parent 4253e5789a
commit b951324606
@@ -444,6 +444,7 @@ def emit_impl(typeInfo, api, cgen):
boxed_access = "&boxed_%s" % p.typeName
if p.pointerIndirectionLevels > 0:
cgen.stmt("if (!%s) return" % access)
cgen.stmt("if (input_result != VK_SUCCESS) return")
cgen.stmt("std::lock_guard<std::mutex> lock(mReconstructionMutex)")
cgen.line("// %s create" % p.paramName)