From c068bdea454f389b7dd7ce38bbb51a16dc6896ab Mon Sep 17 00:00:00 2001 From: pdeayton-nv <205388607+pdeayton-nv@users.noreply.github.com> Date: Fri, 25 Jul 2025 13:16:12 -0700 Subject: Fix mesh shader reflection JSON output (#7868) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 * 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 * 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 --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: pdeayton-nv Co-authored-by: Yong He --- include/slang.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') 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 -- cgit v1.2.3