Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DirectX] Shader Flag Analysis to indicate use of Raw and Structured Buffers #112273

Closed
2 tasks
Tracked by #57 ...
bharadwajy opened this issue Oct 14, 2024 · 4 comments
Closed
2 tasks
Tracked by #57 ...
Assignees
Labels
backend:DirectX obsolete Issues with old (unsupported) versions of LLVM

Comments

@bharadwajy
Copy link
Contributor

bharadwajy commented Oct 14, 2024

Two flags viz., ComputeShadersPlusRawAndStructuredBuffers and EnableRawAndStructuredBuffers are set based on use of raw and structured buffers.

  • Implement shader flag analysis to set EnableRawAndStructuredBuffers if shader uses Raw or Structured buffers.
  • Implement shader flag analysis to set ComputeShadersPlusRawAndStructuredBuffers if shader uses Raw or Structured buffers, SM Major is = 4 and is a compute shader

NOTE:EnableRawAndStructuredBuffers is required for particle life but ComputeShadersPlusRawAndStructuredBuffers depends on one extra condition and can be implemented alongside.

See DxilModule::CollectShaderFlagsForModule(ShaderFlags &Flags) - specifically setting of bool hasRawAndStructuredBuffer for the conditions to set the flag ComputeShadersPlusRawAndStructuredBuffers and EnableRawAndStructuredBuffers.

AC
Add tests that use Raw and Structure buffers to verify that the flags are appropriately set.

@bharadwajy bharadwajy changed the title ComputeShadersPlusRawAndStructuredBuffers [DirectX] Shader Flag Analysis for ComputeShadersPlusRawAndStructuredBuffers Oct 14, 2024
@bharadwajy bharadwajy moved this to Planning in HLSL Support Oct 14, 2024
@davidcook-msft davidcook-msft moved this from Planning to Ready in HLSL Support Oct 15, 2024
@bharadwajy bharadwajy changed the title [DirectX] Shader Flag Analysis for ComputeShadersPlusRawAndStructuredBuffers [DirectX] Shader Flag Analysis to indicate use of Raw and Structured Buffers Oct 22, 2024
@damyanp damyanp moved this from Ready to Active in HLSL Support Oct 29, 2024
@coopp
Copy link
Contributor

coopp commented Nov 4, 2024

This issue is blocked at the moment by the need to generate proper IR for tests. ResourceKinds are not being picked up correctly for RWBuffer or StructuredBuffer.

@coopp
Copy link
Contributor

coopp commented Nov 4, 2024

Not blocked

@coopp
Copy link
Contributor

coopp commented Nov 7, 2024

Closing this issue as these flags being set are no longer needed or used. The PR created to set the flags has been closed out as well and not merged.

Tex opened microsoft/DirectXShaderCompiler#7003 to track addressing what to do with them long term.

@coopp coopp closed this as completed Nov 7, 2024
@github-project-automation github-project-automation bot moved this from Active to Closed in HLSL Support Nov 7, 2024
@EugeneZelenko EugeneZelenko added the obsolete Issues with old (unsupported) versions of LLVM label Nov 7, 2024
@EugeneZelenko EugeneZelenko closed this as not planned Won't fix, can't repro, duplicate, stale Nov 7, 2024
@bogner
Copy link
Contributor

bogner commented Jan 14, 2025

I opened #122663 the other day, which seems to be a duplicate. We should discuss whether this is really "not needed"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:DirectX obsolete Issues with old (unsupported) versions of LLVM
Projects
Status: Closed
Development

No branches or pull requests

4 participants