yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

StanFixed stage and result field names in json reflection (#5927)76fdeaa47

master
7.9 KiB178 linesraw
1result code = 0
2standard error = {
3}
4standard output = {
5{
6    "parameters": [
7
8    ],
9    "entryPoints": [
10        {
11            "name": "main",
12            "stage": "vertex",
13            "parameters": [
14                {
15                    "name": "a",
16                    "stage": "vertex",
17                    "binding": {"kind": "varyingInput", "index": 0},
18                    "semanticName": "A",
19                    "type": {
20                        "kind": "vector",
21                        "elementCount": 4,
22                        "elementType": {
23                            "kind": "scalar",
24                            "scalarType": "float32"
25                        }
26                    }
27                },
28                {
29                    "name": "b",
30                    "stage": "vertex",
31                    "binding": {"kind": "varyingInput", "index": 1, "count": 3},
32                    "semanticName": "B",
33                    "type": {
34                        "kind": "struct",
35                        "name": "B",
36                        "fields": [
37                            {
38                                "name": "b0",
39                                "type": {
40                                    "kind": "vector",
41                                    "elementCount": 4,
42                                    "elementType": {
43                                        "kind": "scalar",
44                                        "scalarType": "int32"
45                                    }
46                                },
47                                "stage": "vertex",
48                                "binding": {"kind": "varyingInput", "index": 0},
49                                "semanticName": "B"
50                            },
51                            {
52                                "name": "b1",
53                                "type": {
54                                    "kind": "struct",
55                                    "name": "X",
56                                    "fields": [
57                                        {
58                                            "name": "x0",
59                                            "type": {
60                                                "kind": "vector",
61                                                "elementCount": 4,
62                                                "elementType": {
63                                                    "kind": "scalar",
64                                                    "scalarType": "float32"
65                                                }
66                                            },
67                                            "stage": "vertex",
68                                            "binding": {"kind": "varyingInput", "index": 0},
69                                            "semanticName": "B",
70                                            "semanticIndex": 1
71                                        },
72                                        {
73                                            "name": "x1",
74                                            "type": {
75                                                "kind": "vector",
76                                                "elementCount": 4,
77                                                "elementType": {
78                                                    "kind": "scalar",
79                                                    "scalarType": "float32"
80                                                }
81                                            },
82                                            "stage": "vertex",
83                                            "binding": {"kind": "varyingInput", "index": 1},
84                                            "semanticName": "B",
85                                            "semanticIndex": 2
86                                        }
87                                    ]
88                                },
89                                "stage": "vertex",
90                                "binding": {"kind": "varyingInput", "index": 1, "count": 2},
91                                "semanticName": "B",
92                                "semanticIndex": 1
93                            }
94                        ]
95                    }
96                },
97                {
98                    "name": "c",
99                    "stage": "vertex",
100                    "binding": {"kind": "varyingInput", "index": 4, "count": 3},
101                    "type": {
102                        "kind": "struct",
103                        "name": "C",
104                        "fields": [
105                            {
106                                "name": "c0",
107                                "type": {
108                                    "kind": "struct",
109                                    "name": "X",
110                                    "fields": [
111                                        {
112                                            "name": "x0",
113                                            "type": {
114                                                "kind": "vector",
115                                                "elementCount": 4,
116                                                "elementType": {
117                                                    "kind": "scalar",
118                                                    "scalarType": "float32"
119                                                }
120                                            },
121                                            "stage": "vertex",
122                                            "binding": {"kind": "varyingInput", "index": 0},
123                                            "semanticName": "CX"
124                                        },
125                                        {
126                                            "name": "x1",
127                                            "type": {
128                                                "kind": "vector",
129                                                "elementCount": 4,
130                                                "elementType": {
131                                                    "kind": "scalar",
132                                                    "scalarType": "float32"
133                                                }
134                                            },
135                                            "stage": "vertex",
136                                            "binding": {"kind": "varyingInput", "index": 1},
137                                            "semanticName": "CX",
138                                            "semanticIndex": 1
139                                        }
140                                    ]
141                                },
142                                "stage": "vertex",
143                                "binding": {"kind": "varyingInput", "index": 0, "count": 2},
144                                "semanticName": "CX"
145                            },
146                            {
147                                "name": "c1",
148                                "type": {
149                                    "kind": "vector",
150                                    "elementCount": 4,
151                                    "elementType": {
152                                        "kind": "scalar",
153                                        "scalarType": "int32"
154                                    }
155                                },
156                                "stage": "vertex",
157                                "binding": {"kind": "varyingInput", "index": 2},
158                                "semanticName": "CY"
159                            }
160                        ]
161                    }
162                }
163            ],
164            "result": {
165                "semanticName": "SV_POSITION",
166                "type": {
167                    "kind": "vector",
168                    "elementCount": 4,
169                    "elementType": {
170                        "kind": "scalar",
171                        "scalarType": "float32"
172                    }
173                }
174            }
175        }
176    ]
177}
178}