The helpers read a vtable pointer (8 bytes) from the object they are given;
the fixture was a 4-byte int, so they read past it. Found in review.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
create_device_proxy returns the proxy's DXGI pointer when the title asks for
IDXGIDevice1. D3D12XboxCreateDevice passed that pointer to set_device_outer,
so the Vulkan device's outer identity was the DXGI pointer, and
set_device_adapter_provider, which knew only the primary vtable, set nothing:
GetAdapter then loaded the host's dxgi.dll and returned a host adapter.
set_device_outer resolves the proxy first (device_proxy_primary), and
set_device_adapter_provider takes either pointer, returns whether it set the
provider and says so on stderr when it did not.
dxgi_device_test creates the device as IDXGIDevice1 on WARP, a hardware
adapter and the Vulkan device. Found by @kacper-serewis in review.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A GDKX title asks its device for IDXGIDevice1, then GetAdapter and
EnumOutputs(0), to find the output it gives SetFrameIntervalX. The proxy
refused the QueryInterface, and a PC ID3D12Device has no IDXGIDevice to
forward to.
The proxy now answers IDXGIObject, IDXGIDevice and IDXGIDevice1 as one COM
object with the device (a second vtable pointer in the proxy, same reference
count and QueryInterface). GetAdapter and GetParent return the adapter of the
device behind it: the host DXGI adapter with the device's LUID on the host
backend, the layer's own rt::dxgi adapter on the Vulkan device
(set_device_outer installs that provider).
dxgi_device_test walks it on WARP, the first hardware adapter and the Vulkan
device.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>