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

Add patching stage to SPIR-V for vertex attrib types #68

Closed
flibitijibibo opened this issue Aug 20, 2024 · 2 comments · Fixed by #70
Closed

Add patching stage to SPIR-V for vertex attrib types #68

flibitijibibo opened this issue Aug 20, 2024 · 2 comments · Fixed by #70
Labels
help wanted Extra attention is needed

Comments

@flibitijibibo
Copy link
Collaborator

Previously we were exploiting Vulkan's SCALED types, but this doesn't hold up when SPIRV-Cross gets involved and it won't hold up for SDL_gpu since it can't provide scaled types. I don't think it will be as involved as HLSL/D3D11 but I also don't know if we have to patch in type conversion helpers.

CC @thatcosmonaut @TheSpydog

@flibitijibibo
Copy link
Collaborator Author

flibitijibibo commented Aug 21, 2024

This is where the attrib is emitted, it doesn't have a type declaration so it may get determined when the attrib is loaded, rather than declared?

https://github.com/icculus/mojoshader/blob/main/profiles/mojoshader_profile_spirv.c#L288

@flibitijibibo
Copy link
Collaborator Author

Here's where vertex inputs are emitted:

https://github.com/icculus/mojoshader/blob/main/profiles/mojoshader_profile_spirv.c#L2218

We can likely pad the top with OpNop instructions to make room for OpConvertUToF as needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant