On Mon, 2 Feb 2026 13:30:40 GMT, Ambarish Rapte <[email protected]> wrote:

> Issue:
> As described in the bug, a crash occurs on macOS VM created using Parallels.
> The crash occurs when trying to create a 
> [MTLArgumentEncoder](https://github.com/openjdk/jfx/blob/5ac1620ac0ba20170ae9758e20893feba5ebc58b/modules/javafx.graphics/src/main/native-prism-mtl/MetalShader.m#L76C49-L76C82),
>  which is required for creating Shaders(Both Prism and Decora)
> This crash is not observed on macOS VM created using Apple Virtualization 
> Framework.
> 
> Fix:
> Support for MTLArgumentEncoder is mandatory for Prism Metal Rendering 
> pipeline. Without support for MTLArgumentEncoder the Shaders cannot be 
> created.
> In this scenario Prism should gracefully fallback to Software rendering.
> Added a check to verify if the minimum 
> [MTLGPUFamilyMac2](https://developer.apple.com/documentation/metal/mtlgpufamily/mac2?language=objc)
>  GPU family is supported by the platform. If not supported then Metal 
> Pipeline cannot be used, and rendering falls back to software pipeline.

LGTM

One thing of note is that with the newly-updated default pipeline order of 
`"mtl,es2,sw"` on macOS, if we fallback to sw (e.g., on a Parallels setup that 
doesn't support mtl or es2), the sw pipeline will use Metal to blit. I think 
that should be OK as long as it works (I note we have the same potential issue 
with OpenGL today, so this is not a new issue).

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

Marked as reviewed by kcr (Lead).

PR Review: https://git.openjdk.org/jfx/pull/2061#pullrequestreview-3745918871

Reply via email to