Skip to content
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

Add alignment to NodeRecordType in RDAT only #6278

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

tex3d
Copy link
Contributor

@tex3d tex3d commented Feb 10, 2024

This change adds NodeRecordType alignment field to RDAT to make it possible to validate pointer and stride alignment in the runtime.

This version of the change avoids changing any DXIL metadata, requiring recovery of alignment information on DxilModule load from the record type used with GetNodeRecordPtr(). If a record is not used in the code, alignment will not be recovered.

Issue: #6270

Copy link
Contributor

github-actions bot commented Feb 10, 2024

✅ With the latest revision this PR passed the Python code formatter.

@tex3d tex3d force-pushed the rdat-record-alignment-no-meta branch 3 times, most recently from 7e48893 to c9b8466 Compare February 11, 2024 01:25
@tex3d tex3d force-pushed the rdat-record-alignment-no-meta branch from c9b8466 to 1acf3ff Compare February 20, 2024 21:34
@tex3d tex3d force-pushed the rdat-record-alignment-no-meta branch from 1acf3ff to 0df184e Compare February 27, 2024 10:16
Since DxilValidation for RDAT part expects exact binary comparison match, we need to restore any missing alignment from the RDAT before we generate RDAT and compare.

Alignment for records used with GetNodeRecordPtr() will be restored from llvm, and not overwritten by this alignment from RDAT, so it still varifies that alignment matches type llvm module when available.
@tex3d tex3d force-pushed the rdat-record-alignment-no-meta branch from 0df184e to 4eb1d2b Compare February 27, 2024 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: New
Development

Successfully merging this pull request may close these issues.

None yet

1 participant