Repository: godot
Issue: Severe 2D rendering performance drops on Windows since Godot 3.3 when using GLES3
Labels: platform:windows,topic:rendering,regression,topic:2d,performance

### Godot version

3.4.2

### System information

Windows 10, PopOS 21.10, GLES3, Nvidia GTX 970

### Issue description

I'm developing on Linux and recently tested my project on Windows and noticed a significant drop in performance. After some debugging I identified the rendering as the bottleneck.
However, the performance on Linux (PopOS 21.10) is much better, even though it's the same machine, the same project, and the same Godot version.
I continued testing earlier versions of Godot and found out that the performance drop started with Godot 3.2.4 beta 1 and is therefore, maybe, related to the introduction of batching.

I created a small reproduction project that simply renders 200 sprites/lines/rects/circles using Sprite nodes/`draw_line`/`draw_rect`/`draw_circle`. It does not run `update()` or perform any logic, it will simply draw 200 shapes of a kind once and then idle.
Then I tested the performance for each render-kind, with batching on/off, on Windows 10 and PopOS 21.10, using Godot 3.2.3 (last version before the notable FPS drop) and the latest Godot 3.4.2.

I noticed that Linux reaches more than twice the FPS than Windows in almost all cases.
Even without batching, Linux still performs better in Godot 3.4.2 than on 3.2.3.
On Windows, however, Godot suffers extreme performance drops without batching enabled. E.g. 200 `draw_line()` calls in Godot 3.4.2 yield 165 FPS, while 3.2.3 still managed about 1000 FPS. In comparison, Linux reaches 1500 FPS in 3.4.2 and 1050 in 3.2.3.
I could reproduce this kind of behavior on other machines, as well.

So, in my original project where I have quite a lot `draw_line` calls that can't be batched, I get normal performance on Linux but really bad performance on Windows.

I found #54826 and #54377 that seem to be related, but since I was testing with 3.4.2, the PR apparently didn't make any difference. As suggested in #54826, I also tried different opengl options but without success.

Below are tables with average FPS values for all the different test cases.

### Godot 3.2.3 (No batching for GLES3)
| Test        | Windows | Linux |
|-------------|---------|-------|
| sprites     | 2100    | 4600  |
| draw_line   | 1000    | 1050  |
| draw_rect   | 2000    | 5800  |
| draw_circle | 660     | 660   |


### Godot 3.4.2
#### Batching: on
| Test        | Windows | Linux |
|-------------|---------|-------|
| sprites     | 2400    | 5400  |
| draw_line   | 2500    | 6800  |
| draw_rect   | 2500    | 6800  |
| draw_circle | 95      | 830   |

#### Batching: off
| Test        | Windows | Linux |
|-------------|---------|-------|
| sprites     | 2200    | 4600  |
| draw_line   | 165     | 1500  |
| draw_rect   | 2300    | 5700  |
| draw_circle | 95      | 830   |



### Steps to reproduce

1. Get the reproduction project
2. Open `Node2D.tscn`
3. Hide/Show `draw_function_test` or `sprite_test` node to test Sprite node performance or `draw_` function performance.
4. In case of `draw_function_test`, use the "Draw Type" property to test `draw_line`, `draw_rect`, or `draw_circle`
5. FPS are displayed in the top left corner

### Minimal reproduction project

[godot-perftest.zip](https://github.com/godotengine/godot/files/7786014/godot-perftest.zip)