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

NW.js 0.29.0: passing --disable-software-rasterizer appears to disable hardware acceleration #6498

Closed
AshleyScirra opened this issue Mar 7, 2018 · 9 comments

Comments

@AshleyScirra
Copy link

Tested on Windows 10 x64

In Construct we pass --disable-software-rasterizer on the command line to make sure we don't get software rendering. However in NW.js 0.29.0, it appears that passing this flag causes WebGL to become unavailable. If I delete the flag from the command line, I get hardware-accelerated WebGL again. It's strange behavior since despite the name, the flag appears to now also disable hardware acceleration.

This may well be an upstream issue but thought I'd give you a heads up in case it is something to do with NW.js or there are other reports.

Demo: package.zip
This is based on a simple Construct export. It displays the renderer info at the top. If it says canvas2d then WebGL isn't working; if it is, it should say WebGL and include the renderer string.

@Christywl
Copy link
Contributor

Christywl commented Mar 8, 2018

I can reproduce this issue on Linux/Windows with nwjs-sdk-v0.29.0.
image

@AshleyScirra
Copy link
Author

BTW if you want a minimal repro, you can just try:

const canvas = document.createElement("canvas");
const gl = canvas.getContext("webgl");
console.log(gl);  // null if not working

@rogerwang
Copy link
Member

This is reproduced in upstream Chrome browser. Using the switch disables hardware acceleration according to 'chrome://gpu' info page.
Please report this to upstream: https://crbug.com/new

@AshleyScirra
Copy link
Author

I can't reproduce that with Chrome Canary - running chrome --disable-software-rasterizer on my system launches Canary and chrome://gpu says WebGL and WebGL 2 are still hardware accelerated. Maybe it's upstream but already fixed?

@rogerwang
Copy link
Member

Could be. I was testing with Chrome stable 65.

@rogerwang
Copy link
Member

Will try to cherry pick the upstream fix.

btw, this switch might not be used given we supports swiftshader now. It disables swiftshader which lets you use CSS 3D and WebGL even on hardware with incapable GPUs.

@rogerwang
Copy link
Member

Please try this build as we'll release it soon: https://dl.nwjs.io/live-build/nw29/03-14-2018/4aacedc-733b9b3-24a4d36-f80f428/v0.29.1/

@AshleyScirra
Copy link
Author

@rogerwang - looks like it's working fine now. Thanks!

@rogerwang
Copy link
Member

Good to know it. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants