-
Notifications
You must be signed in to change notification settings - Fork 14.7k
[DXIL] Adding support to RootSignatureFlags in obj2yaml #122396
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
Merged
Merged
Changes from 9 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
8adb678
adding rootsignature to obj2yaml
ba78f21
adding test
0a54559
removing old test
557075f
remove useless includes
e0d3dcd
addressing comments
80587dd
updating test
be3764d
removing useless header
7582ca6
fix formating
6aaa0a5
renaming test
916b2f1
addressing pr comments
d9bce0a
adding str to ROOT_ELEMENT_FLAG
e7676ed
formating
a0cee57
refactoring to follow llvm standards
1e7a1fe
addressing comments
0ed658a
clean up
932062e
remove version
628937c
fix pr
1378c9f
adding dxil-dis test
e3206c9
adding compatibility test
f93d42d
addressing test concerns
25e3f37
clean up
751cbdc
addressing comments
44532d6
adding fail test
ca21878
adding comment
987901c
adding few more tests
0fbe900
format
b771aea
cleanup
74f7226
addressing comments and fix tests
69f581a
making code clearer
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
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
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 | ||
---|---|---|---|---|
|
@@ -92,6 +92,16 @@ Error DXContainer::parseHash(StringRef Part) { | |||
return Error::success(); | ||||
} | ||||
|
||||
Error DXContainer::parseRootSignature(StringRef Part) { | ||||
if (RootSignature) | ||||
return parseFailed("More than one RTS0 part is present in the file"); | ||||
dxbc::RootSignatureDesc Desc; | ||||
if (Error Err = readStruct(Part, Part.begin(), Desc)) | ||||
return Err; | ||||
RootSignature = Desc; | ||||
return Error::success(); | ||||
} | ||||
|
||||
Error DXContainer::parsePSVInfo(StringRef Part) { | ||||
if (PSVInfo) | ||||
return parseFailed("More than one PSV0 part is present in the file"); | ||||
|
@@ -192,6 +202,11 @@ Error DXContainer::parsePartOffsets() { | |||
return Err; | ||||
break; | ||||
case dxbc::PartType::Unknown: | ||||
break; | ||||
case dxbc::PartType::RTS0: | ||||
if (Error Err = parseRootSignature(PartData)) | ||||
return Err; | ||||
|
||||
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.
Suggested change
|
||||
break; | ||||
} | ||||
} | ||||
|
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
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,44 @@ | ||
# RUN: yaml2obj %s | obj2yaml | FileCheck %s | ||
--- !dxcontainer | ||
Header: | ||
Hash: [ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, | ||
0x0, 0x0, 0x0, 0x0, 0x0, 0x0 ] | ||
Version: | ||
Major: 1 | ||
Minor: 0 | ||
PartCount: 1 | ||
PartOffsets: [ 60 ] | ||
Parts: | ||
- Name: RTS0 | ||
Size: 8 | ||
RootSignature: | ||
Version: 1 | ||
AllowInputAssemblerInputLayout: true | ||
damyanp marked this conversation as resolved.
Show resolved
Hide resolved
|
||
DenyVertexShaderRootAccess: false | ||
DenyHullShaderRootAccess: false | ||
DenyDomainShaderRootAccess: false | ||
DenyGeometryShaderRootAccess: false | ||
DenyPixelShaderRootAccess: false | ||
AllowStreamOutput: false | ||
LocalRootSignature: false | ||
DenyAmplificationShaderRootAccess: false | ||
DenyMeshShaderRootAccess: false | ||
CBVSRVUAVHeapDirectlyIndexed: false | ||
SamplerHeapDirectlyIndexed: false | ||
|
||
#CHECK: - Name: RTS0 | ||
#CHECK-NEXT: Size: 8 | ||
#CHECK-NEXT: RootSignature: | ||
#CHECK-NEXT: Version: 1 | ||
#CHECK-NEXT: AllowInputAssemblerInputLayout: true | ||
#CHECK-NEXT: DenyVertexShaderRootAccess: false | ||
#CHECK-NEXT: DenyHullShaderRootAccess: false | ||
#CHECK-NEXT: DenyDomainShaderRootAccess: false | ||
#CHECK-NEXT: DenyGeometryShaderRootAccess: false | ||
#CHECK-NEXT: DenyPixelShaderRootAccess: false | ||
#CHECK-NEXT: AllowStreamOutput: false | ||
#CHECK-NEXT: LocalRootSignature: false | ||
#CHECK-NEXT: DenyAmplificationShaderRootAccess: false | ||
#CHECK-NEXT: DenyMeshShaderRootAccess: false | ||
#CHECK-NEXT: CBVSRVUAVHeapDirectlyIndexed: false | ||
#CHECK-NEXT: SamplerHeapDirectlyIndexed: false |
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 | ||||
---|---|---|---|---|---|---|
|
@@ -153,6 +153,12 @@ dumpDXContainer(MemoryBufferRef Source) { | |||||
break; | ||||||
case dxbc::PartType::Unknown: | ||||||
break; | ||||||
case dxbc::PartType::RTS0: | ||||||
std::optional<dxbc::RootSignatureDesc> RS = Container.getRootSignature(); | ||||||
if (RS && RS.has_value()) | ||||||
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.
Suggested change
|
||||||
NewPart.RootSignature = DXContainerYAML::RootSignatureDesc(*RS); | ||||||
break; | ||||||
break; | ||||||
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.
Suggested change
|
||||||
} | ||||||
} | ||||||
|
||||||
|
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.
Uh oh!
There was an error while loading. Please reload this page.