yum-mirror/slang

Making it easier to work with shaders

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

Harsh Aggarwal (NVIDIA)Fix 7441: CUDA boolean vector layout to use 1-byte elements (#7862)bdda8a90c

master
13.4 KiB390 linesraw
1result code = 0
2standard error = {
3}
4standard output = {
5{
6    "parameters": [
7        {
8            "name": "UsedCB",
9            "binding": {"kind": "constantBuffer", "index": 1},
10            "type": {
11                "kind": "constantBuffer",
12                "elementType": {
13                    "kind": "struct",
14                    "name": "S",
15                    "fields": [
16                        {
17                            "name": "Size",
18                            "type": {
19                                "kind": "vector",
20                                "elementCount": 2,
21                                "elementType": {
22                                    "kind": "scalar",
23                                    "scalarType": "uint32"
24                                }
25                            },
26                            "binding": {"kind": "uniform", "offset": 0, "size": 8, "elementStride": 4}
27                        }
28                    ]
29                },
30                "containerVarLayout": {
31                    "binding": {"kind": "constantBuffer", "index": 0}
32                },
33                "elementVarLayout": {
34                    "type": {
35                        "kind": "struct",
36                        "name": "S",
37                        "fields": [
38                            {
39                                "name": "Size",
40                                "type": {
41                                    "kind": "vector",
42                                    "elementCount": 2,
43                                    "elementType": {
44                                        "kind": "scalar",
45                                        "scalarType": "uint32"
46                                    }
47                                },
48                                "binding": {"kind": "uniform", "offset": 0, "size": 8, "elementStride": 4}
49                            }
50                        ]
51                    },
52                    "binding": {"kind": "uniform", "offset": 0, "size": 8, "elementStride": 0}
53                }
54            }
55        },
56        {
57            "name": "UnusedCB",
58            "binding": {"kind": "constantBuffer", "index": 2},
59            "type": {
60                "kind": "constantBuffer",
61                "elementType": {
62                    "kind": "struct",
63                    "name": "S",
64                    "fields": [
65                        {
66                            "name": "Size",
67                            "type": {
68                                "kind": "vector",
69                                "elementCount": 2,
70                                "elementType": {
71                                    "kind": "scalar",
72                                    "scalarType": "uint32"
73                                }
74                            },
75                            "binding": {"kind": "uniform", "offset": 0, "size": 8, "elementStride": 4}
76                        }
77                    ]
78                },
79                "containerVarLayout": {
80                    "binding": {"kind": "constantBuffer", "index": 0}
81                },
82                "elementVarLayout": {
83                    "type": {
84                        "kind": "struct",
85                        "name": "S",
86                        "fields": [
87                            {
88                                "name": "Size",
89                                "type": {
90                                    "kind": "vector",
91                                    "elementCount": 2,
92                                    "elementType": {
93                                        "kind": "scalar",
94                                        "scalarType": "uint32"
95                                    }
96                                },
97                                "binding": {"kind": "uniform", "offset": 0, "size": 8, "elementStride": 4}
98                            }
99                        ]
100                    },
101                    "binding": {"kind": "uniform", "offset": 0, "size": 8, "elementStride": 0}
102                }
103            }
104        },
105        {
106            "name": "UsedTexture",
107            "binding": {"kind": "shaderResource", "index": 0},
108            "type": {
109                "kind": "resource",
110                "baseShape": "texture2D",
111                "resultType": {
112                    "kind": "vector",
113                    "elementCount": 4,
114                    "elementType": {
115                        "kind": "scalar",
116                        "scalarType": "float32"
117                    }
118                }
119            }
120        },
121        {
122            "name": "UnusedTexture",
123            "binding": {"kind": "shaderResource", "index": 1},
124            "type": {
125                "kind": "resource",
126                "baseShape": "texture2D",
127                "resultType": {
128                    "kind": "vector",
129                    "elementCount": 4,
130                    "elementType": {
131                        "kind": "scalar",
132                        "scalarType": "float32"
133                    }
134                }
135            }
136        },
137        {
138            "name": "UsedBuffer",
139            "binding": {"kind": "shaderResource", "index": 2},
140            "format": "r32ui",
141            "type": {
142                "kind": "resource",
143                "baseShape": "textureBuffer"
144            }
145        },
146        {
147            "name": "UnusedBuffer",
148            "binding": {"kind": "shaderResource", "index": 3},
149            "format": "r32ui",
150            "type": {
151                "kind": "resource",
152                "baseShape": "textureBuffer"
153            }
154        },
155        {
156            "name": "UsedStructuredBuffer",
157            "binding": {"kind": "shaderResource", "index": 4},
158            "type": {
159                "kind": "resource",
160                "baseShape": "structuredBuffer",
161                "resultType": {
162                    "kind": "scalar",
163                    "scalarType": "uint32"
164                }
165            }
166        },
167        {
168            "name": "UnusedStructuredBuffer",
169            "binding": {"kind": "shaderResource", "index": 5},
170            "type": {
171                "kind": "resource",
172                "baseShape": "structuredBuffer",
173                "resultType": {
174                    "kind": "scalar",
175                    "scalarType": "uint32"
176                }
177            }
178        },
179        {
180            "name": "UsedRWTexture",
181            "binding": {"kind": "unorderedAccess", "index": 0},
182            "type": {
183                "kind": "resource",
184                "baseShape": "texture2D",
185                "access": "readWrite",
186                "resultType": {
187                    "kind": "vector",
188                    "elementCount": 4,
189                    "elementType": {
190                        "kind": "scalar",
191                        "scalarType": "float32"
192                    }
193                }
194            }
195        },
196        {
197            "name": "UnusedRWTexture",
198            "binding": {"kind": "unorderedAccess", "index": 1},
199            "type": {
200                "kind": "resource",
201                "baseShape": "texture2D",
202                "access": "readWrite",
203                "resultType": {
204                    "kind": "vector",
205                    "elementCount": 4,
206                    "elementType": {
207                        "kind": "scalar",
208                        "scalarType": "float32"
209                    }
210                }
211            }
212        },
213        {
214            "name": "UsedRWBuffer",
215            "binding": {"kind": "unorderedAccess", "index": 2},
216            "format": "r32ui",
217            "type": {
218                "kind": "resource",
219                "baseShape": "textureBuffer",
220                "access": "readWrite"
221            }
222        },
223        {
224            "name": "UnusedRWBuffer",
225            "binding": {"kind": "unorderedAccess", "index": 3},
226            "format": "r32ui",
227            "type": {
228                "kind": "resource",
229                "baseShape": "textureBuffer",
230                "access": "readWrite"
231            }
232        },
233        {
234            "name": "UsedRWStructuredBuffer",
235            "binding": {"kind": "unorderedAccess", "index": 4},
236            "type": {
237                "kind": "resource",
238                "baseShape": "structuredBuffer",
239                "access": "readWrite",
240                "resultType": {
241                    "kind": "scalar",
242                    "scalarType": "uint32"
243                }
244            }
245        },
246        {
247            "name": "UnusedRWStructuredBuffer",
248            "binding": {"kind": "unorderedAccess", "index": 5},
249            "type": {
250                "kind": "resource",
251                "baseShape": "structuredBuffer",
252                "access": "readWrite",
253                "resultType": {
254                    "kind": "scalar",
255                    "scalarType": "uint32"
256                }
257            }
258        },
259        {
260            "name": "UsedSampler",
261            "binding": {"kind": "samplerState", "index": 0},
262            "type": {
263                "kind": "samplerState"
264            }
265        },
266        {
267            "name": "UnusedSampler",
268            "binding": {"kind": "samplerState", "index": 1},
269            "type": {
270                "kind": "samplerState"
271            }
272        },
273        {
274            "name": "UsedUniform",
275            "binding": {"kind": "uniform", "offset": 0, "size": 4, "elementStride": 0},
276            "type": {
277                "kind": "scalar",
278                "scalarType": "uint32"
279            }
280        },
281        {
282            "name": "UnusedUniform",
283            "binding": {"kind": "uniform", "offset": 4, "size": 4, "elementStride": 0},
284            "type": {
285                "kind": "scalar",
286                "scalarType": "uint32"
287            }
288        }
289    ],
290    "entryPoints": [
291        {
292            "name": "main",
293            "stage": "compute",
294            "parameters": [
295                {
296                    "name": "dispatchThreadID",
297                    "semanticName": "SV_DISPATCHTHREADID",
298                    "type": {
299                        "kind": "vector",
300                        "elementCount": 3,
301                        "elementType": {
302                            "kind": "scalar",
303                            "scalarType": "uint32"
304                        }
305                    }
306                }
307            ],
308            "threadGroupSize": [1, 1, 1],
309            "bindings": [
310                {
311                    "name": "UsedCB",
312                    "binding": {"kind": "constantBuffer", "index": 1, "used": 1}
313                },
314                {
315                    "name": "UnusedCB",
316                    "binding": {"kind": "constantBuffer", "index": 2, "used": 0}
317                },
318                {
319                    "name": "UsedTexture",
320                    "binding": {"kind": "shaderResource", "index": 0, "used": 1}
321                },
322                {
323                    "name": "UnusedTexture",
324                    "binding": {"kind": "shaderResource", "index": 1, "used": 0}
325                },
326                {
327                    "name": "UsedBuffer",
328                    "binding": {"kind": "shaderResource", "index": 2, "used": 1},
329                    "format": "r32ui"
330                },
331                {
332                    "name": "UnusedBuffer",
333                    "binding": {"kind": "shaderResource", "index": 3, "used": 0},
334                    "format": "r32ui"
335                },
336                {
337                    "name": "UsedStructuredBuffer",
338                    "binding": {"kind": "shaderResource", "index": 4, "used": 1}
339                },
340                {
341                    "name": "UnusedStructuredBuffer",
342                    "binding": {"kind": "shaderResource", "index": 5, "used": 0}
343                },
344                {
345                    "name": "UsedRWTexture",
346                    "binding": {"kind": "unorderedAccess", "index": 0, "used": 1}
347                },
348                {
349                    "name": "UnusedRWTexture",
350                    "binding": {"kind": "unorderedAccess", "index": 1, "used": 0}
351                },
352                {
353                    "name": "UsedRWBuffer",
354                    "binding": {"kind": "unorderedAccess", "index": 2, "used": 1},
355                    "format": "r32ui"
356                },
357                {
358                    "name": "UnusedRWBuffer",
359                    "binding": {"kind": "unorderedAccess", "index": 3, "used": 0},
360                    "format": "r32ui"
361                },
362                {
363                    "name": "UsedRWStructuredBuffer",
364                    "binding": {"kind": "unorderedAccess", "index": 4, "used": 1}
365                },
366                {
367                    "name": "UnusedRWStructuredBuffer",
368                    "binding": {"kind": "unorderedAccess", "index": 5, "used": 0}
369                },
370                {
371                    "name": "UsedSampler",
372                    "binding": {"kind": "samplerState", "index": 0, "used": 1}
373                },
374                {
375                    "name": "UnusedSampler",
376                    "binding": {"kind": "samplerState", "index": 1, "used": 0}
377                },
378                {
379                    "name": "UsedUniform",
380                    "binding": {"kind": "uniform", "offset": 0, "size": 4, "elementStride": 0}
381                },
382                {
383                    "name": "UnusedUniform",
384                    "binding": {"kind": "uniform", "offset": 4, "size": 4, "elementStride": 0}
385                }
386            ]
387        }
388    ]
389}
390}