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

MSL: Fix support for HLSL mesh shader #2448

Merged

Conversation

andrejnau
Copy link
Contributor

No description provided.

@CLAassistant
Copy link

CLAassistant commented Feb 17, 2025

CLA assistant check
All committers have signed the CLA.

@@ -0,0 +1,76 @@
; SPIR-V
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HLSL shader:

struct Output {
    float4 pos: SV_Position;
    float3 color: COLOR0;
};

[outputtopology("triangle")]
[numthreads(1, 1, 1)]
void main(out indices uint3 triangles[1], out vertices Output vertices[3]) {
    SetMeshOutputCounts(3, 1);

    triangles[0] = uint3(0, 1, 2);

    vertices[0].pos = float4(-0.5, -0.5, 0.0, 1.0);
    vertices[0].color = float3(1.0, 0.0, 0.0);

    vertices[1].pos = float4(0.5, -0.5, 0.0, 1.0);
    vertices[1].color = float3(0.0, 1.0, 0.0);

    vertices[2].pos = float4(0.0, 0.5, 0.0, 1.0);
    vertices[2].color = float3(0.0, 0.0, 1.0);
}

Compiled using dxc/spirv-dis from VulkanSDK 1.4.304.1.

Copy link
Contributor

@HansKristian-Work HansKristian-Work left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems okay to me. Waiting on CI to pass.

@HansKristian-Work HansKristian-Work merged commit 6a62df6 into KhronosGroup:main Feb 18, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants