-
Notifications
You must be signed in to change notification settings - Fork 878
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
Add None WSI #3365
base: master
Are you sure you want to change the base?
Add None WSI #3365
Conversation
I couldn't find any tests or builds for the non-windows wsi. Do these exist somewhere I've not checked? |
idk, #define DXVK_WSI_NONE 1
#include <d3d11.h>
#include <cstdio>
int main(int argc, char** argv) {
ID3D11Device* device;
ID3D11DeviceContext* ctx;
D3D_FEATURE_LEVEL level = D3D_FEATURE_LEVEL_11_1;
D3D_FEATURE_LEVEL level2 = D3D_FEATURE_LEVEL_11_1;
HRESULT hr = D3D11CreateDevice(nullptr, D3D_DRIVER_TYPE_HARDWARE, nullptr, 0, &level, 1, D3D11_SDK_VERSION, &device, &level2, &ctx);
if (FAILED(hr)) {
printf("ko\n");
return 1;
}
// TODO: do something
// ...
ctx->Flush();
printf("done\n");
return 0;
} Run Output
|
@pchome sure, writing such a test isn't hard, but there doesn't seem to be any infrastructure from which to call the test. |
I did have some tests at one point -- but currently unmerged. I think they are in the |
in that case, if there aren't tests for the less-trivial glfw and sdl2 paths in main, perhaps it's ok to defer tests here? |
Yeah sure. Should probably hook up headless surface though. |
ok, I've put a call to |
190a574
to
a4a6cbe
Compare
@Joshua-Ashton is this good to merge? |
FWIW in terms of "testing", I've been using this since april without issue. |
@expipiplus1, do you have time to review the conversation in #3451 to see how this MR would best fit into an "official" WSI system for dxvk? Once we have a working system it should be easy to include a None implementation as part of that work. |
@flibitijibibo It looks as though it would fit in with the API @Joshua-Ashton proposed there. As long as nothing requires getting a window or monitor then it's all fine. I would be keen to get this merged, and can commit to porting it to the |
That makes sense to me - the absolute earliest I'll be able to look at DxvkWsi is December (if that; SDL_ActionSet work starts January so it's a tiny window), so this should probably go in first so that the implementer knows for sure that all backends still work correctly. |
The dynamic WSI patch series can now be found at #3738. Definitely give this a try whenever you have time; it's mostly the same at the backend level but with a C++ interface to allow for multiple simultaneous implementations in the official binary. |
This got stepped on by #3738, but the good news is that this should now be possible to support in the same binary as SDL/GLFW. |
This, of course, is unable to create windows.
TODO:
createSurface
succeeding first)