As per MSDN, SetName is just a wrapper around SetPrivateData and a specific GUID.
Some apps and tools will use this to retrieve their name back.
So instead, just forward the name to Vulkan in the SetPrivateData call.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Previously this would make the user buffer count == 0, which obviously makes apps and assertions not happy.
Fixes a crash in Horizon Zero Dawn when minimized (therefore having a degenerate surface region)
Signed-off-by: Joshua Ashton <joshua@froggi.es>
This can happen on Windows when windows are minimized.
Might not happen in winevulkan, but Vulkan spec outlines this Win32 case
explicitly and it happens on native Windows.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
It is considered a "success", in that fences must be signalled, so make
sure we wait and reset it so we don't risk calling vkAcquireNextImageKHR
later with an already signalled fence.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Only way to implement a D3D12 swapchain.
For now, disable compute paths, we'll introduce it properly after refactor.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
For correctness, we will need to defer any initial resource state
handling to the queue timeline. Here, we will build an UNDEFINED ->
common layout barrier if (and only if):
- The resource is marked to care about initial layout transition.
- We are the first queue thread to observe that initial_transition
member is 1 (atomic exchange).
- The first use of the resource was not marked to be a discard.
E.g., if the first use of the resource is an alias barrier, we must
not emit an early barrier. The only we should do here is to clear the
initial_transition member, and leave it like that.
A command list maintains a list of d3d12_resources which *might* need a
transition. For the first frame a resource is used (or so), it will not
have the flag cleared yet, so multiple command lists might add the
d3d12_resource to its own transition list. This is fine, as the queue
will resolve it.
If multiple queues see the same initial transition, there might be
shenanigans, but the application must ensure there is either a
submission boundary or fence boundary between the uses. Any initial
layout transition will only be submitted after a Wait() is observed, as
submission of the transition command buffer will be in-order with other
submissions.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Use a default format if there is no format specified.
Otherwise, the call fails on both Wine and DXVK DXGIs.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
vkd3d-shader is currently kinda buggy and crashes when you try to trace
DXBC. This used to never be run since it was guarded by
VKD3D_SHADER_DEBUG, but with the move to a static build we merged all
debug logging under VKD3D_DEBUG. Reintroduce different debug channels in
a way that is compatible with a statically linked vkd3d.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
The output here is actually for secure presentation and restricting a swapchain to a certain output.
Correctly handle NULL (desktop) targets that we used to have.
Fixes crashes with titles that use fullscreen via an initial fullscreen desc.
Signed-off-by: Joshua Ashton <joshua@froggi.es>