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

Possible bug in Microsoft.UI.Composition.CompositionBackdropBrush - not working in screen duplication mode with iGPU enabled #106

Open
ak-eyeware opened this issue Apr 11, 2022 · 0 comments
Assignees

Comments

@ak-eyeware
Copy link

ak-eyeware commented Apr 11, 2022

Hi,

Background
Based on your CPP HelloComposition sample, I've built a sample which blurs the current contents of the screen (windows desktop).
It's rendering a fullscreen visual with blurring and backdrop brush applied, using a fullscreen win32 window.
For the blur effect, combination of following brushes is used:

  • winrt::Windows::UI::Composition::CompositionBackdropBrush
  • winrt::Microsoft::Graphics::Canvas::Effects::GaussianBlurEffect

Issue
When 2 screens are attached to the PC and the "screen duplication mode" is enabled in the Windows Display Settings,
the blur effect is not rendered correctly on the duplicating screen, instead just becomes completely black. Note, the blur effect is rendered correctly on the screen that is being duplicated (i.e. the screen contents is blurred correctly).
If I DISABLE the integrated graphics adapter of the PC through the device manager, the effect is rendered correctly on both screens and shows the same screen content, blurred as expected.
To illustrate, Device Manager settings in the working case:
working_case_device_manager

Windows specification
Edition Windows 10 Pro for Workstations
Version 21H2
OS build 19044.1586
Experience Windows Feature Experience Pack 120.2212.4170.0

Further notes
The same issue has been reproduced across multiple platforms (AMD and Intel laptops) and OS versions (both Windows 10 and Windows 11) and the pattern with disabling iGPU has been consistently fixing the problem across these platforms.

The fact that the rendering content on the duplicating screen becomes black indicates that the issue could be related to the iGPU not being able to read the framebuffer contents and apply blur on top of it, when duplicating. Can just speculate what can cause that...

Reproducer
See the attached VS2019 project.
Following windows SDK has been used to compile the project:
choco install windows-sdk-10-version-2004-all --version=10.0.19041.0

blur_with_screen_duplication_reproducer.zip

Can you please recommend how the issue can be solved or workarounded?
If this is not appropriate channel to report the issue, please let me know where I can re-post it.

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

No branches or pull requests

2 participants