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

HLSL: Add task(amplification) shader support #2124

Merged
merged 4 commits into from
Mar 22, 2023

Conversation

Try
Copy link
Contributor

@Try Try commented Mar 18, 2023

spirv_hlsl.cpp Outdated
}
else
{
SPIRV_CROSS_THROW("Amplification shader in HLSL must have payload");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've tested with DXC: empty struct as payload compiles, yet produces invalid byte-code
bcf5408759f3.hlsl:17:5: error: For amplification shader with entry 'main', payload size 4 is greater than declared size of 0 bytes
https://shader-playground.timjones.io/8d8dbf3b63aa67aa3d000327b56915dd

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you just make a dummy struct with one int?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Haven't tested yet, but probably 'one-int' wont work, because task-payload should match mesh-payload in order to link.

spirv_parser.cpp Outdated Show resolved Hide resolved
spirv_hlsl.cpp Outdated Show resolved Hide resolved
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.

Comments.

@HansKristian-Work HansKristian-Work merged commit 09e60d7 into KhronosGroup:main Mar 22, 2023
@Try Try deleted the hlsl-task-shader branch March 22, 2023 16:53
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.

2 participants