mirror of
https://gitee.com/openharmony/third_party_vulkan-loader
synced 2024-11-27 01:11:22 +00:00
scripts: Fix safe_struct Android versioning issue
The VK_ANDROID_external_memory_android_hardware_buffer extension uses an android structure that is undefined before android 'O'. Worked around this issue by defining a dummy structure for earlier android OS versions. Change-Id: If515920d3b1707cbeb6a0377827c680d93d516ff
This commit is contained in:
parent
5ddf2bc8fb
commit
299b31902c
@ -723,6 +723,12 @@ class HelperFileOutputGenerator(OutputGenerator):
|
||||
safe_struct_helper_source = '\n'
|
||||
safe_struct_helper_source += '#include "vk_safe_struct.h"\n'
|
||||
safe_struct_helper_source += '#include <string.h>\n'
|
||||
safe_struct_helper_source += '#ifdef VK_USE_PLATFORM_ANDROID_KHR\n'
|
||||
safe_struct_helper_source += '#if __ANDROID_API__ < __ANDROID_API_O__\n'
|
||||
safe_struct_helper_source += 'struct AHardwareBuffer {};\n'
|
||||
safe_struct_helper_source += '#endif\n'
|
||||
safe_struct_helper_source += '#endif\n'
|
||||
|
||||
safe_struct_helper_source += '\n'
|
||||
safe_struct_helper_source += self.GenerateSafeStructSource()
|
||||
return safe_struct_helper_source
|
||||
|
Loading…
Reference in New Issue
Block a user