Bug 1679700 - Cast int parameter in get_yuv_offset_vector to float, to work around...
commitd74d995c135cae12a7ffa1cffc2c9a3621179045
authorMarkus Stange <mstange.moz@gmail.com>
Mon, 30 Nov 2020 19:54:41 +0000 (30 19:54 +0000)
committerMarkus Stange <mstange.moz@gmail.com>
Mon, 30 Nov 2020 19:54:41 +0000 (30 19:54 +0000)
tree3952a068cc51e3150091116533b70adc4cced709
parentac75b50d8b2038ec2c74778d236aca71486c91ed
Bug 1679700 - Cast int parameter in get_yuv_offset_vector to float, to work around a shader compilation bug with integer equality comparisons on macOS Intel. r=jrmuizel

We've encountered similar bugs before, e.g.
https://github.com/servo/webrender/wiki/Driver-issues#3540---mac-glsl-compiler-bug-with-integer-comparison-take-two

We don't want to change this `if` to a `switch` because glsl-opt compiles it
down to an if statement anyway, just a more complicated one (which was triggering
other bugs on other platforms, see bug 1678924).

Differential Revision: https://phabricator.services.mozilla.com/D98208
gfx/wr/webrender/res/yuv.glsl