forked from microsoft/DirectXShaderCompiler
-
Notifications
You must be signed in to change notification settings - Fork 0
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
DxilValidation: add ShaderCompatInfo call graph checking #16
Closed
Conversation
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
…rdPtrAndUpdateUsers (microsoft#6314) In EmitGetNodeRecordPtrAndUpdateUsers, the type will be mutated. And the GEP user of the RecordPtr will be merged at same time. This make things complex because the GEP index need to be updated since type is mutated. To make things easier, merge the GepUse after mutate type. Fixes microsoft#6223
This will allow lit test check dxil version to avoid running on unsupported dxil.dll.
This is a draft on top of PR microsoft#6291. It will be turned into a real PR against main after that one merges. |
…on (microsoft#6320) In validator version 1.7 and below, the RaytracingTier1_1 module flag was set on every function if any StateObjectConfig subobject had the AllowStateObjectAdditions flag set. This was incorrect, as the requirement is validated in the runtime based on the use of the subobject instead. Subobjects are removed from the module and placed in RDAT during container serialization, so the requirement would be lost when recomputing the flags in validation. This didn't break validation because flag validation was completely disabled for libraries! This change fixes this problem, and allows DxilValidation to validate ShaderFlags because they will no longer mismatch due to this issue. Running CollectShaderFlagsForModule is also necessary for collecting per-function shader flags which will be used by call graph validation in a subsequent change, so enabling flag validation unblocks that as well. Fixes microsoft#6321
There was a typo in dxcpdbutils where the normalized file path wasn't actually being used. This change fixes that and adds thorough testing for the DxcPdbUtils path normalization. Also fixed another case where `/dir/my_file` gets normalized to `.\\dir\my_file`.
…ity info (microsoft#6291) Fix barrier allowed ops and flags by shader kind New barrier operations lacked validation and for RDAT info: had incorrect min target and shader stage flags. - Identify barrier DXIL operations with new `is_barrier` in `hctdb.py` and generated `OP::IsDxilOpBarrier`. - Identify when a barrier op requires shader stage with group (compute-like stage), or when it requires node memory. - Add new `OptFeatureInfo_RequiresGroup` to identify function only compatible with a shader stage with a visible group for access to groupshared memory or use of group sync. - Translate to original `BarrierMode` when compatible; adds `BarrierMode::Invalid` to identify invalid cases. - Account for `DXIL::MemoryTypeFlags::AllMemory` being allowed and auto-masked by driver. - Properly set min shader model and compatible shader stage flags. - Validate barrier for shader stage. - Added new barriers to counters which were missing. Adressing parts of: microsoft#6256 and microsoft#6292 Fixes microsoft#6266
Replace assert on illegal DXIL op with return illegal value. Check the illegal cases in validation. Fixes microsoft#6168
ShaderCompatInfo identifies compatibility for functions that could be called from an entry point. Currently, this checking detects compatibility problems between entry points and internal function calls that the validator otherwise misses. This change adds a check for ShaderCompatInfo, recursing into called functions looking for a source of conflict when not compatible with the current entry point properties. Errors are emitted for the entry point and at one source of each type of conflict that ShaderCompatInfo detects. A function is considered the source of a conflict when it has the conflict but none of the functions called from this function have this conflict. Removed early exit for ShaderFlags validation when module is a library, since these flags should be validated for libraries, and running CollectShaderFlagsForModule fills in the ShaderCompatInfo data we need for validation.
- Plus, replace unrecognized MaxOutputRecords attribute usage with MaxRecords
11e807d
to
9e4ee71
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
ShaderCompatInfo identifies compatibility for functions that could be called from an entry point.
Currently, this checking detects compatibility problems between entry points and internal function calls that the validator otherwise misses.
This change adds a check for ShaderCompatInfo, recursing into called functions looking for a source of conflict when not compatible with the current entry point properties.
Errors are emitted for the entry point and at one source of each type of conflict that ShaderCompatInfo detects.
A function is considered the source of a conflict when it has the conflict but none of the functions called from this function have this conflict.
Removed early exit for ShaderFlags validation when module is a library, since these flags should be validated for libraries, and running CollectShaderFlagsForModule fills in the ShaderCompatInfo data we need for validation.
Addresses part of microsoft#6256
Fixes microsoft#6292