11 Replies Latest reply on Aug 5, 2015 6:01 PM by amayra

    Intel HD + Direct3D cause glitched graphics when C++ source code uses bit shifting in color/alpha combiner formula.


      This problem concerns Intel HD drivers, specifically DirectX drivers. The issue was found when a program named Dolphin (a open source game console emulator, found at https://dolphin-emu.org/ ) was updated earlier in March 2014.


      The program supports both OpenGL and Direct3D backends. Shortly after the release of developement version 4.0-1288 Intel HD users saw small multicolor glitches on some (not all) 3d objects. These have only been reported on Intel HD 4000/4600, and are not reproducible on AMD or NVIDIA GPUs


      The Dolphin code introduced a new color / alpha combiner formula (link to culprit Git commit: https://github.com/dolphin-emu/dolphin/commit/4f82d6f7aff107d3cb941df111250c66aa9f5ea8 ) in March 2014, and while the formula should be accurate in terms of emulation, it brought up these glitches.


      The Dolphin TEV color combiner has a new formula since 4.0-1288, and one of the changes was to remove integer division from the equation and use bit shifting instead. A developer of Dolphin found out that the glitches disappear, if the bit shift >>7 in the formula (see the GitHub link above) is replaced with conditional ternary operator >= 128 ? 1 : 0 , although they should give identical results here. This suggests that some bitwise operations fail under some circumstances, and developers strongly suspect Intel driver problem. As said, this happens only with Intel HD (latest or older drivers) and D3D backend (OpenGL is glitchless).


      An example of the glitches can be found at http://imgur.com/FpgCc8i .


      I contacted Intel support via normal support "form", but I was told that open source software isn't covered by Intel Customer Support. This I accept, of course. But this is basically a bug report aimed to Intel HD DirectX driver development team, I hope these forums reach the people whom this concerns.