Repository navigation
Count first uses of the pixel shader front-face input in cached listings - #6130
Open
kacper-serewis wants to merge 2 commits into
Open
kacper-serewis wants to merge 2 commits into
kacper-serewis wants to merge 2 commits into
Conversation
Contributor
|
The census misses a first read in I assembled the instruction with import struct, sys
sys.path.insert(0, 'tools')
from shader_ir import parse_line
from ps_front_face_census import first_uses
ins = parse_line('flat_store_dword v[4:5], v0 ; encoding: [0x00,0x00,0x70,0xdc,0x04,0x00,0x7d,0x00]')
native = bytearray(0x128)
struct.pack_into('<I', native, 0xc0, 0x100)
native.extend(bytes.fromhex(ins['enc']))
print(first_uses(dict(code_start=0x128, code_end=len(native), insns=[ins]), native, 4))
AI-assisted. |
This was referenced Nov 23, 2026
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 item PS-FRONT-FACE-FIRST-USE on board #6089. Independent CPU follow-up to #5237. Based directly on main at 561b65a with no PR dependencies.
Run
python -I tools/ps_front_face_census.py <dxbc> --disasm <cached-listings>. Each indexed PS stem contributes once per category. The tool derives the candidate register from ISG1 and verifies the listing words against FSSM from the native entry. It follows direct branches and fallthrough until the first read, a recognized full write, termination, or uncertainty. Branch feasibility is unmodeled.Whole private cache on Windows, CPU only. Of 26,503 indexed stems, 12,101 were PS, 1,984 declared front face, all 1,984 listings were examined, and 0 signatures were skipped. The historical first printed access was a read in 345 listings. Traversal resolved 264 readers (243 ne e32, 20 ne e64, 1 eq e32, each u32 against immediate zero), 5 without a read and 1,715 unresolved. Reasons overlap across paths: 707 possible lane-partial writes, 1,008 unknown flow/addressing, 8 unclassified destinations. These counts describe the candidate VGPR's uses. Its native bit pattern remains unmeasured by this tool.
Five synthetic cache tests passed via
python -I tests/test_ps_front_face_census.py -v. Compileall and staged diff checks passed. No GPU/driver or raw package used. AI-assisted with Codex.