runtime: stop inner_coverage_requirements scan at SPIR-V preamble boundary (RT-CONSERVATIVE-RASTER-PREAMBLE-STOP) #1982
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!1982
Loading…
Reference in a new issue
No description provided.
Delete branch "perf/rt-conservative-raster-preamble-stop"
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?
Pull request successfully merged and closed
Item ID:
RT-CONSERVATIVE-RASTER-PREAMBLE-STOP(claimed in #1608)Summary
inner_coverage_requirements()inruntime/src/conservative_raster.his called on every shader stage of every graphics PSO (runtime/shims/d3d12_vulkan_device.cpp:8459), yet previously walked the entire SPIR-V binary word-by-word through all debug names, decorations, types, constants, globals, and function bodies.Per SPIR-V Logical Layout (§2.4),
OpCapability(17) andOpExecutionMode(16) strictly precede all debug (OpString/OpSource*/OpName/OpMemberName/OpModuleProcessed), annotation (OpDecorate*/OpGroup*), type/constant/global (OpType*/OpConstant*/OpVariable/OpUndef), and function (OpFunction) sections.runtime/test/conservative_raster_test.cppwith coverage for short/empty inputs, wrong magic, header-only modules, full modules with large bodies, boundary truncation rejection, and early-stop verification acrossOpName,OpDecorate,OpTypeVoid,OpConstant,OpVariable, andOpFunction.Benchmarks (
-O2, bit-exact A/B vs full-module scan)Testing & Disclosure
clang++ -std=c++20 -g -O1 -fsanitize=address,undefined -fno-omit-frame-pointer -Wall -Wextra -Werror runtime/test/conservative_raster_test.cpp: PASSclang++ -std=c++20 -g -O1 -fsanitize=thread -fno-omit-frame-pointer -Wall -Wextra -Werror runtime/test/conservative_raster_test.cpp: PASSclang++ -std=c++20 -O2 -Wall -Wextra -Werror runtime/test/conservative_raster_test.cpp: PASSpython3 -I scripts/check_no_game_data.py runtime/src/conservative_raster.h runtime/test/conservative_raster_test.cpp: PASSpython3 -I tests/test_text_write_line_endings.py: PASS (3/3)Verified on Windows 11 (
10.0.26200.9974) with MSVC19.44.35228(x64,/std:c++20 /EHsc /W4 /permissive- /utf-8 /O2) againstmaind48a957bb+c367a1e36d(claim#2570#issuecomment-7239583640):runtime/src/conservative_raster.h,runtime/test/conservative_raster_test.cpp); stopsinner_coverage_requirementsat the first post-OpExecutionModeSPIR-V instruction (OpName,OpDecorate*,OpType*,OpConstant*,OpVariable,OpFunction, etc.) after validating the boundary instruction's own word framing.check_no_game_data.pyclean.d48a957bb+ PR test):conservative_raster_test.exefails (rc=1,conservative raster capability checks: 6 failures).d48a957bb+c367a1e36dmerge): Auto-merges cleanly (rc=0), compiles with0warnings under/W4 /permissive-, and passes (conservative raster: enabled extension, precision and uncertainty bounds checked,rc=0).AI-assisted.
Red/green: On main conservative_raster_test fails 6 checks (the inner_coverage_requirements scan runs past the SPIR-V preamble), and with the PR ctest -R "^conservative_raster$" passes.
Independent tester (OreoFR, RTX 4070, Windows 11): PR head merged with the other PRs of its batch on main c1ecf04ed, full ctest run (485 tests, tests that launch the game excluded): no new failure compared with main.
Verified by OreoFR
c1ecf04ed+ PR headc367a1e36; green run in a merge package of 16 PRs, no new ctest failure vs mainctest -R ^conservative_raster$AI-assisted (Claude Code, Claude Opus 5.5).