RFR: 8271024: Implement macOS Metal Rendering Pipeline [v3]

Jayathirth D V jdv at openjdk.org
Wed Jun 25 13:40:35 UTC 2025


On Mon, 23 Jun 2025 18:27:02 GMT, Martin Fox <mfox at openjdk.org> wrote:

>> Glass changes are updated based on review inputs.
>> 
>> Also @arapte noticed commented out GLASS_POOL_PUSH/POP logic in GlassView.m which is updated to match mainline code. Since this enables common autoreleasepool, explicit autorelease calls for Vertex & Index buffer in MetalMesh.m are removed. Latest code is tested again and headful CI runs are green with both OpenGL and Metal.
>
> @jayathirthrao Thanks for renaming the classes. Much appreciated.
> 
>> 4. Regarding setOpaque() in GlassWindow.m : 
> 
> That setOpaque: call still isn't being executed. The code is looking at the GlassLayer, not the GlassLayerCGL, so the isKindOfClass: is failing and setOpaque: is never called.
> 
> But there's no point in changing that code until we can reproduce the original PickTest3D bug and I haven't been able to do that. Have you? The bug (JDK-8095004) was entered in 2013 but the version of PickTest3D in apps/toys was added in early 2015. I don't know how closely it matches the code that caused the original bug report.
> 
> The original bug report doesn't add up. The comments state that the problem stems from using a Phong material that has a diffuse color with an alpha of 0.5. That should cause the individual objects to become translucent which is what happens when I tweak the PickTest3D code. But the screen shot in the bug report shows solid objects; the entire scene is washed out but the individual objects are opaque.
> 
> I can't test this on my Windows box probably because I'm running in a VM. Prism reports that the D3D renderer is running without error but I still get blank screens except for the ColorCube toy.

@beldenfox Thanks for pointing to improper isKindOfClass: usage. That is updated now and setOpaque is getting called properly as in mainline.

Regarding reproducing the issue originally seen in PickTest3D : PickTest3D is updated in 2015 under [JDK-8130532](https://bugs.openjdk.org/browse/JDK-8130532) to use alpha value as 1.0 instead of 0.5 for diffuse color. I reverted this change to use 0.5 and disabled calling setOpaque in GlassWindow.m. Unfortunately,  i see proper output with translucent objects and there is no difference in output of PickTest3D with/without setOpaque call even with 0.5 alpha value. As you have also observed in current code setOpaque call has no effect in output even when we use 0.5 alpha value. Currently i am trying get information related to PickTest3D code pre 2015.

Regarding running demos in VM : Is Prism falling back to SW pipeline? (You can check for this info using -Dprism.verbose=true). If it is falling back to SW pipeline in VM, we can try to force it to use hardware pipeline using -Dprism.forceGPU=true.

-------------

PR Comment: https://git.openjdk.org/jfx/pull/1824#issuecomment-3004816257


More information about the openjfx-dev mailing list