husker-dev / openglfx

OpenGL node for JavaFX
Apache License 2.0
88 stars 12 forks source link

NVDXInterop crash upon calling wglDXRegisterObjectNV #80

Open streamingdv opened 7 months ago

streamingdv commented 7 months ago

Describe the bug I'm currently in the middle of a closed beta test and a user of mine reported a bug when using the OpenGLFX rendering engine. It immediately crashes upon startup of the stream.

To Reproduce Difficult seems to be driver or device specific. Here are some crashlogs

Crashlogs.zip

It seems it is DirectX related, I asked him to use the OpenGL pipeline on Windows (which is supported by my application). Will report back if the crash also happens via the OpenGL pipeline but I guess not.

Environment:

husker-dev commented 7 months ago

Interesting. I think I should also do a little functionality testing when checking NvDxInterop support to rule out any driver or hardware issues.

I'll see what I can do about it, but right now all my time is spent upgrading offscreen-jgl (now called “grapl”) to make it possible to update openglfx in future

streamingdv commented 7 months ago

Thanks, yes no worries. Keep me updated. I will report back if I got some news.

streamingdv commented 7 months ago

@husker-dev yes the OpenGL pipeline seems to work fine according to the feedback I got from my beta tester.

streamingdv commented 6 months ago

hs_err_pid23372.txt

Another crash report from a user, happening on a AMD Ryzen 5 5500U with Radeon Graphics device.

streamingdv commented 3 months ago

@husker-dev are there any news? I got a few more bug reports and all of them seem to use some kind of Radeon Graphics device. My application also offers additional rendering pipelines so I have workarounds available but would be cool if this could be fixed somehow.

husker-dev commented 3 months ago

@streamingdv Hi, currently busy with my job and also the project grapl that we use. I plan to work on openglfx soon, but I won't give exact dates. It might be in the next few weeks

streamingdv commented 3 months ago

All good, thanks for the status update 👍

husker-dev commented 3 months ago

@streamingdv, some updates:

Swap buffers

I made a good asynchronous algorithm that will have something called "Swap buffers". Also, I will remove synchronous rendering, because better option will be configuration with one swap buffer.

NVDXInterop has already been rewritten to support them.

New interop type

I've been trying to implement texture sharing from DirectX 9 to OpenGL via DXGI handles for the last three days.

I managed to do it via a DirectX 11 proxy. It used EXT_external_objects and EXT_external_objects_win32 on OpenGL side.

Most of the logic is taken from here:

I'll make this a priority choice over wgl_nv_dx_interop because it consumes less GPU resources and should also be well supported on AMD GPU.

I'll upload the code soon

husker-dev commented 3 months ago

It looks like I can do it without DirectX 11. It seems to work too

streamingdv commented 3 months ago

Once the new version is ready I can definitely offer to test it on a few Windows/ Linux machines. If everything works I can invite some users of my application to test a beta release of my app bundled with the new OpenGLFX lib to get some feedback.