oizma / angleproject

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

Detect Sampler array inside a for-loop and return with an error message in shader translator #94

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is a temporary fix to avoid process crash due to a Mac driver bug.

However, this should not be Mac only behavior because we don't want some WebGL 
code to work on one platform but not on the others.

After this fix, 
https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/conforma
nce/gl-min-textures.html should no longer crash.

Original issue reported on code.google.com by z...@google.com on 13 Dec 2010 at 5:27

GoogleCodeExporter commented 9 years ago

Original comment by z...@google.com on 13 Dec 2010 at 5:46

GoogleCodeExporter commented 9 years ago
I was under the impression that this will be a Mac-only limitation. But 
implementing it for all platforms basically means that WebGL would not allow 
sampler arrays. Are we adding this limitation to the WebGL spec?

Original comment by alokp@chromium.org on 13 Dec 2010 at 7:04

GoogleCodeExporter commented 9 years ago
We are not changing the WebGL spec as this is a implementation bug.  So with 
this fix, we basically  have to live with the unfortunate fact that our WebGL 
implementation won't pass all conformance tests when it's released.  By forcing 
this shader-compile-failure on all platforms is to discourage WebGL developers 
not to use Sampler arrays inside for-loops, at least temporarily.

Original comment by z...@google.com on 13 Dec 2010 at 8:10

GoogleCodeExporter commented 9 years ago
Sorry for not getting back earlier - the email somehow missed my Inbox.

If we are not changing the spec, it just seems wrong to disable this feature on 
all platforms. If you are too concerned about portability, may be unrolling the 
array is next best option for Mac.

If you want to work on this, here are some tips:
1. Add something like SH_UNROLL_LOOP_WITH_SAMPLER_ARRAY to ShCompileOptions.
2. Implement it in TOutputGLSL::visitLoop

Original comment by alokp@chromium.org on 20 Dec 2010 at 5:14

GoogleCodeExporter commented 9 years ago
http://codereview.appspot.com/4331048/ out for review.

Original comment by z...@google.com on 30 Mar 2011 at 11:55

GoogleCodeExporter commented 9 years ago

Original comment by z...@google.com on 30 Mar 2011 at 11:55

GoogleCodeExporter commented 9 years ago

Original comment by z...@google.com on 8 Apr 2011 at 12:22