diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/loader_extension_generator.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/scripts/loader_extension_generator.py b/scripts/loader_extension_generator.py index 105073d1..1d2d984c 100644 --- a/scripts/loader_extension_generator.py +++ b/scripts/loader_extension_generator.py @@ -1090,13 +1090,14 @@ class LoaderExtensionOutputGenerator(OutputGenerator): funcs += ' "ICD associated with VkPhysicalDevice does not support ' funcs += base_name funcs += '");\n' + funcs += ' }\n' if has_surface == 1: - funcs += ' VkIcdSurface *icd_surface = (VkIcdSurface *)(surface);\n' - funcs += ' uint8_t icd_index = phys_dev_term->icd_index;\n' - funcs += ' if (NULL != icd_surface->real_icd_surfaces) {\n' - funcs += ' if (NULL != (void *)icd_surface->real_icd_surfaces[icd_index]) {\n' - funcs += ' return icd_term->dispatch.' + funcs += ' VkIcdSurface *icd_surface = (VkIcdSurface *)(surface);\n' + funcs += ' uint8_t icd_index = phys_dev_term->icd_index;\n' + funcs += ' if (NULL != icd_surface->real_icd_surfaces) {\n' + funcs += ' if (NULL != (void *)icd_surface->real_icd_surfaces[icd_index]) {\n' + funcs += ' ' + return_prefix + 'icd_term->dispatch.' funcs += base_name funcs += '(' count = 0 @@ -1113,10 +1114,10 @@ class LoaderExtensionOutputGenerator(OutputGenerator): count += 1 funcs += ');\n' - funcs += ' }\n' + if not has_return_type: + funcs += ' return;\n' funcs += ' }\n' - - funcs += ' }\n' + funcs += ' }\n' funcs += return_prefix funcs += 'icd_term->dispatch.' @@ -1160,7 +1161,7 @@ class LoaderExtensionOutputGenerator(OutputGenerator): funcs += ' return;\n' funcs += ' }\n' funcs += ' }\n' - funcs += ' %sicd_term->dispatch.%s(' % (return_prefix, base_name) + funcs += ' %sicd_term->dispatch.%s(' % (return_prefix, base_name) count = 0 for param in ext_cmd.params: if count != 0: @@ -1168,7 +1169,7 @@ class LoaderExtensionOutputGenerator(OutputGenerator): funcs += param.name count += 1 funcs += ');\n' - funcs += ' }\n' + funcs += ' }\n' if has_return_type: funcs += ' return VK_SUCCESS;\n' |
