Some of the modifications added to the fragment shader (in order to implement rounded rectangle clipping) broke the rendering on the rpi3 when using the proprietary driver. While these changes work on mesa based drivers, it seems that the proprietary driver has some limitations: * the right operand of the condition of a for loop must be a constant, which causes the line for (int rectIndex = 0; rectIndex < nRects; rectIndex++) not to work because nRects is not a constant. * can't index arrays with non constant variables, which causes things like vec4 bounds = vec4(u_roundedRect[index].xy, u_roundedRect[index].xy + u_roundedRect[index].zw); not to work unless index is a constant (which is not). So we need to rewrite the code in way that allows us to overcome those limitations. The first one is easy, as we need to replace the former loop with something like this: for (int rectIndex = 0; rectIndex < ROUNDED_RECT_MAX_RECTS; rectIndex++) { if (rectIndex >= u_roundedRectNumber) break; whatever; } This is required for the driver to be able to unwind the for loop. And this gives a way to fix the second issue: when unwinding the loop, the rectIndex var will be a constant in each of the loop steps, which allows us to use it to index the array. We need to perform all the accesses to the array with that variable though, so we can't do it inside any function. I'll send a patch with the changes.
Created attachment 415982 [details] Patch
Committed r270675: <https://trac.webkit.org/changeset/270675> All reviewed patches have been landed. Closing bug and clearing flags on attachment 415982 [details].