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

[milestone] Compile a runnable shader from clang #7

Open
5 of 8 tasks
damyanp opened this issue Apr 25, 2024 · 0 comments
Open
5 of 8 tasks

[milestone] Compile a runnable shader from clang #7

damyanp opened this issue Apr 25, 2024 · 0 comments

Comments

@damyanp
Copy link
Collaborator

damyanp commented Apr 25, 2024

This is a milestone on the way to getting full HLSL support in Clang.

For this milestone we need to be able to compile a simple compute shader such that the resulting DXBC container can pass validation and be signed by the DXC validator and can therefore be executed on a non-developer mode Windows desktop PC. The shader compiler binary should come from some kind of nightly build, rather than building locally.

Sample shader

RWBuffer<int> In : register(u0);
RWBuffer<int> Out : register(u1);

[numthreads(8,1,1)]
void main(uint GI : SV_GroupIndex) {
  Out[GI] = In[GI] * In[GI];
}

Workstreams

Language (#21)

  • numthreads entry attribute
  • Entry function linkage rules

Resource Binding (#23)

Semantics (#25)

  • Support SV_GroupIndex and SV_DispatchThreadID used with basic scalar/vector input types for target shader.

Resources (#8)

DirectX Container (#9)

damyanp referenced this issue in llvm/llvm-project Jun 26, 2024
Direct3D requires a PSV0 section to be present in the DXContainer in
order to be able to load and use the shader.

This change adds a minimal stub PSV0, with some hard-coded values, that
are just enough to unblock loading into Direct3D.

Contributes to #90129
lravenclaw referenced this issue in lravenclaw/llvm-project Jul 3, 2024
Direct3D requires a PSV0 section to be present in the DXContainer in
order to be able to load and use the shader.

This change adds a minimal stub PSV0, with some hard-coded values, that
are just enough to unblock loading into Direct3D.

Contributes to #90129
AlexisPerry referenced this issue in llvm-project-tlp/llvm-project Jul 9, 2024
Direct3D requires a PSV0 section to be present in the DXContainer in
order to be able to load and use the shader.

This change adds a minimal stub PSV0, with some hard-coded values, that
are just enough to unblock loading into Direct3D.

Contributes to #90129
@damyanp damyanp transferred this issue from llvm/llvm-project Aug 1, 2024
@damyanp damyanp changed the title [HLSL][DirectX] Compile a runnable shader from clang [milestone] Compile a runnable shader from clang Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Active
Development

No branches or pull requests

1 participant