From c45f02579076fcf559f92be501d8293d308db34e Mon Sep 17 00:00:00 2001 From: MindSpunk Date: Fri, 22 Aug 2025 03:00:32 +1000 Subject: Fix reflection JSON writing userAttribs section twice for some cases. (#8210) `emitReflectionVarLayoutJSON` will output the `userAttribs` section twice as it gets output by `emitReflectionModifierInfoJSON` first before being output again by a direct call to `emitUserAttributes`. It seems the answer here is to just remove the extra explicit call to `emitUserAttributes` and rely on the call in `emitReflectionModifierInfoJSON`? --- tests/reflection/attribute.slang.expected | 40 ++++--------------------------- 1 file changed, 4 insertions(+), 36 deletions(-) (limited to 'tests/reflection/attribute.slang.expected') diff --git a/tests/reflection/attribute.slang.expected b/tests/reflection/attribute.slang.expected index 664613aef..dd969cf47 100644 --- a/tests/reflection/attribute.slang.expected +++ b/tests/reflection/attribute.slang.expected @@ -35,15 +35,7 @@ standard output = { ] } ], - "binding": {"kind": "uniform", "offset": 4, "size": 4, "elementStride": 0}, - "userAttribs": [ - { - "name": "DefaultValue", - "arguments": [ - 1 - ] - } - ] + "binding": {"kind": "uniform", "offset": 4, "size": 4, "elementStride": 0} } ], "userAttribs": [ @@ -87,15 +79,7 @@ standard output = { ] } ], - "binding": {"kind": "uniform", "offset": 4, "size": 4, "elementStride": 0}, - "userAttribs": [ - { - "name": "DefaultValue", - "arguments": [ - 1 - ] - } - ] + "binding": {"kind": "uniform", "offset": 4, "size": 4, "elementStride": 0} } ], "userAttribs": [ @@ -144,15 +128,7 @@ standard output = { ] } ], - "binding": {"kind": "uniform", "offset": 4, "size": 4, "elementStride": 0}, - "userAttribs": [ - { - "name": "DefaultValue", - "arguments": [ - 2 - ] - } - ] + "binding": {"kind": "uniform", "offset": 4, "size": 4, "elementStride": 0} } ], "userAttribs": [ @@ -196,15 +172,7 @@ standard output = { ] } ], - "binding": {"kind": "uniform", "offset": 4, "size": 4, "elementStride": 0}, - "userAttribs": [ - { - "name": "DefaultValue", - "arguments": [ - 2 - ] - } - ] + "binding": {"kind": "uniform", "offset": 4, "size": 4, "elementStride": 0} } ], "userAttribs": [ -- cgit v1.2.3