pixel_aot: lower vector no-op v_nop and sync scanner #559
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/565"
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 Holastor on 2026-11-22T12:46:34Z.
Description
This PR adds lowering for the vector no-op instruction
v_nop(0x7e000000, VOP1 opcode 0x00) intools/pixel_aot.pyand marks it as supported intools/scan_unsupported_shaders.py.v_nopis commonly emitted in RDNA 2 shaders for lane padding and execution timing without modifying vector state or execution masks. In the standalone disassemblertools/disasm_rdna2.py,v_nopwas already decoded, butpixel_aot.pylacked a matching no-op rule, causing 4,690 shaders (57.6% of scanned shaders) to reportv_nopas an unsupported blocker.Summary of Changes
tools/pixel_aot.py:v_nopinlower()alongsides_nop, requiringmask == "entry".if exported and line != "s_endpgm": raise ValueError(...)so that anyv_nopattempting to execute after color export (exp) is rejected.v_nopin unreachable alignment padding within_check_two_exits().tools/scan_unsupported_shaders.py:r"v_nop"toSUPPORTED_INSTRUCTIONS_REGEX(it was already inKNOWN_RDNA2_BASE_OPCODES).tests/pixel_aot_check.py:v_noptoscheduling_hints()(part of the binary fixture assembled withllvm-mc -mcpu=gfx1013).check_scheduling_hints()to assert:translate(["v_nop"] + plain) == nopv_nop 0(invalid operand),plain + ["v_nop"](afters_endpgm), andplain[:-1] + ["v_nop", plain[-1]](betweenexpands_endpgm).tests/rdna2_tools_check.py:test_gfx1013_v_nop_decode_and_lower:0000007eintov_nop.analyze_shader_instructions().lower().lower()raisesValueErrorifv_nopoccurs after color export.test_supported_shader_instructions, assertedis_instruction_supported("v_nop")is True, whilev_nop 0andv_nop v0are False.Verification
Commit under test:
6c8c16d8Evidence and follow-up
0000007e) or source-built fixture templates. No game dumps, proprietary assets, or binaries are included.v_nopcannot take operands, cannot occur between color export ands_endpgm, and cannot occur after program termination.Checklist
This change was AI-assisted.