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

SPIR-V non-float vertex patching #71

Merged
merged 7 commits into from
Aug 27, 2024

Conversation

thatcosmonaut
Copy link
Contributor

The SDL_gpu backend needs to patch SPIR-V for non-float inputs to render correctly.

Copy link
Collaborator

@flibitijibibo flibitijibibo left a comment

Choose a reason for hiding this comment

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

One quick thing and then this should be good to go

((uint32_t*)vshader->parseData->output)[typeLoadOffset] = typeLoad;
*ptr_to_opcode_u32 = (*ptr_to_opcode_u32 & 0xFFFF0000) | opcodeLoad;
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should also patch in the opposite direction, in case one layout uses short and another uses float (unlikely but I wouldn't want to debug that without advance knowledge...)

@flibitijibibo flibitijibibo merged commit 5b2da1d into icculus:main Aug 27, 2024
3 checks passed
@thatcosmonaut thatcosmonaut deleted the spirv_blendindices_patch branch August 27, 2024 23:38
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