On Wed, 25 Nov 2026 08:51:05 GMT, Marius Hanl <[email protected]> wrote:
>> Lukasz Kostyra has updated the pull request incrementally with six
>> additional commits since the last revision:
>>
>> - Config: Disable clear opts by default
>>
>> Current implementation is not the most precise and can cause rendering
>> errors. It will be restored when further improved as a follow-up.
>> - Static analysis fixes from @kevinrushforth
>>
>> Omitted GetArrayLength() fix because it is more complex and needs more
>> time.
>> - Cleanup unused functions/methods/classes
>>
>> Some methods (ex. from Matrix, BBox or Config) were left for future
>> convenience.
>> - RenderingContext: Cleanup Mesh rebuild changes
>>
>> - Changed CopyResource action to now use ITrackedResource objects and to
>> perform D3D12 State transitions
>> - Removed CopyBufferRegion Action
>> - Review comments from @jayathirthrao, update Buffer initialization
>>
>> - Fixed MSAA support polling
>> - Adjusted code initializing Internal::Buffer:
>> - Now Buffer::Init will only initialize data when we create an
>> UPLOAD-heap Buffer for convenienice
>> - DEFAULT-heap Buffers now require manual update via RenderingContext
>> - RenderingContext, similar to Textures, employs a fast path for small
>> Buffers utilizing preallocated memory
>> - NativeMesh will now reuse existing VB/IB if BuildGeometryBuffers uses
>> the same buffer size with new data
>> - RTContext: Fix potential quad VB data overwrite
>>
>> Main Ring Buffer data should be declared before use, together with
>> ResourceManager's data.
>
> modules/javafx.graphics/src/main/native-prism-d3d12/D3D12NativeShader.cpp
> line 258:
>
>> 256: {
>> 257: #endif
>> 258:
>
> In the same spirit as D3D, can we have a `JNI_OnLoad` function here, so that
> this will work with GraalVM?
>
> https://github.com/openjdk/jfx/blob/94168cc51fb449561248fe84184c088a324e7e0d/modules/javafx.graphics/src/main/native-prism-d3d/D3DShader.cc#L203-L207
>
> We can also use another file, e.g. `D3D12NativeLibrary` (did not checked this
> yet)
I would rather put this in `D3D12NativeLibrary`. I can add this.
> modules/javafx.graphics/src/main/native-prism-d3d12/D3D12NativeShader.cpp
> line 262:
>
>> 260: (JNIEnv* env, jobject obj, jlong ptr)
>> 261: {
>> 262: if (!ptr) return;
>
> Here and some other locations: Not sure what the openjdk / openjfx code
> convention for C++ is, but should we use `{ .. }` here?
There are some cases in old D3D code and across JFX where this style is used.
AFAIR the only strict rule about these is multi-line single-statement
conditions with no brackets, ex:
Bad:
if (check)
foo();
Good:
if (check) {
foo();
}
Single-line conditions are I think fine without brackets.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/2346#discussion_r4694539830
PR Review Comment: https://git.openjdk.org/jfx/pull/2346#discussion_r4694534683