git: openjdk/jfx-sandbox: direct3d12: 8342684: JavaFX D3D12: Fix gradient issues in Ensemble8

duke duke at openjdk.org
Fri Nov 8 13:23:29 UTC 2024


Changeset: e77d51c7
Branch: direct3d12
Author:    Lukasz Kostyra <lukasz.kostyra at oracle.com>
Date:      2024-11-08 14:15:34 +0000
URL:       https://git.openjdk.org/jfx-sandbox/commit/e77d51c7d0e96c544760c408efe266aafab8936c

8342684: JavaFX D3D12: Fix gradient issues in Ensemble8

Problem happened because some parts of Prism (rightfully so) reuse the
same shader in multiple draw calls, only with different constants. Since
setting shader constants did not flag other parts of the backend for
refresh, old shader constants were used which caused visual
discrepancies.

Resolved by moving shader constant setting to NativeDevice, which in
turn clears the mApplied flag for D3D12ResourceManager, triggering
shader constants update.

Also, to help aid debugging potential issues like that faster, added a
new property - prism.d3d12.apiOpts - which is by default set to true.
Setting it to false will disable D3D12 API optimizations in the backend,
essentially forcing a full re-record of RenderingContext parameters
before each draw call.

! modules/javafx.graphics/src/main/java/com/sun/prism/d3d12/D3D12Shader.java
! modules/javafx.graphics/src/main/java/com/sun/prism/d3d12/ni/D3D12NativeDevice.java
! modules/javafx.graphics/src/main/java/com/sun/prism/d3d12/ni/D3D12NativeShader.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/D3D12NativeShader.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12Config.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12Config.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