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

GPU: Xbox alignment requirements not met #11675

Open
flibitijibibo opened this issue Dec 20, 2024 · 1 comment
Open

GPU: Xbox alignment requirements not met #11675

flibitijibibo opened this issue Dec 20, 2024 · 1 comment
Assignees
Milestone

Comments

@flibitijibibo
Copy link
Collaborator

Xbox is annoying about resource alignment and is insistent on it being a magic number - we get it right at first but it doesn't always stick; FNA3D hits it after setting our second dummy texture data:

https://github.com/FNA-XNA/FNA3D/blob/master/src/FNA3D_Driver_SDL.c#L4472

Pretty sure we had this right at one point but resource management has probably changed a lot since our last Xbox checkup.

@flibitijibibo
Copy link
Collaborator Author

Got a better explanation: While we realign source data to match Xbox's needs, it turns out it also cares about slices being aligned too. So this increment ends up breaking the rule after slice 0:

https://github.com/libsdl-org/SDL/blob/main/src/gpu/d3d12/SDL_gpu_d3d12.c#L5762

In addition to aligned row pitch we also need aligned slice offsets, so that's fun!

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

No branches or pull requests

3 participants