Uniform buffers are all zeros on Intel ipgus on WebGL backend #3371
Labels
api: gles
Issues with GLES or WebGL
external: driver-bug
A driver is causing the bug, though we may still want to work around it
Description
On some devices, when using the webgl backend, uniform buffers are all zeros in shaders.
I've managed to narrow it down to "some" ranges of intel integrated graphics, but I can't say with confidence which ones. I can definitely reproduce it on my old surface pro 3, which uses Intel® HD Graphics 4400.
I can't say for sure it's only intel igpus, but so far I haven't found a user that has this issue on any other graphics driver.
This is affecting an unfortunate portion of our end users and currently blocking us from fully switching to wgpu.
Repro steps
cargo run-wasm --example hello-triangle --features webgl
and open it in your browser.Expected vs observed behavior
For the example code above, this is a correct output:
If the triangle is any other color, it is broken.
Extra materials
No warnings or validation or extra log at all.
I did find that if you move the buffer out of the loop and up to the top, it works:
But if you store the buffer between frames, intentionally leaking them, it doesn't work:
So my theory right now is that the buffer isn't initialized fast enough, rather than being dropped too soon.
Meanwhile, duplicating the entire submission seems to work too:
(If you just duplicate the renderpass on the encoder, it flickers randomly between working and not working)
Platform
wgpu v0.14.2 and 48fbb92 (master as of writing). Haven't tried older versions.
Browser doesn't seem to matter, it's been reprod in Edge, Firefox and Chrome.
Reproduced on Intel® HD Graphics 630 and Intel® HD Graphics 4400 so far.
The text was updated successfully, but these errors were encountered: