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

Visual glitches with OpenGL backend #4773

Closed
Myszkoj opened this issue Nov 30, 2021 · 8 comments
Closed

Visual glitches with OpenGL backend #4773

Myszkoj opened this issue Nov 30, 2021 · 8 comments

Comments

@Myszkoj
Copy link

Myszkoj commented Nov 30, 2021

Version: v1.83 WIP
Branch: docking

Back-ends: imgui_impl_opengl3 / imgui_impl_sdl
Compiler: Visual Studio 2019
Operating System: Windows10

Several versions ago I noticed small glitches on top of the most ImGui controls(in both debug and release versions).
It's basically impossible for me to screenshot them, since they occure once 2-10sec and last(I think) single frame.

I have fabricated the screenshot below to show how it looks.
glitches

I also tried to capture it on the video(ignore highlighting of the random controls, those are caused by the mouse cursor not visible on the recording). Glitch can be visible between 0:29 and 0:31 inside Debugger window(small white rectangle in the middle).
https://user-images.githubusercontent.com/9519504/144048691-95a4acd1-2556-460c-9d46-f3179eeba23e.mp4

I have noticed that those glitches tend to occure on the frames, less often on text, but may also happen in other places.
My first suspects where custom controls like gizmo or ImGui::Image from framebuffer texture, but I commented them out and it still appears.
I have also eliminated icon fonts(tested with default fonts).
It looks to me like corruption of the texture buffer, but I have no clue what may cause it.
Any ideas?

@ocornut ocornut changed the title Visual glitches Visual glitches with OpenGL backend Nov 30, 2021
@ocornut
Copy link
Owner

ocornut commented Nov 30, 2021

Looks the same as #3033.. Might be a driver bug but hard to say.

Does it also shows with the OpenGL2 backend?

Out of curiosity, does it also shows if your apply the change in that post?
#4468 (comment)

@Myszkoj
Copy link
Author

Myszkoj commented Nov 30, 2021

Interesting, few days ago I had what I initially thought was a memory leak, but then it recovered and I blamed windows/dell updates. I will read #4468 again and make few tests.

@ocornut
Copy link
Owner

ocornut commented Nov 30, 2021

Please note that I have little reason to believe that #4468 will fix that, but since we are dealing with GPU drivers-voodoo and it is likely we are going to change the buffer upload to #4468, it is worth testing that.

@Myszkoj
Copy link
Author

Myszkoj commented Nov 30, 2021

I can already tell you that using orphaning may help, if not with this issue, then the next. I had several problems with my implementation of the transformations buffers in my rendering pipeline and sometimes when only one buffer is used, but updated every frame with new data drivers may "lock" any change on this buffer until it is processed without any stall or error. In my case it resulted in "flickering" of the scene, sometimes objects were moving, somtimes whole scene disappeared. I will look into those functions and experiment a little.

@Myszkoj
Copy link
Author

Myszkoj commented Nov 30, 2021

Unfortunately orphaning did not help with this issue.

@Myszkoj
Copy link
Author

Myszkoj commented Nov 30, 2021

Is there any interaction with the GPU in ImGui::Render function?

@ocornut
Copy link
Owner

ocornut commented Nov 30, 2021

Is there any interaction with the GPU in ImGui::Render function?

No.

@ocornut
Copy link
Owner

ocornut commented Nov 30, 2021

I suggest to move this to #3033 and would be good to try different backends:
#3033 (comment)

@Myszkoj Myszkoj closed this as completed Nov 30, 2021
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

2 participants