Dolphin, the GameCube and Wii emulator - Forums

Full Version: [PATCH] Mario Galaxy 2 DX11 EFB crash fix
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
This quick (and very simple) patch will resolve the Super Mario Galaxy 2 crash with CPU->EFB Access enabled, while using the DX11 plugin.

All things, such as picking up star bits, and yoshie's tongue work as expected, plus my existing games do not show any issues with this patch, however my library is quite limited.

Patched against SVN 6239, however it should be able to be applied to any revision really.

Enjoy.

The patch has been updated.
Nice catch, although I'm not quite sure where the problem is.

Could you try the attached patch as well? It should be the more correct one if I understand the issue right.

EDIT: The patch is to be applied from inside the Video_DX11/Src directory.
Unfortunately, the issue remains with the new patch. I will investigate further. This is a good break from my normal job that typically consumes my free time. (embedded software engineer)
Hm, alright you seem to have some clue of what you're doing then, could you check where exactly smg is crashing and give me the value of RectToLock (and possibly other stuff which might be interesting)?
fwiw, smg works fine for me which is why I can't fix the issue myself..
Gotcha. To tell you the truth, it never started crashing until I got my new 465 GTX. It worked fine with my previous ATI HD5670. I also don't believe my older 9600GT had any issues either.

yeah, I don't have any issues on my laptop (ati 4200) nor on my pc (ati 3850)...
Anyway, thanks for your efforts Wink
This patch should resolve everything. It is concise, and to the point.

I have done a lot of troubleshooting, and found that the nvidia cards will fail if RectToLock is more than a 1x1 region. (driver bug?) It seems all we need is a 1x1 pixel to sample from anyhow, so this should not cause any problems, if I understand things correctly.

The error will be generated by D3D::context->Map(read_tex, 0, D3D11_MAP_READ, 0, &map);

The resulting map.pData will be NULL, and will cause a crash in PEEK_COLOR.
Well that actually makes sense, since read_tex is only a 1x1 texture...
Will commmit the fix soon, thanks Smile
Not a problem. Smile
Committed in r6247. I hope I got it right Wink
Pages: 1 2