Skip to content

Runtime: support RGBA8 typeless RTV mip and array ranges (D3D-70) - #630

Merged
ItsNotRexed merged 1 commit into
ProjectLeonida:mainfrom
73N1X:feat/rgba8-rtv-subresources-main
Nov 22, 2026
Merged

ItsNotRexed merged 1 commit into
ProjectLeonida:mainfrom
73N1X:feat/rgba8-rtv-subresources-main

Conversation

@73N1X

@73N1X 73N1X commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

What changes

D3D-70: explicit UNORM/SRGB/UINT RTVs on R8G8B8A8_TYPELESS resources can now select higher 2D mips and contiguous array-layer ranges. Previously the implementation accepted only one mip and one layer, so these descriptors could not be used for clears.

The frontend checks mip, plane and layer bounds, using subtraction to reject overflowing layer ranges. Replay retains the existing format interpretation, descriptor snapshots, cache behavior and predication. MSAA, 3D views, typed-resource casts and additional format families remain outside this change.

This follows merged #388 directly on main c432cdce127ed2d22a99aa6ef57d91db4a10b5bb. Claim: #313 (comment)

The coordinator assigned D3D-70 separately from @NWX10's D3D-69 (generalizing typed-view format families). This PR changes subresource selection for the three existing RGBA8 view formats only. #521 remains open; its conversion and CPU expectation changes need to be retained when whichever PR lands second is rebased. No unmerged PR is included in this branch.

Validation

Windows, MSVC 19.44, Radeon RX 5700 XT, driver 32.0.21045.5002; synthetic fixtures only, no game data.

  • Full RelWithDebInfo runtime build passed; CTest 27/27 passed.
  • CPU typeless replay: 31 scenarios, preserving existing predication and unsupported-resource checks.
  • d3d12_typeless_rtv_test: 79 WARP readback comparisons (13 existing, 54 mip/array, 12 non-array higher-mip), plus 17 invalid-view rejections. Every subresource is read back, including untouched sentinels. UINT and untouched subresources compare exactly; selected normalized values retain the existing one-byte tolerance.
  • d3d12_clear_test: 59 general RTV/DSV comparisons against WARP passed.
  • vk_command_replay_test: suites A-E passed, including GPU predication.
  • GPU tests ran with Vulkan validation and synchronization validation enabled, with no validation errors.
  • Negative control: the expanded CPU test fails at the first layered-view case with main's original replay header, and passes after restoring this implementation.
  • git diff --check passed; main was unchanged at publication preparation.

The SDK configuration did not find ml64 or glslangValidator; optional register-preservation and descriptor sampling shader coverage was therefore unavailable. No full-game or corpus validation is claimed.

Validation coordination: #313 (comment)

@troythedecoyx

Copy link
Copy Markdown
Contributor

Tested 4250c77 merged onto main c432cdc on NVIDIA GeForce RTX 4060 Ti (Ada), driver 32.0.16.2124 (NVIDIA 621.24), Windows 11 Home 26300, MSVC 2022 / Ninja, Vulkan SDK 1.4.363: pass.

Besides ctest, I ran each test program this PR changes directly (several aren't registered with ctest):

  • d3d12_typeless_rtv_test: exit 0
  • typeless_rtv_test: exit 0 (typeless_rtv_test: 31 format, snapshot, whole/rectangle and rejection scenarios passed)

ctest: 100% tests passed, 0 tests failed out of 27.

AI-assisted.

@MrCheese5

Copy link
Copy Markdown
Contributor

Tested 4250c77 on RTX 4090 (driver 621.14), Windows 11 26200, MSVC 19.44: pass

No game files used. AI-assisted run (Claude Code).

@ItsNotRexed
ItsNotRexed merged commit 13d68c1 into ProjectLeonida:main Nov 22, 2026
9 checks passed
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.

4 participants