Skip to content

Commit 76fdeaa

Browse files
authored
Fixed stage and result field names in json reflection (shader-slang#5927)
1 parent 8e55b49 commit 76fdeaa

File tree

50 files changed

+86
-86
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+86
-86
lines changed

source/slang/slang-reflection-json.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -1006,22 +1006,22 @@ static void emitReflectionEntryPointJSON(
10061006
switch (entryPoint->getStage())
10071007
{
10081008
case SLANG_STAGE_VERTEX:
1009-
writer << ",\n\"stage:\": \"vertex\"";
1009+
writer << ",\n\"stage\": \"vertex\"";
10101010
break;
10111011
case SLANG_STAGE_HULL:
1012-
writer << ",\n\"stage:\": \"hull\"";
1012+
writer << ",\n\"stage\": \"hull\"";
10131013
break;
10141014
case SLANG_STAGE_DOMAIN:
1015-
writer << ",\n\"stage:\": \"domain\"";
1015+
writer << ",\n\"stage\": \"domain\"";
10161016
break;
10171017
case SLANG_STAGE_GEOMETRY:
1018-
writer << ",\n\"stage:\": \"geometry\"";
1018+
writer << ",\n\"stage\": \"geometry\"";
10191019
break;
10201020
case SLANG_STAGE_FRAGMENT:
1021-
writer << ",\n\"stage:\": \"fragment\"";
1021+
writer << ",\n\"stage\": \"fragment\"";
10221022
break;
10231023
case SLANG_STAGE_COMPUTE:
1024-
writer << ",\n\"stage:\": \"compute\"";
1024+
writer << ",\n\"stage\": \"compute\"";
10251025
break;
10261026
default:
10271027
break;
@@ -1051,7 +1051,7 @@ static void emitReflectionEntryPointJSON(
10511051
}
10521052
if (auto resultVarLayout = entryPoint->getResultVarLayout())
10531053
{
1054-
writer << ",\n\"result:\": ";
1054+
writer << ",\n\"result\": ";
10551055
emitReflectionParamJSON(writer, resultVarLayout);
10561056
}
10571057

tests/bindings/hlsl-to-vulkan-array.hlsl.expected

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ standard output = {
6464
"entryPoints": [
6565
{
6666
"name": "main",
67-
"stage:": "fragment",
68-
"result:": {
67+
"stage": "fragment",
68+
"result": {
6969
"stage": "fragment",
7070
"binding": {"kind": "varyingOutput", "index": 0},
7171
"semanticName": "SV_TARGET",

tests/bindings/hlsl-to-vulkan-combined.hlsl.expected

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ standard output = {
2424
"entryPoints": [
2525
{
2626
"name": "main",
27-
"stage:": "fragment",
28-
"result:": {
27+
"stage": "fragment",
28+
"result": {
2929
"stage": "fragment",
3030
"binding": {"kind": "varyingOutput", "index": 0},
3131
"semanticName": "SV_TARGET",

tests/bindings/hlsl-to-vulkan-global.hlsl.expected

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ standard output = {
3939
"entryPoints": [
4040
{
4141
"name": "main",
42-
"stage:": "fragment",
43-
"result:": {
42+
"stage": "fragment",
43+
"result": {
4444
"stage": "fragment",
4545
"binding": {"kind": "varyingOutput", "index": 0},
4646
"semanticName": "SV_TARGET",

tests/bindings/hlsl-to-vulkan-shift-implicit.hlsl.expected

+2-2
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ standard output = {
132132
"entryPoints": [
133133
{
134134
"name": "main",
135-
"stage:": "fragment",
136-
"result:": {
135+
"stage": "fragment",
136+
"result": {
137137
"stage": "fragment",
138138
"binding": {"kind": "varyingOutput", "index": 0},
139139
"semanticName": "SV_TARGET",

tests/bindings/hlsl-to-vulkan-shift.hlsl.expected

+2-2
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ standard output = {
132132
"entryPoints": [
133133
{
134134
"name": "main",
135-
"stage:": "fragment",
136-
"result:": {
135+
"stage": "fragment",
136+
"result": {
137137
"stage": "fragment",
138138
"binding": {"kind": "varyingOutput", "index": 0},
139139
"semanticName": "SV_TARGET",

tests/cross-compile/cpp-resource-reflection.slang.32.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ standard output = {
109109
"entryPoints": [
110110
{
111111
"name": "computeMain",
112-
"stage:": "compute",
112+
"stage": "compute",
113113
"parameters": [
114114
{
115115
"name": "dispatchThreadID",

tests/cross-compile/cpp-resource-reflection.slang.64.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ standard output = {
109109
"entryPoints": [
110110
{
111111
"name": "computeMain",
112-
"stage:": "compute",
112+
"stage": "compute",
113113
"parameters": [
114114
{
115115
"name": "dispatchThreadID",

tests/cuda/cuda-reflection.slang.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ standard output = {
228228
"entryPoints": [
229229
{
230230
"name": "main",
231-
"stage:": "compute",
231+
"stage": "compute",
232232
"parameters": [
233233
{
234234
"name": "dispatchThreadID",

tests/hlsl-intrinsic/sampler-feedback/sampler-feedback-basic.slang.expected

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ standard output = {
9090
"entryPoints": [
9191
{
9292
"name": "main",
93-
"stage:": "fragment",
94-
"result:": {
93+
"stage": "fragment",
94+
"result": {
9595
"stage": "fragment",
9696
"binding": {"kind": "varyingOutput", "index": 0},
9797
"semanticName": "SV_TARGET",

tests/ir/string-literal-hash-reflection.slang.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ standard output = {
2121
"entryPoints": [
2222
{
2323
"name": "computeMain",
24-
"stage:": "compute",
24+
"stage": "compute",
2525
"parameters": [
2626
{
2727
"name": "tid",

tests/reflection/actual-global.slang.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ standard output = {
2929
"entryPoints": [
3030
{
3131
"name": "computeMain",
32-
"stage:": "compute",
32+
"stage": "compute",
3333
"parameters": [
3434
{
3535
"name": "dispatchThreadID",

tests/reflection/arrays.hlsl.expected

+2-2
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ standard output = {
142142
"entryPoints": [
143143
{
144144
"name": "main",
145-
"stage:": "fragment",
146-
"result:": {
145+
"stage": "fragment",
146+
"result": {
147147
"stage": "fragment",
148148
"binding": {"kind": "varyingOutput", "index": 0},
149149
"semanticName": "SV_TARGET",

tests/reflection/attribute.slang.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ standard output = {
265265
"entryPoints": [
266266
{
267267
"name": "main",
268-
"stage:": "compute",
268+
"stage": "compute",
269269
"parameters": [
270270
{
271271
"name": "dispatchThreadID",

tests/reflection/binding-gl.hlsl.expected

+2-2
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ standard output = {
138138
"entryPoints": [
139139
{
140140
"name": "main",
141-
"stage:": "fragment",
142-
"result:": {
141+
"stage": "fragment",
142+
"result": {
143143
"stage": "fragment",
144144
"binding": {"kind": "varyingOutput", "index": 0},
145145
"semanticName": "SV_TARGET",

tests/reflection/binding-push-constant-gl.hlsl.expected

+2-2
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ standard output = {
195195
"entryPoints": [
196196
{
197197
"name": "main",
198-
"stage:": "fragment",
199-
"result:": {
198+
"stage": "fragment",
199+
"result": {
200200
"stage": "fragment",
201201
"binding": {"kind": "varyingOutput", "index": 0},
202202
"semanticName": "SV_TARGET",

tests/reflection/buffer-layout.slang.1.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ standard output = {
249249
"entryPoints": [
250250
{
251251
"name": "main",
252-
"stage:": "compute",
252+
"stage": "compute",
253253
"parameters": [
254254
{
255255
"name": "dispatchThreadID",

tests/reflection/buffer-layout.slang.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ standard output = {
249249
"entryPoints": [
250250
{
251251
"name": "main",
252-
"stage:": "compute",
252+
"stage": "compute",
253253
"parameters": [
254254
{
255255
"name": "dispatchThreadID",

tests/reflection/cross-compile.slang.expected

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ standard output = {
7070
"entryPoints": [
7171
{
7272
"name": "main",
73-
"stage:": "fragment",
74-
"result:": {
73+
"stage": "fragment",
74+
"result": {
7575
"stage": "fragment",
7676
"binding": {"kind": "varyingOutput", "index": 0},
7777
"semanticName": "SV_TARGET",

tests/reflection/default-space.slang.expected

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ standard output = {
5757
"entryPoints": [
5858
{
5959
"name": "main",
60-
"stage:": "fragment",
61-
"result:": {
60+
"stage": "fragment",
61+
"result": {
6262
"stage": "fragment",
6363
"binding": {"kind": "varyingOutput", "index": 0},
6464
"semanticName": "SV_TARGET",

tests/reflection/explicit-register-space.slang.expected

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ standard output = {
1616
"entryPoints": [
1717
{
1818
"name": "main",
19-
"stage:": "fragment",
20-
"result:": {
19+
"stage": "fragment",
20+
"result": {
2121
"stage": "fragment",
2222
"binding": {"kind": "varyingOutput", "index": 0},
2323
"semanticName": "SV_TARGET",

tests/reflection/gh-55.glsl.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ standard output = {
4444
"entryPoints": [
4545
{
4646
"name": "main",
47-
"stage:": "fragment"
47+
"stage": "fragment"
4848
}
4949
]
5050
}

tests/reflection/global-type-params.slang.expected

+2-2
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ standard output = {
180180
"entryPoints": [
181181
{
182182
"name": "main",
183-
"stage:": "fragment",
184-
"result:": {
183+
"stage": "fragment",
184+
"result": {
185185
"stage": "fragment",
186186
"binding": {"kind": "varyingOutput", "index": 0},
187187
"semanticName": "SV_TARGET",

tests/reflection/global-uniforms.hlsl.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ standard output = {
7171
"entryPoints": [
7272
{
7373
"name": "main",
74-
"stage:": "fragment"
74+
"stage": "fragment"
7575
}
7676
]
7777
}

tests/reflection/matrix-layout.slang.1.expected

+2-2
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ standard output = {
230230
"entryPoints": [
231231
{
232232
"name": "main",
233-
"stage:": "fragment",
234-
"result:": {
233+
"stage": "fragment",
234+
"result": {
235235
"stage": "fragment",
236236
"binding": {"kind": "varyingOutput", "index": 0},
237237
"semanticName": "SV_TARGET",

tests/reflection/matrix-layout.slang.expected

+2-2
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ standard output = {
230230
"entryPoints": [
231231
{
232232
"name": "main",
233-
"stage:": "fragment",
234-
"result:": {
233+
"stage": "fragment",
234+
"result": {
235235
"stage": "fragment",
236236
"binding": {"kind": "varyingOutput", "index": 0},
237237
"semanticName": "SV_TARGET",

tests/reflection/mix-explicit-and-implicit-spaces.slang.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ standard output = {
140140
"entryPoints": [
141141
{
142142
"name": "main",
143-
"stage:": "compute",
143+
"stage": "compute",
144144
"threadGroupSize": [1, 1, 1]
145145
}
146146
]

tests/reflection/multi-file.hlsl.expected

+4-4
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,8 @@ standard output = {
402402
"entryPoints": [
403403
{
404404
"name": "mainVS",
405-
"stage:": "vertex",
406-
"result:": {
405+
"stage": "vertex",
406+
"result": {
407407
"semanticName": "SV_POSITION",
408408
"type": {
409409
"kind": "vector",
@@ -417,8 +417,8 @@ standard output = {
417417
},
418418
{
419419
"name": "mainFS",
420-
"stage:": "fragment",
421-
"result:": {
420+
"stage": "fragment",
421+
"result": {
422422
"stage": "fragment",
423423
"binding": {"kind": "varyingOutput", "index": 0},
424424
"semanticName": "SV_TARGET",

tests/reflection/parameter-block-explicit-space.slang.expected

+2-2
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ standard output = {
196196
"entryPoints": [
197197
{
198198
"name": "main",
199-
"stage:": "fragment",
200-
"result:": {
199+
"stage": "fragment",
200+
"result": {
201201
"stage": "fragment",
202202
"binding": {"kind": "varyingOutput", "index": 0},
203203
"semanticName": "SV_TARGET",

tests/reflection/parameter-block.slang.1.expected

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ standard output = {
7777
"entryPoints": [
7878
{
7979
"name": "main",
80-
"stage:": "fragment",
81-
"result:": {
80+
"stage": "fragment",
81+
"result": {
8282
"stage": "fragment",
8383
"binding": {"kind": "varyingOutput", "index": 0},
8484
"semanticName": "SV_TARGET",

tests/reflection/parameter-block.slang.2.expected

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ standard output = {
7474
"entryPoints": [
7575
{
7676
"name": "main",
77-
"stage:": "fragment",
78-
"result:": {
77+
"stage": "fragment",
78+
"result": {
7979
"stage": "fragment",
8080
"binding": {"kind": "varyingOutput", "index": 0},
8181
"semanticName": "SV_TARGET",

tests/reflection/parameter-block.slang.expected

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ standard output = {
7171
"entryPoints": [
7272
{
7373
"name": "main",
74-
"stage:": "fragment",
75-
"result:": {
74+
"stage": "fragment",
75+
"result": {
7676
"stage": "fragment",
7777
"binding": {"kind": "varyingOutput", "index": 0},
7878
"semanticName": "SV_TARGET",

tests/reflection/ptr/ptr-generic.slang.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ standard output = {
2929
"entryPoints": [
3030
{
3131
"name": "computeMain",
32-
"stage:": "compute",
32+
"stage": "compute",
3333
"parameters": [
3434
{
3535
"name": "dispatchThreadID",

tests/reflection/ptr/ptr-global.slang.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ standard output = {
6060
"entryPoints": [
6161
{
6262
"name": "computeMain",
63-
"stage:": "compute",
63+
"stage": "compute",
6464
"parameters": [
6565
{
6666
"name": "dispatchThreadID",

tests/reflection/ptr/ptr-self-reference.slang.expected

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ standard output = {
5252
"entryPoints": [
5353
{
5454
"name": "computeMain",
55-
"stage:": "compute",
55+
"stage": "compute",
5656
"parameters": [
5757
{
5858
"name": "dispatchThreadID",

0 commit comments

Comments
 (0)