Commit Graph

3 Commits

Author SHA1 Message Date
3d48c4adb0 dxgi_device_test: the not-a-proxy fixture is pointer-sized
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>
2026-11-22 21:22:18 +00:00
974da138db d3d12_xs: a device created as IDXGIDevice1 keeps the proxy as its identity and the layer's adapter
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>
2026-11-22 21:09:31 +00:00
1b3a0d80f3 d3d12_xs: the device proxy answers IDXGIDevice1 (GetAdapter), step 3 of the GDKX boot sequence
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>
2026-11-22 20:35:26 +00:00