Fix VOPC classification and inline comments in scan_unsupported_shaders #228
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/231"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by alexander-src on 2026-11-21T18:49:29Z.
Change
Fix three analysis bugs in
tools/scan_unsupported_shaders.py:op.startswith("v_cmp")before the_f16/_f32/_f64/_u32/_i32type-suffix check inclassify_isa_category()so real RDNA 2 compare opcodes (such asv_cmp_lt_f32andv_cmp_eq_u32) are classified asVOPC (Vector Compare)instead of falling into theVOP / VALUbranch and leavingVOPCunreachable.//comments consistently inextract_opcode(),is_instruction_supported(), andanalyze_shader_instructions()(matchingparse_assembly_file()and LLVM AMDGPU disassembly syntax) instead of only splitting on;and#.totalinsideanalyze_shader_instructions()only for non-empty instruction lines after comment stripping so blank and comment-only lines are not counted intotal_instructions,supported_instructions, andsupport_percentage.test_vopc_classificationandtest_inline_slash_comments_and_blank_linestotests/rdna2_tools_check.py.Verification
Run on Linux x86_64 (
python3 3.14) againstmaine8895ad:python3 -B tests/rdna2_tools_check.py->Ran 19 tests in 0.125s : OK (skipped=1)(test_llvm_comparisonskipped becauseLLVM_LIBis unset; all 18 non-LLVM tests passed).main:tools/scan_unsupported_shaders.py: both new tests failed (v_cmp_lt_f32classified asVOP / VALU,is_instruction_supported("s_endpgm // shader exit")returnedFalse, and blank/comment lines inflatedtotal_instructions).build-and-testjob and Ubuntullvm-15job (missing Windows host andllvm-15locally; covered by CI).Evidence and follow-up
All new test inputs in
tests/rdna2_tools_check.pyare synthetic assembly lines authored inline under the repository's MIT license. No game files or external dumps were used.Checklist
AI-assisted: yes.