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

duke duke at openjdk.org
Tue Apr 15 14:52:11 UTC 2025


Changeset: a59c017a
Branch: direct3d12
Author:    Lukasz Kostyra <lukasz.kostyra at oracle.com>
Date:      2025-04-15 10:04:53 +0000
URL:       https://git.openjdk.org/jfx-sandbox/commit/a59c017a4f3ba4722ca202d358e58406e25dcdf8

Downgrade used D3D12 interfaces

In most cases we acquired too new D3D12 interfaces and didn't use any of
the APIs they provided.

Most interfaces were downgraded to their basic version, with some
D3D12 exceptions:
- ID3D12Device4 - Remains at v4 because of CreateCommandList1, which
  allows us to create a Command List independently of the Command
  Allocator. Downgrading further would require rewriting CommandListPool
- ID3D12GraphicsCommandList1 - remains at v1 because of
  ResolveSubresourceRegion. If we ever want to jump below that we'd have
  to reimplement part of BlitTexture().
- ID3D12Debug3 - remains at v3 due to GPU validation support. Mostly
  used only in development anyway, so shouldn't interfere with running
  D3D12 on older systems in Release build.
- ID3D12InfoQueue1 - remains at v1 due to RegisterMessageCallback.
  Similarly to ID3D12Debug3 only used for debugging.

DXGI exceptions:
- IDXGIFactory2 - Remains at v2 due to CreateSwapChainForHwnd, which
  simplifies initialization process greatly.
- IDXGISwapChain3 - Remains at v3 due to GetCurrentBackBufferIndex,
  useful when managing the frame rendering.

! modules/javafx.graphics/src/main/native-prism-d3d12/D3D12Common.hpp
! modules/javafx.graphics/src/main/native-prism-d3d12/D3D12NativeTexture.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/D3D12NativeTexture.hpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12Buffer.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12Debug.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12RingBuffer.cpp

Changeset: 1c6d8154
Branch: direct3d12
Author:    Lukasz Kostyra <lukasz.kostyra at oracle.com>
Date:      2025-04-15 16:42:15 +0000
URL:       https://git.openjdk.org/jfx-sandbox/commit/1c6d815479825d8265a8777586c50b562f0256c8

Buffer: Leave initialization early for Readback buffers

On some older GPUs Readback buffers are restricted to their initial
state, which is COPY_DEST or RESOLVE_DEST. By mistake D3D12Buffer
initialization would record a ResourceBarrier transitioning from
COPY_DEST to COPY_DEST which is not only excessive but also incorrect on
those older systems.

Additional condition was added to leave Buffer initialization method early
which prevents recording the Barrier and any issues.

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



More information about the openjfx-changes mailing list