diff options
| author | pdeayton-nv <205388607+pdeayton-nv@users.noreply.github.com> | 2025-07-25 13:16:12 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-25 20:16:12 +0000 |
| commit | c068bdea454f389b7dd7ce38bbb51a16dc6896ab (patch) | |
| tree | 250b2c640f37e9eb35a69a34fd45ddea54d47b57 /include/slang.h | |
| parent | 6f60f16e00f972cbfc7b30cf070faaf0952f9bc0 (diff) | |
Fix mesh shader reflection JSON output (#7868)
* Fix mesh shader reflection JSON output
Fixes issue #7736 where mesh shaders were showing stage "UNKNOWN" and missing type information in reflection JSON output.
Changes:
- Add missing SLANG_STAGE_MESH and SLANG_STAGE_AMPLIFICATION cases to shader stage switch statements in emitReflectionVarBindingInfoJSON and emitReflectionEntryPointJSON
- Add missing MeshOutput to TypeReflection::Kind enum in slang.h
- Add missing type kind cases (OutputStream, MeshOutput, Specialized, None) to emitReflectionTypeInfoJSON
Testing:
- Simple mesh shader now correctly shows "stage": "mesh" instead of "UNKNOWN"
- Complex mesh shader with parameters shows proper stage and input type information
- Output parameters show "kind": "None" instead of crashing with assertion
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: pdeayton-nv <pdeayton-nv@users.noreply.github.com>
* Remove test files from mesh shader reflection fix
As requested, removed test files since there is no testing infrastructure
for reflection JSON output. Focus is now only on the core mesh and
amplification shader reflection fixes.
Co-authored-by: pdeayton-nv <pdeayton-nv@users.noreply.github.com>
* Address review comments: move MeshOutput enum to end and restore assert
- Move MeshOutput enum member to end of TypeReflection::Kind enum for backward compatibility
- Replace fprintf with SLANG_ASSERT for unhandled type kinds
Co-authored-by: pdeayton-nv <pdeayton-nv@users.noreply.github.com>
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: pdeayton-nv <pdeayton-nv@users.noreply.github.com>
Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'include/slang.h')
| -rw-r--r-- | include/slang.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/slang.h b/include/slang.h index 97ed08bed..516af9603 100644 --- a/include/slang.h +++ b/include/slang.h @@ -2246,6 +2246,7 @@ struct TypeReflection Feedback = SLANG_TYPE_KIND_FEEDBACK, Pointer = SLANG_TYPE_KIND_POINTER, DynamicResource = SLANG_TYPE_KIND_DYNAMIC_RESOURCE, + MeshOutput = SLANG_TYPE_KIND_MESH_OUTPUT, }; enum ScalarType : SlangScalarTypeIntegral |
