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
8.8 KiB239 linesraw
1result code = 0
2standard error = {
3}
4standard output = {
5{
6    "parameters": [
7        {
8            "name": "MyConstantBuffer",
9            "binding": {"kind": "descriptorTableSlot", "space": 1, "index": 0},
10            "type": {
11                "kind": "constantBuffer",
12                "elementType": {
13                    "kind": "struct",
14                    "fields": [
15                        {
16                            "name": "x",
17                            "type": {
18                                "kind": "scalar",
19                                "scalarType": "float32"
20                            },
21                            "binding": {"kind": "uniform", "offset": 0, "size": 4, "elementStride": 0}
22                        },
23                        {
24                            "name": "a",
25                            "type": {
26                                "kind": "array",
27                                "elementCount": 10,
28                                "elementType": {
29                                    "kind": "scalar",
30                                    "scalarType": "float32"
31                                },
32                                "uniformStride": 16
33                            },
34                            "binding": {"kind": "uniform", "offset": 16, "size": 160, "elementStride": 16}
35                        },
36                        {
37                            "name": "y",
38                            "type": {
39                                "kind": "scalar",
40                                "scalarType": "float32"
41                            },
42                            "binding": {"kind": "uniform", "offset": 176, "size": 4, "elementStride": 0}
43                        }
44                    ]
45                },
46                "containerVarLayout": {
47                    "binding": {"kind": "descriptorTableSlot", "index": 0}
48                },
49                "elementVarLayout": {
50                    "type": {
51                        "kind": "struct",
52                        "fields": [
53                            {
54                                "name": "x",
55                                "type": {
56                                    "kind": "scalar",
57                                    "scalarType": "float32"
58                                },
59                                "binding": {"kind": "uniform", "offset": 0, "size": 4, "elementStride": 0}
60                            },
61                            {
62                                "name": "a",
63                                "type": {
64                                    "kind": "array",
65                                    "elementCount": 10,
66                                    "elementType": {
67                                        "kind": "scalar",
68                                        "scalarType": "float32"
69                                    },
70                                    "uniformStride": 16
71                                },
72                                "binding": {"kind": "uniform", "offset": 16, "size": 160, "elementStride": 16}
73                            },
74                            {
75                                "name": "y",
76                                "type": {
77                                    "kind": "scalar",
78                                    "scalarType": "float32"
79                                },
80                                "binding": {"kind": "uniform", "offset": 176, "size": 4, "elementStride": 0}
81                            }
82                        ]
83                    },
84                    "binding": {"kind": "uniform", "offset": 0, "size": 192, "elementStride": 0}
85                }
86            }
87        },
88        {
89            "name": "pushConstantBuffer",
90            "binding": {"kind": "pushConstantBuffer", "index": 0},
91            "type": {
92                "kind": "constantBuffer",
93                "elementType": {
94                    "kind": "struct",
95                    "name": "MyPushConstantStruct",
96                    "fields": [
97                        {
98                            "name": "pushX",
99                            "type": {
100                                "kind": "scalar",
101                                "scalarType": "float32"
102                            },
103                            "binding": {"kind": "uniform", "offset": 0, "size": 4, "elementStride": 0}
104                        },
105                        {
106                            "name": "pushY",
107                            "type": {
108                                "kind": "scalar",
109                                "scalarType": "float32"
110                            },
111                            "binding": {"kind": "uniform", "offset": 4, "size": 4, "elementStride": 0}
112                        }
113                    ]
114                },
115                "containerVarLayout": {
116                    "binding": {"kind": "pushConstantBuffer", "index": 0}
117                },
118                "elementVarLayout": {
119                    "type": {
120                        "kind": "struct",
121                        "name": "MyPushConstantStruct",
122                        "fields": [
123                            {
124                                "name": "pushX",
125                                "type": {
126                                    "kind": "scalar",
127                                    "scalarType": "float32"
128                                },
129                                "binding": {"kind": "uniform", "offset": 0, "size": 4, "elementStride": 0}
130                            },
131                            {
132                                "name": "pushY",
133                                "type": {
134                                    "kind": "scalar",
135                                    "scalarType": "float32"
136                                },
137                                "binding": {"kind": "uniform", "offset": 4, "size": 4, "elementStride": 0}
138                            }
139                        ]
140                    },
141                    "binding": {"kind": "uniform", "offset": 0, "size": 8, "elementStride": 0}
142                }
143            }
144        },
145        {
146            "name": "tx",
147            "binding": {"kind": "descriptorTableSlot", "space": 2, "index": 1},
148            "type": {
149                "kind": "resource",
150                "baseShape": "texture2D",
151                "resultType": {
152                    "kind": "vector",
153                    "elementCount": 4,
154                    "elementType": {
155                        "kind": "scalar",
156                        "scalarType": "float32"
157                    }
158                }
159            }
160        },
161        {
162            "name": "ta",
163            "binding": {"kind": "descriptorTableSlot", "space": 3, "index": 2},
164            "type": {
165                "kind": "resource",
166                "baseShape": "texture2D",
167                "resultType": {
168                    "kind": "vector",
169                    "elementCount": 4,
170                    "elementType": {
171                        "kind": "scalar",
172                        "scalarType": "float32"
173                    }
174                }
175            }
176        },
177        {
178            "name": "ty",
179            "binding": {"kind": "descriptorTableSlot", "index": 0},
180            "type": {
181                "kind": "resource",
182                "baseShape": "texture2D",
183                "resultType": {
184                    "kind": "vector",
185                    "elementCount": 4,
186                    "elementType": {
187                        "kind": "scalar",
188                        "scalarType": "float32"
189                    }
190                }
191            }
192        },
193        {
194            "name": "sx",
195            "binding": {"kind": "descriptorTableSlot", "index": 1},
196            "type": {
197                "kind": "samplerState"
198            }
199        },
200        {
201            "name": "sa",
202            "binding": {"kind": "descriptorTableSlot", "index": 2},
203            "type": {
204                "kind": "array",
205                "elementCount": 4,
206                "elementType": {
207                    "kind": "samplerState"
208                }
209            }
210        },
211        {
212            "name": "sy",
213            "binding": {"kind": "descriptorTableSlot", "index": 3},
214            "type": {
215                "kind": "samplerState"
216            }
217        }
218    ],
219    "entryPoints": [
220        {
221            "name": "main",
222            "stage": "fragment",
223            "result": {
224                "stage": "fragment",
225                "binding": {"kind": "varyingOutput", "index": 0},
226                "semanticName": "SV_TARGET",
227                "type": {
228                    "kind": "vector",
229                    "elementCount": 4,
230                    "elementType": {
231                        "kind": "scalar",
232                        "scalarType": "float32"
233                    }
234                }
235            }
236        }
237    ]
238}
239}