File: surface_forwarding_prototypes.xslt

package info (click to toggle)
primus-vk 1.6.4-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 252 kB
  • sloc: cpp: 1,865; sh: 65; makefile: 49
file content (22 lines) | stat: -rw-r--r-- 1,340 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/registry">
  <xsl:for-each select="commands/command">
    <xsl:variable name="surface" select="param[type = 'VkSurfaceKHR'][not(contains(text(), '*'))]"/>
    <xsl:variable name="surfaceInfo" select="param[type = 'VkPhysicalDeviceSurfaceInfo2KHR']"/>
    <xsl:variable name="dev" select="param[type = 'VkPhysicalDevice']"/>
    <xsl:if test="($surface/text() != '' or $surfaceInfo/text() != '') and $dev/text() != '' and proto/name/text() != 'vkGetPhysicalDeviceSurfaceSupportKHR' and proto/name/text() != 'vkGetPhysicalDeviceSurfacePresentModes2EXT'">
<xsl:value-of select="proto/type"/> VKAPI_CALL PrimusVK_<xsl:value-of select="substring(proto/name,3)"/>(
<xsl:for-each select="param">
  <xsl:text>    </xsl:text><xsl:value-of select="."/>
  <xsl:if test="./following-sibling::param/text() != ''">,<xsl:text>
</xsl:text></xsl:if>
</xsl:for-each>) {
  VkPhysicalDevice phy = instance_info[GetKey(<xsl:value-of select="$dev/name"/>)].display;
  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>);
}	    
    </xsl:if>
  </xsl:for-each>
</xsl:template>
</xsl:stylesheet>