Skip to content

test: accept all valid Windows MMDevice endpoint ID formats in audio test - #25

Merged
ivall merged 1 commit into
xcl-dev:mainfrom
Lum7nt:fix/audio-endpoint-test-format
Nov 21, 2026
Merged

ivall merged 1 commit into
xcl-dev:mainfrom
Lum7nt:fix/audio-endpoint-test-format

Conversation

@Lum7nt

@Lum7nt Lum7nt commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The unit test default_audio_endpoint_is_windows_default previously asserted that render endpoint IDs start strictly with {0.0.0..

On Windows systems with Bluetooth audio devices, USB headsets, or virtual sound endpoints, Windows MMDevice IDs can have prefixes like {3.0.0.00000002}.{GUID}, causing the test to fail despite returning a valid endpoint ID.

This PR updates the assertion to verify that a well-formed MMDevice ID ({...}.{...}) is returned, allowing all 151 unit tests to pass cleanly on all Windows configurations.

@ivall

ivall commented Nov 21, 2026

Copy link
Copy Markdown
Collaborator

Reviewed and merged, thanks – the endpoint id check now accepts any MMDevice id. Checked together with #21, #22 and #25 on top of current main: full workspace tests pass (277 lib tests, e2e, console_dlls_e2e, gpu_pso_e2e, rpf_e2e), no new build warnings.

@ivall
ivall merged commit 13e2af9 into xcl-dev:main Nov 21, 2026
ivall added a commit that referenced this pull request Nov 22, 2026
…ist layouts

Unicorn Overlord runs on a newer console D3D12 runtime from its own game OS.
It reports the same SDK version (0x20004) as XDefiant and Minecraft, but some
vtables are laid out differently:

- Command queue: there are two more methods before Signal. Signal is at #16,
  Wait #17, GetTimestampFrequency #18, SignalX #25 and PresentX #32. The
  title's Signal used to land on GetTimestampFrequency, which wrote 100 MHz
  over the fence's vtable, and the game crashed. queue_dispatch now handles
  the title's queue slots from #14. A fence passed to #16 or #17 marks the
  newer layout; the older layout never passes one there.
- Command list: the console methods from CopyTextureRegionX onward sit two
  slots later (#85 instead of #83). The texture uploads used to hit
  SetPredicationBufferX, so every texture stayed zero and the screen showed
  only shapes and gradients. guard::make_layout_split now picks the method
  at each call and leaves the argument registers, xmm ones included,
  untouched.

Also:
- Console-only resource state bits (0x100000 on the 4K display target) are
  masked off when a resource is created. The PC refused the resource and
  the title threw.
- The title commits 2046 of 2048 MB of unified memory at start. XCL's
  per-draw arena now has its own 64 MB pool at the end of window 0, so
  draws are no longer skipped.
- FENCES is a read-write lock. end_title reads it while the title's threads
  are suspended, so a suspended reader no longer blocks it.

Diagnostics:
- XCL_WATCH=rva sets a write watchpoint in the exe; the calling thread is
  armed at once.
- XCL_WATCH_FENCE=n watches the n-th fence.
- The log now shows the device's SDK version, console-only interface
  requests, the title's file opens with their flags, DirectStorage
  requests, unified-memory use, and (in traces) whether title textures hold
  data in memory.

README: Unicorn Overlord is listed as fully playable. Bink's GPU-assisted
mode is no longer listed as missing: it needs no Bink-specific support.
Hull, domain and amplification shaders are dropped from the list too, since
none of the games use them.
theaustinayers pushed a commit that referenced this pull request Nov 24, 2026
…nment

GetResourceAllocationInfo (#25) and GetResourceAllocationInfo2 (#108)
laid several resources out one after another, each at its own
alignment, but returned the end of the last one as the size. The PC's
docs for GetResourceAllocationInfo with several descriptions: "the C++
algorithm for calculating a structure size and alignment are used" - a
4 MiB-aligned resource between two 64 KiB-aligned ones takes 12 MiB,
first or last 8 MiB, the alignment 4 MiB. XCL answered 8 MiB + 64 KiB
and 4 MiB + 128 KiB: a title sizing one heap for the group from it got
a heap that does not end on the alignment its resources need.

The arithmetic of both is now one function, `allocation_of`, which pads
the total to the largest alignment when there is more than one
resource. One resource's info is still the driver's or XG's as it is
(#108 asks #25 for each one alone); the per-resource offsets #108
writes are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
CalvyPZ pushed a commit to CalvyPZ/xcl that referenced this pull request Nov 24, 2026
Add standalone host-driver parity and contract tests for D3D12.X's
memory-layout and copy-footprint query hooks (Part of xcl-dev#480):
GetResourceAllocationInfo (xcl-dev#25), GetResourceAllocationInfo2 (console
xcl-dev#108 vs PC ID3D12Device8 xcl-dev#68), GetCustomHeapProperties (xcl-dev#26), and
GetCopyableFootprints (xcl-dev#38).

No runtime files outside crates/xcl/tests/ are modified. Full suite
(.\scripts\test.ps1) passed 895 passed, 0 failed, 42 ignored (1 GPU
test skipped: heap_window_out_of_memory_falls_back_to_the_switch_form).

Part of xcl-dev#480
Assisted-by: Antigravity
theaustinayers added a commit to theaustinayers/xcl that referenced this pull request Nov 25, 2026
… it with

Review of d4624b7: the PC heap behind a shader-visible console sampler heap
now holds 2 048 samplers, and descriptor heap xcl-dev#8 GetDesc was not hooked, so a
title asking its 128-slot sampler heap for its description read 2 048. A title
that sizes an allocator or a loop from that count makes samplers or copies at
console handles past its 128 16-byte slots: console_heap::slot finds none
there, dev_create_sampler_x hands the handle to the PC CreateSampler as it is,
and the driver writes a sampler descriptor at that address in the title's
memory. A view heap already read twice its slots, and one whose views are in
the shared heap read no shader-visible flag. Whether the retail title calls
GetDesc on these heaps was not checked (no trace taken).

Device xcl-dev#14 now keeps the description each console CBV/SRV/UAV and sampler heap
was made with (the title's type, 4 included, count, flags and node mask) until
the heap's last Release, and xcl-dev#8 answers it to calls from the title's images,
returned through the hidden pointer called the C++ way or the C way
(this_first, as device xcl-dev#25 / xcl-dev#26). Other heaps, and every call from XCL itself
(the split slot: list_x::pc_heaps reads the PC flags), get the PC
description as before.

New test a_console_heap_describes_itself_as_the_title_made_it, on a WARP device
adopted as a title's: a shader-visible sampler heap of 128 made through device
xcl-dev#14 answers [1, 128, 1, 0] both ways while XCL's own GetDesc says 2 048; a view
heap answers the PC description until it is known as a console heap of type 4
and 64 slots, then that; both are forgotten when released; xcl-dev#8 is in the
descriptor heap's console slots. Checked that it fails with the hook answering
the PC description ("the sampler heap": [1, 2048, 1, 1]). The view heap's
recording at creation is not covered (making a view heap through xcl-dev#14 makes the
process-wide shared heap).

Tested on the software adapter only (WARP). Not run on the hardware GPU or on a
title.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants