Skip to content

Conversation

@pow2clk
Copy link
Collaborator

@pow2clk pow2clk commented Mar 30, 2024

To enable reuse of the mesh code generation for output parameters, mesh nodes now share the mesh shader function properties instead of having their own copies. This allows us to rely on the same code to detect errors and pass along parameter information. Since nodes don't store their info in the shader info union, there isn't a conflict.

Similar sharing with mesh signature lowering is possible by calling the mesh signature lowering stages for mesh nodes and lightly altering those functions to accomodate for node shaders.

Some changes were made to validation to allow for the new parameters and DXIL intrinsics in node shaders.

Created a convenience method in function properties to identify mesh nodes as I was tired of typing out the conditionals to identify it.

Adds tests for invalid output parameters, misuse of SetMeshOutputCounts, and a thorough end-to-end node record-to-mesh output test.

Fixes #6475

To enable reuse of the mesh code generation for output parameters, mesh
nodes now share the mesh shader function properties instead of having
their own copies. This allows us to rely on the same code to detect
errors and pass along parameter information. Since nodes don't store
their info in the shader info union, there isn't a conflict.

Similar sharing with mesh signature lowering is possible by calling the
mesh signature lowering stages for mesh nodes and lightly altering those
functions to accomodate for node shaders.

Some changes were made to validation to allow for the new parameters and
DXIL intrinsics in node shaders.

Created a convenience method in function properties to identify mesh
nodes as I was tired of typing out the conditionals to identify it.

Adds tests for invalid output parameters, misuse of SetMeshOutputCounts,
and a thorough end-to-end node record-to-mesh output test.

Fixes microsoft#6475

Add a raft of tests for mesh node out param fails

enable signature lowering more tests
@pow2clk pow2clk added this to the Mesh Node Preview Release milestone Mar 30, 2024
@pow2clk pow2clk requested a review from a team as a code owner March 30, 2024 03:38
@pow2clk pow2clk added the experimental-mesh-nodes Issues related to the experimental mesh nodes for work graphs label Mar 30, 2024
@pow2clk pow2clk linked an issue Mar 30, 2024 that may be closed by this pull request
@github-actions
Copy link
Contributor

github-actions bot commented Mar 30, 2024

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 30, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

Copy link
Contributor

@tex3d tex3d left a comment

Choose a reason for hiding this comment

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

Some general things (see comments for specifics):

  • Gate mesh node metadata on IsMeshNode() rather than things like validator version for HL IR or the field of a union member (like ShaderProps.MS.outputTopology).
  • Don't access ShaderProps.MS union member without being sure it's valid (IsMS() || IsMeshNode()).
  • Validation tests should probably be IR based, not HLSL based, since we'd likely want to prevent some of these cases in HLSL before reaching validation at some point.
  • Test file paths could be improved.

Copy link
Contributor

@tex3d tex3d left a comment

Choose a reason for hiding this comment

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

I think this is basically fine to merge for now. Follow-ups can be done later.

@bob80905 bob80905 enabled auto-merge (squash) April 1, 2024 23:55
@bob80905 bob80905 merged commit 08c41b4 into microsoft:release-preview-mesh-nodes Apr 3, 2024
@pow2clk pow2clk deleted the mesh-nodes-out-params branch April 15, 2024 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

experimental-mesh-nodes Issues related to the experimental mesh nodes for work graphs

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Mesh node output parameters

4 participants