Lines Matching refs:term_func
1531 term_func = ''
1533 term_func += '// Some device commands still need a terminator because the loader needs to unwrap something about them.\n'
1534 term_func += '// In many cases, the item needing unwrapping is a VkPhysicalDevice or VkSurfaceKHR object. But there may be other items\n'
1535 term_func += '// in the future.\n'
1536 term_func += 'PFN_vkVoidFunction get_extension_device_proc_terminator(struct loader_device *dev, const char *name, bool* found_name) {\n'
1537 term_func += ''' *found_name = false;
1549 term_func += f' // ---- Core {version.name} commands\n'
1553 term_func += f'#if defined({ext_cmd.protect})\n'
1555 term_func += f' // ---- {ext_cmd.ext_name} extension commands\n'
1558 term_func += f' if (!strcmp(name, "{ext_cmd.name[2:]}")) {{\n'
1559 term_func += f' *found_name = true;\n'
1561 term_func += f' return dev->driver_extensions.{ext_cmd.ext_name[3:].lower()}_enabled && dev->driver_extensions.{ext_cmd.require[3:].lower()}_enabled ?\n'
1563 term_func += f' return dev->driver_extensions.{ext_cmd.ext_name[3:].lower()}_enabled ?\n'
1564 term_func += f' (PFN_vkVoidFunction)terminator_{(ext_cmd.name[2:])} : NULL;\n'
1565 term_func += f' }}\n'
1568 term_func += '#endif // %s\n' % last_protect
1570 term_func += ' return NULL;\n'
1571 term_func += '}\n\n'
1573 return term_func
1578 term_func = ''
1579 term_func += '// Functions that required a terminator need to have a separate dispatch table which contains their corresponding\n'
1580 term_func += '// device function. This is used in the terminators themselves.\n'
1581 term_func += 'struct loader_device_terminator_dispatch {\n'
1589 term_func += f' // ---- Core {version.name} commands\n'
1593 term_func += f'#if defined({ext_cmd.protect})\n'
1595 term_func += f' // ---- {ext_cmd.ext_name} extension commands\n'
1598 term_func += f' PFN_{ext_cmd.name} {ext_cmd.name[2:]};\n'
1601 term_func += '#endif // %s\n' % last_protect
1603 term_func += '};\n\n'
1605 return term_func
1637 term_func = ''
1639 term_func += '// Functions that required a terminator need to have a separate dispatch table which contains their corresponding\n'
1640 term_func += '// device function. This is used in the terminators themselves.\n'
1641 term_func += 'void init_extension_device_proc_terminator_dispatch(struct loader_device *dev) {\n'
1642 term_func += ' struct loader_device_terminator_dispatch* dispatch = &dev->loader_dispatch.extension_terminator_dispatch;\n'
1643 term_func += ' PFN_vkGetDeviceProcAddr gpda = (PFN_vkGetDeviceProcAddr)dev->phys_dev_term->this_icd_term->dispatch.GetDeviceProcAddr;\n'
1650 term_func += f' // ---- Core {version.name} commands\n'
1654 term_func += f'#if defined({ext_cmd.protect})\n'
1656 term_func += f' // ---- {ext_cmd.ext_name} extension commands\n'
1661 term_func += f' if (dev->driver_extensions.{ext_cmd.ext_name[3:].lower()}_enabled && dev->driver_extensions.{ext_cmd.require[3:].lower()}_enabled)\n'
1662 term_func += f' dispatch->{ext_cmd.name[2:]} = (PFN_{(ext_cmd.name)})gpda(dev->icd_device, "{(ext_cmd.name)}");\n'
1664 term_func += f' if (dev->driver_extensions.{ext_cmd.ext_name[3:].lower()}_enabled)\n'
1665 term_func += f' dispatch->{ext_cmd.name[2:]} = (PFN_{(ext_cmd.name)})gpda(dev->icd_device, "{(ext_cmd.name)}");\n'
1668 term_func += '#endif // %s\n' % last_protect
1670 term_func += '}\n\n'
1672 return term_func