GPU: reject shader-visible RTV and DSV heap creation #2961

Open
github-bot wants to merge 1 commit from github-bot/gh-2961 into main AGit
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-26 01:34 UTC · original
andrewpozdnakov7-jpg:codex2/descriptor-heap-visibility → main · +52 −1 · 1 files · 1 commits · open

CreateDescriptorHeap now returns E_INVALIDARG when an RTV or DSV heap is requested with SHADER_VISIBLE and an output object. Only CBV/SRV/UAV and sampler heaps support the flag. D3D12 descriptor heap flags.

On both inbox and app-local D3D12 WARP, the two shader-visible RTV/DSV creations returned E_INVALIDARG with no heap. Six valid combinations of type and flag created an object. The eight null-output calls returned S_FALSE. The test uses one descriptor per heap.

The same fixture through VIctory's device vtable on main at 63bcca43 failed because the shader-visible RTV case returned S_OK and an object. The patch passes the complete 16-call matrix.

Eight descriptor tests and the full WARP GPU diagnostics suite passed (247 passed, one ignored). Strict GPU Clippy with default and diagnostic features and asset policy passed.

AI-assisted. Validation used synthetic calls and software WARP.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-26 01:34 UTC · [original](https://github.com/Marvisak/VIctory/pull/2961) `andrewpozdnakov7-jpg:codex2/descriptor-heap-visibility` → `main` · +52 −1 · 1 files · 1 commits · open CreateDescriptorHeap now returns E_INVALIDARG when an RTV or DSV heap is requested with SHADER_VISIBLE and an output object. Only CBV/SRV/UAV and sampler heaps support the flag. [D3D12 descriptor heap flags](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/ne-d3d12-d3d12_descriptor_heap_flags). On both inbox and app-local D3D12 WARP, the two shader-visible RTV/DSV creations returned E_INVALIDARG with no heap. Six valid combinations of type and flag created an object. The eight null-output calls returned S_FALSE. The test uses one descriptor per heap. The same fixture through VIctory's device vtable on main at 63bcca43 failed because the shader-visible RTV case returned S_OK and an object. The patch passes the complete 16-call matrix. Eight descriptor tests and the full WARP GPU diagnostics suite passed (247 passed, one ignored). Strict GPU Clippy with default and diagnostic features and asset policy passed. AI-assisted. Validation used synthetic calls and software WARP.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:18:42 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-26 05:36 UTC · original

Automated triage for the maintainers.

Needs work. The change in create_heap (victory-gpu/src/descriptor.rs) makes the emulated console device return E_INVALIDARG for a shader-visible RTV/DSV heap. The code itself is small and the test is clear, but the evidence is desktop D3D12 (the Learn page and WARP), while this function stands in for the console's runtime, whose validation can differ. The title only ever sees what the console runtime does, so an E_INVALIDARG here is only right if the console runtime also refuses this call; if it does not, the change could turn an accepted call into a failure. Either way, a call the title never makes gains nothing from this.

What would change the verdict: evidence that the console runtime rejects this flag combination (for example, the title's own code checking for that failure), or a log showing the title makes this call. Without that, this looks like a guard for a case that does not occur.

CI: passing.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-26 05:36 UTC · [original](https://github.com/Marvisak/VIctory/pull/2961#issuecomment-7183632858) <!-- victory-triage v1 head=70d6b075b23bce058e2e398e84a019267717bb96 verdict=needs-work at=2026-11-26T05:35:49Z --> Automated triage for the maintainers. **Needs work.** The change in `create_heap` (`victory-gpu/src/descriptor.rs`) makes the emulated console device return `E_INVALIDARG` for a shader-visible RTV/DSV heap. The code itself is small and the test is clear, but the evidence is desktop D3D12 (the Learn page and WARP), while this function stands in for the console's runtime, whose validation can differ. The title only ever sees what the console runtime does, so an `E_INVALIDARG` here is only right if the console runtime also refuses this call; if it does not, the change could turn an accepted call into a failure. Either way, a call the title never makes gains nothing from this. What would change the verdict: evidence that the console runtime rejects this flag combination (for example, the title's own code checking for that failure), or a log showing the title makes this call. Without that, this looks like a guard for a case that does not occur. CI: passing. --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2961/head:github-bot/gh-2961'
git switch 'github-bot/gh-2961'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2961'
git switch 'github-bot/gh-2961'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2961'
git switch 'github-bot/gh-2961'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2961'
git switch 'main'
git merge --squash 'github-bot/gh-2961'
git switch 'main'
git merge --ff-only 'github-bot/gh-2961'
git switch 'main'
git merge 'github-bot/gh-2961'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!2961
No description provided.