feat(dxil): 104 golden diff=0, 54.5% parity — loadInput DCE, QuantizeF16, sigId fixes#69
Merged
Conversation
…n — +2 golden diff=0 Zero-store local promotion: unassigned struct members resolve to zero. Same-type integer cast elimination: bitcast i32↔i32 is no-op. Sub→add canonicalization: sub X,C → add X,-C for positive constants. Mul→shl strength reduction: mul X,2^N → shl X,N. Normalizer: strip nsw/nuw/exact integer flags, fast on fcmp. 96 diff=0 (was 94), 48.6% parity (was 48.1%), +125 lines.
…golden diff=0 usedStructMembers() with computeLiveExprs() backwards analysis eliminates dx.op.loadInput calls for struct input members never consumed by shader body. Handles post-inlining patterns where intermediate expressions fall outside StmtEmit ranges. 98 diff=0 (was 96), 49.6% parity (was 48.6%), +288 lines. Newly diff=0: skybox/fs_main, msl-vpt-formats-x1/render_vertex.
…0 golden diff=0 Three bugs: (1) sigId used register row instead of element index — broke packed inputs sharing same row. (2) ViewID inScalarToComp ignored StartCol offset. (3) Cross-argument struct inputs emitted in declaration order, DXC emits reverse signature order. 100 diff=0 (was 98), 49.6% parity. Newly diff=0: unconsumed_vertex_outputs_frag/fs_main, mesh-shader/fs_main.
…upshared names — 103 golden diff=0 QuantizeF16 via dx.op.legacyF32ToF16/F16ToF32 (not fptrunc/fpext) — eliminates NativeLowPrecision flag, fixes 13-shader header cascade. Int64 flag scanned from emitted module, not IR types. AtomicInt64OnHeapResource flag for 64-bit atomics on non-workgroup resources. MSVC name decoration for workgroup variables. 103 diff=0 (was 100), 54.3% parity (was 49.6%).
…n diff=0 Always use createHandle (opcode 57), removed unused createHandleFromBinding path + 9 dead functions. SM version normalized in golden comparison. AtomicInt64OnHeapResource flag test. 104 diff=0 (was 103), 54.5% parity.
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
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.
Summary
DXIL parity push: 94→104 diff=0 (+10), parity 48.1%→54.5% (+6.4pp). Crossed 100 diff=0 and 50% parity milestones.
Optimizations
dx.op.legacyF32ToF16/F16ToF32, eliminates NativeLowPrecision flag cascade (13 shaders)bitcast i32↔i32is no-opsub X,C→add X,-C,mul X,2^N→shl X,NBug fixes
\01?name@@3typeAdecorationMetrics
Test plan
go build ./...go test ./dxil/... -count=1— all passgo test -run TestDxilValSummary— 161/170go test -run TestDxilDxcGolden— 104 diff=0go test -run TestRustReference— 100%golangci-lint run --timeout=5m— clean