RFR: 8258754: Gracefully fallback to the OpenGL rendering pipeline if Metal rendering pipeline initialization fails [v5]
prr at openjdk.java.net
Fri Jan 8 21:09:09 UTC 2021
On Fri, 8 Jan 2021 19:26:29 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> Ajit Ghaisas has updated the pull request incrementally with one additional commit since the last revision:
>> Cover all combinations of OGL and Metal pipelines
> The logic looks correct to me (I didn't run it). I did leave one question about whether we want to initialize both pipelines in the typical case where we don't need a fallback.
> 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).
I am sure it is not.
I think what we can do, which is really all we can do, is be consistent in the order in which we consider the pipelines.
I think the code we write here for mac ought to be written in a way that when we flip
the switch to make metal peferred / default that we don't have a lot of code to move around.
In as few words as possible :
The default pipeline will be used so long as it is supported, and in the absence of any other
unambiguous request for another supported pipeline.
It is expected that some pipeline is available, so long as the windowing system is running and reachable.
In such an unlikely event no pipeline is supported an InternalError will be thrown.
unambiguous means that with opengl as default
- if you ask for both, we first try opengl.
- if you disable both, we first try opengl
- if you ask for neither, we first try opengl
- if you don't enable some other pipeline, we first try opengl
when we flip the switch to metal as default then :
- if you ask for both, we first try metal.
- if you disable both, we first try metal
- if you ask for neither, we first try metal
- if you don't enable some other pipeline, we first try metal
More information about the lanai-dev