Skip to content

Fix SV_PrimitiveID in GSVIn #7624

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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

Nielsbishere
Copy link
Contributor

GSVIn doesn't permit usage of SV_PrimitiveID, even though according to the spec this is allowed.
This happens if you try to compile GS with SV_PrimitiveID with lib_ target rather than gs_.
This can break some shaders that can use IDxcLinker together with lib_.

NielsbishereAlt and others added 11 commits May 12, 2025 14:45
…t; avoids pixel shader from inverting SV_POSITION.y in a lib file
…nly supported on GS/VS/DS/MS already. Added test case for fvk-invert-y for lib files
…PrimitiveID from Vertex->Geometry shaders (GSVIn) even though according to the spec it should be allowed. This breaks existing shaders but only if they're compiled as lib file (compiling it with gs_ is fine). This is because the value in this table is NA, which results in the semantic becoming invalid and down the road that results in this error: "Semantic 'SV_PrimitiveID' is invalid as gs Input."
@Nielsbishere
Copy link
Contributor Author

Fixes #7625

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.

2 participants