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

Fix snake case for 1d/2d/3d suffix #617

Merged
merged 3 commits into from
Oct 14, 2024
Merged

Fix snake case for 1d/2d/3d suffix #617

merged 3 commits into from
Oct 14, 2024

Conversation

almarklein
Copy link
Member

@almarklein almarklein commented Oct 14, 2024

In responding to pygfx/pygfx#863, I realized that gfx.renderers.wgpu.set_wgpu_limits(max_texture_dimension_3d=...) does not work, but gfx.renderers.wgpu.set_wgpu_limits(max_texture_dimension3d=...) does. While in fact wgpu uses the former notation, as is shown in the error message:

Caused by:
  Limit 'max_texture_dimension_3d' value 3000 is better than allowed 2048

This PR fixes that, and keeps the old notation working too: max_texture_dimension3d still resolves to maxTextureDimension3D.

We have two implementations of to_snake_case() and to_camel_case(), because the codegen does not import from wgpu. This PR also makes them the same again (the diverged a little.

The codegen is actually not affected. Only the way that custom limits and such are handled.

@almarklein
Copy link
Member Author

Locally the failing test works. I'll wait for the nice diff error in #614.

@almarklein
Copy link
Member Author

almarklein commented Oct 14, 2024

Oh, now the codegen test passes. Was I seeing the ruff flakiness? Anyway, ready.

@almarklein almarklein marked this pull request as ready for review October 14, 2024 13:15
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