Stop using texelFetchOffset on macOS because it appears to be buggy on macOS Intel
Categories
(Core :: Graphics: WebRender, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox87 | --- | fixed |
People
(Reporter: jrmuizel, Assigned: jrmuizel)
References
Details
Attachments
(1 external file)
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 https://github.com/google/angle/commit/11e43ecee238ec6975652e0aa684e2f1c832d1d0 and
https://github.com/google/angle/commit/0303cf6b95
and in mesa https://github.com/mesa3d/mesa/commit/4650aea7a536ddce120576fadb91845076e8e37a
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.
Comment 1•5 years ago
|
||
Once we stop using texelFetchOffset on macOS we should be free to simplify the optimized switch statements in bug 1689316 without running into bugs with integer equality comparisons.
| Assignee | ||
Comment 2•5 years ago
|
||
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
https://github.com/google/angle/commit/11e43ecee238ec6975652e0aa684e2f1c832d1d0
and https://github.com/google/angle/commit/0303cf6b95 and in mesa
https://github.com/mesa3d/mesa/commit/4650aea7a536ddce120576fadb91845076e8e37a
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.
Updated•5 years ago
|
Comment 4•5 years ago
|
||
| bugherder | ||
Description
•