Project

General

Profile

Actions

Emulator Issues #7774

closed

[D3D] Huge performance drop in Resident Evil 1 Wii with sw-bbox (4.0-3659)

Added by bgtsetso about 10 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?
Resident Evil 1 for Wii

Game ID?
RE4P08

What's the problem? Describe what went wrong in few words.
Performance drop in both game cutscenes (now 10 FPS instead of 30) and ingame (now 23 FPS instead of 30).
I tested many builds before I found the culprit. The last working build (30 FPS both ingame and cutscenes) is 4.0-3657. The next available build is 4.0-3659 is broken as are all later builds up till the current one 4.0-3764 which is broken too.

What did you expect to happen instead?
30 FPS

What steps will reproduce the problem?
Just run the game.

What are your PC specifications? (including, but not limited to: Operating
System, CPU and GPU)
CPU: AMD Phenom II X4 925
GPU: AMD Radeon HD5850 with latest drivers

Actions #1

Updated by JMC4789 about 10 years ago

Well, I think we found a game that had hidden bounding box usage. Were there any effects broken before that point?

Actions #2

Updated by bgtsetso about 10 years ago

Thanks for the quick response.

Broken effects? Do you have anything specific in mind that I should look for?

Actions #3

Updated by crudelios about 10 years ago

Interesting. I'll check it out.

Actions #4

Updated by JMC4789 about 10 years ago

Bounding Box is used for a lot of interesting effects... I couldn't think of how Resident Evil uses it though.

Your computer is pretty slow (no offense, if it was running it fine before, then we don't want to have a performance regression anyway) and bounding box is very expensive. We enabled bounding box by default thinking there were only 4 games that used it, and those games needed it to function. We didn't expect any other games to be affected... but I believe someone put forth the possibility that other games could enable it and do nothing with it... which is a possibility here.

Actions #5

Updated by bgtsetso about 10 years ago

Ok I understand but isn't there a way to enable the Bounding Box with game ini only for those few games that actually need it? Also I believe that killing Resident Evil in such a way would be rather disappointing for many people. Of course it is up to you what the best approach should be.

Actions #6

Updated by JMC4789 about 10 years ago

The reason we enabled Bounding Box by default was to see if it affected any other games. Because of this, I /think/ that this will cause us to put the option back in unless there's a game breaking issue it fixes.

Actions #7

Updated by JMC4789 about 10 years ago

I'd rather actually see if there are more games. Is there still a way to manually override Bounding Box in the INIs?

Actions #8

Updated by crudelios about 10 years ago

No, I removed the setting altogether. I want to test the game to figure out what values are being spewed out by bbox, perhaps there is something different with or without bbox in use.

Actions #9

Updated by hk.konpie about 10 years ago

Also 'The Sky Crawlers: Innocent Aces' huge speed down.....
4.0-3657 -> 60fps
4.0-3659 -> 5fps

Actions #10

Updated by skidau about 10 years ago

If we were to bring the option back, it would be preferable if it were a "speed hack" type option. i.e. the option should Disable BBox emulation.

Actions #11

Updated by crudelios about 10 years ago

I've been checking and for some reason, Resident Evil is clearing the bbox regs (thus turning on bbox calculation), but then it never uses them. This makes things very slow for no graphical changes at all, the speed hit is roughly 50% in my computer.

Actions #12

Updated by skidau about 10 years ago

Can you think of a way to detect this and automatically disable BBox calculation?

Actions #13

Updated by JMC4789 about 10 years ago

This is the exact thing we feared happening. I guess we have to have an option for disabling the bounding box emulation for this particular case. What a shame.

Actions #14

Updated by crudelios about 10 years ago

Skidau there is no way to know if the bbox regs are going to actually be used when they are first cleared.

The best I can do is to add a check to determine if bbox regs were used the last time they were cleared and if they were not, bbox calculations wouldn't be enabled the next time the regs were cleared.

Actions #15

Updated by skidau about 10 years ago

That sounds like it would work in most cases.

Actions #16

Updated by crudelios about 10 years ago

I think so too. I'll try it out and see what happens ;)

Actions #17

Updated by crudelios about 10 years ago

After a fast check, it seems to be working. RE is fast again and Paper Mario is still showing the effects.

I'll test it a little bit more tomorrow and if all is well I'll open a PR with the code change.

Actions #18

Updated by JMC4789 about 10 years ago

  • Status changed from New to Accepted
Actions #19

Updated by bgtsetso about 10 years ago

Hi, is there any progress with this issue? I'm asking because I saw the monthly Dolphin progress report and there the current issue is mentioned as already solved although it still isn't.

Actions #20

Updated by JMC4789 almost 10 years ago

Any update on this? If we can't find out a good way to auto-detect, re-adding the option is fine.

Actions #21

Updated by bgtsetso almost 10 years ago

Apparently the issue got fixed recently by 4.0-4219 - OGL: implement bounding box support with ssbo.
Thank you degasus!

Actions #22

Updated by pauldacheez almost 10 years ago

  • Status changed from Accepted to Work started

Fixed as of 4.0-4219 on OpenGL. https://dolphin-emu.org/download/dev/fb50cb6d99062069a71db49d56d975df5c6eecb3/

This issue still applies to D3D, though, so we'll probably want to keep this open.

Actions #23

Updated by crudelios almost 10 years ago

I would love to do for DirectX what degasus did for OpenGL, but it's way beyond my current knowledge.

I'm having no luck with the viewport fix (see my pull request) so this issue is still pending :\

Actions #24

Updated by degasus almost 10 years ago

@crudelios Don't worry, it's also way beyond my d3d knowledge. :/

But it won't be as hard as my patch for someone who has already worked a bit with d3d. All VideoCommon related parts (eg async operation between threads) are already done.

Actions #25

Updated by ZephyrSurfer almost 10 years ago

I know for sure I don't have enough D3D knowledge. What would be the equivalent type to SSBO?

Actions #26

Updated by ZephyrSurfer almost 10 years ago

This is fixed now on D3D.

It was said by one of the super devs(degasus) that there should still be a change to disable BBox like phire's suggestion on your PR Crudelios.

So I don't know if the status should change here and a new issue report be made??
Because I'm pretty sure any performance impact that OP wanted fixed is now done.

Actions #27

Updated by skidau almost 10 years ago

  • Status changed from Work started to Fixed
Actions #28

Updated by skidau almost 10 years ago

Fixed by 4.0-4555 (ff4526b4a9b7dbcbdbaff35a657739e272aea637)

Actions

Also available in: Atom PDF