mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:40:52 +01:00
[PR #216] Select the slot 14 descriptor layout when creating the device proxy #268
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#268
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/216
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:old-pr/9951📝 Commits (1)
85d1e80Select the console descriptor heap layout per device proxy📊 Changes
7 files changed (+96 additions, -91 deletions)
View changed files
📝
runtime/shims/d3d12_vulkan_device.cpp(+7 -14)📝
runtime/shims/d3d12_xs.cpp(+1 -1)📝
runtime/shims/d3d12_xs_device.cpp(+13 -18)📝
runtime/shims/d3d12_xs_device.h(+14 -1)📝
runtime/test/d3d12_console_descriptor_heap_test.cpp(+49 -47)📝
runtime/test/d3d12_translated_draw_test.cpp(+7 -6)📝
runtime/test/fixtures/tiny_frame.cpp(+5 -4)📄 Description
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):Claimed in the coordination issue as the Windows slot 14 build fix.
Depends on:
#9809,#9857,#9873(overlap in the slot 14 implementation). This branch builds the D3D12 targets independently. The full-runtime integration check below also uses the audio-only commit from#9809.What and why
The Xbox and PC versions of device slot 14 share a 16-byte descriptor prefix. The Xbox version also supplies a heap address and size. Reading those words on a PC call can turn adjacent stack data into an apparently valid heap address. This affected the existing descriptor, present and half-float tests. Measured Xbox layout · Windows runtime report
Select the layout when constructing each proxy. The Xbox Vulkan entry point supplies the console allocator. PC-layout proxies call the underlying device with the ordinary descriptor. Both heap paths now share the Vulkan device's allocation and COM ownership logic, and the standalone proxy can link without the Vulkan library.
The regression test passes identical bytes, including a plausible address and size, to both kinds of proxy. Only the Xbox proxy returns that address from heap slots 9 and 10. It also checks that an Xbox descriptor with a zero address gets ordinary storage. The two synthetic Xbox callers now pass the measured layout.
Tested
RelWithDebInfo, GeForce RTX 4080, NVIDIA driver 621.01. Reproduced the original MSVC errors on2d53a8055, then built the D3D12 COM library, standalone proxy targets and guest fixtures. All 16 focused CTests passed, includingd3d12_console_descriptor_heap,d3d12_descriptor,d3d12_translated_draw, both present paths and the standalone mocks.8403c4c2bfrom#9809applied on top. On the PR alone two existingacphal.cppsize assertions block that build. The default CTest run gave 256 passes, 12 skips, one disabled and five failures. All five also failed in a control build of2d53a8055with the upstream slot 14 change (3630610ca) reverted:root_sig,d3d12_com,d3d12_vulkan_device,d3d12_execute_indirect_validationandd3d12_depth_resolve.LEONIDA_TEST_GUEST_DRAWseparately and ran the synthetic guests throughgta6rt --run. Bothrun_tiny_framecases passed the clear/readback check.d3d12_translated_draw_guestpassed its pixel comparison.test_exec_computedandtest_image_atomics_guard, failed when rerun on the clean base.AI-assisted: yes, with OpenAI Codex.
Checklist
scripts/check_no_game_data.pypassed on them.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.