RFR: 8258754: Gracefully fallback to the OpenGL rendering pipeline if Metal rendering pipeline initialization fails
Kevin Rushforth
kcr at openjdk.java.net
Fri Jan 8 19:21:17 UTC 2021
On Fri, 8 Jan 2021 19:16:05 GMT, Ajit Ghaisas <aghaisas at openjdk.org> wrote:
>>>
>>> Maybe we can make this check version specific (maybe 10.12 for now) so
>>> that in future version when opengl is removed, then this check will be
>>> noop and if Metal fails, then it will quit.
>>>
>>> Regards
>>> Prasanta
>>
>> It is better to avoid version specific check when we can cover all the combinations discussed in other comments. My last commit addresses it.
>
> In the absence of specification, I have implemented the below combinations -
>
> Current hard-coded Default pipeline is : OpenGL
> If user specifies : Nothing --> Selected pipeline is : Default
> If user specifies : opengl=true --> Selected pipeline is : OpenGL
> If user specifies : opengl=false --> Selected pipeline is : Metal
> If user specifies : metal=true --> Selected pipeline is : Metal
> If user specifies : metal=false --> Selected pipeline is : OpenGL
> If user specifies : opengl=true AND metal=false --> Selected pipeline is : OpenGL
> If user specifies : opengl=false AND metal=true --> Selected pipeline is : Metal
> If user specifies : opengl=true AND metal=true --> Selected pipeline is : Default
> If user specifies : opengl=false AND metal=false --> Selected pipeline is : Default
>
> Note that - I have not considered the order of VM options. If needed, that should be handled separately later.
>
> If selected pipeline could not be initialized, then the other pipeline is used as fallback.
> For fallback, appropriate message is logged only in verbose mode.
> If fallback also fails (unlikely) - then a RuntimeException with appropriate message is thrown.
Yes, I think this is what we what.
> Note that - I have not considered the order of VM options. If needed, that should be handled separately later.
I don't think this is possible (even if it were desired).
-------------
PR: https://git.openjdk.java.net/lanai/pull/147
More information about the lanai-dev
mailing list