RESOLVED FIXED 219739
REGRESSION(r268923): [WPE] Nothing renders on the rpi3 using the proprietary video driver
https://bugs.webkit.org/show_bug.cgi?id=219739
Summary REGRESSION(r268923): [WPE] Nothing renders on the rpi3 using the proprietary ...
Miguel Gomez
Reported 2020-12-10 05:46:50 PST
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.
Attachments
Patch (3.95 KB, patch)
2020-12-11 02:38 PST, Miguel Gomez
no flags
Miguel Gomez
Comment 1 2020-12-11 02:38:43 PST
EWS
Comment 2 2020-12-11 04:46:51 PST
Committed r270675: <https://trac.webkit.org/changeset/270675> All reviewed patches have been landed. Closing bug and clearing flags on attachment 415982 [details].
Note You need to log in before you can comment on or make changes to this bug.