git: openjdk/jfx-sandbox: direct3d12: 6 new changesets

duke duke at openjdk.org
Wed Mar 12 16:41:53 UTC 2025


Changeset: 43021a5c
Branch: direct3d12
Author:    Lukasz Kostyra <lukasz.kostyra at oracle.com>
Date:      2025-03-11 15:09:02 +0000
URL:       https://git.openjdk.org/jfx-sandbox/commit/43021a5c8cd76958c5463faf15821c2418ba0fb6

RingContainer: Fix potential data overwriting

In some rare cases it was possible for RingContainer-s to incorrectly
detect the situation where the RingContainer is full. First, the
condition for "tail is behind head" was wrong, and then the check for
overflow would be incorrect. This could cause the area near head to be
treated as available and thus overwritten when preparing a Command List.
Overwriting could ex. happen when GPU is still executing a Command List
which uses some temporary Descriptors, which would cause device removal.

This adjustment to conditions ensures that:
- We only enter the "tail behind head" section when it actually is the
  case
- We will wait for next mid-frame checkpoint when Ring Container is
  "almost" full

Fixes occassional "Failed to Present on SwapChain" bug, leading to
infinite-loop of "Failed to Create SwapChain" messages.

! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12RingContainer.cpp

Changeset: 7caff3e8
Branch: direct3d12
Author:    Lukasz Kostyra <lukasz.kostyra at oracle.com>
Date:      2025-03-11 15:16:46 +0000
URL:       https://git.openjdk.org/jfx-sandbox/commit/7caff3e84aa22e163a1b809078ae1ab98cebaecf

NativeSwapChain: Move wait to right after Present

! modules/javafx.graphics/src/main/native-prism-d3d12/D3D12NativeSwapChain.cpp

Changeset: 614bd166
Branch: direct3d12
Author:    Lukasz Kostyra <lukasz.kostyra at oracle.com>
Date:      2025-03-12 09:54:57 +0000
URL:       https://git.openjdk.org/jfx-sandbox/commit/614bd16626d02036224a7f2904daeea6484d48e1

D3D12Shader: Assign null SRV descriptors when no texture is bound

! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12InternalShader.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12ResourceManager.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12Shader.hpp

Changeset: f68ff9a0
Branch: direct3d12
Author:    Lukasz Kostyra <lukasz.kostyra at oracle.com>
Date:      2025-03-12 10:07:29 +0000
URL:       https://git.openjdk.org/jfx-sandbox/commit/f68ff9a0ad395b65d376624e538e7f45f3dfb5f1

RingContainer: Improve debug logging

! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12ResourceManager.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12RingContainer.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12RingContainer.hpp

Changeset: 78a4dc73
Branch: direct3d12
Author:    Lukasz Kostyra <lukasz.kostyra at oracle.com>
Date:      2025-03-12 14:37:31 +0000
URL:       https://git.openjdk.org/jfx-sandbox/commit/78a4dc73368aee5fa08d92a3eabc835c5ea42201

Skip a Render call when RenderingContext::Apply() fails

Prepare steps in RenderingContext have to sometimes allocate some data
that potentially can fail (only should during development though). To
prevent some second-hand errors or validation layer failures
RenderingContext::Apply() now returns a bool which can be false. If it
does so, current Render*() call is aborted early.

! modules/javafx.graphics/src/main/native-prism-d3d12/D3D12NativeDevice.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/D3D12NativeShader.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/D3D12NativeShader.hpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12BlitPixelShader.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12BlitPixelShader.hpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12InternalShader.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12InternalShader.hpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12MipmapGenComputeShader.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12MipmapGenComputeShader.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
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12RingBuffer.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12RingContainer.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12RingContainer.hpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12RingDescriptorHeap.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12Shader.hpp

Changeset: a4485f04
Branch: direct3d12
Author:    Lukasz Kostyra <lukasz.kostyra at oracle.com>
Date:      2025-03-12 17:36:18 +0000
URL:       https://git.openjdk.org/jfx-sandbox/commit/a4485f041b4ab64c1dca01325a053b448b78bf51

Buffer: Remove Command List wait

Since we now have ResourceDisposer, we can utilize it to hold the
staging buffer reference used for Buffer upload and avoid the
Signal/Wait on Command Queue. This should speed up not only Buffer
uploads, but any other situations where a Buffer is used temporarily and
without initial data.

Change also adjusts some logs in RingContainer (removes leftover debug
logs, adds a check for trying to reserve 0 slots).

! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12Buffer.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12RingContainer.cpp



More information about the openjfx-changes mailing list