git: openjdk/jfx-sandbox: direct3d12: D3D12Shader.java: Fix incorrect constant count passed to native side

duke duke at openjdk.org
Tue Mar 4 16:47:55 UTC 2025


Changeset: bf721cbe
Branch: direct3d12
Author:    Lukasz Kostyra <lukasz.kostyra at oracle.com>
Date:      2025-03-04 16:03:50 +0000
URL:       https://git.openjdk.org/jfx-sandbox/commit/bf721cbe5631c7c7e0768870eda63151022b9cc0

D3D12Shader.java: Fix incorrect constant count passed to native side

When calling Shader.setConstants() Prism expects count parameter to be
"how many 4-component ints or floats are passed". However, D3D12
native-side was written with the (incorrect) expectation that count
means "how many ints or floats are passed".

To fix this discrepancy D3D12Shader now calls
D3D12NativeShader.setShaderConstants() with count multiplied by 4.

This fixes some incorrectly rendered Ensemble scenes, like Colorful
Circles having an incorrect gradient background.

! modules/javafx.graphics/src/main/java/com/sun/prism/d3d12/D3D12Shader.java



More information about the openjfx-changes mailing list