Reject unknown offscreen GPU operations #212

Merged
RonLogic merged 1 commit from upstream-pr/215 into main 2026-11-21 19:11:41 +00:00
RonLogic commented 2026-11-21 18:29:07 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RonLogic on 2026-11-21T18:29:07Z.


Summary

A typo such as offscreen_check.exe warp --bvh-wave falls through to the triangle renderer. It generates a BMP named --bvh-wave and exits successfully, which can make a script report a test pass when the requested GPU operation never ran.

Reject unrecognized -- operations at the draw fallback. The command now prints an argument error and exits with status 2 without writing an image. Positional BMP paths and valid GPU checks keep their existing behavior.

Verification

ctest --test-dir out/build/gpu-cli-validation --no-tests=error -R '^(offscreen_(invalid_operation_)?warp|bvh_waves_(hardware|warp))$' --output-on-failure

The new regression check failed before the fix because the command created an image and returned 0. All four tests passed after the fix on Windows 11 with an RTX 4070 and WARP.

Refs #166.

AI-assisted. The Windows results were verified locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6532754265 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/215). Originally posted by [RonLogic](https://github.com/RonLogic) on 2026-11-21T18:29:07Z. --- ## Summary A typo such as `offscreen_check.exe warp --bvh-wave` falls through to the triangle renderer. It generates a BMP named `--bvh-wave` and exits successfully, which can make a script report a test pass when the requested GPU operation never ran. Reject unrecognized `--` operations at the draw fallback. The command now prints an argument error and exits with status 2 without writing an image. Positional BMP paths and valid GPU checks keep their existing behavior. ## Verification ```powershell ctest --test-dir out/build/gpu-cli-validation --no-tests=error -R '^(offscreen_(invalid_operation_)?warp|bvh_waves_(hardware|warp))$' --output-on-failure ``` The new regression check failed before the fix because the command created an image and returned 0. All four tests passed after the fix on Windows 11 with an RTX 4070 and WARP. Refs #166. AI-assisted. The Windows results were verified locally.
upstream-sync closed this pull request 2026-11-24 06:41:51 +00:00
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
R0Y00/Xbox2Windows!212
No description provided.