Update Slang to 2026.10#22
Open
github-actions[bot] wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates SlangShaderSharp bindings to match Slang 2026.10, primarily expanding shader coverage tracing support (new entry model + function/branch coverage) and syncing compiler option/headers to the updated native API.
Changes:
- Extends coverage metadata model: new
CoverageEntryInfofields (counter index, kind/mode, ranges, function/branch identity) and addsICoverageTracingMetadata.GetEntryCount(). - Adds new coverage-related enums (
CoverageEntryKind,CoverageCounterMode,CoverageBranchArmKind) and compiler options (TraceFunctionCoverage,TraceBranchCoverage). - Updates native header snapshot (
headers/slang.h) and introducesSlang.InvalidCoverageCounterIndex.
Reviewed changes
Copilot reviewed 8 out of 20 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Structs/CoverageEntryInfo.cs | Tail-extends managed/unmanaged coverage entry structs and marshalling logic for the new coverage entry model. |
| src/Slang.cs | Adds InvalidCoverageCounterIndex constant used by coverage metadata defaults. |
| src/ICoverageTracingMetadata.cs | Updates coverage metadata interface docs and adds GetEntryCount() to match the 2026.10 COM API. |
| src/Enums/CoverageEntryKind.cs | New enum describing coverage entry semantic kind. |
| src/Enums/CoverageCounterMode.cs | New enum describing runtime accumulation mode for counters. |
| src/Enums/CoverageBranchArmKind.cs | New enum describing branch-arm semantics for branch coverage. |
| src/Enums/CompilerOptionName.cs | Updates coverage option docs and adds new function/branch coverage compiler options. |
| headers/slang.h | Syncs vendored Slang header to 2026.10 (coverage tracing API + other doc updates). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
130
to
+134
| structSize = (nuint)sizeof(CoverageEntryInfoUnmanaged), | ||
| // `file` is an output pointer owned by the metadata object; only `structSize` needs initialization. | ||
| file = null, | ||
| line = managed.Line | ||
| line = managed.Line, | ||
| counterIndex = managed.CounterIndex, |
Comment on lines
19
to
+23
| /// 1-based source line for this coverage entry, or 0 if the entry | ||
| /// could not be attributed to a real source line. The current | ||
| /// implementation reports line-oriented entries; future revisions | ||
| /// may attach additional fields describing branch/function/region | ||
| /// semantics. | ||
| /// implementation reports, function, and branch entries; | ||
| /// future revisions may add source-region entries or additional | ||
| /// branch forms. |
Comment on lines
+44
to
+48
| /// <summary> | ||
| /// Number of source coverage entries available through | ||
| /// <see cref="ICoverageTracingMetadata.GetEntryInfo"/>. The current line/function/branch producers have | ||
| /// one entry per counter, but future source-region coverage may | ||
| /// expose entries that do not map one-to-one with runtime counter |
Comment on lines
+51
to
53
| [PreserveSig] | ||
| uint GetEntryCount(); | ||
| } |
Comment on lines
+235
to
238
| /// <summary> bool: insert per-statement line coverage counters </summary> | ||
| TraceCoverage = 145, | ||
|
|
||
| /// <summary> |
Comment on lines
250
to
252
| /// </summary> | ||
| TraceCoverageReservedSpace = 147, | ||
|
|
Comment on lines
18
to
20
| /// <summary> | ||
| /// 1-based source line for this coverage entry, or 0 if the entry | ||
| /// could not be attributed to a real source line. The current |
Comment on lines
18
to
+22
| public unsafe partial interface ICoverageTracingMetadata : ISlangCastable | ||
| { | ||
| /// <summary> | ||
| /// Number of counter slots in the synthesized coverage buffer. | ||
| /// In the current implementation this is the number of line- | ||
| /// oriented source-location counter slots. Generic specializations | ||
| /// and other cloned instances of the same source line aggregate | ||
| /// into that source line's slot. Future revisions may extend the | ||
| /// entry model without changing the interface shape. | ||
| /// Number of runtime counter slots in the synthesized coverage | ||
| /// buffer. This can differ from <see cref="ICoverageTracingMetadata.GetEntryCount"/> once a coverage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Auto Generated PR to update Slang to version 2026.10