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

Improve workaround for wgpu's gles texture type inference #557

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

teohhanhui
Copy link
Contributor

@teohhanhui teohhanhui commented Sep 3, 2024

  • Remove unnecessary feature flag (atlas) from WebGL2 section

To be honest, I can't see any difference with or without the patch. Everything seems to work fine when running the examples through wasm-server-runner without --features atlas anyway... Has the workaround been added somewhere else? (I can't find anything...)

Closes #395
Closes #283

* Remove unnecessary feature flag (`atlas`) from WebGL2 section
@rparrett
Copy link
Collaborator

rparrett commented Sep 3, 2024

I should test again, but as far as I remember, #395 is still valid -- it should be tested with atlases consisting of exactly 12 (or other multiples of 6 greater than 6) tiles. It's possible that this was only an issue for native GL. Also possible that something changed on the wgpu side and it's no longer an issue.

@teohhanhui
Copy link
Contributor Author

teohhanhui commented Sep 5, 2024

You're right. This workaround is needed. I'm trying out bevy_ecs_tilemap and without this patch, I'm getting:

ERROR app:  wgpu-hal heuristics assumed that the view dimension will be equal to `D2` rather than `D2Array`.
`D2` textures with `depth_or_array_layers == 1` are assumed to have view dimension `D2`
`D2` textures with `depth_or_array_layers > 1` are assumed to have view dimension `D2Array`
`D2` textures with `depth_or_array_layers == 6` are assumed to have view dimension `Cube`
`D2` textures with `depth_or_array_layers > 6 && depth_or_array_layers % 6 == 0` are assumed to have view dimension `CubeArray` log.target = "wgpu_hal::gles";
log.module_path = "wgpu_hal::gles";
log.file = "/home/teohhanhui/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-hal-0.21.1/src/gles/mod.rs";
log.line = 421;

Just as expected... (and of course the render is wrong too)

@teohhanhui
Copy link
Contributor Author

/ping @rparrett Please let me know if there are any outstanding concerns.

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.

Improve workaround for wgpu's gles texture type inference WASM Support for texture arrays
2 participants