git: openjdk/jfx-sandbox: direct3d12: Perform final frame offscreenRTT to swapChain transfer via Blit
duke
duke at openjdk.org
Tue Apr 22 15:03:57 UTC 2025
Changeset: 90235018
Branch: direct3d12
Author: Lukasz Kostyra <lukasz.kostyra at oracle.com>
Date: 2025-04-22 16:51:56 +0000
URL: https://git.openjdk.org/jfx-sandbox/commit/902350180dbad654ea221975dde806bc7a2cc174
Perform final frame offscreenRTT to swapChain transfer via Blit
When Stage had renderScaleX/renderScaleY properties set to anything else
than 1, D3D12 backend would incorrectly draw the Scene without rescaling
it to Stage's dimensions. This was visible ex. in systemTests::QPathTest.
When performing final steps before SwapChain's Present() D3D12 would
either copy or resolve Offscreen RTT contents onto SwapChain buffers.
This would cause above problems and to accommodate different render
scales had to be rewritten. Recent Blit() implementation turned out to be
quite useful here, especially because it already picks the fastest route
when blitting one RTT onto another, it only had to be adopted to use with
SwapChain as an RTT.
IRenderTarget interface was added on native side which serves as a
common base for NativeRenderTarget and NativeSwapChain. This allows to
use SwapChain as Blit destination (NOTE: I assumed Source should remain
a NativeRenderTarget always, because we want to extract
NativeRenderTarget's underlying Texture when we have to trigger BlitPS
shader - then that Texture becomes a source Texture passed to
RenderingContext).
Various other reorganization things were done in the process, including
removing old copy/resolveToSwapChain calls. This makes Stage render
scales work properly in D3D12 and visually fixes QPathTest.
! modules/javafx.graphics/src/main/java/com/sun/prism/d3d12/D3D12Context.java
! modules/javafx.graphics/src/main/java/com/sun/prism/d3d12/D3D12SwapChain.java
! modules/javafx.graphics/src/main/java/com/sun/prism/d3d12/ni/D3D12NativeDevice.java
! modules/javafx.graphics/src/main/native-prism-d3d12/D3D12NativeDevice.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/D3D12NativeDevice.hpp
! modules/javafx.graphics/src/main/native-prism-d3d12/D3D12NativeRenderTarget.hpp
! modules/javafx.graphics/src/main/native-prism-d3d12/D3D12NativeSwapChain.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/D3D12NativeSwapChain.hpp
= modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12DescriptorData.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12DescriptorData.hpp
+ modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12IRenderTarget.hpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12RenderingContext.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12RenderingContext.hpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12RenderingParameter.hpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12ResourceManager.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12ResourceManager.hpp
More information about the openjfx-changes
mailing list