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

Variable layout lag and artifacts during resize on integrated graphics #339

Closed
aevyrie opened this issue May 11, 2020 · 12 comments
Closed
Labels
bug Something isn't working

Comments

@aevyrie
Copy link

aevyrie commented May 11, 2020

Building an iced app on a device with an nVidia GPU, results in a strange lag during resize, which I do not see on another device with an AMD GPU. Not sure if GPU is root cause, but seems like an important distinction.

What I'm seeing is some of the widgets updating layout faster than others, and more prominently, it seems like text layout is lagging behind the rest of the widgets.

Here is a screenshot during resize:
image

This may be some text layout related bug, I often get large text artifacts during resize like this:
image

Again, these issues only seem to happen on the device with the nVidia GPU. After the screen resize is complete, the layout seems to catch up, and everything looks normal.

@joshirio
Copy link

joshirio commented May 11, 2020

I have similar artifacts, especially as shown in your 2nd screenshot, when running some exmples on an integrated intel GPU (Windows 10 x64)

@aevyrie
Copy link
Author

aevyrie commented May 11, 2020

This appears to be related to antialiasing. With antialiasing enabled the artifacts are gone.

@aevyrie
Copy link
Author

aevyrie commented May 11, 2020

Interestingly, enabling AA seems to force the renderer to use the discrete GPU (task manager shows GPU switch), the issue seems to lie with the renderer using the integrated graphics. The difference I see between the two systems probably has to do with the Nvidia software that controls whether applications are rendered by discrete/integrated.

@aevyrie aevyrie changed the title Variable layout lag during resize on certain hardware configurations Variable layout lag and artifacts during resize on certain hardware configurations May 11, 2020
@aevyrie aevyrie changed the title Variable layout lag and artifacts during resize on certain hardware configurations Variable layout lag and artifacts during resize on integrated graphics May 11, 2020
@hecrj
Copy link
Member

hecrj commented May 12, 2020

These artifacts are most likely a graphics driver issue (see #172). Are your chipset drivers up-to-date?

@hecrj hecrj added the bug Something isn't working label May 12, 2020
@aevyrie
Copy link
Author

aevyrie commented May 12, 2020

Updating the drivers did not fix this. I tried updating the intel and nvidia drivers through the device manager, and restarted.

Strangely though, I've noticed that otherwise, performance is actually better in some respects in this glitchy state. The top and left edges of controls are comletely stationary, none of the jelly effect I normally see during window resize. Maybe there is something to be learned from this bug?

@aevyrie
Copy link
Author

aevyrie commented May 12, 2020

Welp, for some reason there was an update available today for the intel graphics, and that seemed to fix the issue.

It's really odd that performance is so good on integrated graphics though, it runs better than it does on a more powerful discrete GPU - no lag or jelly. 😕

@aevyrie aevyrie closed this as completed May 12, 2020
@hecrj
Copy link
Member

hecrj commented May 12, 2020

@aevyrie Vsync may be involved in what you are experiencing.

@aevyrie
Copy link
Author

aevyrie commented May 12, 2020

@hecrj That's a good idea. I haven't noticed any tearing when running on integrated though. I'll try and force vsync off for the application in the driver.

@aevyrie
Copy link
Author

aevyrie commented May 16, 2020

@hecrj any ideas how to troubleshoot this further? I haven't had any luck in the driver settings forcing vsync off. It happens on both systems I have access to, with nvidia and amd cards. The only way I've found to fix it is when using the integrated intel gpu. Maybe it's happening in winit or wgpu? What I've read seems to suggest it's to do with the gui and gpu aren't synced.

@hecrj
Copy link
Member

hecrj commented May 16, 2020

@aevyrie I am not exactly sure what is the problem you are having.

Are you talking about smooth window resizing? Do the wgpu examples have the same issue?

@aevyrie
Copy link
Author

aevyrie commented May 16, 2020

The problem is smooth resizing only working on the integrated gpu. On the dedicated gpus, there is some gui layout lag during resize that gives a "jelly" effect. I can give the wgpu examples a try.

@aevyrie
Copy link
Author

aevyrie commented May 29, 2020

@hecrj It looks like this is present to some degree in the wgpu examples. It's difficult to say though because it's so hard to quantify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants