-
Notifications
You must be signed in to change notification settings - Fork 692
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
Replace reachable llvm_unreachable with errors in HLSignatureLower #6888
Open
tex3d
wants to merge
1
commit into
microsoft:main
Choose a base branch
from
tex3d:sig-size-errors
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+97
−12
Open
Changes from all commits
Commits
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
14 changes: 14 additions & 0 deletions
14
tools/clang/test/HLSLFileCheck/hlsl/diagnostics/errors/ia_sig_too_large.hlsl
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,14 @@ | ||
// RUN: %dxc -E main -T vs_6_0 %s | FileCheck %s | ||
|
||
// Expect error when the Input Assembler (vertex input) signature is too large | ||
// CHECK: error: Failed to allocate all input signature elements in available space. | ||
|
||
struct VSIN { | ||
float4 pos : Position; | ||
float array1[30] : ARRAY1; | ||
float array2[2] : ARRAY2; | ||
}; | ||
|
||
float4 main(VSIN In) : SV_Position { | ||
return In.pos; | ||
} |
11 changes: 11 additions & 0 deletions
11
...s/clang/test/HLSLFileCheck/hlsl/diagnostics/errors/invalid_interpolation_sv_position.hlsl
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,11 @@ | ||
// RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s | ||
|
||
// CHECK: error: invalid interpolation mode for SV_Position | ||
|
||
struct PSIN { | ||
nointerpolation float4 pos : SV_Position; | ||
}; | ||
|
||
float main(PSIN In) : SV_Target{ | ||
return In.pos.x; | ||
} |
15 changes: 15 additions & 0 deletions
15
tools/clang/test/HLSLFileCheck/hlsl/diagnostics/errors/output_sig_too_large.hlsl
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,15 @@ | ||
// RUN: %dxc -E main -T vs_6_0 %s | FileCheck %s | ||
|
||
// Expect error when the output signature is too large | ||
// CHECK: error: Failed to allocate all output signature elements in available space. | ||
|
||
struct VSOUT { | ||
float4 pos : SV_Position; | ||
float4 array1[30] : BIGARRAY; | ||
float4 array2[2] : SMALLARRAY; | ||
}; | ||
|
||
VSOUT main() { | ||
VSOUT Out = (VSOUT)0; | ||
return Out; | ||
} |
39 changes: 39 additions & 0 deletions
39
tools/clang/test/HLSLFileCheck/hlsl/diagnostics/errors/pc_sig_too_large.hlsl
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,39 @@ | ||
// RUN: %dxc -E main -T hs_6_0 %s | FileCheck %s | ||
|
||
// Expect error when the patch constant signature is too large | ||
// CHECK: error: Failed to allocate all patch constant signature elements in available space. | ||
|
||
#define NumOutPoints 2 | ||
|
||
struct HsCpIn { | ||
float4 pos : SV_Position; | ||
}; | ||
|
||
struct HsCpOut { | ||
float4 pos : SV_Position; | ||
}; | ||
|
||
struct HsPcfOut | ||
{ | ||
float tessOuter[4] : SV_TessFactor; | ||
float tessInner[2] : SV_InsideTessFactor; | ||
float4 array1[25] : BIGARRAY; | ||
float4 array2[2] : SMALLARRAY; | ||
}; | ||
|
||
HsPcfOut pcf(InputPatch<HsCpIn, NumOutPoints> patch, uint patchId : SV_PrimitiveID) { | ||
HsPcfOut output = (HsPcfOut)0; | ||
return output; | ||
} | ||
|
||
[patchconstantfunc("pcf")] | ||
[domain("quad")] | ||
[partitioning("fractional_odd")] | ||
[outputtopology("triangle_ccw")] | ||
[outputcontrolpoints(NumOutPoints)] | ||
HsCpOut main(InputPatch<HsCpIn, NumOutPoints> patch, | ||
uint cpId : SV_OutputControlPointID, | ||
uint patchId : SV_PrimitiveID) { | ||
HsCpOut output = (HsCpOut)0; | ||
return output; | ||
} |
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.
Should we report error when out of bound?