Skip to content

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
@almarklein almarklein requested a review from Korijn as a code owner October 14, 2024 13:15
@almarklein almarklein merged commit 52f6baa into main Oct 14, 2024
21 checks passed
@almarklein almarklein deleted the snake_case_fix branch October 14, 2024 13:39
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