Emulator Issues #7936
closedBurnout 2 Snow Effect Causing Massive Slowdown
0%
Description
Game Name?
Burnout 2: Point of Impact
Game ID?
GB4E51
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?
Full 60FPS
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.]
- Start a race on any of the Crystal Summit tracks
- Set Conditions to Snow
- 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?
No.
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,
configuration files)
[Upload big files to a hosting service and post links here!]
http://i.imgur.com/MJOn7lJ.jpg
[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.]
Updated by JMC4789 almost 10 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!
Updated by Anonymous almost 10 years ago
Checking Skip EFB Access didn't work, but incidentally, the OpenGL backend doesn't seem to render the snow either. I think this is just one of those Hyrule Field-type scenarios. Thanks for the response!
Updated by phire almost 10 years ago
Could you please record a single frame fifo log of the snow?
Updated by JMC4789 almost 10 years ago
adiffin502: I think OpenGL's lack of line-width is part of the problem. Please record a fifolog for us to examine! Thanks!
Updated by Anonymous almost 10 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:
https://docs.google.com/uc?export=download&confirm=Ufws&id=0B3AFeSVGmg9sMGY4TEk0azNybXc
Updated by ZephyrSurfer almost 10 years ago
Could I specifically ask for a 5 frame fifolog. Thanks. And do compress again aswell.
Updated by Anonymous almost 10 years ago
Updated by Anonymous almost 10 years ago
Another strange thing I noticed is that there seems to be more falling snow in the Grand Prix appearances of the snow tracks (when it is snowing) than there is in any other mode O_o
Grand Prix: http://i.imgur.com/3uVgfo2.jpg
All other modes: http://i.imgur.com/VNuo5u3.jpg
Updated by degasus almost 10 years ago
Yeah, each snow flake is rendered as a point, seperately. Between them, the uniform are changed. Likely because of a changed transformation matrix...
Updated by JMC4789 almost 10 years ago
Can we just make this a duplicate of the flanoir issue then?
Updated by degasus almost 10 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?
Updated by Armada almost 10 years ago
@wickmarkus86
The state managers is already used by the Renderer for the culling state.
Updated by Armada almost 10 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
Updated by Anonymous almost 10 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.)
Updated by JMC4789 almost 10 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.
Updated by magumagu9 almost 10 years ago
We shouldn't merge this with 6587 unless someone actually proves it's the same issue... the fact that both slowdowns involve drawing snow doesn't make them related in any meaningful way.
Updated by ZephyrSurfer almost 10 years ago
This one looks like it's not points but 2 triangles together for every snowflake.
Updated by JMC4789 almost 10 years ago
I think based on what I remember it's something to do with all the primitives causing pipeline flushes all the time? I think both may be causing the same problem.
Updated by ZephyrSurfer almost 10 years ago
This just got a lot worse on OpenGL.
I had 75 FPS on 4.0-4674 but now its a mere 43 on the newly merged 4.0-4699.
That sucks.
Updated by JMC4789 almost 10 years ago
Because now OpenGL actually renders the snow properly?
Updated by ZephyrSurfer almost 10 years ago
You could do that if you enabled Texture Format Overlay.
And I'm now realizing some of OpenGls advanced options like Wireframe are broken. I'll bisect later.
Updated by JMC4789 almost 10 years ago
Nah, we know Wireframe is broken. It'll get fixed soon.
Updated by ZephyrSurfer almost 10 years ago
Oh OK well tell whoevers gonna fix it do also fix show statistics when used with that option since I can't remember when that worked.
Updated by JMC4789 almost 10 years ago
That never worked with OpenGL's wireframe.
Updated by magumagu9 almost 10 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.
Updated by JMC4789 almost 10 years ago
Is there any side effect to the dirty = true change? Or does that make it so it doesn't update it, I guess?
A slowdown that makes the effect work properly would be permissable, though.
Updated by JMC4789 almost 10 years ago
Tested this on my NVIDIA card, I get 160 - 250 fps in the snow levels with the snow on in latest master. Flanoir snow is a lot slower than this.
Updated by magumagu9 almost 10 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.
Updated by Armada almost 10 years ago
What we could do is check whether the point size has changed, maybe it sets the field to the same size?
Updated by NeoBrainX almost 10 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)
Updated by degasus almost 10 years ago
@neobrain: I don't think so. I guess it's more because the game also changes some other constands between each point. Likely the transformation matrix.
Updated by Anonymous almost 10 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.
Updated by guitaristocrat3 over 9 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.
Updated by escape336 about 9 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
042206E0 00000000
Updated by JMC4789 over 7 years ago
- Status changed from Questionable to Working as intended
The snow effect abuses the geometry shader for point-size/line-width causing the slowdown. There's not much that can be done about it.
Updated by JosJuice over 7 years ago
- Relates to performance changed from No to Yes
Updated by phire over 7 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.