ValhallaTeam / angleproject

Automatically exported from code.google.com/p/angleproject
Other
0 stars 0 forks source link

Shader crashes Firefox/Chrome and Windows 7 #425

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1.
Go to shadertoy:-
https://www.shadertoy.com/view/MsX3WH
2.
Uncomment line 12 to define BigSet 
3.
Press compile (or Alt-Enter)

You should expect to see a detailed Mona Lisa image.
What happens is it crashes WebGL completely.

This is on Firefox and Chrome on Windows 7.
Mac and Linux handle the shader perfectly.

I suspect it runs out of memory for unrolling code or variable counts.

Original issue reported on code.google.com by DHoskins...@gmail.com on 16 May 2013 at 1:04

GoogleCodeExporter commented 9 years ago
Reproduced. Also doesn't seem to work with dx11proto, which I expected not to 
have any issues with this shader...

Original comment by nicolas....@gmail.com on 16 May 2013 at 1:51

GoogleCodeExporter commented 9 years ago
I haven't been able to repo either. In Chrome I do see the GPU watchdog kill 
the GPU process for taking too long. If I disable the GPU watchdog 
(--diable-gpu-watchdog) it takes ~70 seconds to fail to compile the shader on 
my machine. HP Z600 with NVidia Quadro FX 380

The errors in the console are

: (81,8-14): error X4507: maximum ps_3_0 constant register index (224) exceeded 
- Try reducing number of constants referenced
: Warning: D3D shader compilation failed with default flags. Retrying with 
avoid flow control.
: (81,8-14): error X4507: maximum ps_3_0 constant register index (224) exceeded 
- Try reducing number of constants referenced
: Warning: D3D shader compilation failed with avoid flow control flags. 
Retrying with prefer flow control.
: error X4507: maximum ps_3_0 constant register index (224) exceeded - Try 
reducing number of constants referenced
: Warning: D3D shader compilation failed with prefer flow control flags. 

There's a low priority TODO in Chrome to move shader compilation to a separate 
thread. That would mean we could not block the rest of the GPU process so that 
shaders that take so long to compile would probably just end up with a "This 
page is taking too long, wait?" type of dialog rather than being killed by the 
GPU watchdog. 

Original comment by g...@chromium.org on 20 May 2013 at 5:37

GoogleCodeExporter commented 9 years ago
Issue 426 has been merged into this issue.

Original comment by g...@chromium.org on 20 May 2013 at 8:07

GoogleCodeExporter commented 9 years ago
BigSet works for me when I use the dx11proto branch with shader model 5.0. It 
does still take several seconds to compile. On some systems that might trigger 
the timeout. It seems shader model 5.0 is at least capable of compiling it 
though.

For Chrome, once the program binary is cached, subsequent loads are sub second.

Original comment by apatr...@google.com on 20 May 2013 at 10:35

GoogleCodeExporter commented 9 years ago

Original comment by c...@chromium.org on 7 Dec 2013 at 4:04

GoogleCodeExporter commented 9 years ago

Original comment by geofflang@chromium.org on 10 Dec 2013 at 3:49

GoogleCodeExporter commented 9 years ago
As mentioned in #4, works with D3D11, but takes a while to compile. Separating 
compilation into a thread or process seems like a really good idea now.

Original comment by c...@chromium.org on 21 May 2014 at 7:46

GoogleCodeExporter commented 9 years ago
Chrome/ANGLE can now handle this shader with D3D9 and D3D11.  Moving shader 
compilation to other threads is being investigated in other tickets.

Original comment by geofflang@chromium.org on 29 Apr 2015 at 6:25