8000 GPU: Validate that a texture format is valid for compute writes by thatcosmonaut · Pull Request #13044 · libsdl-org/SDL · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

GPU: Validate that a texture format is valid for compute writes #13044

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

Merged
merged 2 commits into from
May 14, 2025

Conversation

thatcosmonaut
Copy link
Collaborator

Only certain texture formats are valid for writes in a compute shader. This patch causes an assert if the texture binding is an invalid format.

It's probably worth also exposing this to the client with some kind of Supports query API call, but we can add that in a separate patch so we can cherry-pick this one back to 3.2.x.

Resolves #13043

@thatcosmonaut
Copy link
Collaborator Author

Never mind about the API change, SDL_GPUTextureSupportsFormat is enough to support this. I'll make that change now.

@thatcosmonaut
Copy link
Collaborator Author

Turns out we don't need to check this in BeginComputePass at all because texture creation catches it now. Great!

@thatcosmonaut thatcosmonaut merged commit b08d79b into libsdl-org:main May 14, 2025
40 checks passed
@thatcosmonaut thatcosmonaut deleted the gpu_compute_write_format branch May 14, 2025 23:24
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.

GPU Vulkan: Validation errors in shaders when using non-RGBA ordered texture formats
2 participants
0