-
Notifications
You must be signed in to change notification settings - Fork 17
[Root Signatures] Fix default values for Descriptor Range Flags and Root Descriptor Flags in Version 1 #297
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
base: main
Are you sure you want to change the base?
Conversation
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.
Can we update the pr title/description to match the format of other prs and update the title so that it also denotes changes to the valid flags + root descriptor flags
@@ -461,7 +461,10 @@ As specified in the grammar, '0' denotes there are no flags set. | |||
- `RootFlags = 0` | |||
- `ROOT_DESCRIPTOR_FLAGS` and `DESCRIPTOR_RANGE_FLAGS` | |||
- Version 1.0: | |||
- `DATA_VOLATILE` | |||
- `CBV`: `DATA_VOLATILE | DESCRIPTORS_VOLATILE` |
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.
These should also be split into the different flag types. DESCRIPTORS_VOLATILE
isn't a valid ROOT_DESCRIPTOR_FLAG
…gnature Version (#145828) This pr updates `setDefaultFlags` in `HLSLRootSignature.h` to account for which version it should initialize the default flag values for. - Updates `setDefaultFlags` with a `Version` argument and initializes them to be compliant as described [here](llvm/wg-hlsl#297). - Updates `RootSignatureParser` to retain the `Version` and pass this into `setDefaultFlags` - Updates all uses of `setDefaultFlags` in test-cases - Adds some new unit testing to ensure behaviour is as expected and that the Parser correctly passes down the version Resolves #145820.
…for Root Signature Version (#145828) This pr updates `setDefaultFlags` in `HLSLRootSignature.h` to account for which version it should initialize the default flag values for. - Updates `setDefaultFlags` with a `Version` argument and initializes them to be compliant as described [here](llvm/wg-hlsl#297). - Updates `RootSignatureParser` to retain the `Version` and pass this into `setDefaultFlags` - Updates all uses of `setDefaultFlags` in test-cases - Adds some new unit testing to ensure behaviour is as expected and that the Parser correctly passes down the version Resolves llvm/llvm-project#145820.
…nature` (#147111) This pr resolves some discrepancies in verification during `validate` in `DXILRootSignature.cpp`. Note: we don't add a backend test for version 1.0 flag values because it treats the struct as though there is no flags value. However, this will be used when we use the verifications in the frontend. - Updates `verifyDescriptorFlag` to check for valid flags based on version, as reflected [here](llvm/wg-hlsl#297) - Add test to demonstrate updated flag verifications - Adds `verifyNumDescriptors` to the validation of `DescriptorRange`s - Add a test to demonstrate `numDescriptors` verification - Updates a number of tests that mistakenly had an invalid `numDescriptors` specified Resolves: #147107
…DXILRootSignature` (#147111) This pr resolves some discrepancies in verification during `validate` in `DXILRootSignature.cpp`. Note: we don't add a backend test for version 1.0 flag values because it treats the struct as though there is no flags value. However, this will be used when we use the verifications in the frontend. - Updates `verifyDescriptorFlag` to check for valid flags based on version, as reflected [here](llvm/wg-hlsl#297) - Add test to demonstrate updated flag verifications - Adds `verifyNumDescriptors` to the validation of `DescriptorRange`s - Add a test to demonstrate `numDescriptors` verification - Updates a number of tests that mistakenly had an invalid `numDescriptors` specified Resolves: llvm/llvm-project#147107
This patch is updating the spec to match DXC behaviour for Descriptor Ranges flags serialization on root signatures version 1.
DXC: https://github.com/microsoft/DirectXShaderCompiler/blob/d43d909801c185e5bad11a683a970cd23957c3c9/lib/DxilRootSignature/DxilRootSignature.cpp#L118