dotnet / dotnet/wpf

WPF dirty rectangle glitches in high GPU-load situations

Open
#4,480 15 comments 3 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

- In high GPU-load situations, dirty-rect handling in WPF-based applications gets out of sync with window content update
- This triggers situations in which e.g. a bigger update of a visual is first clipped to the update rectangle of another overlaid smaller visual / control and just shows in one of the subsequent frames
- Preliminary analysis suggests, that this is because of D3D 9Ex with D3DSWAPEFFECT_COPY is used by the WPF rendering engine and partial updates during D3D 9Ex application frame rendering are not properly synchronized with DWM GPU blit copy presentation and DWM update rectangle / presentation history handling
- A detailed write-up can be found in the attached document:
[D3D9Ex_WPF_Update_Rectangle_Glitches.pdf](https://github.com/dotnet/wpf/files/6429461/D3D9Ex_WPF_Update_Rectangle_Glitches.pdf)
- More detailed information like videos, screenshots, GPUView ETW traces and reproducer applications are available for download here: https://drive.google.com/file/d/1yfLaGcvRUD4rAXRPjfpvTHhaytXAk-KI/view?usp=sharing

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.