Insufficent WASM runtime for https://ruffle.rs/demo/

For support with specific websites

Moderator: trava90

Forum rules
Please always mention the name/domain of the website in question in your topic title.
Please one website per topic thread (to help keep things organized). While behavior on different sites might at first glance seem similar, they are not necessarily caused by the same.

Please try to include any relevant output from the Toolkit Error Console or the Developer Tools Web Console using the following procedure:
  1. Clear any current output
  2. Navigate or refresh the page in question
  3. Copy and paste Errors or seemingly relevant Warnings into a single [ code ] block.
User avatar
craniumcadoo
Hobby Astronomer
Hobby Astronomer
Posts: 17
Joined: 2023-08-02, 19:42

Insufficent WASM runtime for https://ruffle.rs/demo/

Unread post by craniumcadoo » 2023-08-02, 20:16

Code: Select all

Serious error loading Ruffle: CompileError: wasm validation error: at offset 78928: unrecognized opcode: c0  
index.js:2:267384
Serious error occurred loading SWF file: CompileError: wasm validation error: at offset 78928: unrecognized opcode: c0  
index.js:2:271100
Error: CompileError: wasm validation error: at offset 78928: unrecognized opcode: c0
I'm mainly just curious if the reason the Ruffle WASM doesn't work is known.

The previous error was due to a lack of ReadableStream support, but https://github.com/ruffle-rs/ruffle/pull/11699 fixed that panic. Sites that use the Ruffle JS API instead of the polyfill don't work on Pale Moon because of this CompileError, though sites that use the polyfill work on Pale Moon if the Flash plugin is installed ever since https://github.com/ruffle-rs/ruffle/pull/11407.

User avatar
craniumcadoo
Hobby Astronomer
Hobby Astronomer
Posts: 17
Joined: 2023-08-02, 19:42

Re: Insufficent WASM runtime for https://ruffle.rs/demo/

Unread post by craniumcadoo » 2023-10-25, 19:16

This error is gone (possibly the opcodes were added in v32.4.1). Now the error is, as logged in the console on https://ruffle.rs/demo/:

Error: WebGL: linkProgram: Must have a compiled vertex shader attached.
Error: WebGL: getUniformLocation: `program` must be linked.

This causes wgpu to panic with the error message "Could not find color uniform in shader clear shader": see https://github.com/gfx-rs/wgpu/blob/49d ... er.rs#L659

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 919
Joined: 2021-01-26, 11:18

Re: Insufficent WASM runtime for https://ruffle.rs/demo/

Unread post by Kris_88 » 2023-10-25, 19:33

Works fine for me.
U1.png

User avatar
craniumcadoo
Hobby Astronomer
Hobby Astronomer
Posts: 17
Joined: 2023-08-02, 19:42

Re: Insufficent WASM runtime for https://ruffle.rs/demo/

Unread post by craniumcadoo » 2023-10-25, 19:46

Hmm, maybe your Pale Moon is falling back to webgl or canvas instead of wgpu-webgl for some reason. Those Ruffle backends work fine on Pale Moon, but the default Ruffle backend is wgpu-webgl.

If it's falling back to webgl the console will say:

New Ruffle instance created (Version: nightly 2023-10-25 | WebAssembly extensions: OFF | Used renderer: webgl)

Instead of Used renderer being wgpu-webgl: see the preferredRenderer option on https://github.com/ruffle-rs/ruffle/wik ... of-options

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 919
Joined: 2021-01-26, 11:18

Re: Insufficent WASM runtime for https://ruffle.rs/demo/

Unread post by Kris_88 » 2023-10-25, 20:02

craniumcadoo wrote:
2023-10-25, 19:46
If it's falling back to webgl the console will say:
New Ruffle instance created (Version: nightly 2023-10-25 | WebAssembly extensions: OFF | Used renderer: webgl)
Yes, I have this message.
craniumcadoo wrote:
2023-10-25, 19:46
Instead of Used renderer being wgpu-webgl: see the preferredRenderer option on https://github.com/ruffle-rs/ruffle/wik ... of-options
I checked in the PM 32.4.1 win64 portable with fresh profile.
I don't think I need to change anything if it's already working.

User avatar
craniumcadoo
Hobby Astronomer
Hobby Astronomer
Posts: 17
Joined: 2023-08-02, 19:42

Re: Insufficent WASM runtime for https://ruffle.rs/demo/

Unread post by craniumcadoo » 2023-10-25, 20:10

You don't have to change anything for yourself, but this won't work for a person who has a computer supposedly supporting WebGL2. For me, https://get.webgl.org/webgl2/ says "Your browser supports WebGL2" but also doesn't show a spinning cube. I think that's the cause of the issue.

User avatar
craniumcadoo
Hobby Astronomer
Hobby Astronomer
Posts: 17
Joined: 2023-08-02, 19:42

Re: Insufficent WASM runtime for https://ruffle.rs/demo/

Unread post by craniumcadoo » 2023-10-25, 20:12

Screenshot from 2023-10-25 16-12-16.png

User avatar
craniumcadoo
Hobby Astronomer
Hobby Astronomer
Posts: 17
Joined: 2023-08-02, 19:42

Re: Insufficent WASM runtime for https://ruffle.rs/demo/

Unread post by craniumcadoo » 2023-10-25, 20:23

Discussed this in the Ruffle Discord. Dinnerbone said "Well that's definitely a pale moon bug then, they're claiming total support and that webgl2 will work, but it clearly doesn't" (https://webglreport.com/?v=2 shows 88 of 88 functions implemented but https://get.webgl.org/webgl2/ doesn't show the spinning cube).

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 919
Joined: 2021-01-26, 11:18

Re: Insufficent WASM runtime for https://ruffle.rs/demo/

Unread post by Kris_88 » 2023-10-25, 20:41

I tried to set webgl.disable-angle=true in about:config.
Then I have "Your browser supports WebGL2" and I see the spinning cube here: https://get.webgl.org/webgl2/
U2.png
But I have black screen here: https://ruffle.rs/demo/

This is certainly interesting, but I'm happy with "falling back to webgl"...

User avatar
craniumcadoo
Hobby Astronomer
Hobby Astronomer
Posts: 17
Joined: 2023-08-02, 19:42

Re: Insufficent WASM runtime for https://ruffle.rs/demo/

Unread post by craniumcadoo » 2023-10-25, 20:59

If I set webgl.bypass-shader-validation to true, the spinning cube appears but I encounter a different error for Ruffle:

Error: WebGL: drawElementsInstanced: Active texture 0 for target 0x0de1 is 'incomplete', and will be rendered as RGBA(0,0,0,1), as per the GLES 2.0.24 $3.8.2: Because the minification filter requires mipmapping, the texture must be "mipmap complete". (32)
Error: WebGL: No further warnings will be reported for this WebGL context. (already reported 32 warnings)

I can set webgl.enable-webgl2 to false to force Ruffle to fall back to webgl.

This are my settings to get the cube to appear but get that error message in Ruffle:
Screenshot from 2023-10-25 16-49-27.png

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35234
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Insufficent WASM runtime for https://ruffle.rs/demo/

Unread post by Moonchild » 2023-10-25, 21:12

Settings all default, test page works fine, spinning cube shows.
That is on Pale Moon 32.4.1 x64, Win 10 x64, AMD RX590, latest Radeon Pro drivers (23.Q3).

We have full support for WebGL2, and have had so for a long time. Dinnerbone isn't correct asserting we don't.
Attachments
FireShot Pro Screen Capture #385 - 'about_config' - about_config.png
FireShot Pro Screen Capture #386 - '' - get.webgl.org_webgl2.png
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35234
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Insufficent WASM runtime for https://ruffle.rs/demo/

Unread post by Moonchild » 2023-10-25, 21:26

craniumcadoo wrote:
2023-10-25, 20:59
Error: WebGL: drawElementsInstanced: Active texture 0 for target 0x0de1 is 'incomplete', and will be rendered as RGBA(0,0,0,1), as per the GLES 2.0.24 $3.8.2: Because the minification filter requires mipmapping, the texture must be "mipmap complete". (32)
Error: WebGL: No further warnings will be reported for this WebGL context. (already reported 32 warnings)
Right I overlooked this initially. it results in all-black textures because of this, and can't be displayed on my system either. But this seems to be a spec compliance issue in the .swf files themselves, or perhaps the way ruffle tries to translate textures (I don't know the inner workings of the plugin emulator). We're compliant on the browser side and even provide useful feedback with that error :)

As an aside: we support Flash's native binary/official NPAPI plugin; ruffle is considerably less performant. Websites should prefer NPAPI over ruffle emulation.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
craniumcadoo
Hobby Astronomer
Hobby Astronomer
Posts: 17
Joined: 2023-08-02, 19:42

Re: Insufficent WASM runtime for https://ruffle.rs/demo/

Unread post by craniumcadoo » 2023-10-26, 13:27

Ok, thank you Moonchild. I'm aware that Pale Moon supports Flash and I have it installed. I was also the one who implemented the Ruffle PR to ensure Ruffle would not attempt to poly-fill elements if Flash was installed. However, some websites use the Ruffle API instead of actual Flash elements, so they can't work with Flash player, and ideally they could work in Pale Moon too. Also, some games that were, for example, built for the Newgrounds Flash Forward Jam surprisingly work better in Ruffle than Flash, because the people who designed them designed them for Ruffle, so they didn't use any of the techniques to make them run faster in Flash player that didn't work in Ruffle, but did use techniques to make them run faster in Ruffle that wouldn't have worked in Flash.

Below is the latest between Dinnerbone and myself in the Ruffle Discord.

Dinnerbone:
You said the webgl 2 test website didn't render, correct? Then it's not a ruffle thing if so
It's not getting far enough to be a swf thing if it's compiling the clear shader
Me:
That was true for me, but that was fixed for me by setting webgl.bypass-shader-validation to true, fixed for Kris_88 by them setting webgl.disable-angle to true, and it was not the case for Moonchild even with default settings.

For all of us, once the spinning cube demo was working, Ruffle failed with:

Code: Select all

Error: WebGL: drawElementsInstanced: Active texture 0 for target 0x0de1 is 'incomplete', and will be rendered as RGBA(0,0,0,1), as per the GLES 2.0.24 $3.8.2: Because the minification filter requires mipmapping, the texture must be "mipmap complete".
That caused the SWF to display in all black. However, that's purely a display thing. The logo animation is playing its normal sounds when clicked even with that error, and the context menu still appears when right clicking it (though for some reason it disappears immediately when right click is released). That error appears for every SWF, so it may in fact be some kind of failing compliance thing with mipmapping (https://github.com/search?q=repo%3Aruff ... &type=code) that other browsers silently ignore.

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 919
Joined: 2021-01-26, 11:18

Re: Insufficent WASM runtime for https://ruffle.rs/demo/

Unread post by Kris_88 » 2023-10-26, 14:25

There are two examples that don't work in Pale Moon. Black screen.
https://webglsamples.org/WebGL2Samples/ ... nterleaved
https://webglsamples.org/WebGL2Samples/ ... _separated

At least in my case, when webgl.disable-angle = true

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 919
Joined: 2021-01-26, 11:18

Re: Insufficent WASM runtime for https://ruffle.rs/demo/

Unread post by Kris_88 » 2023-10-27, 15:55

However, I'm interested. Can anyone check these two examples? Is this not working just for me or is this a common problem?

https://webglsamples.org/WebGL2Samples/ ... _separated
https://webglsamples.org/WebGL2Samples/ ... nterleaved

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35234
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Insufficent WASM runtime for https://ruffle.rs/demo/

Unread post by Moonchild » 2023-10-27, 16:24

Both of those show a square with a color gradient across it for me.

If enabling/disabling ANGLE makes a difference for you, then it'd be something at the driver level (OpenGL conformance of your hardware/drivers), most likely. if there was a problem in Pale Moon, then it would not work no matter what.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

dbsoft
Project Contributor
Project Contributor
Posts: 405
Joined: 2020-02-21, 17:35

Re: Insufficent WASM runtime for https://ruffle.rs/demo/

Unread post by dbsoft » 2023-10-27, 16:28

I also see color gradient with those on MacOS.

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 919
Joined: 2021-01-26, 11:18

Re: Insufficent WASM runtime for https://ruffle.rs/demo/

Unread post by Kris_88 » 2023-10-27, 16:36

Thanks!
So it's just me.
Actually, MS Edge shows the correct picture... Most likely, it can better emulate hardware when it is insufficient.

User avatar
Kerebron
Fanatic
Fanatic
Posts: 105
Joined: 2016-12-04, 22:01

Re: Insufficent WASM runtime for https://ruffle.rs/demo/

Unread post by Kerebron » 2023-10-27, 19:22

Both examples do work on my machine.
Pale Moon 32.4.1 x64, Windows 7HP x64, Intel i3-4000M with integrated HD4600 GPU

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 919
Joined: 2021-01-26, 11:18

Re: Insufficent WASM runtime for https://ruffle.rs/demo/

Unread post by Kris_88 » 2023-10-27, 23:56

I have integrated ATI Radeon 3000 Graphics video adapter, which has limited support on Windows 10.
Windows 10 installed the latest driver and nothing can be improved here...

Post Reply