Lines Matching refs:append

34 sys.path.append(main_path)
81 contents.append(copyright)
83 contents.append(header)
85 contents.append(body)
87 contents.append(footer)
135 lines.append("#include \"vk_loader_platform.h\"")
136 lines.append("#include \"loader.h\"")
137 lines.append("#if defined(__linux__)")
138 lines.append("#pragma GCC optimize(3) // force gcc to use tail-calls")
139 lines.append("#endif")
145 lines.append('\nVKAPI_ATTR void VKAPI_CALL vkDevExt%s(VkDevice device)' % i)
146 lines.append('{')
147 lines.append(' const struct loader_dev_dispatch_table *disp;')
148 lines.append(' disp = loader_get_dev_dispatch(device);')
149 lines.append(' disp->ext_dispatch.DevExt[%s](device);' % i)
150 lines.append('}')
151 lines.append('')
152 lines.append('void *loader_get_dev_ext_trampoline(uint32_t index)')
153 lines.append('{')
154 lines.append(' switch (index) {')
156 lines.append(' case %s:' % i)
157 lines.append(' return vkDevExt%s;' % i)
158 lines.append(' }')
159 lines.append(' return NULL;')
160 lines.append('}')
184 setup.append("VkSwapchainImageInfoKHR *info = %s;" % pdata)
185 setup.append("size_t count = *%s / sizeof(*info), i;" % psize)
186 setup.append("for (i = 0; i < count; i++) {")
187 setup.append(" %s(info[i].image, disp);" % method)
188 setup.append(" %s(info[i].memory, disp);" % method)
189 setup.append("}")
193 setup.append("%s(*%s, disp);" % (method, param.name))
198 setup.append(" if (%s) {" % cond)
199 setup.append(" " + joined)
200 setup.append(" }")
216 func.append(qual + proto.c_func(prefix="vk", attr="VKAPI"))
217 func.append("{")
220 func.append(" const VkLayerDispatchTable *disp;")
222 func.append(" VkResult res;")
223 func.append("")
226 func.append(" disp = loader_get_dispatch(%s);" %
228 func.append("")
233 func.append(" " + dispatch)
235 func.append(" return " + dispatch)
237 func.append(" res = " + dispatch)
238 func.append(obj_setup)
239 func.append("")
240 func.append(" return res;")
242 func.append("}")
244 funcs.append("\n".join(func))
274 stmts.append("table->%s = (PFN_vk%s) gpa(gpu, \"vk%s\");" %
277 stmts.append("table->%s = vk%s; /* non-dispatchable */" %
279 … func.append("static inline void %s_init_device_dispatch_table(VkLayerDispatchTable *table,"
281 … func.append("%s PFN_vkGetDeviceProcAddr gpa,"
283 func.append("%s VkPhysicalDevice gpu)"
289 stmts.append("table->%s = vk%s;" % (proto.name, proto.name))
290 …func.append("static inline void %s_init_instance_dispatch_table(VkLayerInstanceDispatchTable *tabl…
292 func.append("{")
293 func.append(" %s" % "\n ".join(stmts))
294 func.append("}")
302 lookups.append("if (!strcmp(name, \"%s\"))" % (proto.name))
303 lookups.append(" return (void *) table->%s;"
307 … func.append("static inline void *%s_lookup_dispatch_table(const VkLayerDispatchTable *table,"
309 func.append("%s const char *name)"
311 func.append("{")
312 func.append(generate_get_proc_addr_check("name"))
313 func.append("")
314 func.append(" name += 2;")
315 func.append(" %s" % "\n ".join(lookups))
316 func.append("")
317 func.append(" return NULL;")
318 func.append("}")
382 body.append("LIBRARY " + self.library)
383 body.append("EXPORTS")
392 body.append(" vk" + proto.name)
416 lookups.append("/* no %s%s */" % (self.prefix, proto.name))
419 lookups.append("if (!strcmp(name, \"%s\"))" % proto.name)
420 lookups.append(" return (%s) %s%s;" %
426 special_lookups.append("if (!strcmp(name, \"%s\"))" % proto.name)
427 special_lookups.append(" return (%s) %s%s;" %
432 body.append("static inline %s globalGetProcAddr(const char *name)" %
434 body.append("{")
435 body.append(generate_get_proc_addr_check("name"))
436 body.append("")
437 body.append(" name += 2;")
438 body.append(" %s" % "\n ".join(lookups))
439 body.append("")
440 body.append(" return NULL;")
441 body.append("}")
442 body.append("")
443 body.append("static inline void *loader_non_passthrough_gpa(const char *name)")
444 body.append("{")
445 body.append(generate_get_proc_addr_check("name"))
446 body.append("")
447 body.append(" name += 2;")
448 body.append(" %s" % "\n ".join(special_lookups))
449 body.append("")
450 body.append(" return NULL;")
451 body.append("}")