Comments (7)
At one point I thought about making it accessible via the DXGIFactory since we need to know which WSI to use the moment anything DXGI gets touched, but it's worth noting that a dxvk-native application must set the variable on startup, so if the application and its launcher both use it they're required to specify the WSI as if they were the base process (we treat "no value found" as a hard error to avoid apps depending on any kind of default value), so that would avoid the conflict in this particular example.
A real export wouldn't be so bad though, an example could be tried with this line in FNA3D: https://github.com/FNA-XNA/FNA3D/blob/master/src/FNA3D_Driver_D3D11.c#L5198
from dxvk.
Introducing an entry point for this sounds good, definitely cleaner than the env var we currently have.
from dxvk.
I'd be okay with something like extern "C" int dxvkSetWSI(const char*);
in libdxgi; as long as it's easy to dlsym it shouldn't be too hard to add to existing D3D backends!
from dxvk.
I'd be okay with something like
extern "C" int dxvkSetWSI(const char*);
in libdxgi; as long as it's easy to dlsym it shouldn't be too hard to add to existing D3D backends!
That sounds great to me, but I don't know the D3D/DXGI architecture well enough to know where best to put the global variable that would be set by this function, such that there would only be one copy of it per process and it would be accessible to everything that needs to know which WSI is the active one. (The obvious candidates seem to be static libraries that I think get linked more than once, making them unsuitable for that purpose.)
from dxvk.
That's a good question; I believe WSI instances occur in both DXGI and D3D9/8 devices; the part that's tough is that the very first API call for each library will want WSI immediately so it's tough to add it to existing interfaces... @Joshua-Ashton, any ideas for D3D9 in particular?
from dxvk.
Is there a "bottom-level" library that all of the others call into (is that DXGI?), like the way everything in the GTK ecosystem depends on GLib? If there is, then it could have an extern "C" int dxvkSetWSI(const char*)
and a matching extern "C" const char *dxvkGetWSI(void)
.
But if there's no obvious bottom-level library then it might have to be more like dxvkDXGISetWSI
, dxvkD3D9SetWSI
, dxvkD3D8SetWSI
.
from dxvk.
The latter route is probably the way to go - the bottomest(?) library is libdxvk for DxvkInstance but that's statically linked, so entries for each lib is probably all we can do.
from dxvk.
Related Issues (20)
- [d3d8] Ballance black screen HOT 5
- How do I use dxvk-native on Linux? HOT 4
- ninja: build stopped: subcommand failed - 'remove_if' is not a member of 'std' HOT 4
- Spider-Man Shattered Dimensions: light cutoff and flickering HOT 7
- Moonshot Feature Request: Generic AFMF HOT 4
- Mafia: The City of Lost Heaven on DXVK 2.4 = Crash HOT 5
- [d3d9] GTA: Vice City 1.0 crashes after intro video HOT 15
- Documentation: 32 bit and 64 bit mixed? HOT 1
- [d3d9] Might and Magic Heroes VI: vsync switch not working HOT 7
- Do all depth-stencil images need `VK_IMAGE_USAGE_SAMPLED_BIT` set by default? HOT 3
- About the implementation of D3D10.dll HOT 7
- [d3d9] I.G.I 2: Covert Strike doesn't boot HOT 14
- Rainbow Six 3 - broken Planing Phase. HOT 8
- Dishonored 2 - LOD Texture issue HOT 18
- Add Direct3D 7 support HOT 3
- [Regression] [d3d9] [Crash] Medieval 2. The mouse pointer disappears from the screen and the game crashes when loading without any error. HOT 13
- [d3d9, regression] Source Filmmaker freeze
- D3D11SwapChain: Failed to recreate surface: VK_ERROR_OUT_OF_HOST_MEMORY
- Anno 2070 not responding d3d11 HOT 4
- DXVK not working on M2 Pro HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dxvk.