-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
First class DXVK support #1201
First class DXVK support #1201
Conversation
Current blocker: we need to provide a modified version of vkd3d, and getting that to load seems to require LD_LIBRARY_PATH modifications, due to cross-library dependencies diff --git a/include/vkd3d_windows.h b/include/vkd3d_windows.h
index 002ff667..097a4787 100644
--- a/include/vkd3d_windows.h
+++ b/include/vkd3d_windows.h
@@ -186,7 +186,7 @@ typedef struct SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES;
((type *)((char *)(address) - offsetof(type, field)))
# ifdef __x86_64__
-# define __stdcall __attribute__((ms_abi))
+# define __stdcall
# else
# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || defined(__APPLE__)
# define __stdcall __attribute__((__stdcall__)) __attribute__((__force_align_arg_pointer__)) |
Thinking about it, if we load the dependencies of vkd3d-utils using dlopen before doing dlopen on vkd3d-utils, it should work, so perhaps a |
Plumbing it into CreateDefaultContext probably isn't the best. Maybe something like: partial class D3DCompiler
{
static D3DCompiler()
{
// static method
LibraryLoader.RegisterDependency("vkd3d-utils", "vkd3d", "vkd3d-shader");
}
} and plumb it into |
makes sense |
oh my i just saw the CI what |
f6f1c65
to
c4cf564
Compare
ready for review, but not ready for merge until i can get in contact with the dxvk/vkd3d people, i dont want to push broken libs |
f8df5fc
to
0686395
Compare
Status update? |
DXVK on windows needs testing, but aside from that, it's ready for review |
Did you want it merged without that though? |
it's fine to wait until someone can test, this PR shouldnt block releases, and i dont want to be merging in like 15mb of native libs that dont even work |
a25ac58
to
eedfbd1
Compare
This needs a rebase. If you can give me binaries and exact instructions I can test on Windows. |
…ov 16 23:37:59 UTC 2022 (#1204) Co-authored-by: The Silk.NET Automaton <[email protected]>
This reverts commit e794a46.
This reverts commit 33f4df7.
…Jan 9 12:49:59 UTC 2023 (#1285) Co-authored-by: The Silk.NET Automaton <[email protected]>
…an 9 12:49:59 UTC 2023 (#1286) Co-authored-by: The Silk.NET Automaton <[email protected]>
…Jan 9 12:49:59 UTC 2023 (#1287) Co-authored-by: The Silk.NET Automaton <[email protected]>
* New binaries for Vulkan Loader on Linux 5.15.0-1034-azure #41-Ubuntu SMP Fri Feb 10 19:59:45 UTC 2023 * New binaries for Vulkan Loader on Darwin 21.6.0 Darwin Kernel Version 21.6.0: Mon Dec 19 20:44:01 PST 2022; root:xnu-8020.240.18~2/RELEASE_X86_64 * New binaries for Vulkan Loader on Microsoft Windows 10.0.20348 --------- Co-authored-by: The Silk.NET Automaton <[email protected]>
* New binaries for GLFW on Linux 5.15.0-1034-azure #41-Ubuntu SMP Fri Feb 10 19:59:45 UTC 2023 * New binaries for GLFW on Darwin 21.6.0 Darwin Kernel Version 21.6.0: Mon Dec 19 20:44:01 PST 2022; root:xnu-8020.240.18~2/RELEASE_X86_64 * New binaries for GLFW on Microsoft Windows 10.0.20348 --------- Co-authored-by: The Silk.NET Automaton <[email protected]>
…Feb 10 19:59:45 UTC 2023 (#1327) Co-authored-by: The Silk.NET Automaton <[email protected]>
* New binaries for Assimp on Linux 5.15.0-1034-azure #41-Ubuntu SMP Fri Feb 10 19:59:45 UTC 2023 * New binaries for Assimp on Microsoft Windows 10.0.20348 * New binaries for Assimp on Darwin 21.6.0 Darwin Kernel Version 21.6.0: Mon Dec 19 20:44:01 PST 2022; root:xnu-8020.240.18~2/RELEASE_X86_64 --------- Co-authored-by: The Silk.NET Automaton <[email protected]>
…eb 10 19:59:45 UTC 2023 (#1329) Co-authored-by: The Silk.NET Automaton <[email protected]>
cdfdccf
to
14b8603
Compare
All you need to do is go into the diff --git a/examples/CSharp/Direct3D11 Tutorials/Tutorial 1.2 - Hello quad/Program.cs b/examples/CSharp/Direct3D11 Tutorials/Tutorial 1.2 - Hello quad/Program.cs
index 3ba233a72..4451f27a7 100644
--- a/examples/CSharp/Direct3D11 Tutorials/Tutorial 1.2 - Hello quad/Program.cs
+++ b/examples/CSharp/Direct3D11 Tutorials/Tutorial 1.2 - Hello quad/Program.cs
@@ -113,7 +113,7 @@ window.Dispose();
unsafe void OnLoad()
{
//Whether or not to force use of DXVK on platforms where native DirectX implementations are available
- const bool forceDxvk = false;
+ const bool forceDxvk = true;
dxgi = DXGI.GetApi(window, forceDxvk);
d3d11 = D3D11.GetApi(window, forceDxvk);
diff --git a/examples/CSharp/Direct3D11 Tutorials/Tutorial 1.2 - Hello quad/Tutorial 1.2 - Hello quad.csproj b/examples/CSharp/Direct3D11 Tutorials/Tutorial 1.2 - Hello quad/Tutorial 1.2 - Hello quad.csproj
index eddc35792..dfc1d4d7d 100644
--- a/examples/CSharp/Direct3D11 Tutorials/Tutorial 1.2 - Hello quad/Tutorial 1.2 - Hello quad.csproj
+++ b/examples/CSharp/Direct3D11 Tutorials/Tutorial 1.2 - Hello quad/Tutorial 1.2 - Hello quad.csproj
@@ -16,6 +16,9 @@
<ProjectReference Include="..\..\..\..\src\Microsoft\Silk.NET.Direct3D11\Silk.NET.Direct3D11.csproj" />
<ProjectReference Include="..\..\..\..\src\Microsoft\Silk.NET.DXGI\Silk.NET.DXGI.csproj" />
<ProjectReference Include="..\..\..\..\src\Windowing\Silk.NET.Windowing\Silk.NET.Windowing.csproj" />
+
+ <PackageReference Include="Silk.NET.Vkd3d.Native" Version="2.17.0" />
+ <PackageReference Include="Silk.NET.DXVK.Native" Version="2.17.0" />
</ItemGroup>
</Project>
then when running the d3d11 tutorial, it should use DXVK (you can look at console output, there should be a bunch of stuff printed from DXVK) |
…eb 10 19:59:45 UTC 2023 (#1371) Co-authored-by: The Silk.NET Automaton <[email protected]>
…Feb 10 19:59:45 UTC 2023 (#1370) Co-authored-by: The Silk.NET Automaton <[email protected]>
Summary of the PR
IWindow
so we pick the right native libraries on Linux (there are entirely different versions of the binary for SDL and GLFW)Further Comments
I need to contact the DXVK developers about best practices with packaging DXVK (both Windows and Linux versions), so we dont pull a Manjaro