Unity3D WebGL 2.0 content fails to run
Reported by
ste...@unity3d.com,
Apr 1 2016
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2696.0 Safari/537.36 Example URL: http://files.unity3d.com/stefan/webgl/20/20/ Steps to reproduce the problem: 1. go to URL above 2. wait for loading to finish 3. NOTICE you are shown a white canvas and various errors are logged in the console What is the expected behavior? an empty Unity scene should be shown and no errors logged What went wrong? -Unity WebGL 2.0 content failed to load -works with WebGL 1.0 -also works with same Canary version on Windows (10) Does it occur on multiple sites: Yes Is it a problem with a plugin? No Did this work before? N/A Does this work in other browsers? Yes Chrome version: 51.0.2696.0 Channel: canary OS Version: OS X 10.11.4 Flash Version: Shockwave Flash 21.0 r0
,
Apr 4 2016
The first three errors in the console are: WebGL: INVALID_ENUM: texImage2D: invalid type blob:http%3A//files.unity3d.com/dfc455cc-2df1-465a-bd48-e923fcad5d81:1 glGetIntegerv: GL_INVALID_ENUM: enum argument out of range (Filename: D:/Mercurial/unity/Runtime/GfxDevice/opengles/ApiDebugGLES.cpp Line: 434) blob:http%3A//files.unity3d.com/dfc455cc-2df1-465a-bd48-e923fcad5d81:1 OpenGL Error after calling glGetIntegerv() (Filename: D:/Mercurial/unity/Runtime/GfxDevice/opengles/ApiDebugGLES.cpp Line: 434) It would be helpful if you could tell us exactly what enums you're passing in at these points.
,
Apr 5 2016
I just took a look at this. The invalid enum errors are not the cause of the issue (they exist in Firefox as well and are on our side - and have been fixed in a newer version of the branch). The real issue is that all our shaders are apparently failing to compile in WebGL 2.0 in Chrome on OS X. getShaderParameter COMPILE_STATUS will return false, but getShaderInfoLog will return an empty string, so we have no idea what is going on. Also, frequently get "WebGL hit a snag!" errors when trying this. Let me know if you need any more info.
,
Apr 5 2016
New build at http://files.unity3d.com/stefan/webgl/20/new/index.html with our errors fixed. Also as zip if needed.
,
Apr 6 2016
I'll take a look.
,
Apr 6 2016
I tested on Windows and Linux, the console is saturated with glGetIntegerv INVALID_ENUM errors. Is that expected? I did see the sky/horizon view, but nothing else. I am still building chrome on mac.
,
Apr 7 2016
As written in the original report, the content works on windows (and the INVALID_ENUM errors are an issue on our side and fixed in the updated build). This problem is specific to OS X.
,
Apr 7 2016
I run it in Linux and Windows for comparison purpose. I did use the link provided in #4 (is that the updated version?) and I still see all the INVALID_ENUM errors. I was able to reproduce the crashes in Mac and am looking into that right now.
,
Apr 7 2016
The crashes are due to TexStorage3D isn't available until OpenGL 4.2 and you are running it with OpenGL version less than 4.2.
,
Apr 7 2016
,
Apr 7 2016
We can rather say that Mac OS X unfortunately only supports up to the OpenGL 4.1 Core Profile. :) Thanks Mo for tracking that down.
,
Apr 7 2016
Hmm, I wonder how Firefox gets around this.. Shall I ask? :) But besides the crashes (which are not happening all the time for me), I am also seeing shader compilation issues. Can you reproduce those? As for the INVALID_ENUM errors, I actually also still see them in the link Stefan posted - but not in the build from our latest trunk I made locally. So let's just ignore those for now.
,
Apr 7 2016
We can easily emulate TexStorage calls using TexImage or CompressedTexImage calls. Assume Firefox did that. I'll look into the shader compiling issues this afternoon.
,
Apr 7 2016
I wasn't seeing the compile failure on Mac AMD Radeon HD FirePro D500, but I do see it on Intel HD 5000. What is the GPU that you saw this compile failures? It looks like the driver's compiler is buggy.
,
Apr 7 2016
Never mind. I was testing with ToT on my AMD and Canary on my Intel. With ToT on Intel, I also don't see the compile issue. So it looks like a bug in Chrome's shader translator that's been fixed recently. You can grab a ToT build and test it on your side: https://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?prefix=Mac/381909/
,
Apr 7 2016
Also, due to the crash (GPU process crashed), you lost WebGL context, so any CompileShader will fail and no log will be returned.
,
Apr 8 2016
Tried with the Chromium build you linked but it still fails with the same errors for the linked Unity build above. -Could not initialize WebGL context. Failed starting Unity. -GetManagerFromContext: pointer to object of manager 'AudioManager' is NULL -GetManagerFromContext: pointer to object of manager 'TimeManager' is NULL I'm on an Intel HD 4000 if that still matters somehow.
,
Apr 8 2016
Stefan, you probably have to reenable WebGL 2.0 in that browser as AFAIK, Chromium does not share settings with release Chrome. But I also don't get further with the linked build. I see the same shader errors as in Canary.
,
Apr 8 2016
Right, as I realized and mentioned in comment 16, once you lost your WebGL context, all shader compile fails with no log message. I am working on a workaround for TexStorage (https://codereview.chromium.org/1872663002/). Once it's landed, it should fix this issue.
,
Apr 12 2016
This bug should be fixed. Wait for a day or two for the fix to be included in canary. |
||||
►
Sign in to add a comment |
||||
Comment 1 by dtapu...@chromium.org
, Apr 1 2016