···369369 def __init__(self):
370370 self.current_condition = None
371371372372- def process_condition(self, new_condition: Optional[str]) -> Optional[str]:
372372+ def process_condition(self, new_condition: Optional[str], finish: bool = False) -> Optional[str]:
373373 """Return a line (or lines) to yield if required based on the new condition state."""
374374 lines = []
375375 if self.current_condition and new_condition != self.current_condition:
376376 # Close current condition if required.
377377 lines.append("#endif // {}".format(self.current_condition))
378378- # empty line
379379- lines.append("")
378378+ if not finish:
379379+ # empty line
380380+ lines.append("")
380381 self.current_condition = None
381382382382- if new_condition != self.current_condition:
383383+ if not finish and new_condition != self.current_condition:
383384 # Open new condition if required
384385 lines.append("#if {}".format(new_condition))
385386 self.current_condition = new_condition
···389390390391 def finish(self) -> Optional[str]:
391392 """Return a line (or lines) to yield if required at the end of the loop."""
392392- return self.process_condition(None)
393393+ return self.process_condition(None, finish=True)
393394394395395396def generate_per_command(
···418419 def per_command(cmd: Cmd):
419420 return "\tPFN_{} {};".format(cmd.name, cmd.member_name)
420421421421- return generate_per_command(commands, per_command)
422422+ yield from generate_per_command(commands, per_command)
423423+ yield ''
422424423425424426def generate_proc_macro(macro: str, commands: List[Cmd]):
+1
src/xrt/auxiliary/vk/vk_function_loaders.c
···339339#endif // defined(VK_EXT_debug_utils)
340340341341 // end of GENERATED device loader code - do not modify - used by scripts
342342+342343 // clang-format on
343344 return VK_SUCCESS;
344345}