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

Cherry-Pick: Fix debug info offsets for vectors with 16-bit types (#6775) #6893

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

jeffnn
Copy link
Collaborator

@jeffnn jeffnn commented Sep 3, 2024

This fixes a bug where the offsets for elements in vectors with 16-bit types doesn't take into account alignment bits and PIX wouldn't display vector element values correctly in the shader debugger. Eg. if -enable-16bit-types wasn't set, the offsets for a min16float4 would be 0, 16, 32, 48 instead of 0, 32, 64, 96.

Also removed the assert in PopulateAllocaMap_StructType that was checking whether the calculated aligned offset matches the packed offset (from SortedMembers) because it was false for members with sizes smaller than the alignment size.

(cherry picked from commit 84c0a09)

This fixes a bug where the offsets for elements in vectors with 16-bit
types doesn't take into account alignment bits and PIX wouldn't display
vector element values correctly in the shader debugger. Eg. if
`-enable-16bit-types` wasn't set, the offsets for a min16float4 would be
0, 16, 32, 48 instead of 0, 32, 64, 96.

Also removed the assert in PopulateAllocaMap_StructType that was
checking whether the calculated aligned offset matches the packed offset
(from SortedMembers) because it was false for members with sizes smaller
than the alignment size.

(cherry picked from commit 84c0a09)
@jeffnn jeffnn self-assigned this Sep 3, 2024
@jeffnn jeffnn requested a review from a team as a code owner September 3, 2024 23:21
Copy link
Member

@damyanp damyanp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved for checking in to the release branch.

@jeffnn jeffnn changed the title Fix debug info offsets for vectors with 16-bit types (#6775) Cherry-Pick: Fix debug info offsets for vectors with 16-bit types (#6775) Sep 4, 2024
@jeffnn jeffnn merged commit c2d5eb1 into microsoft:release-1.8.2407 Sep 4, 2024
14 checks passed
@jeffnn jeffnn deleted the PIX_CP_DebugInfo16Bit branch September 4, 2024 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants