Project

General

Profile

Actions

Emulator Issues #6482

closed

Anti-Aliasing Breaks Ignore Format changes set to off in games when using OpenGL and D3D11

Added by jpmeunier79 over 11 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

Game Name? MarioKartWii

Game ID? RMCE01

What went wrong? Antialiasing causes screen corruption : black screen with zoom Mii character on selection screen, small partial picture during a race.

What did you expect to happen? Normal antialiasing rendering.

What steps will reproduce the problem? Start a game with antialiasing activated (4x samples here)with D3D11 plugin.

What version of Dolphin were you using (please test the latest version
from http://dolphin-emu.org/download first, 3.5 or 3.5-367 are not valid
tests!)?
Bug with 1735 and 1749.

64 or 32 bit Dolphin? x64

What version of Dolphin used to work?
Version 1729 and before were OK.

What Operating System were you using and what are your hardware
specifications?
Win7 x64
Nvidia GTX 460 (driver 314.22, unchanged between tests)
i5 3570K

Any other relevant information or links to logs:
If during a game session you go disable/apply/enable/apply antialiasing setting in the video pluging pannel, antialiasing is then working again without the picture corruption.


Related issues 1 (0 open1 closed)

Has duplicate Emulator - Emulator Issues #4498: DX11 Anti Aliasing brokenDuplicate

Actions
Actions #1

Updated by maartenpeters over 11 years ago

But there is also a new driver for your video card available: http://www.nvidia.co.uk/object/win8-win7-winvista-64bit-320.49-whql-driver-uk.html But the chance is low that this will solve your problem.

Actions #2

Updated by JMC4789 over 11 years ago

  • Status changed from New to Questionable
  • Issue type set to Bug

On a GTX 760, 320.49, I do not get this issue on 3.5-1791.

Actions #3

Updated by JMC4789 over 11 years ago

  • Status changed from Questionable to Accepted

Confirmed it accidentally while messing with settings, apologies to you.

This bug only happens with Emulate Format Changes On.

Actions #4

Updated by JMC4789 over 11 years ago

Coincidentally, D3D9 isn't affected by this glitch.

Actions #5

Updated by JMC4789 over 11 years ago

Issue 4498 has been merged into this issue.

Actions #6

Updated by JMC4789 over 11 years ago

Found an old issue with the same exact symptoms and checked other games. This is not a one game issue or anything like that.

Actions #7

Updated by limburgerite over 11 years ago

Don't ask me why, but following the suggestion here
https://groups.google.com/d/msg/directxdev/oEg9tkQz9to/zl8w9ZEQKxUJ
fixes the in-game corruption.

Specifically, changing
http://code.google.com/p/dolphin-emu/source/browse/Source/Plugins/Plugin_VideoDX11/Src/PixelShaderCache.cpp?r=ca22872daed7c384db350b2987b21ea92299a9e8#212
from
"Texture2DMS<float4, %d> Tex0 : register(t0);\n"
to
"Texture2DMS Tex0 : register(t0);\n"

Unfortunately, the change is not compatible with DX 10.0.

And it doesn't fix the Miis.

Too bad my knowledge of D3D/HLSL is limited and the documentation is such absolute poo-poo.

Actions #8

Updated by NeoBrainX over 11 years ago

Better yet, in DX11/PixelShaderCache.cpp try replacing line 250
"const int l = sprintf_s(buf, 1024, reint_rgba6_to_rgb8_msaa, D3D::GetAAMode(g_ActiveConfig.iMultisampleMode));"
with
"const int l = sprintf_s(buf, 1024, reint_rgba6_to_rgb8_msaa, D3D::GetAAMode(g_ActiveConfig.iMultisampleMode).Count);"

and line 276
"const int l = sprintf_s(buf, 1024, reint_rgb8_to_rgba6_msaa, D3D::GetAAMode(g_ActiveConfig.iMultisampleMode));"
with
"const int l = sprintf_s(buf, 1024, reint_rgb8_to_rgba6_msaa, D3D::GetAAMode(g_ActiveConfig.iMultisampleMode).Count);"

Actions #9

Updated by NeoBrainX over 11 years ago

@ limburgerite: Also see revision f9b0b0471b36. Your comment made me review that portion again and it was horribly wrong. I'm fairly sure that that revision fixes this issue, thanks to your poking it even made it into 4.0 on-time ;)

Actions #10

Updated by limburgerite over 11 years ago

Still seeing it with revision f9b0b0471b36:
http://postimg.org/image/mnyxce021/dc845dc5/

I made sure to delete the shader cache.

I'll try the changes in comment #8 (if they aren't already in revision f9b0b0471b36).

Actions #11

Updated by limburgerite over 11 years ago

I think this might be it:
http://code.google.com/r/limburgerite-dolphin-emu/source/detail?r=debab3ab544bb5bcba0691d0ca5a59f2e69b9cba&name=issue-6482

The temp texture used in the format conversions was being created as non-multisampled, and the shaders were trying to multisample it. BOOM!

I've tested it and even the Miis are fixed now. I can't say for sure this is the correct fix, but it sure looks like it's working.

Actions #12

Updated by NeoBrainX over 11 years ago

Good catch. It also fixed the crashes that I get when enabling MSAA and format change emulation at the same time. It's indeed the correct thing to do and just a silly thing I missed. I'll try to get this one into 4.0 as well, but not sure if we're past the merge window yet. It'll definitely get applied to master though, so thanks! ;)

Actions #13

Updated by NeoBrainX over 11 years ago

  • Status changed from Accepted to Fixed

This issue was closed by revision eb2e3cff7e96.

Actions

Also available in: Atom PDF