Some architectures seem unable to handle the cast int(infinity) (where infinity is a float) in GLSL, which causes array-bounds-clamping to fail. From what I've seen, they always return 0 in this case, so we're still doing acceptable clamping. Unfortunately we can't use the isinf() function to test for this because it isn't in GLSLES 1.0. I suggest replacing the MAX_NUMBER (infinity) values in the test with some large but not huge numbers, although maybe we should also be explicitly testing our casts from infinity as well?
<rdar://problem/13415829>
Created attachment 193021 [details] Patch
I noticed this too on Windows platforms using ANGLE. It looks like Direct3D doesn't specify the result of HLSL intrinsics like clamp when the inputs are +/-infinity.
Comment on attachment 193021 [details] Patch Seems fine for this layout test. It would be good to add more tests verifying out-of-range access behavior works according to spec. Currently conformance/uniforms/out-of-bounds-uniform-array-access.html is the only conformance test in this area. r=me
It's pretty disappointing how small a number can trigger this :(
Committed r145780: <http://trac.webkit.org/changeset/145780>