Use DXGI to create Vulkan swap chain?

623 views
Skip to first unread message

Mark Sibly

unread,
Apr 15, 2024, 9:49:08 PMApr 15
to Dawn Graphics
Hi,

When using Vulkan in fullscreen mood with the FIFO present mode, the display is vsynced nicely but on my machine there is a user input lag of about half a second which makes it kind of unusable for games. This actually seems to have been a common complaint about Vulkan for several years now.

However, I was messing around with the nvidia control panel today and found a magic setting that seems to fix the problem. The "Vulkan/OpenGL present method" setting defaults to "auto", but if I change it to "prefer layered on DXGISwapchain" it completely fixes the input lag problem! The other available option is "Prefer native".

But you can't expect users to know to change this setting, so it would be nice for my app to be able to 'force' this on. A bit of googling and I found this:

https://github.com/godotengine/godot-proposals/issues/5692

This makes it sound like it's possible, but it sounds like it's something that would need to be done inside Dawn, am I correct?

Of course, it's be nice if the Dawn team could do this for me! But I understand fullscreen gaming is probably not a dawn priority right now, so I just thought I'd ask if it sounds like the idea is at least feasible and, if so, roughly what would be involved. 

I really don't know much about DXGI stuff so don't have a clue how to even begin, could it even be done in GLFW (which I'm using) somehow? I'm guessing not, but who knows?!

Bye!
Mark

Corentin Wallez

unread,
Apr 23, 2024, 7:55:39 AMApr 23
to Mark Sibly, Dawn Graphics
Hey Mark,

It seems that there is missing frame pacing in Fifo mode from what you are describing. Please keep in mind that on WIndows, the MUCH preferred backend to use is D3D12 as the API is the one officially supported on Windows. Created an issue to add tests for the frame pacing.

Looking at the link you send, it seems that there are investigations to use DXGI swapchains with Vulkan, but they are far from complete. Since D3D12 is preferred on Windows anyway, and using DXGI with Vulkan is unproven, I don't think we should add that capability to Dawn.

Cheers,

Corentin

--
You received this message because you are subscribed to the Google Groups "Dawn Graphics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dawn-graphic...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dawn-graphics/16e0573b-c29b-4105-b36d-f23f07327f49n%40googlegroups.com.

Mark Sibly

unread,
Apr 23, 2024, 5:01:58 PMApr 23
to Corentin Wallez, Dawn Graphics
> I don't think we should add that capability to Dawn.

No problem, I thought it might be a known technique or something I could try but it sounds like a major hassle.

Reply all
Reply to author
Forward
0 new messages