runtime: include HRESULT in D3D12 traces #2312

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

@⁠ZroIsHere on GitHub · 2026-11-26 13:44 UTC · original
ZroIsHere:diagnostics/d3d12-trace-hresult → main · +9 −1 · 1 files · 1 commits · draft

--trace-d3d12 currently records failed calls without their HRESULT, making it hard to distinguish unsupported operations from invalid arguments and other failures. Include the hexadecimal HRESULT on failed calls. Keep E_NOTIMPL classified as unsupported and successful calls as ok.

Validation: the Windows/MSVC RelWithDebInfo gta6rt build passed. A retail run with translated shaders recorded four ID3D12Device2::CreatePipelineState failures as hr=0x80070057 (E_INVALIDARG), which the old trace reduced to the generic word failed. No tests were run.

**@⁠ZroIsHere** on GitHub · 2026-11-26 13:44 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2312) `ZroIsHere:diagnostics/d3d12-trace-hresult` → `main` · +9 −1 · 1 files · 1 commits · draft `--trace-d3d12` currently records failed calls without their HRESULT, making it hard to distinguish unsupported operations from invalid arguments and other failures. Include the hexadecimal HRESULT on failed calls. Keep `E_NOTIMPL` classified as `unsupported` and successful calls as `ok`. Validation: the Windows/MSVC RelWithDebInfo `gta6rt` build passed. A retail run with translated shaders recorded four `ID3D12Device2::CreatePipelineState` failures as `hr=0x80070057` (`E_INVALIDARG`), which the old trace reduced to the generic word `failed`. No tests were run.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 13:50:00 +00:00
Author
Owner

@⁠lixonik on GitHub · 2026-11-26 17:57 UTC · original · reviewed

The exact PR head built with MSVC on Windows 11. The d3d12_trace CTest failed at entry #10 because its event parser rejects the new failure suffix. Details inline.

AI-assisted.

**@⁠lixonik** on GitHub · 2026-11-26 17:57 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2312#pullrequestreview-6078688733) · **reviewed** The exact PR head built with MSVC on Windows 11. The `d3d12_trace` CTest failed at entry #10 because its event parser rejects the new failure suffix. Details inline. AI-assisted.
@ -37,0 +37,4 @@
record(method, "unsupported");
} else if (FAILED(code)) {
char outcome[40]{};
std::snprintf(outcome, sizeof(outcome), "failed (hr=0x%08lx)", static_cast<unsigned long>(code));
Author
Owner

@⁠lixonik on GitHub · 2026-11-26 17:57 UTC · original

[P2] Update the trace parser alongside the new failure suffix.

ctest -R '^d3d12_trace$' fails on Windows 11 at entry #10 with ID3D12GraphicsCommandList::Close failed (hr=0x80004005). runtime/test/check_d3d12_trace.py full-matches a bare failed outcome and rejects that event before checking the sequence. Can the parser accept the HRESULT field and still compare the same event kind?

**@⁠lixonik** on GitHub · 2026-11-26 17:57 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2312#discussion_r4711969003) [P2] Update the trace parser alongside the new failure suffix. `ctest -R '^d3d12_trace$'` fails on Windows 11 at entry #10 with `ID3D12GraphicsCommandList::Close failed (hr=0x80004005)`. `runtime/test/check_d3d12_trace.py` full-matches a bare `failed` outcome and rejects that event before checking the sequence. Can the parser accept the HRESULT field and still compare the same event kind?
This pull request can be merged automatically.
This branch is out-of-date with the base branch
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/2312/head:github-bot/gh-2312'
git switch 'github-bot/gh-2312'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2312'
git switch 'github-bot/gh-2312'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2312'
git switch 'github-bot/gh-2312'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2312'
git switch 'main'
git merge --squash 'github-bot/gh-2312'
git switch 'main'
git merge --ff-only 'github-bot/gh-2312'
git switch 'main'
git merge 'github-bot/gh-2312'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.