[WebGPU] With readback, rendering is not updated on a Babylon.js demo (https://playground.babylonjs.com/#BCU1XR#0 )
Categories
(Core :: Graphics: WebGPU, defect, P2)
Tracking
()
People
(Reporter: sotaro, Unassigned)
References
(Depends on 1 open bug, Blocks 3 open bugs)
Details
Attachments
(2 files)
2.68 KB,
text/plain
|
Details | |
4.73 KB,
patch
|
Details | Diff | Splinter Review |
Use latest Nightly, by default readback for present is enabled by default.
go to https://playground.babylonjs.com/#BCU1XR#0
From the top right, select "WEBGPU"
The rendering of the demo was not updated.
Reporter | ||
Updated•9 months ago
|
Reporter | ||
Comment 1•9 months ago
|
||
With latest nightly the problem is addressed for me.
Comment 2•9 months ago
|
||
I have the Nightly with buildid https://hg.mozilla.org/mozilla-central/rev/f8dd4015fa59fee3a1a74c00cd2393a9578e49f0 . I can still repro this bug and bug 1879694
Updated•9 months ago
|
Reporter | ||
Comment 3•9 months ago
|
||
OK, thank you.
Comment 4•9 months ago
•
|
||
Babylon version 5.7.1.1 does not show this bug. But the "Latest" version of babylon (V6.4.3 as of 22Feb2024) does show this behaviour.
Versions of babylon can be toggled from the menu at the top-right.
Reporter | ||
Comment 5•9 months ago
|
||
(In reply to Mayank Bansal from comment #2)
I have the Nightly with buildid https://hg.mozilla.org/mozilla-central/rev/f8dd4015fa59fee3a1a74c00cd2393a9578e49f0 . I can still repro this bug and bug 1879694
Sorry, I forgot to change from WebGL2 to WebGPU.
Updated•9 months ago
|
Updated•9 months ago
|
Reporter | ||
Comment 6•9 months ago
|
||
During loading the site, logout had "Device::create_shader_module error".
Reporter | ||
Updated•9 months ago
|
Comment 8•9 months ago
•
|
||
:sotaro: If you examine the shader compilation message emitted at the error level in the console, you'll see:
Shader '' parsing error: expected global item ('struct', 'const', 'var', 'alias', ';', 'fn') or the end of the file, found 'diagnostic'
┌─ wgsl:1:1
│
1 │ diagnostic(off, derivative_uniformity);
│ ^^^^^^^^^^ expected global item ('struct', 'const', 'var', 'alias', ';', 'fn') or the end of the file
I just filed bug 1882800 to track this particular issue, which is that diagnostic filters are not implemented in naga
(which backs WebGPU's shader compilation). It should be possible to remove diagnostic filter statements and, since webgpu-uniformity-analysis
is not implemented yet and things otherwise should Just Work™.
I'll see if I can reproduce this issue on modified source. We might want to create our own MRE in order to keep working on this.
Updated•9 months ago
|
Reporter | ||
Comment 10•8 months ago
•
|
||
With the STR, log out also had the following error message. It might be related to Bug 1827116.
[ERROR wgpu_core::device::global] Device::create_shader_module error:
Shader '' parsing error: unknown type: 'texture_external'
┌─ wgsl:3:45
│
3 │ @group(0) @binding(1) var videoTexture: texture_external;
│ ^^^^^^^^^^^^^^^^ unknown type
Reporter | ||
Comment 11•8 months ago
|
||
:ErichDonGubler, is there an issue of wgpu for 'texture_external'?
Comment 12•8 months ago
•
|
||
:sotaro: There is, and that bug is webgpu-external-textures
. However, I don't think that the flickering in the OP of this bug is a blocker, since the 5.71.1 version of the demo works on both readback and non-readback paths?
Reporter | ||
Comment 13•8 months ago
|
||
From Bug 1879694 Comment 11, the flickering did not happen when external texture is not recycled. The rendering was displayed momentarily at first and the rest of the time, the rendering was white. The flickering seemed happen by showing old obsoleted WebGPU contents.
From the above, with "Latest" version of babylon, rendering seemed not updated when creating shader module was failed.
Reporter | ||
Comment 14•8 months ago
|
||
Reporter | ||
Comment 15•8 months ago
|
||
With Attachment 9391932 [details] [diff], different external texture is used for each readback. With it, the rendering was displayed momentarily at first and the rest of the time, the rendering was white.
It also seemed to say that rendering of WebGPU seemed not updated when creating shader module was failed.
Reporter | ||
Comment 16•8 months ago
|
||
My investigation was completed. Reassign to :ErichDonGubler.
Reporter | ||
Comment 17•8 months ago
•
|
||
(In reply to Erich Gubler [:ErichDonGubler] from comment #12)
:sotaro: There is, and that bug is
webgpu-external-textures
. However, I don't think that the flickering in the OP of this bug is a blocker, since the 5.71.1 version of the demo works on both readback and non-readback paths?
Yea, it should not be a blocker of Bug 1843891. It seems like a problem of latest Babylon.
The problem seemed to happen when shader compile failed.
Reporter | ||
Comment 18•8 months ago
|
||
Bug 1885490 is going to add a way to disable RemoteTexture recycling for WebGPU. It could be used to check if obsoleted content caused the flickering.
Updated•8 months ago
|
Comment 19•8 months ago
|
||
The remaining scope of this issue is: we're not sure why BabylonJS isn't trying to render after shader compilation fails. We believe that some changes to shaders related to bug 1882800 are causing us to reject standards-compliant shaders, which BabylonJS doesn't attempt to recover from. Triaging as a P2, to match bug 1882800.
Un-assigning from myself, since I'm not putting active effort into investigating this, ATM.
Description
•