[Mesa-dev] [Bug 96684] [swrast] piglit glsl-array-bounds-01 regression

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Mar 30 23:46:48 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=96684

--- Comment #3 from Timothy Arceri <t_arceri at yahoo.com.au> ---
I think the test is wrong, it should not be expecting a specific outcome.

The spec says:

"Behavior is undefined if a shader subscripts an array with an index less than
0 or greater than or equal to the size the array was declared with."

And the test is doing:

float array[] = float [] (1.0, 2.0, 3.0, 4.0);

void main()
{
   int idx = 20;

   if (array[idx] == 5.0)
      gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
   else
      gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
}

So the result is undefined.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170330/45fee225/attachment-0001.html>


More information about the mesa-dev mailing list