-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
400 less fps when drawing circles/arcs in 3.3 #47824
Comments
This seems to be device/driver-specific as I can't reproduce the issue on Linux with Intel HD Graphics 630 and AMD Radeon RX Vega M, nor on another laptop with AMD Radeon RX Vega 56. Details below. The main change between 3.2.3 and 3.3 which might affect this is the extension of 2D batching to GLES3 (in 3.2.3 batching was only for GLES2). Can you see if you get different results if you turn off batching in the project settings? (Rendering > Batching). There are also various options you can play with to see if they make a difference. Test resultsNote that to avoid having a performance hit from running the editor itself, I'm running the project directly from the command line, not from the editor. Both tests done using the official Linux 64-bit editor builds for 3.2.3-stable and 3.3 RC 8. Intel 630 + discrete AMD Radeon Vega M
I seem to get more or less the same metrics with both GLES2 and GLES3 (maybe +20 FPS for AMD with GLES2 on both 3.2.3 and 3.3 RC 8 compared to GLES3).
AMD Radeon Vega 56
|
Testing on Windows 10 with my laptop with the AMD Radeon RX Vega 56, I seem to be able to reproduce a performance drop in 3.3 RC 8 compared to 3.2.3 stable, though both give me surprisingly bad performance metrics on this repo, compared to Linux drivers on the same hardware. The performance regression seems to already happen in 3.2.4 beta 1, so it must be due to a change between 3.2.3-stable and 3.2.4 beta 1.
I'm not so familiar with debugging GPU drivers on Windows, but I can see in the Task Manager's Performance tab that the GPU is 100% busy on 3.2.3 stable, and only 66% busy on 3.3 RC 8. In both releases the CPU is only 5% busy. Disabling batching doesn't seem to make a difference. Here's some performance metrics from Radeon Software: |
I can confirm similar results on another AMD GPU, 315 fps vs 170 fps on average (also on Windows). Interestingly enough, the number of draw calls is the same for both versions (400), and there is no output in the console from batching doing anything. So my assumption is just general degradation for some reason. Frame times tell a different story. In 3.2.3 lows are lower, but highs tend to be higher. It gets from 2.9-3 ms to 7 ms on average and up to 10+ ms sometimes. In 3.3 the averages are more stable, it flactuates from 5.9 ms to 7+ ms, with no outliers in either direction. Radeon 5700 XT, driver version 21.3.1. |
Note that neither circles or arcs (polyline) are batched, so there shouldn't be a huge amount of differences codewise (that probably explains why you get the same performance with batching on or off, they are using the same path). It's possible that an extra state being set (possibly to fix a bug) may have introduced slower performance on some hardware. Or if one version is using line smoothing and one not. Although the drop in performance might seem serious this is unlikely to be a major bug. I'll try and investigate, I just have a couple more crucial bugs to fix first (or clayjohn or anyone interested, it's not a massive amount of code to compare). Doing it manually BTW will probably be batched, hence the improvement in speed. |
If anyone getting this drop can try out 3.2.4 beta 2, and try these settings and see if there is any effect, that will be useful: |
@lawnjelly Tested. Only turning |
See #47833 (comment) in the other issue, as although the observed results are slightly different, the underlying problems / discussion are similar. |
Out of interest what are the results of this one with legacy_orphan set to off, and legacy_stream set to off? |
I think I've tried all combinations between each pair of settings from 3.2.4b2 and nothing else provided any meaningful difference. Including both set to off. |
Testing with the same device (Radeon RX Vega 56) on Linux, I get:
Fluctuates a lot but I guess that can be summarized as a +50-80 FPS gain (or -0.1 mspf). |
I was just wondering because I hadn't yet worked out what had caused the drop in FPS from 3.2.3 to 3.3, as aside from the orphaning the code was mostly the same if I remember correctly. Maybe there is some other change since 3.2.3. |
Something at least improves frame times in 3.3 overall. Not the average, maybe, but the spread. I definitely see it going off both ends in 3.2.4, but not so in 3.3 even with default/auto settings. If there is anything else we can track, do tell. |
Some tests all done on the same machine with AMD FirePro D300 GPU:
|
As an aside, something I had noted a while ago is that the legacy They call It's just not been a massive priority as I'm not sure how much these legacy primitives are used (they may be important in some editor modes though). |
Out of curiousity I've also tried this project on my GTX 960m laptop. In 3.2.3 I get anywhere between 200 and 300 fps, sometimes dipping below 200. In 3.2.4 beta 2/3.3 RC 8 I get values between 35 and 50 fps, varying run to run. Changing flags in 3.2.4 beta 2 doesn't have any effect. That's on Windows 10 and docked (not on battery). I didn't update either drivers or Windows on that laptop for some time though. |
RC9 tests on the same machine (average over 1 minute of measurement, with first and last 5 seconds excluded), using official binaries for all tests, on Linux FPS have huge fluctuation for some reason:
|
Those results look encouraging, it should be good with the defaults we set in RC9. The fluctuation on linux I'm not sure we can do anything obvious about, probably something you'd need internal knowledge of the driver to diagnose. Interesting that on windows the performance is halved with the same workload. |
Fixed by #47864. Please comment if you still reproduce this specific issue in 3.3 RC 9 or stable. |
No description provided.
The text was updated successfully, but these errors were encountered: