Preserve physical window aliases across remaps, order console list values,
and replay bounded indirect graphics with captured draw state. Coordinate
pipeline lifetime, texture refresh and queue teardown. Add synthetic CPU
and GPU coverage for the integrated paths.
Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com>
Co-authored-by: ivanepsilondelta <264061546+ivanepsilondelta@users.noreply.github.com>
@pwu2775-dev found on #2533 that the tests' WKPDID_D3DDebugObjectNameW was
mistyped ({4cca5fd8-921f-42c8-8599-d2866a3e5f7e}, the layer's old constant)
instead of d3dcommon.h's {4cca5fd8-921f-42c8-8566-70caf2a9b741}. Measured with
the right key, the host runtime does what D3D12 documents: SetName is
SetPrivateData with that key and the name with its terminator, GetPrivateData
reads it back (an empty name is a 2-byte entry), and the narrow key is not
touched. SetName(nullptr) faults in the host and leaves the name as it was.
So the name goes back into the private data, now under the right GUID, and the
separate name_ / debug_name() are gone. SetName(nullptr) answers E_INVALIDARG
and changes nothing. d3d12_private_data_test: 667 steps compared, 0 mismatches
(RTX 3060, driver 610.88); d3d12_debug_markers_test checks the name again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d3d12_private_data_test runs the same 672 GetPrivateData / SetPrivateData /
SetPrivateDataInterface / SetName steps on the device, a fence, a buffer, a
command allocator and a descriptor heap of the Vulkan-backed device and of the
host runtime, and compares every HRESULT, returned size, byte and reference
count. On main 130 of them differed (RTX 3060, driver 610.88), the same four
rules on every object:
- SetPrivateData with null data removes the entry whatever the size: S_OK
when there was one, S_FALSE when there wasn't. The layer answered
E_INVALIDARG for a nonzero size and kept the entry, and S_OK for a missing
one.
- Zero bytes with data keep an empty entry (size 0); the layer removed it.
- SetPrivateDataInterface(null) releases the interface and keeps a
pointer-sized entry that reads back as null; the layer removed it.
- SetName is not readable through GetPrivateData: the host sets neither
WKPDID_D3DDebugObjectNameW nor the narrow key. The layer stored the name
there; it now keeps it apart (debug_name()).
SetName(nullptr) faults in the host runtime; the layer still clears the name,
and the test reports those 5 steps as not compared.
d3d12_debug_markers_test's private-data checks expected the old answers and
now expect the host's.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A buffer too small for an entry now gets the size to retry with, for byte
and interface entries alike, as vkd3d-proton's private store does. The
test retries with the returned size for both kinds. Review on #419.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SetMarker/BeginEvent/EndEvent on command lists are recorded in the IR
(DebugMarker) and replayed as vkCmd*DebugUtilsLabelEXT; on queues they
call vkQueue*DebugUtilsLabelEXT under the submit lock. Labels are used
only when the instance enabled VK_EXT_debug_utils
(VulkanDeviceInfo::debug_utils; the standalone device enables it when
the loader lists it); otherwise the calls are no-ops. Events may span
the lists of one ExecuteCommandLists; an unmatched end is dropped and
labels left open are ended before the command buffer ends, so Vulkan's
begin/end rule always holds. Metadata 0/1 strings become UTF-8 labels;
a PIX3 blob (2) gets a fixed label (open question 21).
SetPrivateDataInterface holds a reference until replaced, removed or
the object dies, and GetPrivateData hands it back AddRef'd. SetName
stores WKPDID_D3DDebugObjectNameW. Both live in the shared Object base,
so every object of the Vulkan device has them.
d3d12_debug_markers_test checks the exact label calls through a
recording vkGetInstanceProcAddr, the no-extension path, and private
data on the device, queue, allocator, list, heap, resource and fence.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- d3d12_vulkan_device.cpp: an ID3D12Device11 (PC ABI) the device proxy
forwards to. Creates queues, allocators, command lists (incl.
CreateCommandList1), fences, descriptor heaps (32-byte slots; RTV/DSV hold
TargetViews), render-target and depth-stencil views, committed buffers
(upload/readback mapped and zeroed) and 2D textures in the common formats,
and answers feature-level and architecture queries. Everything else is a
generated stub that logs once.
- First use of a new texture zero-fills it and moves it to the layout the
command expects (vulkan_replay.h initialize), as D3D12 committed resources
start zeroed; no submission at creation. CREATE_NOT_ZEROED skips the fill.
- Children hold the proxy, so GetDevice returns the Xbox-ABI object; COM base
classes moved to d3d12_com_object.h. D3D12 queues share one VkQueue behind a
submit lock.
- D3D12XboxCreateDevice: LEONIDA_D3D12=vulkan creates the Vulkan device on its
own instance and wraps it in the same proxy (gta6rt built with the Vulkan
SDK and Python 3); the host PC device stays the default.
Tests: d3d12_vulkan_device_test calls everything through the proxy (heaps via
slot 14 with RAX start handles, a render target via slot 76 with the Xbox
layout word) and reads colour, depth, stencil and a never-written texture
back; it also runs the standalone device. Clean under the Khronos validation
layer with the other GPU tests; all 6 ctest tests pass.