-
Notifications
You must be signed in to change notification settings - Fork 14.7k
[DirectX] Validate if Textures/TypedBuffers are being bound in Root Signatures #147573
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
Open
joaosaffran
wants to merge
24
commits into
llvm:users/joaosaffran/146785
Choose a base branch
from
joaosaffran:validation/textures-not-bind-root-signatures
base: users/joaosaffran/146785
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.
Open
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
01a558b
add validation
43eb04e
adding validation
f67bec1
Merge branch 'validation/check-descriptors-are-bound' into validation…
d7b4cf4
format
403b546
Merge branch 'validation/check-descriptors-are-bound' into validation…
aea75da
fix test
5af9199
update
46294cb
Merge branch 'validation/check-descriptors-are-bound' into validation…
91ff1bf
clean up
5f8bbeb
Merge branch 'validation/check-descriptors-are-bound' into validation…
8459d14
Merge branch 'validation/check-descriptors-are-bound' into validation…
34deb3a
Merge branch 'validation/check-descriptors-are-bound' into validation…
49f3bf2
Merge branch 'validation/check-descriptors-are-bound' into validation…
848501d
address comments
8d97116
format test
9c34f3f
fix test
24040a0
Merge branch 'validation/check-descriptors-are-bound' into validation…
2c30cd9
addressing comments
76048d4
Merge branch 'validation/check-descriptors-are-bound' into validation…
7c9bd62
clean?
849ff86
format
7a1bc21
format
108a7d5
Merge branch 'validation/check-descriptors-are-bound' into validation…
1c10acf
fix merge mess
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 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
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
23 changes: 23 additions & 0 deletions
23
llvm/test/CodeGen/DirectX/rootsignature-validation-textures.ll
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
; RUN: opt -S -passes='dxil-post-optimization-validation' -mtriple=dxil-pc-shadermodel6.6-compute %s 2>&1 | ||
|
||
|
||
|
||
; Root Signature( | ||
; DescriptorTable(UAV(b0, space=0, visibility=SHADER_VISIBILITY_ALL)) | ||
|
||
@TB.str = private unnamed_addr constant [3 x i8] c"TB\00", align 1 | ||
|
||
define void @CSMain() "hlsl.shader"="compute" { | ||
entry: | ||
|
||
%TB = tail call target("dx.Texture", float, 1, 0, 0) @llvm.dx.resource.handlefrombinding.tdx.TypedBuffer_f32_1_0_0t(i32 0, i32 0, i32 1, i32 0, i1 false, ptr nonnull @TB.str) | ||
|
||
ret void | ||
} | ||
|
||
!dx.rootsignatures = !{!0} | ||
|
||
!0 = !{ptr @CSMain, !1, i32 2} | ||
!1 = !{!3} | ||
!3 = !{!"DescriptorTable", i32 0, !4} | ||
!4 = !{!"UAV", i32 1, i32 0, i32 0, i32 -1, i32 0} |
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
23 changes: 23 additions & 0 deletions
23
llvm/test/CodeGen/DirectX/rootsignature-validation-typedbuffer.ll
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
; RUN: opt -S -passes='dxil-post-optimization-validation' -mtriple=dxil-pc-shadermodel6.6-compute %s 2>&1 | ||
|
||
|
||
|
||
; Root Signature( | ||
; DescriptorTable(UAV(b0, space=0, visibility=SHADER_VISIBILITY_ALL)) | ||
|
||
@TB.str = private unnamed_addr constant [3 x i8] c"TB\00", align 1 | ||
|
||
define void @CSMain() "hlsl.shader"="compute" { | ||
entry: | ||
|
||
%TB = tail call target("dx.TypedBuffer", float, 1, 0, 0) @llvm.dx.resource.handlefrombinding.tdx.TypedBuffer_f32_1_0_0t(i32 0, i32 0, i32 1, i32 0, i1 false, ptr nonnull @TB.str) | ||
|
||
ret void | ||
} | ||
|
||
!dx.rootsignatures = !{!0} | ||
|
||
!0 = !{ptr @CSMain, !1, i32 2} | ||
!1 = !{!3} | ||
!3 = !{!"DescriptorTable", i32 0, !4} | ||
!4 = !{!"UAV", i32 1, i32 0, i32 0, i32 -1, i32 0} |
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.
Uh oh!
There was an error while loading. Please reload this page.