Repository navigation
gpu: name the failing part when a fixed mesh profile does not match - #3440
Merged
Merged
Conversation
prepare_native_mesh57 compared six parts of the reviewed profile (normalized descriptor, state_a, state_b, root blob, mesh shader, pixel shader) and the end of the file in one expression and threw a single "profile input bytes differ". The message now names the first failing check: the part and whether its length or its content differs, or trailing bytes after the pixel shader. The prefix, the check order and the set of accepted and refused profiles are unchanged.
Capture the fixture's log and require the exact refusal line for the unreviewed fixed mesh state, so a wrong part name or message fails.
8 of 9 tasks
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.
Part of #3416
Branch
mesh57-profile-mismatch-part, head 50900f6, based on main 1a44cee:git merge-treewith main 1a0120b is clean; main has not changed the two files since 1a44cee.What changes
prepare_native_mesh57compared six parts of the reviewed profile in one expression, together with the end of the file:state_astate_bOn any mismatch it threw a single
profile input bytes differ.The message now names the first check that fails (
src/startup_stubs/native_mesh57.inl:301-319, line numbers at the branch head):profile input bytes differ: <part> length <profile> != <actual>(:303)profile input bytes differ: <part> content(:310)profile input bytes differ: trailing bytes after the pixel shader(:319)The prefix, the check order and the set of accepted and refused profiles are unchanged. The refusal is still logged as
x2w-render native slot57 mesh %016llx refused: %s(:466).tests/startup_indirect_draw_indexed.cpppointsX2W_TRAP_LOGat the fixture's log (:2075) and requires one exact log line per message:refused:const auto mismatched = create();(:2275-2289)profile input bytes differ: normalized descriptor contentlengths[0]one larger, thencreate()(:2301-2327)profile input bytes differ: normalized descriptor length 769 != 768create()(:2328-2340)profile input bytes differ: trailing bytes after the pixel shaderThe content check runs before the block #3433 added at the same place (:2290), so that it reads the log right after the
create()under test. The length and trailing-bytes cases run after #3433's lookup-count check (:2299), so they do not change its counts.Evidence
On 50900f6, release build of
startup_indirect_draw_indexedandstartup_cache_index_check, then:Result: 12/12 passed, the mesh57 cases on WARP:
native_fixed_mesh57_{,mrt,varying,uint_heap,pixel_heap,waterfall,waterfall_fine,buffers,constant,mask}_warpstartup_cache_index,startup_cache_index_per_call_controlMutations in
src/startup_stubs/native_mesh57.inl, one at a time, each reverted and rebuilt (12/12 after the revert):<part> contentnative_fixed_mesh57_warpfails:malformed fixed mesh profile: missing log line '... refused: profile input bytes differ: normalized descriptor length 769 != 768'native_fixed_mesh57_warpfails:malformed fixed mesh profile: missing log line '... refused: profile input bytes differ: trailing bytes after the pixel shader'native_fixed_mesh57*_warpcases fail:unreviewed fixed mesh state: missing log line '... normalized descriptor content'" content"changed to" contents"The two content mutations were not repeated on 50900f6; that commit only adds lines after the content check.
Behaviour control, run on an earlier revision (base 212d4b5, before the log check existed), not repeated since: with the memcmp for part 0 skipped, the fixtures fail on pixels,
unreviewed fixed mesh state: pixel (2,0): got 0xffffffff, expected 0xff000000.No test or document expected the old text: at the branch head,
git grep "input bytes differ" -- tests docsonly hits the checks intests/startup_indirect_draw_indexed.cpp.Not covered
CI
On main 1a0120b the
prbuild preset buildsstartup_indirect_draw_indexed, but theprCTest filter does not matchnative_fixed_mesh57*_warp. PR CI compiles the changed test file and does not run the new checks. The run above does.Interactions with other open mesh branches
By
git merge-treeat af40698: no textual conflict with the fivenative_direct_meshbranches; the files are disjoint. 50900f6 touches onlytests/startup_indirect_draw_indexed.cpp.