gecko-dev/gfx/wr/webrender_build
Jeff Muizelaar 0a6b4af5e8 Bug 1690027. Avoid using texelFetchOffset on macOS. r=mstange
We've run into a number of bugs with integer comparison on macOS Intel. I
created a reduced test case of bug 1689510 here:
https://github.com/jrmuizel/texel-fetch-offset.

It appears that offset parameter to texelFetchOffset can cause subsequent uses
of that integer value to get confused and generate bad shader code.

There are known issues around texelFetchOffset on Intel mentioned in ANGLE
11e43ecee2
and https://github.com/google/angle/commit/0303cf6b95 and in mesa
4650aea7a5

My theory is that there's also a workaround in the Intel driver but this work
around is somehow broken which causes the incorrect code.

Here's the result of compilation in working case:
https://gist.github.com/jrmuizel/e6a9b838aba97ec6190c147e0aa3a335
and the broken one:
https://gist.github.com/jrmuizel/8b303770b920c44dee9a18586140ab01

The broken one has had the cmp instruction dropped.

Differential Revision: https://phabricator.services.mozilla.com/D103691
2021-02-01 17:16:19 +00:00
..
src Bug 1690027. Avoid using texelFetchOffset on macOS. r=mstange 2021-02-01 17:16:19 +00:00
Cargo.toml Bug 1604615 - Optimize webrender shaders at build time. r=gw 2020-04-21 10:32:03 +00:00