Skip to content

Add validation for Vulkan feature properties #13138

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
slouken opened this issue May 28, 2025 · 0 comments
Open

Add validation for Vulkan feature properties #13138

slouken opened this issue May 28, 2025 · 0 comments
Milestone

Comments

@slouken
Copy link
Collaborator

slouken commented May 28, 2025

Three of the four properties are simply adding a restriction to an existing public API:

  • _VULKAN_DEPTHCLAMP_BOOLEAN forces SDL_GPURasterizerState.enable_depth_clip to be set to true,
  • _VULKAN_DRAWINDIRECTFIRST_BOOLEAN forces SDL_GPUIndirectDrawCommand.first_instance to be set to zero, and
  • _VULKAN_SAMPLERANISOTROPY_BOOLEAN forces SDL_GPUSamplerCreateInfo.enable_anisotropy to be set to false.

These are all able to be trivially validated by SDL without shader reflection.

If an app dev is designing for Android with these restrictions as well as another platform simultaneously then it may be useful to ensure that the behavior of the API is consistent across all platforms so that any app code written is truly "write once, work everywhere" even if they are opting out of select features.

Originally posted by @lmurray in #13016 (comment)

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

1 participant