Open istinnstudio opened 1 year ago
I don’t have capacity to work on it right now, but I don’t mind better compatibility. Having separate build sounds too complicated, is there a way to make both DX12 and OpenGL work with the same dll?
It is absolutely understandable. I wish there was a way to separate the usage of Direct3D/OpenGL before the jvm tries to validate this dll against its dependencies. I have no idea if there is a way to separate/distinguish those calls in order for the jvm to understand what to select and what to avoid. More or less somehow say to the jvm that if dx supported <12 then avoid/disable direct3d (and all invalid calls) and switch to an OpenGL only mode . I do not know if this is possible, with the current dll. from dxdiag on win10
It is possible if you manually resolve the imports from Direct3D.
I wish I knew how to do this but it is beyond my knowledge.
The best option that doesn't require modifications to Skia is most likely multiple DLL files. The files most likely can be compressed/packed together in the jar if the file size is worrying as any duplicate code should compress well.
I am going to upgrade to a new platform that supports dx12. But in my opinion there sould be 2 separate dll's, one for DX12 one for OpenGL (as 0-x-2-2 commented also), so the real feature request is: "Build 2 separated independent dlls one for eatch graphics dev platform" and develop a simple automatic selection system (or simply use a new manual selection parameter in user code) that selects the one that fits the specs. It is a bit pitty to waste all those cases that do not cover both platforms at the same time.
I've been struggling to build locally a Windows release without Direct3D 12, and try an only OpenGL dll version. The build system is a bit confusing with all those python scripts, but GitHub actions is ready for this, I guess. If it is relatively easy please update the action scripts in order to support a special "only OpenGL" release without the Direct3D 12 dependency. This might expand the use of Skija to GPUs that do not support DirectX 12 (like intel 4th gen). If it will never happen for any reason, please close this "issue"!
reference: https://github.com/HumbleUI/Skija/issues/15#issuecomment-1366695155