create_vulkan_wrapper.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:python-vulkan-wrapper 作者: gabdube 项目源码 文件源码
def parse_allocation_callback(f):
    # Allocation callback must be defined before the structs, but there are no good way to differenciate them
    # from the function pointers. Hence why they are hardcoded here
    f.write("""
# Allocation callback
FnAllocationFunction = FUNCTYPE(c_void_p, c_void_p, c_size_t, c_size_t, SystemAllocationScope)
FnReallocationFunction = FUNCTYPE(c_void_p, c_void_p, c_size_t, c_size_t, SystemAllocationScope)
FnFreeFunction = FUNCTYPE(None, c_void_p, c_void_p)
FnInternalAllocationNotification = FUNCTYPE(None, c_void_p, c_size_t, InternalAllocationType, SystemAllocationScope)
FnInternalFreeNotification = FUNCTYPE(None, c_void_p, c_size_t, InternalAllocationType, SystemAllocationScope)
FnDebugReportCallbackEXT = FUNCTYPE(Bool32, DebugReportFlagsEXT, DebugReportObjectTypeEXT, c_uint64, c_size_t, c_uint32, c_char_p, c_char_p, c_void_p)
"""[1::])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号