On Mon, 16 Nov 2026 08:06:56 GMT, Jayathirth D V <[email protected]> wrote:
>> Lukasz Kostyra has updated the pull request with a new target base due to a
>> merge or a rebase. The incremental webrev excludes the unrelated changes
>> brought in by the merge/rebase. The pull request contains eight additional
>> commits since the last revision:
>>
>> - MeshView: Use weak_ptr for Mesh and Material references
>>
>> Changed in-line with NativePhongMaterial change in previous commit
>> - Review fixes from general comments from @kevinrushforth
>>
>> - D3D12Context.java correctly handles NULL destination RTT now
>> - D3D12SwapChain.java prevents potential NPE when disposing
>> - D3D12RenderingContext.cpp:
>> - Shader assignments are now checked based on stored Shader parameter
>> instead of PSO's bound Shader (fixes incorrect shader resource
>> assignments after restoring the Context after Blit)
>> - Clear now handles dirty bboxes better (fixes unnecessary and/or
>> incorrect bbox estimation)
>> - D3D12Graphics.java now provides premultiplied clear parameters
>> - D3D12NativeSwapChain.cpp now checks for tearing support when VSync is
>> requested disabled, will fall-back to enabled VSync if device does not
>> support it or we cannot poll DXGI for support
>> - D3D12NativeRenderTarget.cpp sets underlying Texture's sampling to
>> linear to match D3D's settings
>> - D3D12NativePhongMaterial.cpp now uses weak pointers to refer to
>> texture maps - prevents keeping strong references and keeping the
>> resources alive despite NativeTexture being released
>>
>> Additionally:
>> - Added logic to unbind Textures from RenderingContext when they are
>> disposed
>> - Added a missing Clear call to createRTTexture (found it in D3D backend)
>> - RenderPerfTest will respect java.animation.fullspeed pre-set when
>> it is set via a JVM argument
>> - DXGIFormat: Remove extra newline
>> - Review comments from @crschnick
>>
>> Doesn't contain SwapChain flag adjustment, as this will be solved
>> separately with SwapChain changes requested by @kevinrushforth
>> - Update CompileHLSL6Task to latest build fixes
>> - Merge remote-tracking branch 'upstream/master' into feature/direct3d12
>> - Review fixes from @kevinrushforth
>> - Implement Direct3D12 Rendering Pipeline
>
> modules/javafx.graphics/src/main/java/com/sun/prism/d3d12/D3D12Context.java
> line 76:
>
>> 74: int getMSAASampleSize(PixelFormat format) {
>> 75: int maxSamples = mDevice.getMaximumMSAASampleSize(format);
>> 76: return maxSamples < 2 ? 1 : (maxSamples < 4 ? 2 : 4);
>
> If we are limiting the max samples to 4, what is the use of probing until 16?
This code follows how D3D9 does it. I could limit polling code to 4x MSAA on
native-side, but would prefer not to - this way the behavior is similar to
D3D9, the native-side backend returns maximum possible level while Java-side
limits it in only one common place. This way, if we ever want to ex. introduce
8x MSAA support, the limitation is only in one spot instead of multiple.
> modules/javafx.graphics/src/main/native-prism-d3d12/D3D12NativeMesh.cpp line
> 67:
>
>> 65: bool NativeMesh::BuildGeometryBuffers(const void* vbData, size_t vbSize,
>> const void* ibData, size_t ibSize, DXGI_FORMAT ibFormat)
>> 66: {
>> 67: if (mVertexBuffer)
>
> Can we avoid disposing of vertex/index buffer when the count is not changed?
> I see we do that in D3D9 and other pipelines.
We could do that. Current implementation was a bit simplified because data
uploading was done only on initialization in `D3D12::Buffer`. I will adjust
this code and provide some helper to upload data to GPU-only buffers.
I wonder if it would help some performance tests too...
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/2346#discussion_r4602235167
PR Review Comment: https://git.openjdk.org/jfx/pull/2346#discussion_r4602254344