Project

General

Profile

Actions

Emulator Issues #7942

closed

D3D antialiasing broken on EFB copies

Added by fallaha56 about 10 years ago.

Status:
Fixed
Priority:
Urgent
Assignee:
Category:
GFX
% Done:

0%

Operating system:
Windows
Issue type:
Bug
Milestone:
Regression:
Yes
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

Game Name?
-(any/all)

Game ID?
-(any/all)

What's the problem? Describe what went wrong in few words.
-enabling MSAA/SGSSAA in D3D no longer works

What did you expect to happen instead?
-it to work(!)

What steps will reproduce the problem?

  1. optionally set SGSSAA in nvidiaInspector
  2. set antialiasing on in Dolphin in D3D mode
  3. does not work (aliasing easily visible in F-Zero on track, on car text)

Dolphin 3.5 and 3.5-367 are old versions of Dolphin that have
known issues and bugs, so don't report issues about them and test the
latest Dolphin version first.
Which versions of Dolphin did you test on?
-4.0-4643

Does using an older version of Dolphin solve your issue? If yes, which
versions of Dolphin used to work?
-4.0-4618

What are your PC specifications? (including, but not limited to: Operating
System, CPU and GPU)
-WIn7 64bit, i7-980x, GTX970, latest drivers (no update since bug noted)

Is there any other relevant information? (e.g. logs, screenshots,
configuration files)
-forcing OpenGL SGSSAA has never worked, also OpenGL crashes for me every time when trying to close the Dolphin game window so am unable to use


Related issues 1 (0 open1 closed)

Has duplicate Emulator - Emulator Issues #7947: built-in MSAA D3D antialiasing broken (on nVidia only?) as of 4.0-4643 (vs 4.0-4618)Duplicate

Actions
Actions #1

Updated by JMC4789 about 10 years ago

Find the exact build that changed behavior, and give us some screenshots or something that show a comparison. Thanks!

Actions #2

Updated by fallaha56 about 10 years ago

I have narrowed the builds down as much as I can! (in fact I tested almost 10 versions) -I have no access to builds in between 4643 and 4618 since that is all that is available on the website...

Similarly happy to try and generate screenshots too but again only have access to said versions (and they will simply show AA not working!)

Any thoughts?

DF

Actions #3

Updated by JMC4789 about 10 years ago

Oh, sorry! That's my bad; I think I know who to ping though!

Actions #4

Updated by Armada about 10 years ago

  • Status changed from New to Questionable

We don't support SGSSAA or MSAA through third-party tools. Our own Anti-Aliasing setting is working fine on my GTX680.

Actions #5

Updated by fallaha56 about 10 years ago

Well think that's a damn shame! Dolphin running with SSAA is a joy to
behold -if you haven't tried it do, this option doesn't seem to be there
otherwise in D3D

Meanwhile Dolphin crashes endlessly in OpenGL or with DSR enabled (and I
run a modern rig, may not be a coder but I do know my hardware)

Supported or not why it should it be fine and then stop working within a
couple of revisions...

Actions #6

Updated by JMC4789 about 10 years ago

In an emulator, letting a third party program/driver do stuff to inputs/outputs can cause visual glitches and crashes. If a change made to the emulator causes an unsupported feature to break, then, that's just how it is.

Actions #7

Updated by Armada about 10 years ago

  • Status changed from Questionable to Invalid

The things is we already support SSAA in the OpenGL backend without third-party tools. And DSR is nothing more than a 4x internal resolution (you can even turn it up to 4k in the INI file).

If you get crashes in OpenGL without any third-party tools messing with the graphics then you should submit a new issue report for that.

Actions #8

Updated by fallaha56 about 10 years ago

Dear Jules this is not a 'third party tool' issue, SGSSAA is a built-in nVidia driver feature that has worked for a very long time indeed in Dolphin -something has suddenly changed and it now no longer works:
In case you haven't seen this: http://www.overclock.net/t/1250100/nvidia-sparse-grid-supersampling
-it should work just fine in D3D and OpenGL never mind the other issues with OpenGL for just now

-I do understand the difference between DSR and the much superior SGSSAA, that's why I reported this and did my best to help pinpoint the problem!

Actions #9

Updated by fallaha56 about 10 years ago

Jules I should have made this more clear -the built-in untweaked no-third party MSAA in D3D is broken too!

Actions #10

Updated by Armada about 10 years ago

I also consider the Nvidia Driver 3D Settings a third-party tool, you're trying to enable graphical features through your drivers instead of through Dolphin. That is why they break when we make changes to our D3D backend.

I've tested the Anti-Aliasing option in Dolphin, it works fine.

Also I'm not explaining the difference between DSR and SGSSAA, I'm saying we already support all those features you're trying to use within Dolphin itself. Please stop changing your driver settings and just stick with the Dolphin video configuration.

Actions #11

Updated by Armada about 10 years ago

Issue 7947 has been merged into this issue.

Actions #12

Updated by degasus about 10 years ago

btw, there is a reason why we don't support the msaa option from drivers or any other third party programs: They all just enable msaa on the default rendertarget. But bad luck, we render nothing on the default render target. So it's just a waste of GPU time.

Actions #13

Updated by fallaha56 about 10 years ago

This broken in Dolphin! I've retested it now to confirm, no third-party tools required...just the in-app settings...

Actions #14

Updated by fallaha56 about 10 years ago

-Jules all my driver settings for Dolphin are default for testing, nothing forced, this is broken and I can fix it by switching between recent Dolphin versions

Let me know what more info I need to send you.

Actions #15

Updated by degasus about 10 years ago

Are you sure there is no non-default setting within the driver? iirc there is a reset button in the nvidia panel.

Actions #16

Updated by JMC4789 about 10 years ago

SSAA is working for me in OpenGL, and AA is working for me in D3D. GTX 760, latest drivers. Looks like a problem on your end.

Actions #17

Updated by fallaha56 about 10 years ago

Guys first things first I truly appreciate all the hard work behind Dolphin

All my settings are reset/default/unforced/off including FXAA and Maxwell interleaving...can send screenshot if required (FYI am not a complete numpty, I've been building gaming rigs/workstations for 15yrs+ honest)

Appreciate not everyone may have this issue, does anyone else have a similar graphics setup?

Actions #18

Updated by fallaha56 about 10 years ago

Btw F-Zero on the car speed/acceleration rev-up screen is a great place to see this in action/not-in-action

Actions #19

Updated by JMC4789 about 10 years ago

It's working for me there. Can you get comparison screenshots?

Actions #20

Updated by Armada about 10 years ago

We've already got two different Nvidia GPUs (GTX680 and GTX760) where AA is working fine, it's likely a problem with your setup.

Try a clean installation of your Nvidia drivers, that will reset all the changes ever made to your drivers and rule out problems with your driver settings.

Actions #21

Updated by fallaha56 about 10 years ago

Have already done driver reset, really cannot do a full Win7 reinstallation to test that theory further...

Appreciate both our nV cards are similar BUT they're defo not identical -there seems to be some major changes in the Maxwell AA engine -it only supports x2x4x8 no longer offers x16/x32 MSAA -could this be something to do with it?

Also can anyone shed any light on D3D changes to Dolphin between 4643 and 4618?

-happy to provide screenshots...just doing that now...

Actions #22

Updated by fallaha56 about 10 years ago

Screenshots take 2 -correct file names this time!

All scenarios/builds covered...

Actions #23

Updated by fallaha56 about 10 years ago

Comparison with forced SGSSAA...

Actions #24

Updated by Armada about 10 years ago

  • Status changed from Invalid to Questionable

Since there is another user that is reporting the same issue I'll reopen the ticket. But since it doesn't seem to affect everyone it's likely a bug in the drivers due to Dolphin's new usage of texture arrays. I'll see whether I can at least disable the texture arrays when only one layer is used.

Actions #25

Updated by ofunniku about 10 years ago

PC: Win7 64-bit, AMD Athlon X4 860K, R9 285 - 14.12 AMD Catalyst Omega

Happens to me on any game on dolphin-master-4.0-4744-x64:

OpenGL is happy with EFB on or off, it will apply any selected MSAA mode.

D3D only applies any selected MSAA mode when EFB is disabled, even forcing MSAA through CCC does not get around this.

On the suggestion of Armada-MBPP I tried rev.4618: MSAA works with EFB on D3D

Actions #26

Updated by ofunniku about 10 years ago

BTW: Option I toggled with was: External Frame Buffers: Disable

Actions #27

Updated by Armada about 10 years ago

The original reporter didn't mention anything about External Frame Buffers, still can't reproduce the issue though.

Actions #28

Updated by fallaha56 about 10 years ago

Hi, 'original reporter' here.

I can confirm that disabling EFBs 'fixes' the issue with AA for me also.

Well spotted by the other fella -I hadn't tried that!

Actions #29

Updated by Armada about 10 years ago

According to ofunniku PR 1740 didn't solve the problem.

@ofunniku: Could you try this build? http://dl.dolphin-emu.org/prs/pr-1748-dolphin-latest-x64.7z

Actions #30

Updated by ofunniku about 10 years ago

Still present in PR 1748

Actions #31

Updated by fallaha56 about 10 years ago

Still present for me also.

Actions #32

Updated by Armada about 10 years ago

@fallaha56 If you disable the External Framebuffer do you get MSAA again?

Actions #33

Updated by fallaha56 about 10 years ago

Yep

Actions #34

Updated by Armada about 10 years ago

We've tried a lot of different GPUs and drivers and we're not able to reproduce it on any of them.

As soon as I'll be able to test it on some more PCs next week, but I won't be able to fix it until I'm actually able to reproduce the problem.

To help me reproduce your problem please use pastie.org to send me your gfx_dx11.ini files in the configuration that shows the problem.

Actions #35

Updated by MayImilae about 10 years ago

  • Category set to gfx
  • Regression set to Yes
Actions #36

Updated by pauldacheez about 10 years ago

ofunniku, fallaha56:
EFB = Embedded Framebuffer.
XFB = External Framebuffer.
Please don't fucking mix these up. Real XFB locks rendering to 1x IR and would obviously not interact particularly well with AA. EFB to RAM rarely does anything of the sort.

Actions #37

Updated by fallaha56 about 10 years ago

Thanks for the tip ;) -they're both EFB in the GUI, for me I have to disable both EFB + XFB.

Out of the house but will double check this later on and submit settings as requested.

D

Actions #38

Updated by ofunniku about 10 years ago

As pauldacheez has mentioned, I kept getting XFB mixed up with EFB, and it was XFB that was enabled that was causing AA not to apply. Setting 1x IR and MSAA 4x, aliasing is very noticeable.

Although OpenGL likes XFB just fine either way, I've been advised to keep the option disabled, but uploaded my gfx_dx11.ini with the problem visible, just in case it helps.

Actions #39

Updated by Armada almost 10 years ago

  • Status changed from Questionable to Accepted

Reproduced on Windows 7 x64, GTX680 with 344.75. Real XFB causes MSAA to have no effect on some systems.

Actions #40

Updated by Armada almost 10 years ago

Correction, MSAA isn't supposed to work on Real XFB at all. It's Virtual XFB that is having problems with MSAA.

Actions #41

Updated by Armada almost 10 years ago

Can you try this build? It fixes the problem for me: http://dl.dolphin-emu.org/prs/pr-1740-dolphin-latest-x64.7z

Actions #42

Updated by ofunniku almost 10 years ago

Tested the build, and it's still present.

Although you might've fixed it for nvidia users, hopefully it works for the other guy too.

Actions #44

Updated by ofunniku almost 10 years ago

Rewording: I also noticed that Anti-aliasing options actually has an effect in the game, and no AA on Virtual XFB actually scales better than any AA mode with XFB.

Maybe this is a scaling issue? This looks almost like nearest neighbor scaling to me, now that I think about it.

Actions #45

Updated by Armada almost 10 years ago

This issue got a lot more complex, I can still reproduce the problem, but only if I don't attach a debugger.

Actions #46

Updated by fallaha56 almost 10 years ago

Hi

Thanks for the test version, I too have to add to the complexity I'm afraid -it involves both the eXFB and the EFB.

This gets a little over my head as to how it's possible but am confident that even with eXFB disabled I'm getting no AA on EFB-rendered 3D surfaces (is that the right terminology?)

Eg F-Zero:
-in 4618 everything is anti-aliased with eXFB and EFB on
-builds after that (special builds and all other ones too) do not do AA
-with eXFB off I then get AA in game but NOT on the pre-race 3D car power-up screens (suspect this involves the EFB?)
-disabling EFB makes the pre-race 3D disappear altogether

Pretty sure this is what is happening/I'm not crazy. Can supply screenshots if truly necessary...

Actions #47

Updated by Armada almost 10 years ago

Okay, I think I've finally nailed down the problem. The latest build should fix it: http://dl.dolphin-emu.org/prs/pr-1740-dolphin-latest-x64.7z

(Make sure you re-download it and that you're not running the old build)

Actions #48

Updated by fallaha56 almost 10 years ago

Hi thanks again, merry xmas

Sorry to say have to confirm not working on Win7-64/GTX970/344.75 :-(

Actions #49

Updated by Armada almost 10 years ago

Please make absolutely sure you're not running an old build, because I can't reproduce the problem on the latest build with or without the debugger. This means that the problem is completely fixed for me.

Actions #50

Updated by fallaha56 almost 10 years ago

4800 for sure

Know we touched on this before but could this be an architecture-related issue -I've have had similar issues with a number of games/demos where I had AA with my GTX580 but now do not...

Actions #51

Updated by Armada almost 10 years ago

4800 is an old build and you didn't download it from the link I sent: http://dl.dolphin-emu.org/prs/pr-1740-dolphin-latest-x64.7z

The version number should be 4.0-4808-dirty, but even then we can't be sure which build of the version you're running.

For good measure here's a build I compiled myself, when you run it it should not [stereo-xfb] in the title bar and have version 4.0-4820-dirty: https://www.dropbox.com/s/7jhbh7saal6omx8/Dolphin-x64.7z?dl=0

Actions #52

Updated by Armada almost 10 years ago

It should note [stereo-xfb] in the title...

Actions #53

Updated by ofunniku almost 10 years ago

Alright, I'm going to test it now and to ensure a clean build, I will remove my Dolphin folder in Documents and extract the build to a new folder in C:\Emulation Test Builds\

For good measure, I will also revert my system drivers to AMD Catalyst 14.9 (WHQL)
http://support.amd.com/en-us/kb-articles/Pages/AMDCatalyst14-9WINReleaseNotes.aspx

Give me a bit, this will take about half an hour.

Actions #54

Updated by Armada almost 10 years ago

Don't revert your system drivers unless you're running a beta version, I'm only interested in results from the latest stable version.

Actions #55

Updated by fallaha56 almost 10 years ago

Thanks again -I did just follow the link you sent honest!

So...now can confirm no AA on EFB-surfaces but working in game (with xEFB and EFB on, F-Zero)

Actions #56

Updated by Armada almost 10 years ago

Fallaha56, please make sure you're using the correct terms. There is no such thing as an xEFB or an eXFB in Dolphin.

From what I understand from your comment you are able to get AA working with Virtual XFB?

Actions #57

Updated by fallaha56 almost 10 years ago

Sorry will try again:

Under 'hacks' in GFX:
-I get 2 sets of settings: EFB Copies (embedded frame buffer?) and External Frame Buffer
-in F-Zero disabling External Frame Buffer gets me in-game AA only, certain 2D/3D pre-screens have no AA on 3D
-disabling EFB copies makes the 3D on the 2D screens disappear altogether

Not sure how Dolphin renders all these surfaces -gets a little over my head!

Actions #58

Updated by ofunniku almost 10 years ago

I am happy to report that your latest build applies AA with the XFB - Virtual option on my machine.

I restored my Dolphin folder to Documents to recover my settings and it still works, so it's not a setting issue, indeed this build seems to be working.

To verify further, I ran some checks:

  1. I once again extracted the file (http://dl.dolphin-emu.org/prs/pr-1740-dolphin-latest-x64.7z) to a another folder, deleted the settings in documents and ran (build 4808-dirty) and saw the issue was still the same on that build, recovered settings, same thing.

  2. Tested build 4808, from the site (https://dolphin-emu.org/download/) and still saw the issue with a clean profile, recovered profile, still the issue.

  3. Re-updated to AMD Catalyst Omega 14.12 (WHQL), and tested all three builds, and build 4820-dirty with the stereo-xfb string in the title is still the one rendering properly

Hoping the other guy reports success too!

Actions #59

Updated by Armada almost 10 years ago

  • Priority set to Urgent
  • Operating system Windows added

This issue has been confirmed to be a bug in the HLSL compiler on Windows 7 systems. It affects all users regardless of GPU or driver version. It affects all EFB copies that use shaders to resolve the samples, mainly EFB to Texture and EFB to Virtual XFB.

I will report the issue to Microsoft and provide a workaround in a new PR.

Actions #60

Updated by Armada almost 10 years ago

Please test this build, it contains the workaround that should fix the problem for both XFB copies and EFB copies:

http://dl.dolphin-emu.org/prs/pr-1769-dolphin-latest-x64.7z

Actions #61

Updated by ofunniku almost 10 years ago

Switching the options in the emulator: First screenshot is MSAA 2x, second is 4x, last is 8x

Actions #62

Updated by Armada almost 10 years ago

Oops, forgot about the line that averages the colors out. Try downloading the build again, it should work now.

Actions #63

Updated by ofunniku almost 10 years ago

Last linked build is still exhibiting the same AA problem.

Actions #64

Updated by Armada almost 10 years ago

  • Status changed from Accepted to Fix pending

This regression is solved in PR #1769, however there is still an unrelated issue that causes the XFB to render at a lower quality.

However if you compare the build from PR #1769 and the latest master build you will definitely notice an improvement.

Actions #65

Updated by Armada almost 10 years ago

  • Status changed from Fix pending to Fixed
Actions #66

Updated by Armada almost 10 years ago

This build should fix the other issue, Virtual XFB should have no difference in quality in this build: http://dl.dolphin-emu.org/prs/pr-1781-dolphin-latest-x64.7z

Actions #67

Updated by fallaha56 almost 10 years ago

Still getting weird scaling issue (4843 dirty) sorry

Actions #68

Updated by Armada almost 10 years ago

fallaha56, please provide a screenshot.

Actions #69

Updated by sessa.squares almost 10 years ago

It's what I'd best describe as staircasing, like some kind of scaling artifact, please see attached

Again is not present in 4618

Actions #70

Updated by Armada almost 10 years ago

That is a new regression unrelated to the bug discussed here, please create a new issue report for it.

Actions #71

Updated by fallaha56 almost 10 years ago

Oks done, think I have it pinned down to stereoscopy update, thanks.

Actions

Also available in: Atom PDF