-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify CapabilitySet
Diagnostic Printing
#4678
Merged
ArielG-NV
merged 13 commits into
shader-slang:master
from
ArielG-NV:implied-atom-removal-from-diagnostic-prints
Jul 23, 2024
Merged
Changes from 6 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
95cb6cb
Fixes: #4675
ArielG-NV 234a32d
Merge branch 'master' into implied-atom-removal-from-diagnostic-prints
ArielG-NV b5d0688
compress capability sets to remove redundant shader-stages for when p…
ArielG-NV 50b9aae
Merge branch 'implied-atom-removal-from-diagnostic-prints' of https:/…
ArielG-NV e7d9679
add a null case to `printDiagnosticArg` to ensure nothing outputs odd…
ArielG-NV ab213e9
test fix
ArielG-NV c52cdc4
change capability provenance collection and use
ArielG-NV 6b381e3
Merge branch 'master' into implied-atom-removal-from-diagnostic-prints
ArielG-NV f2d0e1f
push changes to add clarity to err
ArielG-NV 5f5fa3d
Merge branch 'implied-atom-removal-from-diagnostic-prints' of https:/…
ArielG-NV d1d74f0
fix test error
ArielG-NV 07a2bbe
always print require if found since implies the result capabilities
ArielG-NV c2fabf6
Merge branch 'master' into implied-atom-removal-from-diagnostic-prints
ArielG-NV File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -737,8 +737,8 @@ DIAGNOSTIC(41001, Error, recursiveType, "type '$0' contains cyclic reference to | |
|
||
DIAGNOSTIC(41010, Warning, missingReturn, "control flow may reach end of non-'void' function") | ||
DIAGNOSTIC(41011, Error, profileIncompatibleWithTargetSwitch, "__target_switch has no compatable target with current profile '$0'") | ||
DIAGNOSTIC(41012, Warning, profileImplicitlyUpgraded, "user set `profile` had an implicit upgrade applied to it, atoms added: '$0'") | ||
DIAGNOSTIC(41012, Error, profileImplicitlyUpgradedRestrictive, "user set `profile` had an implicit upgrade applied to it, atoms added: '$0'") | ||
DIAGNOSTIC(41012, Warning, profileImplicitlyUpgraded, "user set profile $0 had an implicit upgrade applied to it, atoms added: '$1'") | ||
DIAGNOSTIC(41012, Error, profileImplicitlyUpgradedRestrictive, "user set profile $0 had an implicit upgrade applied to it, atoms added: '$1'") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "shader '$0' uses capabilities that are not part of the specified profile '$1'. Missing capabilities are: '$2'" |
||
DIAGNOSTIC(41015, Warning, usingUninitializedOut, "use of uninitialized out parameter '$0'") | ||
DIAGNOSTIC(41016, Warning, usingUninitializedVariable, "use of uninitialized variable '$0'") | ||
DIAGNOSTIC(41017, Warning, usingUninitializedGlobalVariable, "use of uninitialized global variable '$0'") | ||
|
18 changes: 18 additions & 0 deletions
18
tests/language-feature/capability/capabilitySimplification1.slang
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
//TEST:SIMPLE(filecheck=CHECK): -target glsl -entry computeMain -stage compute -profile sm_5_0 | ||
//TEST:SIMPLE(filecheck=CHECK_IGNORE_CAPS): -target glsl -emit-spirv-directly -entry computeMain -stage compute -profile sm_5_0 -ignore-capabilities | ||
|
||
|
||
// CHECK_IGNORE_CAPS-NOT: error 36107 | ||
|
||
// CHECK: error 36107 | ||
// CHECK-NOT: sm_6_0 | ||
// CHECK-NOT: sm_6_3 | ||
// CHECK-NOT: sm_6_4 | ||
// CHECK-SAME: vertex{{.*}}/{{.*}}fragment | ||
// CHECK-SAME: sm_6_5 | ||
|
||
[numthreads(1,1,1)] | ||
void computeMain() | ||
{ | ||
WaveMultiPrefixProduct(1, 0); | ||
} |
27 changes: 27 additions & 0 deletions
27
tests/language-feature/capability/capabilitySimplification2.slang
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
//TEST:SIMPLE(filecheck=SPIRV): -target spirv -emit-spirv-directly -entry computeMain -stage compute -profile sm_5_0 | ||
//TEST:SIMPLE(filecheck=GLSL): -target glsl -entry computeMain -stage compute -profile sm_5_0 | ||
//TEST:SIMPLE(filecheck=HLSL): -target hlsl -entry computeMain -stage compute -profile sm_5_0 | ||
//TEST:SIMPLE(filecheck=CHECK_IGNORE_CAPS): -target spirv -emit-spirv-directly -entry computeMain -stage compute -profile sm_5_0 -ignore-capabilities | ||
|
||
|
||
// CHECK_IGNORE_CAPS-NOT: warning 41012 | ||
|
||
// SPIRV: warning 41012 | ||
// SPIRV-NOT: spirv_1_2 | ||
// SPIRV-NOT: spirv_1_3 | ||
// SPIRV-SAME: spvGroupNonUniformBallot | ||
|
||
// GLSL: warning 41012 | ||
// GLSL-NOT: GLSL_400 | ||
// GLSL-NOT: GLSL_430 | ||
// GLSL-SAME: GL_KHR_shader_subgroup_ballot | ||
|
||
// HLSL: warning 41012 | ||
// HLSL-NOT: sm_5_1 | ||
// HLSL-SAME: sm_6_0 | ||
|
||
[require(sm_6_0)] | ||
[numthreads(1,1,1)] | ||
void computeMain() | ||
{ | ||
} |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"shader '$0' uses additional capabilities that are not part of the specified profile '$1'. The profile setting is automatically updated to include these capabilities: '$2'"