Graphics
Intel® graphics drivers and software, compatibility, troubleshooting, performance, and optimization
20598 Discussions

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

HSöde1
New Contributor I
3,900 Views

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/ 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 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 10.18.10.3621 or older drivers) and D3D backend (OpenGL is glitchless).

An example of the glitches can be found at http://imgur.com/FpgCc8i 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.

0 Kudos
1 Solution
HSöde1
New Contributor I
2,277 Views

I'm happy to report that this issue is fixed with latest Intel HD drivers (version 15.36.6.64.3907), this was tested and confirmed by several users.

Only thing that causes concerns is the fact that this update is not compatible with previous generation Intel HD 3000/4000 hardware, which leaves a lot of customers without this fix.

But thank you for the great update!

Concerning the original issue, this topic can be marked as solved.

View solution in original post

0 Kudos
11 Replies
Allan_J_Intel1
Employee
2,277 Views

Thanks for joining the graphics community.

I am currently researching on this issue. As soon as I can, I will send you a message with my findings. Thank you for your patience and understanding.

Allan.

0 Kudos
ROBERT_U_Intel
Employee
2,277 Views

hsode788, Could you please point to a source where can we obtain a legal version of a game used on Dolphin emulator? The Emulator on its own doesn't have any games pre-installed

 

 

Thanks

Robert

 

0 Kudos
HSöde1
New Contributor I
2,277 Views

Hello!

And thank you for your response.

It's true that Dolphin doesn't come with any games / applications pre-installed. The only legal way (and the only way that Dolphin developer team supports) to acquire a copy of a game is to "dump" a copy directly from a game disc, either with softmodded Wii game console ( wiibrew.org tells all about that ) or with one of the few PC-DVD-drives that _can_ do it.

The nature of the emulator itself has a lot of gray area, for example downloading a dump of game, that you own. To avoid legal issues, only the methods stated above are supported. Unfortunately that means, that I can not point out a place to obtain legal copy of a full game.

That being said, fortunately Dolphin has a feature called "Fifo player". It saves the emulator output for selected number of frames (I'm not a developer, so can't provide in depth details about it). When I made a Fifo-log of a game that shows the glitches on D3D backend on Intel HD 4600, the glitches are not visible when running the same version of the emulator on another PC with AMD GPU. So this Fifo-log might serve as a "legal game" to show what's wrong (and to know when the problem is fixed, maybe..?). Playing back the fifo-log requires the user to disable Dual-core in the options and then to load the .elf -file normally from the Open... menu. The log is attached as .zip, please decompress it first.

The fifo-recorder seems to cause crashes in the latest builds, but this one I made earlier should provide some useful data and is playable with some of the later builds.

Here's a link https://dl.dropboxusercontent.com/u/23618751/Dolphin4.0.1288_glitch/NSMB_D3D_IHD4600_D4.0-1340.zip https://dl.dropboxusercontent.com/u/23618751/Dolphin4.0.1288_glitch/NSMB_D3D_IHD4600_D4.0-1340.zip

I also tried some of the "HomeBrew" software found at wiibrew.org, but I couldn't find an application that would show the glitches, unfortunately.

Hope I could be of some assistance!

Best regards,

Henrik S.

0 Kudos
ROBERT_U_Intel
Employee
2,277 Views

@ hsode788, Could you please provide details of your system configuration? If you could attach the DX Diag report that would be very helpful. Also, could you provide step by step instructions on how to reproduce the issue. So far we are not able to replicate what you are seeing based on the information provided.

Thanks

Robert

0 Kudos
HSöde1
New Contributor I
2,277 Views

@Robert_U , sorry my instructions for recreating the issue were incomplete, I tested it now. Regarding my last post, first of all the attached .zip did not contain an .elf file but a .dff file. But it is a correct file, and enough for showing the problem.

To see whe glitches I'm talking about take these steps:

0.9) Use a computer that ONLY has Intel HD 4000/4600 GPU enabled (since selecting that in Dolphin won't necessarily disable the discrete GPU, AFAIK).

1) Download the latest developement version of Dolphin, Win x64 version from " https://dolphin-emu.org/download/ Dolphin Emulator - Download " (tested today with 4.0-1871).

2) Extract the program, create an empty text file of name portable.txt in the program folder (the same that includes Dolphin.exe). This will save all the settings inside that folder (instead of global user folder).

3) Download the zipped .dff I posted earlier, unzip to location of your choice.

4) Launch Dolphin.

5) Select Config. On first page uncheck Enable Dual Core (fifo-player crashes with dual core, irrelevant for this issue).

6) Select Graphics. On first page select Backend: D3D (GPU should be Intel(R) HD Graphics 4X00, not Microsoft Basic Render Driver).

7) Select File/Open... , open the .dff file downloaded in 3).

This should open an output window for the recorded (3) frames that cycle rapidly. The picture is mainly black, since the frames don't include texture information for the black parts.

The glitches should here be seen as _bright white dots on some objects, especially in the lower right part of the screen_. The dots seem to form some wireframe lines.

The glitches can be fixed, if you change the backend (selected in 6)) to OpenGL. Also, they can't be seen, if you open the same file on a PC, that has a discrete GPU (AMD or NVIDIA), regardless if you choose D3D or OpenGL. And importantly, the glitches disappear, if you make the described change in the source code (change ">>7" to ">=128 ? 1 : 0", works for D3D but causes OpenGL to crash), see the initial post. So the glitches seem to only apper, after the graphics output is sent to Intel GPU's drivers when using D3D backend (which leads us here).

I'm happy to provide further information, and will provide all the information you asked for about my settings, altough this has been confirmed by other users. The computer works fine otherwise.

My system config is (shortened)

CPU: Intel i5-4670S

GPU: Intel HD 4600, driver version 10.18.10.3621

OS: Windows 8.1 Pro with Media Center 64-bit, latest updates installed (as of 16 Jun 2014).

Display: Samsung UE46F7007 LCD TV

Dolphin running in portable mode and/or global mode.

My DxDiag-report: https://dl.dropboxusercontent.com/u/23618751/Dolphin4.0.1288_glitch/DxDiag.txt https://dl.dropboxusercontent.com/u/23618751/Dolphin4.0.1288_glitch/DxDiag.txt

Thanks again for looking into this. I'm already grateful, I really am. Please reply if you can or can not reproduce the issue with these instructions. And thank you for your understanding, I am not a programmer, so I don't have the insight of all the relevant aspects.

0 Kudos
mmagu
Beginner
2,277 Views

Another way to look at this which might be more straightforward: https://drive.google.com/file/d/0B-DW3o814HmuZWFLNEtLOXNkU1k/edit?usp=sharing https://drive.google.com/file/d/0B-DW3o814HmuZWFLNEtLOXNkU1k/edit?usp=sharing is a frame dumped using Intel GPA System Analyzer. It currently looks like the first image from http://imgur.com/a/u3cf2; http://imgur.com/a/u3cf2; it should look like the second image (note the bottom right corner in particular). This is using an Intel(R) Core(TM) i5-3317U CPU @ 1.70GHz, driver version 10.18.10.3621.

0 Kudos
ROBERT_U_Intel
Employee
2,277 Views

@hsode788, Could you please attach your DXDiag report to this thread? Also, does your system have the latest BIOS from your system manufacturer installed? And one final question, have you checked this issue on a standard display or just a TV? Can you test on a non-TV display?

Thanks

Robert

0 Kudos
HSöde1
New Contributor I
2,277 Views

Not trying to intentionally up the topic, just curious, were you eventually able to reproduce the issue? magumagu (the last post above this) is one of the active developers of Dolphin, btw. If there is any additional information that I (or someone) could present to you then please let us know.

And if you have seen the problem do you, so far, have any ideas, of what might be the cause?

0 Kudos
HSöde1
New Contributor I
2,277 Views

@Robert_U: Ok, found the way to attach a DxDiag -report directly in this thread. My earlier post included a link to a previous version of the report, though. The version attached here is from today.

You asked about my BIOS, I checked and updated to the latest firmware version (F7) of my motherboard (Gigabyte GA-H87N-WIFI), so now it's up to date. Checked the settings concerning graphics (IGP, VRAM etc.), found no "problematic" settings that cound interfere, as to my knowledge.

Then I unplugged my LCD-TV from my computer and (using the same HDMI port&cable) switched it to my desktop monitor (Samsung 2493HM), which is a normal 1920x1200 with integrated speakers. No problems with the change, Windows 8.1 recognized the model and changed the resolution respectively.

Then I downloaded a new development version of Dolphin 4.0-2200 (built today), the master build code still includes culprit code and the bit shifts. Then I executed it in a portable mode (without old settings, shader cache ect), and tested a game. The glitches are still there, unchanged. There is yet another screenshot attached (see especially the cannon and the ribbons of the gifts).

Hopefully this information helps!

0 Kudos
HSöde1
New Contributor I
2,278 Views

I'm happy to report that this issue is fixed with latest Intel HD drivers (version 15.36.6.64.3907), this was tested and confirmed by several users.

Only thing that causes concerns is the fact that this update is not compatible with previous generation Intel HD 3000/4000 hardware, which leaves a lot of customers without this fix.

But thank you for the great update!

Concerning the original issue, this topic can be marked as solved.

0 Kudos
asaga2
Beginner
2,277 Views

buy new PC for this

0 Kudos
Reply