Skip to content

[RDAT] Add mesh node signature elements to mesh node case for RDAT - #6499

Merged
Joshua Batista (bob80905) merged 6 commits into
microsoft:release-preview-mesh-nodesfrom
bob80905:add_missing_RDAT_MS_output_sigs
Apr 5, 2024
Merged

Joshua Batista (bob80905) merged 6 commits into
microsoft:release-preview-mesh-nodesfrom
bob80905:add_missing_RDAT_MS_output_sigs

Conversation

@bob80905

@bob80905 Joshua Batista (bob80905) commented Apr 4, 2024 •

Copy link
Copy Markdown
Collaborator

Previously, mesh nodes would be missing two details in the RDAT output: SigOutputElements and SigPrimOutputElements.
The signature data was missing from RDAT because lib\DxilContainer\DxilContainerAssembler.cpp:AddShaderNodeInfo only added MeshOutputTopology, MaxOutputVertices, and MaxOutputPrimitives data to the RDAT.
In this PR, more data gets added to RDAT, including the previously missing signature elements.
A test was added that verifies that the RDAT includes these new signatue element details.
Fixes #6495

@bob80905
Joshua Batista (bob80905) requested a review from a team as a code owner April 4, 2024 22:57
@bob80905 Joshua Batista (bob80905) changed the title add mesh node sig elements to mesh node case in rdat [RDAT] Add mesh node signature elements to mesh node case for RDAT Apr 4, 2024
@bob80905

Copy link
Copy Markdown
Collaborator Author

The new test does have some data inside SigOutputElements / SigPrimOutputElements, and ideally the test would just check for that data. But other rdat tests tend to check for lots of surrounding structure. The test is large, since it tests ALL RDAT output, and I would like to remove some check lines, but I am unsure what the general guidelines are for what doesn't need to be checked in RDAT tests.

@damyanp Damyan Pepper (damyanp) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM - I have some questions around TODO comments.

@damyanp

Copy link
Copy Markdown
Member

... other rdat tests tend to check for lots of surrounding structure. The test is large, since it tests ALL RDAT output, and I would like to remove some check lines, but I am unsure what the general guidelines are for what doesn't need to be checked in RDAT tests.

Yeah, I was going to comment on that but I remember seeing other tests like this. It strikes me as being pretty brittle if anything is ever added to the output here, but I don't think you're too far from existing patterns here.

For the preview branch this is probably ok and we don't need to dig too deep into it.

@tex3d Tex Riddell (tex3d) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good! The one thing to watch out for when initializing a record to zero is if it has any ArrayRef fields, which must be set to (uint)-1 (RDAT_NULL_REF) for any null/empty arrays. This was the cause of the corrupt values for the signature elements before this change. I feel like RDAT validation should have caught that, but maybe there's a gap here. I'll look into that later.

@bob80905
Joshua Batista (bob80905) enabled auto-merge (squash) April 5, 2024 20:10
@bob80905
Joshua Batista (bob80905) merged commit e6c1c4f into microsoft:release-preview-mesh-nodes Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants