winevulkan: Generate "in_ext" definition on demand.
commitad7945eb41f7c8849655e785dfd8656af7c7ea6f
authorAlexandros Frantzis <alexandros.frantzis@collabora.com>
Wed, 16 Nov 2022 11:47:59 +0000 (16 13:47 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 16 Nov 2022 20:24:19 +0000 (16 21:24 +0100)
treee141fe164a5d99094fa0c2e57a0ffdb6966e2221
parentd95885ba0b5b7d27af7fb26e7ec467b515dcc5d8
winevulkan: Generate "in_ext" definition on demand.

There are cases in StructConversionFunction.definition where we will
generate copy code for extension struct members, without emitting the
definition of "in_ext" variable used in the copy code.

This issue is triggered by mismatches in the condition that guards the
generation of the "in_ext" definitions, and the condition(s) that govern
the generation of the member copy code (e.g., in
StructConversionFunction.member_needs_copy and
VkMember.needs_conversion).

In order to avoid such mismatches and the burden of having to keep the
conditions in sync, this commit generates the definition on demand, by
checking if it's actually needed by the member copy code.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
dlls/winevulkan/make_vulkan