On Mon, 27 Nov 2023 20:22:40 GMT, Thorsten Fischer <d...@openjdk.org> wrote:

>> Hi,
>> 
>> I did open the bug report. Some notes to this PR:
>> 
>> My colleagues and I are able to reproduce this bug regularly, even though it 
>> takes sometimes up to 3 or 4 weeks until the D3DERR_DEVICEHUNG error shows 
>> up. We are currently evaluating two versions of fixes, but until now we do 
>> not have any results. I will post them as soon as I got them.
>> 
>> Version 1 (this version): Based on the observation, that the 
>> TestCooperativeLevel/CheckDeviceState method returns D3D_OK again after 
>> about 20 - 60 seconds, the reinitialize is called after the first time the 
>> state is returning D3D_OK. The 'isHung' flag stores the information until 
>> then.
>> 
>> Version 2: calls reinitialize directly after D3DERR_DEVICEHUNG has been 
>> returned. Basically
>> if (hr == D3DERR_DEVICEREMOVED || hr == D3DERR_DEVICEHUNG  ) { .. }
>> 
>> I did not modify the validatePresent method, as for our workaround (see 
>> ticket) it was not necessary. At least the native call swapchain->present 
>> dows not return that error code 
>> (https://learn.microsoft.com/en-us/windows/win32/api/d3d9/nf-d3d9-idirect3dswapchain9-present).
>>  I did not look decisively into all the native calls behind 
>> D3DRTTexture#readPixels.
>> 
>> As I said I will post the results (prism.verbose output) for the 2 versions 
>> later as a base for discussions.
>
> Thorsten Fischer has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Updated copyright year in D3DContext.cc

That's a pretty good summary of when it will be available in a production 
version: JavaFX 22, which will be shipped in March along with JDK 22. Early 
access builds will be available sooner.

There is a short window of time (until next Monday, 4-Dec-2023) to get this 
into jfx21u for JavaFX 21.0.2 if someone wants to backport it. This is a safe 
enough fix, that I will approve it if you do.

Getting this into jfx17u-dev and/or jfx11u-dev is possible, but I don't know 
how likely it is nor what would be involved in getting a build of JavaFX 17.0.x 
/ 11.0.x with the fix. Check with @johanvos of Gluon (probably offline).

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

PR Comment: https://git.openjdk.org/jfx/pull/1199#issuecomment-1832413688

Reply via email to