D3D12: Fix transparency on UNIFIED StageStyles

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • internal
    • Affects Version/s: internal
    • Component/s: javafx
    • generic
    • windows

      D3D12 backend initializes the SwapChain using CreateSwapChainForHwnd() function. This turns out to be an incorrect pick when we want to support UNIFIED Stage style - transparency is not properly applied then.

      Thanks to [~mfox] research we know we have to switch to using CreateSwapChainForComposition() in order to enable transparency. There must be some extra work done to properly support this:
      - Composition uses additional objects - CompositionDevice, CompositionTarget and CompositionVisual. CompositionDevice probably should be kept with the D3D12 Device, while Visual/Target should be kept with the SwapChain.
      - There might be issues when resizing the SwapChain - unnecessary elements must be properly freed (ie. after GPU uses them - integrate with ResourceDisposer?)
      - Glass must be very slightly updated by providing WS_EX_NOREDIRECTIONBITMAP flag to HWND to remove the default surface.

      Worth to also check if performance changes in any way after these additions.

            Assignee:
            Lukasz Kostyra
            Reporter:
            Lukasz Kostyra
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: