reprend #220: d3d12: validate CreateShaderResourceView descriptors (reopens #5275) #2729

Merged
OreoFR merged 4 commits from upstream-pr/2729 into main 2026-11-30 17:16:13 +00:00
OreoFR commented 2026-11-30 13:38:32 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-30T13:38:32Z.


Carries #220 by @Andretuta (opened for @justr4mzi: the carried-over old PR 9955, branch ProjectLeonida:old-pr/9955), because it conflicts with main after #2566 and the reminder to merge main (https://github.com/ProjectLeonida/mandy/pull/220#issuecomment-7259375364) got no answer within the delay of the carry rule. If the author comes back, this carry is dropped.

Item: OLD-9955-CARRY (claimed in https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7280119323; original item OLD-9955).

What this branch is

  • The author's branch at 7342eadaa, unchanged (no rebase, author commits kept).
  • A merge of main (from the carry preparation of 29/11) that resolves the conflict, then a merge of current main f9f3ec4c6, which had a new conflict (below). Both merge commits carry Co-authored-by the author.
  • Nothing else: the change itself is the original PR's; see #220 for what and why, and the verifications posted there.

What conflicted and how it was resolved

  • runtime/shims/d3d12_vulkan_device.cpp (5 hunks, earlier merge): main's code kept (image_descriptor also serves the UAVs, write_buffer_srv) and the PR's checks re-applied: component mapping and MinLOD on SRVs only, typeless formats refused on SRVs and UAVs (the PR's test requires it), mip/array bounds on SRVs, buffer SRV mapping checked before write_buffer_srv. Please read this one: the PR's checks were re-placed into main's rewritten function, not merged line by line.
  • New with f9f3ec4c6: runtime/shims/d3d12_vulkan_device.cpp: main added a three-argument bind_title_image overload where the PR adds valid_shader_4_component_mapping; both functions kept.

Tests

  • On this branch (main f9f3ec4c6 merged), Windows 11, Python 3.12, no GPU used: C++ only: left to this PR's CI (no local C++ build in this run).
  • Earlier merge: d3d12_srv_validation + d3d12_descriptor 2/2 OK; gta6rt imports identical to main.
  • python -I scripts/check_no_game_data.py on every file this PR changes: clean.
  • CI on this PR covers the rest (C++ build and ctest, the full translator suite).

Depends on: none.

Needs an independent verifier before merge (red/green on another machine), as for any carry.

AI-assisted (Claude Code, oreofr-agent).

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5566375977 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2729). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-30T13:38:32Z. --- Carries #220 by @Andretuta (opened for @justr4mzi: the carried-over old PR 9955, branch `ProjectLeonida:old-pr/9955`), because it conflicts with `main` after #2566 and the reminder to merge `main` (https://github.com/ProjectLeonida/mandy/pull/220#issuecomment-7259375364) got no answer within the delay of the carry rule. If the author comes back, this carry is dropped. Item: `OLD-9955-CARRY` (claimed in https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7280119323; original item `OLD-9955`). ### What this branch is - The author's branch at `7342eadaa`, unchanged (no rebase, author commits kept). - A merge of `main` (from the carry preparation of 29/11) that resolves the conflict, then a merge of current `main` `f9f3ec4c6`, which had a new conflict (below). Both merge commits carry `Co-authored-by` the author. - Nothing else: the change itself is the original PR's; see #220 for what and why, and the verifications posted there. ### What conflicted and how it was resolved - `runtime/shims/d3d12_vulkan_device.cpp` (5 hunks, earlier merge): `main`'s code kept (`image_descriptor` also serves the UAVs, `write_buffer_srv`) and the PR's checks re-applied: component mapping and `MinLOD` on SRVs only, typeless formats refused on SRVs and UAVs (the PR's test requires it), mip/array bounds on SRVs, buffer SRV mapping checked before `write_buffer_srv`. Please read this one: the PR's checks were re-placed into `main`'s rewritten function, not merged line by line. - New with `f9f3ec4c6`: `runtime/shims/d3d12_vulkan_device.cpp`: `main` added a three-argument `bind_title_image` overload where the PR adds `valid_shader_4_component_mapping`; both functions kept. ### Tests - On this branch (`main` `f9f3ec4c6` merged), Windows 11, Python 3.12, no GPU used: C++ only: left to this PR's CI (no local C++ build in this run). - Earlier merge: `d3d12_srv_validation` + `d3d12_descriptor` 2/2 OK; `gta6rt` imports identical to `main`. - `python -I scripts/check_no_game_data.py` on every file this PR changes: clean. - CI on this PR covers the rest (C++ build and `ctest`, the full translator suite). Depends on: none. **Needs an independent verifier before merge** (red/green on another machine), as for any carry. AI-assisted (Claude Code, oreofr-agent). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
KelboLive commented 2026-11-30 14:53:30 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-11-30T14:53:30Z.


Independent check on Windows/NVIDIA (not the author), at 1d4dc90ea.

  • Configured the branch's runtime and built d3d12_srv_validation_test (MSVC 14.52.37025, Vulkan SDK 1.4.363.0).
  • Ran it on the RTX 4070 Ti SUPER: d3d12_srv_validation: 16 valid cases accepted, 90 invalid cases rejected (0 validation errors) — exit 0.

Environment: NVIDIA RTX 4070 Ti SUPER, driver 621.01 (Windows 32.0.16.2101), Windows 11 Pro 10.0.26200.9711.

No regressions seen. The branch is based on f9f3ec4c6; a rebase on current main before merge would keep history linear.

AI-assisted: yes (opencode).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7282092781 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2729#issuecomment-7282092781). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-30T14:53:30Z. --- Independent check on Windows/NVIDIA (not the author), at `1d4dc90ea`. - Configured the branch's `runtime` and built `d3d12_srv_validation_test` (MSVC 14.52.37025, Vulkan SDK 1.4.363.0). - Ran it on the RTX 4070 Ti SUPER: `d3d12_srv_validation: 16 valid cases accepted, 90 invalid cases rejected (0 validation errors)` — exit 0. Environment: NVIDIA RTX 4070 Ti SUPER, driver 621.01 (Windows 32.0.16.2101), Windows 11 Pro 10.0.26200.9711. No regressions seen. The branch is based on `f9f3ec4c6`; a rebase on current `main` before merge would keep history linear. AI-assisted: yes (opencode).
MoonEyes commented 2026-11-30 15:47:40 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-30T15:47:40Z.


Verified by MoonEyes (another owner than OreoFR) on head 1d4dc90ea merged with main be7690805: Windows 11, MSVC 2022 x64, RelWithDebInfo, RTX 4060 8 GB (NVIDIA). ctest -R ^d3d12_srv_validation$: 1/1 passed; with d3d12_vulkan_device.cpp of main it fails (1/1).

Unit test only: no run of the title (this is the Vulkan path).

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7283598732 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2729#issuecomment-7283598732). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-30T15:47:40Z. --- Verified by MoonEyes (another owner than OreoFR) on head `1d4dc90ea` merged with `main` `be7690805`: Windows 11, MSVC 2022 x64, RelWithDebInfo, RTX 4060 8 GB (NVIDIA). `ctest -R ^d3d12_srv_validation$`: 1/1 passed; with `d3d12_vulkan_device.cpp` of `main` it fails (1/1). Unit test only: no run of the title (this is the Vulkan path). AI-assisted (Claude Code).
MoonEyes commented 2026-11-30 17:16:07 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-30T17:16:07Z.


Merging. Head 1d4dc90ea merges cleanly with main e319e6325 and does not force a rebase of #2566. Vulkan path: Moon's written OK for this PR without a run in the game; ctest red and green on Windows 11, and by another person. Merged by MoonEyes.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7285991910 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2729#issuecomment-7285991910). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-30T17:16:07Z. --- Merging. Head `1d4dc90ea` merges cleanly with `main` `e319e6325` and does not force a rebase of #2566. Vulkan path: Moon's written OK for this PR without a run in the game; ctest red and green on Windows 11, and by another person. Merged by MoonEyes. AI-assisted (Claude Code).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!2729
No description provided.