tooling: name the rule on an offscreen_check usage error #3950
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!3950
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3948"
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?
@triggered02 on GitHub · 2026-12-03 16:47 UTC · original
triggered02:tooling/offscreen-usage-diagnostics→main· +96 −3 · 2 files · 3 commits · openoffscreen_checkreturns 2 only for a command-line usage error, so a launcher log that recordsonly
ended with exit code: 2says nothing about what was rejected — and it looks like a renderer ordevice failure even though the tool never reached a device. Three of its four usage-error paths
returned silently.
Refs #3913.
What changed
resolve_clinow reports every rejection the same way:offscreen_check, oroffscreen_check warp);warporhardware;--operation: keeps the existingUnknown GPU operation or invalid arguments: <arg>line and adds whether the name is unknown or theoperand count/form is wrong.
The echoed command line is bounded (200 characters, then
...) so a single stray operand cannot fill alog, and the exit code stays 2.
tests/offscreen_check.cpponly.Verification
Environment: Linux, clang-cl 19 + xwin SDK, Release build, Wine + vkd3d-proton, GTX 1660 SUPER. The
launcher run that reported #3913 is on Windows and is not reproduced here.
Each path run directly, all exit 2:
--self-testgains the four paths plus two assertions that the echoed command line and the usage lineare present, and still passes:
Negative control: restoring the silent return for the backend path and rebuilding makes the self-test
fail with
offscreen_check self-test failed: expected stderr substring(exit 1), so the new cases bite.Not established
Which argument a launcher actually passes is still unknown; this change makes the next report
self-describing instead of guessing at the caller. No behavior on a valid command line changed: a draw
run, an operation run and
--self-testall keep their previous exit codes.@chatgpt-codex-connector[bot] on GitHub · 2026-12-03 16:47 UTC · original · edited 2026-12-03 16:49 UTC
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
6bac447ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
@chatgpt-codex-connector[bot] on GitHub · 2026-12-03 16:49 UTC · original · reviewed
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
6bac447c5cℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
@ -2001,0 +2001,4 @@// A launcher log that shows only "exit code: 2" cannot say what was rejected, so// every usage error names the rule it broke and echoes the command line it saw.constexpr const char* kUsage ="usage: offscreen_check <warp|hardware> [<expected.bin> <pixels>] | "@chatgpt-codex-connector[bot] on GitHub · 2026-12-03 16:49 UTC · original
When a non-operation draw invocation has the wrong argument count, this usage line suggests an expected-image path and pixel count, but the parser accepts only a backend plus an output path, optionally followed by vertex and pixel shader paths;
mainpassesargv[2]as the output andargv[3]/argv[4]as shaders. The matching error reason at line 2059 repeats the incorrect form, so users following the diagnostic will still get a rejected command. Show the actual draw arguments instead.Useful? React with 👍 / 👎.
@triggered02 on GitHub · 2026-12-03 17:01 UTC · original
Second commit
cd4f01baadds the process-level assertions:tests/offscreen_invalid_operation.cmakealready runs the built binary for the invalid-operation and positional-draw paths, so it now also checks that the draw path names its rule and echoes the command line, plus a bare invocation and a wrong backend (exit 2, reason, usage line).Run on this host by wrapping the Windows binary in
wine:Negative control for the cmake script too: making the bare-invocation message generic (
bad arguments) fails it withExpected a usage error for a bare invocation, got exit 2.The first commit already ran green on the hosted jobs (Windows, gfx1013, Linux Python); this one is the same change plus assertions, so the new run is the check.
@triggered02 on GitHub · 2026-12-03 17:10 UTC · original
Hosted jobs on
cd4f01baare green: Build and test on Windows SUCCESS (the full suite, which includesoffscreen_capability_table_self_testandoffscreen_invalid_operation_warp, so both the in-process and the process-level assertions ran there), gfx1013 SUCCESS, Linux Python checks SUCCESS. The previous head6bac447cwas also fully green.@R0Y00 on GitHub · 2026-12-03 17:21 UTC · original · requested changes
On
cd4f01baI rebuilt offscreen_check; its registered self-test passed. Independently running offscreen_check warp output.bin extra-argument returns 2 and still prints “a draw run takes an expected-image path and a pixel count, or neither” plus the same expected.bin/pixels form in usage. The actual draw entry point accepts an output path and optional vertex/pixel shader paths. Please align the text and the process-level assertion with the parser. The new end-to-end test currently locks in the misleading syntax flagged in the open thread.@triggered02 on GitHub · 2026-12-03 17:32 UTC · original
You are right, and the mistake is mine in a way worth naming: I described the positional draw from the fixtures that invoke it instead of from what
draw()does withargv[2]andargv[3..4].6ae283effixes the text and the assertion that was pinning it.The draw entry point is
offscreen_check <warp|hardware> <output-image> [<vertex-shader> <pixel-shader>]. The expected image and pixel count belong to--startup-pixel-words, not to the positional form — which is exactly the kind of confusion my "expected-image path and a pixel count" wording created.What changed:
The bare-invocation reason now says "an output image" too, and
tests/offscreen_invalid_operation.cmakeasserts the corrected strings (so the process-level test no longer locks in the wrong syntax).Evidence on this host (clang-cl 19 xwin build, Wine + vkd3d-proton):
The self-test already asserted
{warp, out.bmp}and{hardware, out.bmp, vs.cso, ps.cso}as valid draw forms and{warp, out.bmp, vs.cso}as a usage error; those stay as the parser-level positives.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.