-
Notifications
You must be signed in to change notification settings - Fork 6
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
Compile for Linux like dxvk-native #15
Comments
Hypothetically, yes. However I'm not sure why you'd need that. Do you have a lot of D3D8 code you want to run on Linux? |
I need to develop an app for a very old system, and i mainly use linux for development, i could just use a windows VM, but thats quite inconvenient |
If it can run Vulkan then it can probably run d9vk. If it can't run d9vk, then it won't run d8vk. So I would suggest using dxvk-native in d3d9 mode. The API is extremely similar but easier to use than d3d8. |
I will leave this open because we might support this down the line. But I would still suggest using d3d9. |
I meant using d8vk on my linux desktop to develop, then normal dx8 on the machine |
Oh I see. The machine is Windows and can't run d3d9? How old are we talking here? I will look into the possibility of a native build and get back to you shortly. |
machine is an old windows box with a ti4200 iirc, no dx9 |
Interesting lmao Looks like a native build is possible. I have pushed a commit that makes it possible to complete a GCC build. Try the following command if you want to only build d8vk. Note that d3d9.dll is still required to be present as of now.
Change Note that there will be a lot of macro redefinition warnings still but that shouldn't stop it compiling. |
Let me know if it works or not. There may be some more tweaking required but I expect this ought to work. |
It compiled! im going to try to test it now |
the libdxvk_d3d9.so was taken directly from the same output dir as the d8vk, eg. |
Interesting. I'll look into this more later. I expect it's a simple fix. |
@Beyley Try setting Note: By default, Meson installs to
To install the libs to |
Interesting. I'll take a look at this when I can. |
@Beyley is this still an issue? |
Hi, I don't have much of a stake here, but I'd like to toss my thoughts into the ring. Not a lot of software will, realistically, use a d8vk-native, but some will, somewhere. For reference, Valve uses dxvk-native for their Source games. It's possible that someone else will come along with the same desires. I came here from the upstream DXVK PR, and this was a checkbox, so I think this'll be a must-have anyways. I'll make a note that I should look at FOSS DX8 users somewhere, and see if I can get them going with D8VK if desired. |
After some work upstream, dxvk-native is now more suited for including in distributions and runtimes like the Steam Linux Runtime - this does give some added incentive to make sure d3d8 works, since it simply means that it will be included on the system like the other supported D3D versions. The only real change that d8vk would care about is this one where we tweaked the DLL-specific meson.build files to properly handle prefix/suffix stuff for the soname; aside from that it shouldn't need any special treatment (if anything it should be easier now, since system/runtime packages can guarantee that everything will be included in the right library path). |
Slapped together the changes needed for d3d8's meson.build: diff --git a/src/d3d8/meson.build b/src/d3d8/meson.build
index 9153e338..7b1247a0 100644
--- a/src/d3d8/meson.build
+++ b/src/d3d8/meson.build
@@ -19,8 +19,7 @@ if platform != 'windows'
d3d8_link_depends += files('d3d8.sym')
endif
-d3d8_dll = shared_library('d3d8'+dll_ext, d3d8_src, d3d8_res,
- name_prefix : dxvk_name_prefix,
+d3d8_dll = shared_library(dxvk_name_prefix+'d3d8', d3d8_src, d3d8_res,
dependencies : [ lib_d3d9, util_dep, dxso_dep, dxvk_dep ],
include_directories : dxvk_include_path,
install : true,
@@ -28,5 +27,12 @@ d3d8_dll = shared_library('d3d8'+dll_ext, d3d8_src, d3d8_res,
vs_module_defs : 'd3d8'+def_spec_ext,
link_args : d3d8_ld_args,
link_depends : [ d3d8_link_depends ],
+ kwargs : dxvk_so_version,
)
+if platform != 'windows'
+ pkg.generate(d3d8_dll,
+ filebase: dxvk_pkg_prefix + 'd3d8',
+ subdirs: 'dxvk',
+ )
+endif This can't be applied until the PR branch is rebased, but it should work after that...? |
Thanks for putting in the time. We'd most likely need to do this before merging upstream anyway. Feel free to open a PR and wait for a rebase (I already have 9 patiently doing so 😅 ). |
Done: #211 |
For laughs I ended up doing the rebase myself, was mostly just addressing conflicts in the workaround files: https://github.com/flibitijibibo/dxvk/tree/d8vk EDIT: CI is green, enjoy the artifacts: https://github.com/flibitijibibo/dxvk/actions/runs/9227588888 |
would it be possible to compile this for linux, similar to what DXVK-Native does?
The text was updated successfully, but these errors were encountered: