Skip to content

Conversation

@tgecho
Copy link

@tgecho tgecho commented Dec 6, 2025

Connections
Fixes #8668

Description
When we generate a fallback value, it causes the gles backend to set UNPACK_IMAGE_HEIGHT to a non-zero value, which causes Firefox to log a warning and not write... sometimes. But None does seem to be the correct value for 1D/2D textures.

Testing
I've tested it manually in context of the app I'm building, but I haven't managed to come up with a self contained test case. There's clearly some other state or something in Firefox that leads to this actually triggering a malfunction.

I'm not quite sure how to add an automated test. Is it practical to write a test where we read back the UNPACK_IMAGE_HEIGHT?

If we're nervous about side effects, I could scope this down to be done just within the gles backend by checking for dst_target == glow::TEXTURE_2D and forcing the UNPACK_IMAGE_HEIGHT value to 0 in https://github.com/gfx-rs/wgpu/blob/trunk/wgpu-hal/src/gles/queue.rs#L754

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy --tests. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo xtask test to run tests.
  • If this contains user-facing changes, add a CHANGELOG.md entry.

…ecified

None is the correct value for 1D/2D textures
@tgecho tgecho force-pushed the rows-per-image-for-2d-textures branch from 4013064 to 3e76478 Compare December 6, 2025 22:16
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.

Firefox error in WebGL backend when using queue::write_texture with a 2D texture

1 participant