Skip to content

Allow derivatives on mesh nodes#6507

Merged
bob80905 merged 5 commits intomicrosoft:release-preview-mesh-nodesfrom
bob80905:allow_derivatives_on_mesh_nodes
Apr 10, 2024
Merged

Allow derivatives on mesh nodes#6507
bob80905 merged 5 commits intomicrosoft:release-preview-mesh-nodesfrom
bob80905:allow_derivatives_on_mesh_nodes

Conversation

@bob80905
Copy link
Copy Markdown
Collaborator

@bob80905 bob80905 commented Apr 5, 2024

Previously, mesh nodes (that is, node shaders with mesh launch types) would emit diagnostics when they contain a derivative operation. However, mesh nodes should allow derivative operations. This PR adjusts this rule for mesh nodes, so that derivative operations are allowed. An accompanying regression test ensures that diagnostics that would previously be emitted are no longer emitted.

Fixes #6480.

@bob80905 bob80905 requested a review from a team as a code owner April 5, 2024 22:18
@damyanp
Copy link
Copy Markdown
Member

damyanp commented Apr 5, 2024

mesh nodes should allow derivative operations.

Citation needed :)

(Just checking that we're sure about this!)

Copy link
Copy Markdown
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.

We need test(s) for the DXIL to make sure we don't block derivative intrinsics in validation as well. We also need test(s) checking RDAT, like an adapted version of tools/clang/test/HLSLFileCheck/d3dreflect/rdat_mintarget/sm68_node_deriv.hlsl for SM 6.9 mesh node cases.

@bob80905
Copy link
Copy Markdown
Collaborator Author

bob80905 commented Apr 8, 2024

@damyanp
Here's the citation, it's officially in the specs repo now.
https://github.com/microsoft/hlsl-specs/blob/main/proposals/0019-mesh-nodes.md#derivative-operations

Comment thread tools/clang/test/HLSLFileCheck/dxil/intrinsics/launch_types_mesh.ll Outdated
Comment thread tools/clang/test/SemaHLSL/derivatives-allowed-on-mesh-nodes.hlsl Outdated
Comment thread tools/clang/test/SemaHLSL/derivatives-allowed-on-mesh-nodes.hlsl Outdated
Comment thread tools/clang/test/HLSLFileCheck/dxil/intrinsics/launch_types_mesh.ll Outdated
Comment thread tools/clang/test/SemaHLSL/derivatives-allowed-on-mesh-nodes.hlsl
Comment thread tools/clang/test/SemaHLSL/derivatives-allowed-on-mesh-nodes.hlsl
Copy link
Copy Markdown
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.

Looks good!

@bob80905 bob80905 enabled auto-merge (squash) April 10, 2024 00:29
@bob80905 bob80905 merged commit 8a59115 into microsoft:release-preview-mesh-nodes Apr 10, 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.

4 participants