Repository navigation
Conversation
…osoft#7019) Add validation in BuildResMap() to check that the index parameter of createHandleFromBinding falls within the range [rangeLowerBound, rangeUpperBound] from the ResBind parameter. This matches the existing validation done for createHandle. Add a LIT test that verifies the validator catches an out-of-range index (index 0 with rangeLowerBound=1, rangeUpperBound=1). Co-authored-by: damyanp <[email protected]>
Copilot
AI
changed the title
[WIP] Fix issue 7019 in DirectXShaderCompiler
Validate index range for CreateHandleFromBinding
Feb 21, 2026
damyanp
reviewed
Feb 21, 2026
damyanp
requested changes
Feb 21, 2026
…ation Extend the test to cover both edge cases: index below rangeLowerBound (0 < 1) and index above rangeUpperBound (4 > 3). Uses a range of [1,3] to ensure both boundaries are tested independently. Co-authored-by: damyanp <[email protected]>
damyanp
approved these changes
Feb 21, 2026
Owner
|
@copilot add a short, one-line, description of this change to ReleaseNotes.md |
Co-authored-by: damyanp <[email protected]>
Author
damyanp
reviewed
Feb 23, 2026
Co-authored-by: damyanp <[email protected]>
damyanp
pushed a commit
that referenced
this pull request
Feb 26, 2026
…edTexture2D` type. (microsoft#8096) Part of microsoft#7979 Implement `Load()` methods for `vk::SampledTexture2D`: ```hlsl ParamType Load(int3 location, [], [ParamType offset], [uint status]); ``` Please see the last commit.
… into copilot/fix-issue-7019-tests # Conflicts: # docs/ReleaseNotes.md
Author
damyanp
reviewed
Mar 12, 2026
Owner
|
@copilot address the unresolved comments on this review |
Co-authored-by: damyanp <[email protected]>
Copilot
AI
changed the title
Add comprehensive validation for CreateHandleFromBinding
Add validation for CreateHandleFromBinding
Mar 12, 2026
damyanp
requested changes
Mar 12, 2026
damyanp
left a comment
Owner
There was a problem hiding this comment.
Consider restructuring the three new createHandleFromBinding test files into two - one for some valid, passing, cases, and another for error cases.
Consolidate the three separate createHandleFromBinding test files into two following the existing _passing/_failing convention: - createHandleFromBinding_passing.ll: valid indices at lower and upper bounds - createHandleFromBinding_failing.ll: index below/above range + invalid class Removed the non-constant bind test since it's a defensive check that can't be triggered without also triggering unrelated validation errors. Co-authored-by: damyanp <[email protected]>
Author
Restructured in 99c3cc3. The three test files are now two, following the existing
Dropped the non-constant bind test since it's a defensive check that can't be triggered without also triggering unrelated validation errors. |
Re-add createHandleFromBinding_non_constant_bind.ll to maintain test coverage for the bind parameter constness check. Co-authored-by: damyanp <[email protected]>
damyanp
requested changes
Mar 13, 2026
Remove mention of "non-constant bind parameters" from the description since that case is tested in the separate _non_constant_bind.ll file. Co-authored-by: damyanp <[email protected]>
damyanp
approved these changes
Mar 13, 2026
When the binding range has size 1 (rangeLowerBound == rangeUpperBound), the resource is non-array and the index must be a constant. This mirrors the existing CreateHandle validation which rejects non-constant indices on non-array resources. Co-authored-by: Copilot <[email protected]>
The rangeLowerBound == rangeUpperBound check cannot distinguish non-array resources from 1-element arrays, so revert the non-constant index rejection for now. Keep the passing test case that verifies non-constant indices on array resources are accepted. Co-authored-by: Copilot <[email protected]>
Rename local variables to UpperCamelCase: hdl->Hdl, bind->Bind, cIndex->CIndex, index->Index. Co-authored-by: Copilot <[email protected]>
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.
_passing,_failing, and_non_constant_bind💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.