Lines Matching refs:cmd

163 def _is_driver_table_entry(cmd):  argument
169 if gencom.is_function_supported(cmd):
170 if cmd in _NEEDED_COMMANDS:
172 if cmd in gencom.extension_dict:
173 if (gencom.extension_dict[cmd] == 'VK_ANDROID_native_buffer' or
174 gencom.extension_dict[cmd] == 'VK_EXT_debug_report'):
179 def _is_instance_driver_table_entry(cmd): argument
185 return (_is_driver_table_entry(cmd) and
186 gencom.is_instance_dispatched(cmd))
189 def _is_device_driver_table_entry(cmd): argument
195 return (_is_driver_table_entry(cmd) and
196 gencom.is_device_dispatched(cmd))
254 for cmd in gencom.command_list:
255 if _is_instance_driver_table_entry(cmd):
256 f.write(gencom.indent(1) + 'PFN_' + cmd + ' ' +
257 gencom.base_name(cmd) + ';\n')
266 for cmd in gencom.command_list:
267 if _is_device_driver_table_entry(cmd):
268 f.write(gencom.indent(1) + 'PFN_' + cmd + ' ' +
269 gencom.base_name(cmd) + ';\n')
300 def _is_intercepted(cmd): argument
306 if gencom.is_function_supported(cmd):
307 if cmd in _INTERCEPTED_COMMANDS:
310 if cmd in gencom.extension_dict:
311 return gencom.extension_dict[cmd] in _INTERCEPTED_EXTENSIONS
315 def _get_proc_hook_enum(cmd): argument
321 assert cmd in gencom.version_dict
323 if gencom.version_dict[cmd] == 'VK_VERSION_' + version:
327 def _need_proc_hook_stub(cmd): argument
333 if _is_intercepted(cmd) and gencom.is_device_dispatched(cmd):
334 if cmd in gencom.extension_dict:
335 if not gencom.is_extension_internal(gencom.extension_dict[cmd]):
337 elif gencom.version_dict[cmd] != 'VK_VERSION_1_0':
342 def _define_proc_hook_stub(cmd, f): argument
349 if _need_proc_hook_stub(cmd):
350 return_type = gencom.return_type_dict[cmd]
354 if cmd in gencom.extension_dict:
355 ext_name = gencom.extension_dict[cmd]
358 ext_name = gencom.version_dict[cmd]
359 ext_hook = _get_proc_hook_enum(cmd)
361 handle = gencom.param_dict[cmd][0][1]
362 param_types = ', '.join([''.join(i) for i in gencom.param_dict[cmd]])
363 param_names = ', '.join([''.join(i[1]) for i in gencom.param_dict[cmd]])
365 f.write('VKAPI_ATTR ' + return_type + ' checked' + gencom.base_name(cmd) +
371 if gencom.return_type_dict[cmd] != 'void':
373 f.write(gencom.base_name(cmd) + '(' + param_names + ');\n')
377 ext_name + ' not enabled. ' + cmd + ' not executed.\");\n')
378 if gencom.return_type_dict[cmd] != 'void':
383 def _define_global_proc_hook(cmd, f): argument
390 assert cmd not in gencom.extension_dict
393 f.write(gencom.indent(2) + '\"' + cmd + '\",\n')
395 f.write(gencom.indent(2) + _get_proc_hook_enum(cmd) + ',\n')
397 gencom.base_name(cmd) + '),\n')
402 def _define_instance_proc_hook(cmd, f): argument
410 f.write(gencom.indent(2) + '\"' + cmd + '\",\n')
413 if cmd in gencom.extension_dict:
414 ext_name = gencom.extension_dict[cmd]
424 reinterpret_cast<PFN_vkVoidFunction>(""" + gencom.base_name(cmd) + """),
427 f.write(gencom.indent(2) + _get_proc_hook_enum(cmd) + ',\n')
429 reinterpret_cast<PFN_vkVoidFunction>(""" + gencom.base_name(cmd) + """),
435 def _define_device_proc_hook(cmd, f): argument
443 f.write(gencom.indent(2) + '\"' + cmd + '\",\n')
446 if (cmd in gencom.extension_dict or
447 gencom.version_dict[cmd] != 'VK_VERSION_1_0'):
450 if cmd in gencom.extension_dict:
451 ext_name = gencom.extension_dict[cmd]
454 ext_name = gencom.version_dict[cmd]
455 ext_hook = _get_proc_hook_enum(cmd)
464 reinterpret_cast<PFN_vkVoidFunction>(""" + gencom.base_name(cmd) + """),
466 gencom.base_name(cmd) + '),\n')
469 f.write(gencom.indent(2) + _get_proc_hook_enum(cmd) + ',\n')
471 reinterpret_cast<PFN_vkVoidFunction>(""" + gencom.base_name(cmd) + """),
500 for cmd in gencom.command_list:
501 _define_proc_hook_stub(cmd, f)
510 for cmd in sorted_command_list:
511 if _is_intercepted(cmd):
512 if gencom.is_globally_dispatched(cmd):
513 _define_global_proc_hook(cmd, f)
514 elif gencom.is_instance_dispatched(cmd):
515 _define_instance_proc_hook(cmd, f)
516 elif gencom.is_device_dispatched(cmd):
517 _define_device_proc_hook(cmd, f)
572 for cmd in gencom.command_list:
573 if _is_instance_driver_table_entry(cmd):
574 gencom.init_proc(cmd, f)
590 for cmd in gencom.command_list:
591 if _is_device_driver_table_entry(cmd):
592 gencom.init_proc(cmd, f)