On Fri, 9 Oct 2020 23:17:27 GMT, Kevin Rushforth <k...@openjdk.org> wrote:

>> The full recreation of the pipeline is only done when D3DERR_DEVICEREMOVED 
>> is occurring. On other causes of why the
>> device is not ready, only the factory reference in the painter is cleared.
>
>> The full recreation of the pipeline is only done when D3DERR_DEVICEREMOVED 
>> is occurring
> 
> I see that now. That part is fine then.
> 
> Another concern is that this would be the first time we have recreated a 
> GraphicsPipeline -- they are effectively
> singletons today. This could have unexpected side effects and would need to 
> be very carefully reviewed and tested.
> Have you considered an alternative where you retain the GraphicsPipeline, but 
> recreate the native device?

I hope I understood your intend. I've tried to replace the recreation of the 
GraphicsPipeline-Instance by only calling
the native parts. Unfortunately that doesn't seem to work at all. Probably I'm 
missing some updates.
    public boolean reinit() {
        if (d3dEnabled) {
            if (creator != Thread.currentThread()) {
                throw new IllegalStateException(
                        "This operation is not permitted on the current thread 
["
                                + Thread.currentThread().getName() + "]");
            }
            notifyAllResourcesReleased();
            nDispose();
            for (int i = 0; i != factories.length; ++i) {
                factories[i] = null;
            }
            nInit(PrismSettings.class);
            factories = new D3DResourceFactory[nGetAdapterCount()];
        }
        return d3dEnabled;
    }

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

PR: https://git.openjdk.java.net/jfx/pull/315

Reply via email to