Repository navigation
Conversation
Contributor
|
Tested
AI-assisted. |
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claimed in the coordination issue as: BUILD-1938, readback-validation slice of this three-part claim, carried into #5934.
Depends on: #4119, #4436 (their published shared-sandbox refactors overlap
tools/sandbox.py; this patch builds independently on main).What and why
sandbox.py --checkcan report success for an invalid renderer image. On current main,check_frame(path, False)returns true for bothjunk\n1 1\n255\nfollowed by one black pixel andP6\n0 0\n255\nwith no pixels. Truncated readbacks can instead raise an exception.Validate the renderer's P6/255 format, positive decimal dimensions and exact RGB payload length. Missing or malformed images now produce a failed check with a readable message. Compute the one-percent coverage threshold without rounding it down to zero for small images. This reads the format emitted by
vk_sandbox, rather than implementing a general Netpbm reader.Tested
Base
561b65a832218fbb9e6d2effd392a8eef093a3f8; patch headd333c58e73ebbdd35bacb8158edbb02e277f634f.python -I -B tests/test_sandbox_frame.py -v: six tests pass, covering valid binary pixels, malformed/missing readbacks, clear-only frames, the coverage boundary and the 256-colour texture-detail boundary. The regression tests fail on the original implementation.test_sandbox_pick.py(6),test_sandbox_scene.py(10), andtest_text_write_line_endings.py(3) pass.git diff --checkpasses.The three new slices merge cleanly with one another. This slice also merges cleanly with #5830; the integration checkout resolved the other slices' conflicts with that PR. All test inputs are original synthetic bytes/GLSL; no game files.
AI-assisted: yes, Codex.
Checklist