Skip to content
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

Periodic stalls when drawing meshes in GLES3 #38192

Open
Kinsman opened this issue Apr 25, 2020 · 10 comments
Open

Periodic stalls when drawing meshes in GLES3 #38192

Kinsman opened this issue Apr 25, 2020 · 10 comments

Comments

@Kinsman
Copy link

Kinsman commented Apr 25, 2020

Godot version:
Version 3.2.1. This bug also appears in Version 3.2.2 beta 1, and in Version 3.1.

OS/device including version:
Windows 10.
Graphics card GeForce GTX 760/PCIe/SSE2.

Issue description:
If you play a scene in the editor that involves a 3D scene and a mesh, there are periodic spikes in the frame time of a few seconds.
This occurs if GLES3 is the renderer - GLES2 does not have this problem. Also, this only applies to scenes runs in the editor - exported standalone projects do not have this problem, so I don't think this is an issue with graphics drivers.

Steps to reproduce:
-Create a new project, set the renderer to GLES3.
-Create a scene with a Spatial as the root, add a Camera, and add a MeshInstance with a cube Mesh for the camera to look at.
-Play the scene in the editor. You can observe the problem either in the Profiler, or dragging the game window around and watching it hiccup.
-Set the cube to be invisible and play the scene again. The periodic stalls should be gone.

@clayjohn
Copy link
Member

I think this has something to do with the debugger. I believe there is a setting you can change that will fix the issue. I know this has been discussed before, so if you search around open issue you should be able to find something. I'll look later too when I have a moment.

@Kinsman
Copy link
Author

Kinsman commented Apr 25, 2020

I noticed that if you play a scene, and then minimize the editor, the hiccups disappear. The hiccups are dependent on whether the editor window is visible or not.

@NHodgesVFX
Copy link
Contributor

NHodgesVFX commented Apr 25, 2020

This could be due to the remote scene view. If you change it to local while the game is running it wont do that. You can have it default to off by going to the editor settings->export->debugger->auto switch to remote scene tree and un-checking it.

With remote view enabled:

Profile_Remote

With remote view disabled:
Profile Local

@Calinou
Copy link
Member

Calinou commented Apr 25, 2020

To complete @NHodgesVFX's suggestion, make sure to uncheck Debugger > Auto Switch To Remote Scene Tree in the Editor Settings.

@Kinsman
Copy link
Author

Kinsman commented Apr 25, 2020

The "Auto Switch To Remote Scene Tree" was already unchecked, and either checking it or not checking it had no effect on the problem.

I'd like to show that the hiccups are actually quite dramatic:
spikes

I updated my NVIDIA drivers, but the problem continued.

Finally, I checked the Task Manager, and there's a lot of GPU activity in the 'Copy' section. I'm not sure what Copy means, but it seems to be the source of the hiccups.
gpu_copy

@Zireael07
Copy link
Contributor

If it's not remote scene tree AND GLES3 only, then it means it's shaders compiling (and therefore a duplicate of an already reported issue)

@Calinou
Copy link
Member

Calinou commented Apr 25, 2020

@Zireael07 For reference, that issue would be #13954.

@Kinsman
Copy link
Author

Kinsman commented Apr 25, 2020

I don't know if that's the issue or not: #13954 talks about a pause when something first appears, but the pausing here is looping and continuous. Also, it's possible to avoid the pausing by minimizing the editor while debugging, which is unusual.

@Kinsman
Copy link
Author

Kinsman commented Apr 26, 2020

I've found a satisfactory workaround for the moment.

If I place the 3D scene inside a Viewport, then I can play the scene without hiccups. The problem is still strange, but now I don't have to worry about it as much.

@avril-gh
Copy link
Contributor

i dont think its GLES3...

Im using GLES2 only and i see stalls now and then, here and there.
Sometimes even freezes for half of second.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants