mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:30:53 +01:00
[PR #1470] d3d12_xs: console device slot 74 registers a page pool and writes its handle (RT-SLOT74-POOL-HANDLE) #1502
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1502
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1470
Author: @QemmHD
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:claude/slot74-pool-handle📝 Commits (1)
fbc96fed3d12_xs: console device slot 74 registers a page pool and writes its handle (RT-SLOT74-POOL-HANDLE)📊 Changes
4 files changed (+102 additions, -19 deletions)
View changed files
📝
docs/d3d12_vulkan.md(+1 -1)📝
runtime/shims/d3d12_xs_device.cpp(+63 -6)📝
runtime/shims/d3d12_xs_device.h(+8 -2)📝
runtime/test/xs_proxy_mock_test.cpp(+30 -10)📄 Description
Claimed in the coordination issue as: RT-SLOT74-POOL-HANDLE (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7148763283)
What and why
Console device slot 74 is called with
(pointer, u32, pointer). Since #385,proxy_slot74logs the call and returnsS_OKwithout writing anything, so the title keeps whatever was in its handle variable. VIctory reads the method asRegisterPagePool(address, page count, handle out): it refuses a null out pointer, a zero page count or a base that isn't 64 KiB aligned withE_INVALIDARG, and otherwise records the pool and writes a handle (Marvisak/VIctory, GPL-3,crates/victory-gpu/src/device.rs,register_page_pool). This PR does the same, written anew for this repository:VirtualQuery), since writing there would fault.{address, pages}in a mutex-guarded registry and writes a 64-bit handle from a counter that starts at 1, so a handle is never 0 and never reused.console_page_pool(handle, &addr, &pages)reads a record back for later users.ID3D12Device9::ShaderCacheControl.UnregisterPagePool. Leonida still sends every slot 75 call to the PCCreateCommandQueue1. That's noted as a TODO and indocs/d3d12_vulkan.md.Whether the title reads the handle later hasn't been measured. This just stops it from holding an unset value.
Tested
Windows 11, RTX 4070 SUPER (NVIDIA 621.24), VS 2022 Build Tools + Ninja, RelWithDebInfo, on main
b4b7756e8.xs_proxy_mock_test:check_slot74covers two calls giving distinct handles with the right records; the fiveE_INVALIDARGcases (nothing written, no handle used); and host forwarding at levels 9 and 0. It passes both plain and withLEONIDA_VK_VALIDATION=1.d3d12_depth_resolve.git merge-tree: clean against main, #1387, #1390 and #1328. #968 and #984 already conflict with main elsewhere, and this adds no new conflict with #968's slot 31 code.E_INVALIDARG. VIctory refuses the same case and reaches the world, which suggests the title passes valid arguments.GPUs tested: NVIDIA GeForce RTX 4070 SUPER, driver 621.24, Windows 11
AI-assisted: yes
Checklist
mainand merges cleanly.docs/design.md, with how it was confirmed. (n/a: no translator change)AI-assisted (Claude Code, Claude Opus 5.5).
🤖 Generated with Claude Code
https://claude.ai/code/session_01SR1Fv7eQNgZjM6miWPKjHf
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.