Lines Matching refs:cmd

171 def _is_driver_table_entry(cmd):  argument
177 if gencom.is_function_supported(cmd):
178 if cmd in _NEEDED_COMMANDS:
180 if cmd in gencom.extension_dict:
181 if (gencom.extension_dict[cmd] == 'VK_ANDROID_native_buffer' or
182 gencom.extension_dict[cmd] == 'VK_EXT_debug_report'):
187 def _is_instance_driver_table_entry(cmd): argument
193 return (_is_driver_table_entry(cmd) and
194 gencom.is_instance_dispatched(cmd))
197 def _is_device_driver_table_entry(cmd): argument
203 return (_is_driver_table_entry(cmd) and
204 gencom.is_device_dispatched(cmd))
264 for cmd in gencom.command_list:
265 if _is_instance_driver_table_entry(cmd):
266 f.write(gencom.indent(1) + 'PFN_' + cmd + ' ' +
267 gencom.base_name(cmd) + ';\n')
276 for cmd in gencom.command_list:
277 if _is_device_driver_table_entry(cmd):
278 f.write(gencom.indent(1) + 'PFN_' + cmd + ' ' +
279 gencom.base_name(cmd) + ';\n')
310 def _is_intercepted(cmd): argument
316 if gencom.is_function_supported(cmd):
317 if cmd in _INTERCEPTED_COMMANDS:
320 if cmd in gencom.extension_dict:
321 return gencom.extension_dict[cmd] in _INTERCEPTED_EXTENSIONS
325 def _get_proc_hook_enum(cmd): argument
331 assert cmd in gencom.version_dict
333 if gencom.version_dict[cmd] == 'VK_VERSION_' + version:
337 def _need_proc_hook_stub(cmd): argument
343 if _is_intercepted(cmd) and gencom.is_device_dispatched(cmd):
344 if cmd in gencom.extension_dict:
345 if not gencom.is_extension_internal(gencom.extension_dict[cmd]):
347 elif gencom.version_dict[cmd] != 'VK_VERSION_1_0':
352 def _define_proc_hook_stub(cmd, f): argument
359 if _need_proc_hook_stub(cmd):
360 return_type = gencom.return_type_dict[cmd]
364 if cmd in gencom.extension_dict:
365 ext_name = gencom.extension_dict[cmd]
368 ext_name = gencom.version_dict[cmd]
369 ext_hook = _get_proc_hook_enum(cmd)
371 handle = gencom.param_dict[cmd][0][1]
372 param_types = ', '.join([''.join(i) for i in gencom.param_dict[cmd]])
373 param_names = ', '.join([''.join(i[1]) for i in gencom.param_dict[cmd]])
375 f.write('VKAPI_ATTR ' + return_type + ' checked' + gencom.base_name(cmd) +
381 if gencom.return_type_dict[cmd] != 'void':
383 f.write(gencom.base_name(cmd) + '(' + param_names + ');\n')
387 ext_name + ' not enabled. ' + cmd + ' not executed.\");\n')
388 if gencom.return_type_dict[cmd] != 'void':
393 def _define_global_proc_hook(cmd, f): argument
400 assert cmd not in gencom.extension_dict
403 f.write(gencom.indent(2) + '\"' + cmd + '\",\n')
405 f.write(gencom.indent(2) + _get_proc_hook_enum(cmd) + ',\n')
407 gencom.base_name(cmd) + '),\n')
412 def _define_instance_proc_hook(cmd, f): argument
420 f.write(gencom.indent(2) + '\"' + cmd + '\",\n')
423 if cmd in gencom.extension_dict:
424 ext_name = gencom.extension_dict[cmd]
434 reinterpret_cast<PFN_vkVoidFunction>(""" + gencom.base_name(cmd) + """),
437 f.write(gencom.indent(2) + _get_proc_hook_enum(cmd) + ',\n')
439 reinterpret_cast<PFN_vkVoidFunction>(""" + gencom.base_name(cmd) + """),
445 def _define_device_proc_hook(cmd, f): argument
453 f.write(gencom.indent(2) + '\"' + cmd + '\",\n')
456 if (cmd in gencom.extension_dict or
457 gencom.version_dict[cmd] != 'VK_VERSION_1_0'):
460 if cmd in gencom.extension_dict:
461 ext_name = gencom.extension_dict[cmd]
464 ext_name = gencom.version_dict[cmd]
465 ext_hook = _get_proc_hook_enum(cmd)
474 reinterpret_cast<PFN_vkVoidFunction>(""" + gencom.base_name(cmd) + """),
476 gencom.base_name(cmd) + '),\n')
479 f.write(gencom.indent(2) + _get_proc_hook_enum(cmd) + ',\n')
481 reinterpret_cast<PFN_vkVoidFunction>(""" + gencom.base_name(cmd) + """),
510 for cmd in gencom.command_list:
511 _define_proc_hook_stub(cmd, f)
520 for cmd in sorted_command_list:
521 if _is_intercepted(cmd):
522 if gencom.is_globally_dispatched(cmd):
523 _define_global_proc_hook(cmd, f)
524 elif gencom.is_instance_dispatched(cmd):
525 _define_instance_proc_hook(cmd, f)
526 elif gencom.is_device_dispatched(cmd):
527 _define_device_proc_hook(cmd, f)
582 for cmd in gencom.command_list:
583 if _is_instance_driver_table_entry(cmd):
584 gencom.init_proc(cmd, f)
600 for cmd in gencom.command_list:
601 if _is_device_driver_table_entry(cmd):
602 gencom.init_proc(cmd, f)