Skip to content

Fix GroupSharedLimitASTest and GroupSharedLimitMSTest execution tests#8351

Merged
JoeCitizen merged 1 commit intomicrosoft:mainfrom
JoeCitizen:fix-groupshared-limit-as-ms-tests
Apr 8, 2026
Merged

Fix GroupSharedLimitASTest and GroupSharedLimitMSTest execution tests#8351
JoeCitizen merged 1 commit intomicrosoft:mainfrom
JoeCitizen:fix-groupshared-limit-as-ms-tests

Conversation

@JoeCitizen
Copy link
Copy Markdown
Collaborator

  • Change Init="Zero" to Init="ByName" on UAVBuffer0 resources in ShaderOpArith.xml so the C++ callback fires to set shader text and resize the buffer.
  • Update NumElements from 128 to 4096 on UAV descriptors to match the 4096 DWORDs the shaders write.
  • Add dummy SV_Position write in mesh shaders to satisfy DXIL validation requirement that all output semantics have stores.

- Change Init="Zero" to Init="ByName" on UAVBuffer0 resources in
  ShaderOpArith.xml so the C++ callback fires to set shader text and
  resize the buffer.
- Update NumElements from 128 to 4096 on UAV descriptors to match the
  4096 DWORDs the shaders write.
- Add dummy SV_Position write in mesh shaders to satisfy DXIL
  validation requirement that all output semantics have stores.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

I think it might be safer to change output counts to output one valid primitive. We should file a validator issue and check whether it would be valid to write outside the output counts specified as a follow-up.

out vertices MeshOutput verts[3],
out indices uint3 tris[1]) {
SetMeshOutputCounts(0, 0);
verts[0].pos = float4(0, 0, 0, 0);
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.

I think a safer approach would be to set output counts to non-zero and output something (like one valid primitive). I don't think the point is to test the empty output case, right?

The requirement that we write to SV_Position even when output counts are zero is an interesting edge case the validator didn't account for. Probably warrants a validator issue being filed. I'm not positive it's technically valid to write to an output outside the count specified, so this might be something to follow up on as well.

@JoeCitizen JoeCitizen merged commit 6f0743c into microsoft:main Apr 8, 2026
13 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in HLSL Roadmap Apr 8, 2026
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