mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:15:51 +01:00
[PR #2049] runtime: add layout helpers and unit test suite for Xbox resource desc cleaning (RT-XS-DESC-CLEAN-COVERAGE) #2055
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#2055
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/2049
Author: @abnalstlll-byte
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:feat/rt-xs-desc-clean-coverage📝 Commits (1)
853c9acruntime: add layout helpers and unit test suite for Xbox resource desc cleaning (RT-XS-DESC-CLEAN-COVERAGE)📊 Changes
3 files changed (+214 additions, -0 deletions)
View changed files
📝
runtime/CMakeLists.txt(+8 -0)📝
runtime/shims/d3d12_xs_desc_clean.h(+8 -0)➕
runtime/test/d3d12_xs_desc_clean_test.cpp(+198 -0)📄 Description
Claimed in the coordination issue as: RT-XS-DESC-CLEAN-COVERAGE (claim)
What and why
runtime/shims/d3d12_xs_desc_clean.hprovides translation and sanitization of consoleD3D12_RESOURCE_DESCdescriptions for PC device methods (slot 25GetResourceAllocationInfo, slot 76CreateCommittedResource, and slot 127).Console layout identification helper:
is_xbox_resource_layout(D3D12_TEXTURE_LAYOUT layout)identifying console-specific layout words (such as0x101,0x102,0x105,0x200) while preserving standard PC layouts (UNKNOWN,ROW_MAJOR,64KB_UNDEFINED_SWIZZLE,64KB_STANDARD_SWIZZLE).Unit test suite (
runtime/test/d3d12_xs_desc_clean_test.cpp):kPcResourceFlagsMask) retaining all 9 standard PC flags and masking out high console-only bits.is_xbox_resource_layoutaccurately classifying console vs PC layouts.is_depth_resource_formatcovering standard depth/stencil and typeless formats as well as console format 118 (D16_UNORM_S8_UINT), while rejecting color and typeless non-depth formats.without_depth_stencil_uavstripping UAV on texture dimensions while preserving UAV on buffer dimensions.pc_resource_descnormalizing console tiled layouts toD3D12_TEXTURE_LAYOUT_ROW_MAJORfor buffers andD3D12_TEXTURE_LAYOUT_UNKNOWNfor textures, preserving PC layouts, stripping high console bits, and stripping UAV on depth-stencil andB5G5R5A1_UNORMformats while preserving all geometry, mip levels, and sample descriptions.Registers
d3d12_xs_desc_clean_testand CTest inruntime/CMakeLists.txt.Tested
63/63 checks passed(0 failures).python -I tests/test_ci_registration.py: 16/16 pass.python -I tests/test_text_write_line_endings.py: 3/3 pass.python -I scripts/check_no_game_data.py: clean (0 violations, no game data).AI-assisted (Claude Code)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.