| 1 | <?xml version="1.0"?> |
| 2 | <xsl:stylesheet version="1.0" |
| 3 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
| 4 | <xsl:template match="/registry"> |
| 5 | <xsl:for-each select="commands/command"> |
| 6 | <xsl:variable name="surface" select="param[type = 'VkSurfaceKHR'][not(contains(text(), '*'))]"/> |
| 7 | <xsl:variable name="surfaceInfo" select="param[type = 'VkPhysicalDeviceSurfaceInfo2KHR']"/> |
| 8 | <xsl:variable name="dev" select="param[type = 'VkPhysicalDevice']"/> |
| 9 | <xsl:if test="($surface/text() != '' or $surfaceInfo/text() != '') and $dev/text() != '' and proto/name/text() != 'vkGetPhysicalDeviceSurfaceSupportKHR' and proto/name/text() != 'vkGetPhysicalDeviceSurfacePresentModes2EXT'"> |
| 10 | <xsl:value-of select="proto/type"/> VKAPI_CALL PrimusVK_<xsl:value-of select="substring(proto/name,3)"/>( |
| 11 | <xsl:for-each select="param"> |
| 12 | <xsl:text> </xsl:text><xsl:value-of select="."/> |
| 13 | <xsl:if test="./following-sibling::param/text() != ''">,<xsl:text> |
| 14 | </xsl:text></xsl:if> |
| 15 | </xsl:for-each>) { |
| 16 | VkPhysicalDevice phy = instance_info[GetKey(<xsl:value-of select="$dev/name"/>)].display; |
| 17 | return instance_dispatch[GetKey(phy)].<xsl:value-of select="substring(proto/name,3)"/>(phy<xsl:for-each select="param[type != 'VkPhysicalDevice']">, <xsl:value-of select="name"/></xsl:for-each>); |
| 18 | } |
| 19 | </xsl:if> |
| 20 | </xsl:for-each> |
| 21 | </xsl:template> |
| 22 | </xsl:stylesheet> |