Repository navigation
loader/shims/tools/tests: ordinal classification, host-binding fix, import inventory, hello_pixels - #2490
loader/shims/tools/tests: ordinal classification, host-binding fix, import inventory, hello_pixels#2490NolanCotter wants to merge 38 commits into
Conversation
|
Tested hello_pixels at 9213603 on RTX 3060 12 GB, NVIDIA 621.14, Vulkan 1.4.357, Windows 11 26H2: pass. Ran python -B -I tools/hello_pixels.py --work --harness <same-commit-vk_harness.exe> --size 512 --run --check. Exit 0. The GPU framebuffer had 262,144/262,144 covered pixels, all seven reference probes passed, and the raw, PPM and PNG outputs were written. The harness was built with llvm-mingw Clang 23.1.6 from the tested commit. AI-assisted verification. |
|
Tested Windows MSVC Build & Runtime Tests
Real Hardware Verification (
|
|
Fixed in Thanks @umnitus (RTX 3060/Windows) and @adriaespii (RX 9070/MSVC + llvmpipe) for the hardware runs — the MSVC clean build and 110/110 CTest covers the uncompiled-locally caveat. |
|
Code review of the loader and inventory parts (AI-assisted), checked at defa3f1, with synthetic PE images and the repo's 1. The host-binding fix is bypassed when the import's DLL name has no
2. 3. The inventory ignores delay-load imports (proved). It reads only data directory 1. The loader binds directory 13 eagerly. An image whose only import is a delay import of 4. The inventory and the loader stop the descriptor table at different points (proved). The loader stops at the first descriptor with The loader binds only the first. An unreadable name is also skipped silently, where the loader throws. 5. The report's "unimplemented thunk" column counts host-bound imports (proved). Every unregistered import goes there, including 6. 7. (reasoned) Ordinal 1 of the host Checked and found correct, for normal
|
|
All addressed in 1. 2. classify parity — 3. Delay imports — directory 13 is now read (IMAGE_DELAYLOAD_DESCRIPTOR, RvaBased/IAT/INT checks matching 4. Table termination — the descriptor loop now stops at 5. Host vs thunk — the report now mirrors the routing order: registered → 6. 7. xaudio2_9 ordinals — Verified: Generated with Devin |
Flyander
left a comment
There was a problem hiding this comment.
Checked at 249b7065ddb4db971e318d195da6eec96a2265ff. The existing test_import_inventory.py suite passes (24 tests), but two synthetic PE/list-input cases expose report mismatches with the loader:
-
Shared lookup-table RVA drops later descriptors. I built a synthetic PE with
gameinput.dllandother.dlldescriptors pointing to the same lookup table containingGameInputCreate.pe_imports()returns only[('gameinput.dll', 'GameInputCreate')]; the second descriptor is omitted becauseseen_tablesskips the RVA before associating its symbols with that descriptor's DLL.Loader::bind_imports()callsbind_thunks(dll, ...)for each descriptor, so it resolves each DLL's IAT separately. This hides a real import association and can produce the wrong per-DLL binding/coverage report. Please cache parsed symbols per lookup RVA, then emit them for each descriptor DLL, while keeping a bound on total work/output. The currenttest_shared_thunk_table_is_walked_onceencodes the incomplete one-DLL result and should assert both associations. -
DLL-name normalization differs from the loader.
parse_import_lines(['GameInput!GameInputCreate'])produces('gameinput', 'GameInputCreate');summarize()reportsother/host, althoughpe_loader.cpp::dll_key('GameInput')resolves togameinput.dll, where this import is registered and classified HRESULT. The PE path likewise only lowercases DLL names. Please apply the loader'sdll_keynormalization to report comparison/classification keys (and add cases for a bare name and a trailing dot).
Add synthetic, hardware-free unit tests for the pure helpers in scripts/run_gpu_tests.py: the DXBC/signature/mesh-PSV0 builders, the fragment passthrough source, check_pixel_const, frame_problem, the LEONIDA_* flag parsers (device probe mocked) and the w64_graphics fixture exclusion.
Hand-written .asm fixtures plus a reference implementation covering the s_cmpk_* immediate-compare family and s_wqm_b32 nibble spread, the integer ALU ops (v_not_b32, v_ashrrev_i32, v_min/max_i32/u32), f32 unary transcendentals, and f16 transcendentals. Expected values were verified against the translator's own interpreter run over the full suite (1694 tests, OK). Assisted-by: Devin
The package-free complement to first_light: hand-written SPIR-V assembly (no GLSL compiler, spirv-as only), a generated VKH_DRAW_MESH quad, RGBA32F readback to PPM and a zlib-only PNG, and a --check oracle (coverage + 7 probe pixels against the pattern's closed form) exercised by tests/test_hello_pixels.py without a GPU. Measured end to end on Mesa llvmpipe 20.1.2 at 512x512. Assisted-by: Devin
pe_loader: resolve() and resolve_forwarder() key the DLL name with dll_key() — lower-case, trailing '.' dropped, ".dll" added when there is no extension — the file-name rule LoadLibrary applies. Without it an import naming "GameInput" or "gameinput.dll." missed the shim and owns_dll lookups while LoadLibraryExA still bound a host namesake. registry: xaudio2_9.dll ordinals 8-10 classify as hresult (host table measured: XAudio2CreateV2_9 / WithVersionInfo / WithSharedContexts); the redist's ordinal table is unconfirmed and stays other. import_inventory: classify parity for the ItsNotRexed#1 ordinals; the delay-import directory (entry 13) is read with the loader's checks; the descriptor table stops at Name == 0 and unreadable names fail like read_string; host-bound imports report as host instead of unimplemented thunk (owns_dll ported); thunk tables deduplicate by RVA under a global cap. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
The SignalX defect is fixed on the branch: 3693ce7 lets a fence at slot 25 carry the newer-layout evidence, exactly your suggested correction (a). The mock's new check_signalx_detection reproduces your lost-signal case plus second-queue inheritance, proven-older slot-25 staying a no-op, and slot 23 forwarding without pinning. Verified again on the clang-cl/xwin cross-build under Wine: xs_proxy_mock_test PASS. |
shdann's run on ItsNotRexed#2490 (Windows 11, MSVC, RTX 4090 + Radeon): two tests that pass on main fail on this head. queue_proxy expected E_NOTIMPL for every queue slot past the public chain. The console contract answers those S_OK instead - frame pacing flows through them - which xs_proxy_mock already requires. The queue loop now expects S_OK, SignalX at slot 23 and PresentX at slot 30 are checked as the modelled methods they are (a fence reaching 9 proves SignalX forwarded; PresentX is handled, not refused), and the fence tail keeps its E_NOTIMPL contract unchanged. d3d12_debug_markers called SetMarker/BeginEvent/EndEvent through the PC interface on what is now a console-shaped list: PC slot 56/57/58 land on console slots that map elsewhere, and the first Close failed. The console ABI has no SetMarker or BeginEvent at all - its one marker slot is EndEvent at console 60 - so the PC calls now go to the real list behind each proxy via list_proxy_real_list; the proxy queue still unwraps the proxies at ExecuteCommandLists.
shdann's source read on ItsNotRexed#2490: queue_layout is read and written in child_slot with no synchronisation, so concurrent Signal/Wait calls on one queue can race the detection write. The shared console_layout on the device is already an atomic; give the per-queue cache the same treatment - every use is a compare or an assignment, which the atomic keeps answering.
|
Both regressions addressed in 8d15567 (on 40d9fed):
Also e6aa341: your source-read observation — queue_layout is now std::atomic like the shared console_layout flag; every use is a compare or an assignment. |
shdann's second case on ItsNotRexed#2490: a title reads the timestamp frequency at start-up, before any fence call has detected the layout. Slot 18 then went to the PC GetDesc - a struct-return write of a whole desc through a caller that passed an 8-byte out pointer - so the frequency came back unset (and the write overran). While the layout is still unknown the call is served as the newer layout's GetTimestampFrequency instead: an 8-byte write stays inside either interpretation's buffer. A queue or device already proven older keeps the generic GetDesc forward; slots 19 and 20 stay no-ops because their newer interpretations write through caller pointers an unmodelled older method might not supply. The mock queue's slot 16 now writes a fixed frequency (unless the argument is a mock object - then it is a newer Signal's fence), and check_signalx_detection covers the undetected query and the post- detection shifted path.
|
Slot 18 fixed in 92848ba. While the layout is still unknown, the call is served as the newer layout's GetTimestampFrequency rather than the older GetDesc — the struct-return desc write is far wider than the 8 bytes a frequency caller passes, so the frequency interpretation is the only answer that cannot overrun its argument. Your probe's expected sequence (calls[16]=1,calls[18]=0 then 2,0) now holds; the mock gained a slot-16 frequency write (skipped when the argument is a mock object — a newer Signal's fence) and check_signalx_detection covers the undetected query plus the post-detection shifted path. On the wider ABI point from your first note: agreed that every post-shift PC method goes to the wrong slot when a caller invokes the PC interface on the console-shaped object — that is the intended shape (only title code, compiled against the console SDK, ever calls these objects). The marker test now speaks to the real list behind the proxy, which is the PC-callable object. |
…ueue tail Review findings from shdann's Windows run of the new console queue/list work: - d3d12_debug_markers (and every GPU harness compiled against the PC headers) drove lists through the console-shaped proxy, so PC slots past 26 — including the PIX markers at 56-58, which have no console counterpart — reached unrelated console methods or were dropped. create_device_proxy gains console_lists: false hands the real (PC-shaped) list back from CreateCommandList. The GPU tests pass false; the title path keeps the console default. - queue_proxy asserted E_NOTIMPL for the queue's console tail, but those slots deliberately answer S_OK now — frame pacing flows through them. The test's contract is updated; the fence tail stays refused. - ChildProxy::queue_layout was a plain unsigned char read and written from many threads; it is atomic like the device-wide detection it caches. xs_proxy_mock_test and loader_test pass under Wine; the modified test objects compile clean under clang-cl. The GPU harnesses need a real adapter — covered by shdann's Windows run. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Both regressions and the race are addressed at head Debug markers — Queue tail — the queue_layout race — Verified on the remote build host (clang-cl 20 + xwin, Wine): |
|
Thanks for the confirmations — and yes, both of these are covered at the current head SignalX — good to have the negative control too (the same test object on Slot 18 before detection — fixed in On the design choice — rather than refuse the ambiguous slot, the shim answers it as the newer layout's The command-list point — right that it is one ABI problem larger than the markers; Verified on the remote host (clang-cl 20 + xwin, Wine): |
The doc already promised the no-SDK path — drop the pair --emit-only produced on another machine into the work directory — but main() called assemble() unconditionally, so a machine without spirv-as exited before the prebuilt files could be used. shaders_into() now reuses an existing pair only when spirv-as is absent; fresh assembly always wins when it is on PATH, so a stale pair cannot shadow the sources. shdann's report on Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Excellent comparison — thank you for running the whole suite (AI-assisted reply). Your hypothesis is right. All six new failures are the one ABI problem: a PC-compiled caller's vtable index past slot 26 reaches a console-shifted slot. All of it is fixed at hello_pixels — real tool bug, not just docs: Expected at |
|
@NolanCotter Two of the fixes work. I checked them on Windows 11, MSVC 14.51:
This head also changes the C++ GPU tests. I will compare the full CTest result with main again (the four regressions in my earlier comment) and report only if the result changes. AI-assisted. |
|
Thanks — glad both hold up on real hardware (AI-assisted). The dual-GPU Standing by for the CTest comparison — the expected result at |
…rebuilt .spv magic Two leftovers from the console-ABI review round: - PC GetDesc shares console slot 18 with the newer layout's GetTimestampFrequency; the proxy deliberately serves the frequency getter while the layout is undetected, so the GLOBAL_REALTIME priority check reads the desc on the real queue instead of trusting an 8-byte frequency written into a desc-shaped out-buffer. - shaders_into() accepted any two files named vs.spv/ps.spv when spirv-as was absent; a stray file would reach vk_harness and fail far from the cause. The prebuilt pair is now checked against the SPIR-V magic first. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
@shdann Thanks — that's a decisive comparison. Resolutions:
AI-assisted. |
|
Offer for this pull request: the list tail slot names of D3D-445. An AI tool helped me to write and to test this change. I do not claim D3D-445, and I do not open a separate pull request. The coordinator marked D3D-445 as "waiting for #2490" (#4257 (comment)). @TreXito also offered to send this change (#4257 (comment)). @TreXito, if you already have a patch, tell us, and @NolanCotter can use the one that is better. @NolanCotter, use this patch, change it, or ignore it. It applies to the head What the change does
Files
Tests Windows 11, MSVC 14.51, Ninja, RelWithDebInfo, NVIDIA GeForce RTX 4090. No game files.
At the head Limits
Patch (git diff against f4e0cf2)diff --git a/runtime/shims/d3d12_xs_device.cpp b/runtime/shims/d3d12_xs_device.cpp
index b5549820..3c3cf672 100644
--- a/runtime/shims/d3d12_xs_device.cpp
+++ b/runtime/shims/d3d12_xs_device.cpp
@@ -1277,14 +1277,47 @@ struct ListStats {
static inline std::atomic<bool> first[kListSlots];
};
-void note_list_slot(unsigned slot, std::uint64_t a1, std::uint64_t a2, std::uint64_t a3, std::uint64_t a4) {
+// The list tail (D3D-445). From CopyTextureRegionX on, the newer console layout sits two slots later than the older
+// one (docs/d3d12_xs_console_abi.md 5.3). The table is keyed by the older-layout slot. Only CopyTextureRegionX has a
+// measured name; the other measured pairs are named by their older slot, so that both layouts print the same text
+// for the same method.
+struct ListTailName {
+ unsigned older_slot;
+ const char* name;
+};
+constexpr ListTailName kListTailNames[] = {
+ {83, "CopyTextureRegionX"}, {84, "tail method, older slot 84"}, {85, "tail method, older slot 85"},
+ {88, "tail method, older slot 88"}, {89, "tail method, older slot 89"}, {90, "tail method, older slot 90"},
+ {93, "tail method, older slot 93"}, {94, "tail method, older slot 94"},
+};
+constexpr unsigned kListTailShift = 2;
+static_assert(kConsoleLayoutOlder == ChildProxy::kQueueLayoutOlder &&
+ kConsoleLayoutNewer == ChildProxy::kQueueLayoutNewer,
+ "the list tail names use the queue proxy's layout values");
+
+// Null while the layout is unknown, and for a slot that is not a measured tail slot of that layout: a slot number
+// never gets the other layout's name.
+const char* list_tail_name(unsigned slot, unsigned char console_layout) {
+ if (console_layout != kConsoleLayoutOlder && console_layout != kConsoleLayoutNewer) return nullptr;
+ const unsigned shift = console_layout == kConsoleLayoutNewer ? kListTailShift : 0;
+ if (slot < shift) return nullptr;
+ for (const ListTailName& entry : kListTailNames)
+ if (entry.older_slot == slot - shift) return entry.name;
+ return nullptr;
+}
+
+void note_list_slot(unsigned slot, std::uint64_t a1, std::uint64_t a2, std::uint64_t a3, std::uint64_t a4,
+ unsigned char console_layout = 0) {
if (slot >= kListSlots) return;
ListStats::hits[slot].fetch_add(1, std::memory_order_relaxed);
bool expected = false;
- if (ListStats::first[slot].compare_exchange_strong(expected, true, std::memory_order_relaxed))
- std::fprintf(stderr, "[rt] d3d12_xs: list slot %u first call (args 0x%llx 0x%llx 0x%llx 0x%llx)\n", slot,
- static_cast<unsigned long long>(a1), static_cast<unsigned long long>(a2),
- static_cast<unsigned long long>(a3), static_cast<unsigned long long>(a4));
+ if (ListStats::first[slot].compare_exchange_strong(expected, true, std::memory_order_relaxed)) {
+ const char* name = list_tail_name(slot, console_layout);
+ std::fprintf(stderr, "[rt] d3d12_xs: list slot %u%s%s%s first call (args 0x%llx 0x%llx 0x%llx 0x%llx)\n", slot,
+ name ? " (" : "", name ? name : "", name ? ")" : "", static_cast<unsigned long long>(a1),
+ static_cast<unsigned long long>(a2), static_cast<unsigned long long>(a3),
+ static_cast<unsigned long long>(a4));
+ }
}
// The interfaces the console list answers: the base chain, ID3D12CommandList and every graphics-command-list
@@ -1373,7 +1406,7 @@ std::uint64_t WINAPI list_slot(ListProxy* self, std::uint64_t a1, std::uint64_t
return hr_to_u64(proxy_query_interface(self->device, reinterpret_cast<const IID*>(a1),
reinterpret_cast<void**>(a2)));
} else {
- note_list_slot(Slot, a1, a2, a3, a4);
+ note_list_slot(Slot, a1, a2, a3, a4, self->device->console_layout.load(std::memory_order_relaxed));
constexpr unsigned pc = console_to_pc_list_slot(Slot);
if constexpr (pc == kListNotForwarded) {
if constexpr (Slot == kConsoleAllocateUpload) {
@@ -2004,6 +2037,9 @@ ID3D12CommandList* list_proxy_real_list(const void* list) {
return static_cast<const ListProxy*>(list)->real;
}
+const char* list_tail_slot_name(unsigned slot, unsigned char console_layout) {
+ return list_tail_name(slot, console_layout);
+}
std::uint64_t list_slot_hits(unsigned slot) {
return slot < kListSlots ? ListStats::hits[slot].load(std::memory_order_relaxed) : 0;
}
diff --git a/runtime/shims/d3d12_xs_device.h b/runtime/shims/d3d12_xs_device.h
index a23ac061..76bbf537 100644
--- a/runtime/shims/d3d12_xs_device.h
+++ b/runtime/shims/d3d12_xs_device.h
@@ -118,6 +118,15 @@ bool is_allocator_proxy(const void* allocator);
bool is_list_proxy(const void* list);
ID3D12CommandList* list_proxy_real_list(const void* list);
std::uint64_t list_slot_hits(unsigned slot);
+// The diagnostic name of a command-list slot on the list tail, where the newer console layout sits two slots later
+// than the older one from CopyTextureRegionX on (docs/d3d12_xs_console_abi.md 5.3: newer->older pairs 85->83,
+// 86->84, 87->85, 90->88, 91->89, 92->90, 95->93, 96->94). `console_layout` is the device-wide layout the queue
+// proxy detects (kConsoleLayoutOlder or kConsoleLayoutNewer). Null when the layout is not known yet or the slot is
+// not a measured tail slot of that layout, so that a slot number is never given the other layout's name. Naming
+// only: no slot is forwarded because of it.
+inline constexpr unsigned char kConsoleLayoutOlder = 1;
+inline constexpr unsigned char kConsoleLayoutNewer = 2;
+const char* list_tail_slot_name(unsigned slot, unsigned char console_layout);
// The wrapped allocator (no reference added), or null when `allocator` is not an allocator proxy.
ID3D12CommandAllocator* allocator_proxy_real_allocator(const void* allocator);
unsigned allocator_proxy_slot_count(const void* allocator);
diff --git a/runtime/test/xs_proxy_mock_test.cpp b/runtime/test/xs_proxy_mock_test.cpp
index f0958452..e99702c8 100644
--- a/runtime/test/xs_proxy_mock_test.cpp
+++ b/runtime/test/xs_proxy_mock_test.cpp
@@ -925,6 +925,43 @@ int run_fault_mode(const char* mode) {
return 2;
}
+// ---- 9. List tail slot names (D3D-445) ---------------------------------------------------------------------
+// From CopyTextureRegionX on, the newer layout sits two slots later than the older one (d3d12_xs_console_abi.md
+// 5.3). A diagnostic name follows the device-wide layout, so slot 85 of the newer layout and slot 83 of the older
+// layout are both CopyTextureRegionX, and neither number gets that name under the other layout.
+
+int check_list_tail_names() {
+ const unsigned char older = xs::kConsoleLayoutOlder, newer = xs::kConsoleLayoutNewer;
+ const auto same = [](const char* a, const char* b) { return a && b && std::strcmp(a, b) == 0; };
+ EXPECT(same(xs::list_tail_slot_name(83, older), "CopyTextureRegionX"));
+ EXPECT(same(xs::list_tail_slot_name(85, newer), "CopyTextureRegionX"));
+ // The same numbers under the other layout are different methods.
+ EXPECT(!xs::list_tail_slot_name(83, newer)); // not a measured slot of the newer layout
+ EXPECT(xs::list_tail_slot_name(85, older) && !same(xs::list_tail_slot_name(85, older), "CopyTextureRegionX"));
+ // Every measured newer->older pair has one name, and the eight names differ.
+ const unsigned pairs[][2] = {{85, 83}, {86, 84}, {87, 85}, {90, 88}, {91, 89}, {92, 90}, {95, 93}, {96, 94}};
+ for (const auto& pair : pairs) {
+ EXPECT(same(xs::list_tail_slot_name(pair[0], newer), xs::list_tail_slot_name(pair[1], older)));
+ for (const auto& other : pairs)
+ EXPECT(pair[1] == other[1] ||
+ !same(xs::list_tail_slot_name(pair[1], older), xs::list_tail_slot_name(other[1], older)));
+ }
+ // Slots outside the measured set have no tail name in either layout, and no slot has one before the layout is
+ // known: the log then prints the slot number only, as before.
+ for (unsigned slot = 0; slot < 160; ++slot) {
+ bool older_tail = false, newer_tail = false;
+ for (const auto& pair : pairs) {
+ newer_tail = newer_tail || slot == pair[0];
+ older_tail = older_tail || slot == pair[1];
+ }
+ EXPECT((xs::list_tail_slot_name(slot, older) != nullptr) == older_tail);
+ EXPECT((xs::list_tail_slot_name(slot, newer) != nullptr) == newer_tail);
+ EXPECT(!xs::list_tail_slot_name(slot, 0));
+ EXPECT(!xs::list_tail_slot_name(slot, 3));
+ }
+ return 0;
+}
+
} // namespace
// A failure ends the process with a message on stderr, never in a dialog a test run would wait on: abort() (an
@@ -946,7 +983,8 @@ int main(int argc, char** argv) {
if (argc == 2) return run_fault_mode(argv[1]);
if (argc != 1) return 2;
if (check_tail(true) || check_levels() || check_fence1() || check_create_failures() || check_open_shared() ||
- check_alloc_failures() || check_allocators() || check_lists() || check_signalx_detection())
+ check_alloc_failures() || check_allocators() || check_lists() || check_signalx_detection() ||
+ check_list_tail_names())
return 1;
std::printf("xs_proxy_mock_test: PASS (%d allocations refused on purpose)\n", g_failed_news);
return 0; |
D3-445, contributed by shdann (tested on Windows 11, MSVC 14.51, RTX 4090; xs_proxy_mock passes, negative control fails as designed). From CopyTextureRegionX on, the newer console layout sits two slots later than the older one (docs/d3d12_xs_console_abi.md 5.3). A table keyed by the older-layout slot gives every measured pair one name, so list slot 85 under the newer layout and 83 under the older both log "CopyTextureRegionX"; the seven unmeasured pairs print "tail method, older slot N". A slot gets no name while the layout is unknown or when it is not a measured slot of that layout, so a number never wears the other layout's name. Naming only - console_to_pc_list_slot and the forwarding are untouched. Co-Authored-By: shdann <28006689+shdann@users.noreply.github.com> Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
@shdann Patch applied as Also noting your Built under clang-cl/xwin and @TreXito — shdann's patch landed first since it arrived complete and tested; if yours covers something it doesn't (names beyond the measured pairs, or layout detection from list calls), happy to take a follow-up. AI-assisted. |
|
Taken — thank you (and noted @TreXito's standing offer; shdann's landed first). The patch is in at Reviewed it on the merits before applying — the eight pairs match docs §5.3 exactly, the subtract-shift-then-lookup approach means a slot number can never wear the other layout's name, and naming-only keeps it zero-risk for the forwarding path. Verified here under Wine on the clang-cl/xwin build: Also confirmed your read on |
|
Tested f4e0cf2 on NVIDIA GeForce RTX 4090 (driver 32.0.16.2101), Windows 11, MSVC 14.51: the full CTest result now has the same status as main
This result is for f4e0cf2. The new commit 9b693ec (names for the tail slots) is not included. AI-assisted. |
|
@shdann Confirmed on our side too — parity with
AI-assisted. |
|
That closes the round — thank you for the thorough verification (AI-assisted reply). Parity confirmed: all four regressions resolve, the present tests return to the known window-manager failures, and the dual-GPU re-run + Python suite are clean. Current head state: every console-ABI change in this PR is now mock-verified and hardware-verified — SignalX detection, slot-18 disambiguation, the PC/console list separation, the S_OK queue tail, and the atomic layout cache. |
|
Windows + GPU check (independent). Hardware: NVIDIA GeForce RTX 5080 + RTX 3070 Ti (driver 621.01) and AMD Radeon 610M iGPU (Ryzen 9 9950X3D, driver 32.0.13018.6). OS: Windows 11. Toolchain: MSVC (VS BuildTools 18) + Ninja, single-config RelWithDebInfo; llvm-mc 21.1.8; SPIRV-Tools (spirv-as/spirv-val). Configured with -DLEONIDA_LLVM_MC and -DLEONIDA_SPIRV_AS/VAL so the shader-fixture GPU tests register. Tested head 9b693ec (base aa2988c, which is 4 commits behind current main 03b09a0; this head does not carry large_module_gate). Build: 252/252 targets, 0 errors/warnings. The author's caveat (pe_loader.cpp / registry.cpp / d3d12_xs_device.cpp are Windows-only C++ not compiled on the Linux author box) is resolved - all of it compiles and links clean on MSVC. Targeted PR tests, --repeat until-fail:3 on the RTX 5080 (12 tests x3 = 36 runs, all pass): loader, unimplemented_policy, queue_proxy, xs_proxy_mock (no_reserve / no_protect / no_handler), d3d12_vulkan_device, d3d12_debug_markers. The three regressions flagged earlier in this thread (d3d12_vulkan_device SEGFAULT, d3d12_debug_markers, queue_proxy) are green x3 here. New Python suites (the PR's added/changed test files): test_import_inventory, test_hello_pixels, test_make_game_shader_state, test_run_gpu_tests_helpers, test_viewer_serve, test_spirv_interface, test_wave64_halves_operands - 218 tests OK, 5 skipped (the end-to-end GPU-draw cases). New semantic fixtures (test_scalar_cmpk_wqm, test_valu_f16_trans, test_valu_f32_unary, test_alu_int_misc): 30 OK. Full runtime suite, ctest -C RelWithDebInfo -j 6, excluding the 4 windowed present tests:
Windowed present tests, run serially --repeat until-fail:3 on each GPU: d3d12_present and xbox_present pass x3 on both the RTX 5080 and the Radeon 610M. (On shdann's box these two hit the known window-manager size failures; they present cleanly here.) hello_pixels.py --run --check (the PR's new package-free pixel tool), 512x512, against the built vk_harness.exe:
Full semantic suite (CPU), python -m unittest discover -s tests/semantic:
Net: the PR's unstable CI state did not reproduce locally on either GPU. The Windows-only loader / shim / D3D12-ABI changes compile clean and the loader / queue / proxy tests are green x3; full-suite parity with main on both GPUs; the new pixel tool passes on NVIDIA and AMD. Synthetic fixtures only, no game files. AI-assisted (opencode); runs on my machine. |
|
Thank you — an impressively thorough pass (AI-assisted reply). Two of your data points settle open questions from this thread:
The cross-vendor Between your run and shdann's, every console-ABI change in this PR is now hardware-verified on three NVIDIA cards and two AMD iGPUs, at CTest parity with main. |
|
@2-CD Thank you — that's thorough coverage. The 252-target MSVC build clears the Linux-author caveat, the x3 repeats on both vendors settle the earlier regressions, and the present tests passing on your box confirms the window-manager explanation for shdann's failures rather than a code issue. The identical semantic failure set vs Good data point on the Radeon 610M feature set too (barycentric + interlock but no shader_fma/maintenance8) — the cross-vendor paths in AI-assisted. |
|
Tested 9b693ec on Windows 11 (MSVC BuildTools 2022, Ninja, RelWithDebInfo, -j 4; no Vulkan validation layer installed), one GPU at a time, device line confirmed: AMD Radeon RDNA2 iGPU (driver 26.10.1) and NVIDIA RTX 5080 (driver 616.92). Full MSVC build of this head, then the whole AI-assisted. |
|
Thank you — third independent green at The RDNA2 result carries extra weight for this PR specifically: the console's GPU is RDNA2, so a 153/153 on a desktop RDNA2 part means the descriptor encoding, barrier paths, and subgroup handling the console-ABI layer feeds into are verified on the target's own ISA family — not just on NVIDIA and newer-AMD hardware. That puts the current head at three independent testers, five GPUs (RTX 4090, RTX 5080, RTX 3070 Ti, Radeon 610M, Radeon RDNA2 iGPU), all at parity with main. |
|
@Vonsek Thanks — 153/153 on both the RDNA2 iGPU and the 5080 at AI-assisted. |
Summary
Follow-up batch after #1912 (claim: #1902 (comment)). 12 commits, all new files or small self-contained changes; no game data.
Runtime / loader
runtime/shims/registry.cpp: console ordinal-import classification —xaudio2_9.dll!#1(XAudio2Create) andgameinput.dll!#1(GameInputCreate) classify as HRESULT so unimplemented imports reportE_NOTIMPLinstead of faking success (+unimplemented_policy_testchecks)runtime/src/pe_loader.cpp: fix — unregistered imports on shim-owned DLLs (xgameruntime,gameinput, ...) could bind to the host namesake (the live PC Gaming Services runtime). They now follow the pseudo-handle path and go unimplemented. +docs/import_routing.md(bind order,owns_dll, per-DLL outcome)Docs
docs/console_libraries.md: catalogue of the console-DLL surface (d3d12_xs,xg_xs,AcpHal,dstorage_xs,chad/xapu/xcrdapi, ...) and per-module shim statusdocs/hello_pixels.md+ index rows@NolanCottermaintainer)Tools
tools/import_inventory.py: stdlib PE32+ import parser — mapsdll!function/ ordinal imports to shim-layer coverage per module (mirrorsregistry.cppclassification); 18 teststools/hello_pixels.py: package-free complement to first_light — assembles hand-written SPIR-V (spirv-as only), draws a generated quad throughVKH_DRAW_MESH, writes PPM+PNG,--checkoracle verifies coverage + probe pixels against the pattern's closed formTests (~1,400 lines):
test_hello_pixels,test_import_inventory,test_run_gpu_tests_helpers,test_make_game_shader_state,test_viewer_serveadditions,test_spirv_interface,test_wave64_halves_operands, and semantic fixtures fors_cmpk_*/s_wqm_b32/ ALU / f16-transcendental ops.Tested
python -m compileall -q make_game.py tools tests✅test_hello_pixels9 ✅ ·test_import_inventory18 ✅ ·test_run_gpu_tests_helpers25 ✅ ·test_make_game_shader_state40 ✅ ·test_viewer_serve38 ✅ ·test_spirv_interface28 ✅ ·test_wave64_halves_operands23 ✅python -m unittest discover -s tests/semantic— 1,694 tests OK (incl. new fixtures; expected values verified against the translator's own interpreter)hello_pixelsend-to-end: Mesa llvmpipe (LLVM 20.1.2), Vulkan 1.3.275, Linux — 512×512 draw, 100% coverage, all probes passtest_i18n_index,test_docs_links✅Caveat: the
registry.cpp/pe_loader.cppchanges are Windows-only C++ and were not compiled locally (Linux box) — same situation as the #1912 classifier change that adriaespii verified on MSVC. CI or a Windows check appreciated.AI assistance
Written with AI assistance (Devin + delegated workers); all test expectations verified by execution, not hand-trust.
Checklist