-
Notifications
You must be signed in to change notification settings - Fork 897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Native builds with SDL and GLFW are incompatible, so should have different SONAMEs #3321
Comments
I think the true game plan to solve this is simply to add an interface that lets the dev pick the WSI at runtime. In the meantime though, I am happy to append the other WSI such as GLFW to the name prefix. |
OK, I'll do a PR to make it |
yeah i can live with that as a temporary solution, but as josh said, we should rework this at some point. |
Selecting the GLFW WSI gives DXVK an incompatible ABI: for example, CreateDevice takes a `SDL_Window *` parameter in the default SDL WSI, but takes a `GLFWwindow *` instead in the GLFW WSI. This means it should get a different name, so that binaries expecting one WSI don't unexpectedly load the other. Resolves: doitsujin#3321 Signed-off-by: Simon McVittie <[email protected]>
Different so names is something we do downstream at Silk.NET to handle this problem and it works great, but when the runtime WSI selection does happen, could you drop me a ping if you remember so i can update our native lib handling? |
As far as I can tell, each of the available WSIs for DXVK Native has a different ABI: in the SDL2 WSI, whenever a function in the DirectX API returns or receives a
HWND
it's really aSDL_Window *
, but in the GLFW WSI, whenever a function returns or receives aHWND
it's really aGLFWwindow *
.When SDL 3 becomes stable, presumably there will be SDL3 games that want to use DXVK Native, at which point that would become a third incompatible WSI?
If that's the case, then they should have different SONAMEs. One option would be to append the WSI to the
dxvk_name_prefix
, making themlibdxvk_sdl2_d3d9.so
,libdxvk_glfw_d3d9.so
and so on.libdxvk_d3d9.so
could be a symlink tolibdxvk_sdl2_d3d9.so
, and so on, for backwards compatibility.Or, the default
sdl2
WSI could use an unadorned name because it got there first, and all other WSIs (including SDL3, GLFW, and any other WSIs that are invented in future) could append their name to thedxvk_name_prefix
?The text was updated successfully, but these errors were encountered: