Skip to content

[HLSL] Correct ShaderOp SRV resource states#8665

Draft
JoeCitizen wants to merge 2 commits into
microsoft:mainfrom
JoeCitizen:linalg-hlk-srv-buffer-flags
Draft

[HLSL] Correct ShaderOp SRV resource states#8665
JoeCitizen wants to merge 2 commits into
microsoft:mainfrom
JoeCitizen:linalg-hlk-srv-buffer-flags

Conversation

@JoeCitizen

Copy link
Copy Markdown
Collaborator

Summary

  • create ShaderOp SRV buffers without the unordered-access resource flag
  • transition SRV buffers for both pixel and non-pixel shader access
  • initialize resources on a direct command list so graphics-only resource states are legal

The resource-initialization list was previously compute-only. A compute list cannot transition a resource into D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE, so the framework must use a direct list before addSRVBuffer can advertise the complete SRV state.

Validation

  • built the Release ExecHLSLTests target
  • passed all five LinAlg tests that consume addSRVBuffer on WARP 1.65535.20-preview with D3D12 Agility SDK 1.721.2-preview and ExperimentalShaders=*
  • passed ExecutionTest::BasicTriangleOpTest as a graphics ShaderOp framework regression
  • the ExecutionTest debug layer was enabled during the runtime tests

No physical GPU or HLK lab execution is claimed.

Stack

This draft is stacked on PR #8662. Until that PR lands, this diff also contains its OuterProduct ancestor commit. The SRV change itself is commit 35d571e06.

Refs #7841
Refs #8378

Assisted-by: GitHub Copilot

Jack Elliott and others added 2 commits July 23, 2026 14:52
Use the shared MatrixUse parameter for the OuterProduct result and set it to Accumulator, matching proposal 0035 and the public dx::linalg API. Add a host-side invariant to prevent the legacy A-use declaration from returning.

Assisted-by: GitHub Copilot

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 83725f5d-8e98-4c1d-91ee-ad47629e007b
Create SRV buffers without UAV flags and transition them for both pixel and non-pixel shader access. Use a direct resource-initialization list so the graphics-only pixel state is legal.

Assisted-by: GitHub Copilot

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 83725f5d-8e98-4c1d-91ee-ad47629e007b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

1 participant