Emulator Issues #7936
Burnout 2 Snow Effect Causing Massive Slowdown
Burnout 2: Point of Impact
What's the problem? Describe what went wrong in few words.
The snow effect (which is just little snow sprites falling downwards) is causing huge slowdown (down from full 60FPS to 18FPS in races!) The rain effect doesn't have this issue and what's even more confusing is that there is no slowdown at all when viewing the race in a replay, even with the snow!
What did you expect to happen instead?
What steps will reproduce the problem?
[Don't assume we have ever played the game and know any level names. Be as
specific as possible.]
1. Start a race on any of the Crystal Summit tracks
2. Set Conditions to Snow
3. After loading, the frame-rate takes a nose dive.
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?
All D3D11 compatible versions seem to have this problem. D3D9 is unable to render the snow.
Does using an older version of Dolphin solve your issue? If yes, which
versions of Dolphin used to work?
What are your PC specifications? (including, but not limited to: Operating
System, CPU and GPU)
AMD Athlon X4 750K @ 4.1GHz
Windows 8.1 Pro x64
AMD Radeon HD 7770
Is there any other relevant information? (e.g. logs, screenshots,
[Upload big files to a hosting service and post links here!]
[Do not attach files to this issue. Upload them to another site and
link here. Use imgur.com for images and pastie.org for logs. Monitor the
email address that was used to create this issue.]
#1 Updated by JMC4789 about 5 years ago
- Status changed from New to Questionable
We do not usually accept performance issues without and underlying cause. The big reason for this is that there are certain things that are just slow to emulate, and less we have a specific cause.
There are a few things you can try: Please try "checking" skip EFB Access to CPU, try changing graphics settings to be lower, trying different graphics backends, etc.
You have a slower computer, so it's to be expected that some things could cause severe slowdown. In this case, it could be rendering tons of triangles in individual objects slowing you down. We can maybe get a graphics person to get a look at why it's slowing down to see if this is a bug in Dolphin, or just something that is slow though.
Thank you for the report!
#5 Updated by adiffin502 about 5 years ago
Okay, so another strange thing I realized is that the slowdown only seems to occur in the Grand Prixs in which this effect is used! When playing on the same track in, say, Single Race mode, the slowdown is far less pronounced (50-60FPS).
Here's the FIFO log, by the way:
#8 Updated by adiffin502 about 5 years ago
#9 Updated by adiffin502 about 5 years ago
#12 Updated by degasus about 5 years ago
This one renderes points, in flanoir are lots of triangles. iirc our d3d code has some special overhead if lots of points or lines are drawn.
Maybe you can recheck if the slowdown is still the same on armada's line-width PR. Please both D3D and OGL.
@Armada: Do you think we should add the culling state in the state manager?
#14 Updated by Armada about 5 years ago
Also the previous D3D line-width implementation re-uploaded the uniforms every draw call, not just when they're changed. Thus if the uniform upload process is the bottleneck the line-width branch likely fixes it.
Try this build: http://dl.dolphin-emu.org/prs/pr-1706-dolphin-latest-x64.7z
#15 Updated by adiffin502 about 5 years ago
The slowdown is still the same on the line-width PR (I very much appreciate all of your responses, regardless!), but what's strange is that the snow is now invisible (still being "rendered", but cannot be seen), though the RAIN of all things still works as intended. Maybe the rain works differently?
OpenGL does make the snow visible (it was invisible on OGL outside the LW PR), but is actually about twice as slow (~18FPS compared to ~29FPS on D3D, but that's no surprise seeing as AMD cards aren't nearly as good with OGL as the green team.)
#16 Updated by JMC4789 about 5 years ago
Makes sense. Thanks for the responses. If you have Tales of Symphonia + save files; could you see if the City of Flanoir to see if the snow there gives you a similar slowdown? I have a feeling it will; allowing us to merge those two issues. That way, it would be accepted within that issue instead of questionable as a performance issue here.
#26 Updated by magumagu9 about 5 years ago
Just did a brief investigation; it looks like the game draws a bunch of points, and changes the point size (bpmem.lineptwidth.pointsize) after every point, forcing a flush each time. Commenting out the line "dirty = true" in GeometryShaderManager::SetLinePtWidthChanged gives approximately a 50% speed increase for the given FIFO.
This is a similar issue to the Flanior slowdown, but the details are different enough that fixing one might not fix the other.
#29 Updated by magumagu9 about 5 years ago
Yeah, commenting out dirty = true breaks the rendering; I just mentioned it to demonstrate the point. Although, thinking about it a bit more, commenting out that line shouldn't have quite that large an impact. I wonder if we can optimize our constant buffer usage somehow.
#31 Updated by NeoBrainX about 5 years ago
You could queue those pointsize changes in a buffer (iff they really happen consecutively without any other state change) and store them as vertex attributes, couldn't you? That way, the geometry shader can take care of applying the proper size per-vertex dynamically. (I'm usually not too happy about things like this, but here it seems reasonably sensible)
#33 Updated by adiffin502 about 5 years ago
Just to be clear, the "crazy slowdown" snow is only present in certain snow levels in the Championship modes. For a good example of one of these instances, go to Custom Series Championship > Point of Impact Grand Prix (restart the GP if you aren't on the first race) and start it. I should probably have been more clear about that :/
Oh, and I've just noticed that "Show EFB Copy Regions" doesn't work on D3D.
#34 Updated by guitaristocrat3 over 4 years ago
This slowdown has been repeatable for me in over two thousand revisions on the Crystal Summit Lake stage set to snow conditions, this one particular track is plagued with huge fps hits and makes the emulation stop and start horribly. You have to go out of your way to select snow conditions so most players would only play this track in the story mode I'd imagine. However it's not the snow that's causing the problems I don't think, since the slowdown only occurs halfway through the track and other parts of the track or other tracks entirely are fine that also have snow effects. So to make it repeatable, go to single race, choose a car, on stage select scroll over to Crystal Summit Lake, scroll down to conditions, select snow, then start the race and race about a minute or two into the track where you reach hairpin downhill turns, immediately after the game will freak out and become virtually unplayable.
This is on linux so using OGL, I can usually get stable framerates everywhere else but recent revisions have caused more issues with this game, I'll make another report for that.
#35 Updated by Disorderly over 4 years ago
Sorry for the issue resurrection, here. What is actually happening is that there are two separate snow effects in the game - regular snow and "snow showers."
As the name implies, the snow shower is much heavier than the normal snow effect, meaning there are more snowflakes on screen at once, hence the larger slowdown. Rain also has a "shower" counterpart (just called "showers") that is also slower than the normal rain effect.
This AR code will disable all particle-based weather effects for the NTSC version, thus removing the slowdown:
$Disable Rain and Snow
#38 Updated by phire over 2 years ago
I'm not sure it's the geometry shader that is at fault.
I think dolphin is shoving every single snow particle into a separate draw call, because XFmem has been updated between each snow particle.
If this is the cause of the slow down, it is theoretically possible to fix this slow down by improving dolphin to pack multiple XFmem updates into a single draw call. Would improve performance all over the place.