git: openjdk/jfx-sandbox: direct3d12: 2 new changesets
duke
duke at openjdk.org
Tue Apr 8 13:10:19 UTC 2025
Changeset: 1c8ee87a
Branch: direct3d12
Author: Lukasz Kostyra <lukasz.kostyra at oracle.com>
Date: 2025-04-08 14:38:27 +0000
URL: https://git.openjdk.org/jfx-sandbox/commit/1c8ee87a543d2a271a27ca9d0efd6f568706fd8e
Make Transforms management more akin to D3D9
This change removes Transforms as a Rendering Step and instead sets them
manually when calling appropriate Render call. Additionally, the
viewport is now set from -1 to 1 instead of original 0 to 1 to adjust
for Prism's expectations - this essentially accomplishes the same as
D3DContext.adjustClipSpace() method in D3D pipeline, matching D3D12's
clip space to OpenGL expectations.
! modules/javafx.graphics/src/main/java/com/sun/prism/d3d12/D3D12Context.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/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
Changeset: 9fdc5116
Branch: direct3d12
Author: Lukasz Kostyra <lukasz.kostyra at oracle.com>
Date: 2025-04-08 14:52:19 +0000
URL: https://git.openjdk.org/jfx-sandbox/commit/9fdc5116febff6ad419a6140e72b510640029a9a
Fix Depth Buffer clearing
In situations where we render a SubScene with depth testing enabled
Prism would often follow below pattern for clearing the RTT:
- set the RTT with depth test disabled
- clear the RTT
- re-set the RTT with depth test enabled
D3D12 assumed that when the depth testing is disabled then the Depth
Buffer should not be cleared even when it is present. This turned out to
not be the case, as D3D9 backend cleared the Depth Buffer even if the
testing was disabled. As such, in some scenarios (HelloViewOrder) we
missed a Depth Buffer clear which created visual bugs.
This change fixes above scenario and makes it so that Clear() can be
issued with clearDepth flag. If present and Depth Buffer has already
been created the Clear() will also issue a Depth Buffer clear.
Fixes HelloViewOrder demo not drawing the subscene properly and in
correct order.
! modules/javafx.graphics/src/main/java/com/sun/prism/d3d12/D3D12Graphics.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.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/D3D12NativeRenderTarget.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
More information about the openjfx-changes
mailing list