Repository navigation
airconv: guard null UAV counter pointers, fix Dot2AddHalf accumulation, and return 0 from WaveReadLaneFirst for helper-only lanes - #369
Open
cyyever wants to merge 1 commit into
Conversation
…n, and return 0 from WaveReadLaneFirst for helper-only lanes
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
src/airconv/dxil_converter.cpp,src/airconv/nt/dxbc_converter_base.cpp): In DXILBufferUpdateCounterand DXBCInstAtomicImmIncrement/InstAtomicImmDecrement, branch onir.CreateIsNotNull(ptr)before issuingair.CreateAtomicRMW, returning0via a PHI node when a UAV has no counter resource bound instead of dereferencing a null pointer on the GPU. Indxil_converter.cpp, split the block cleanly atcallviaSplitBlockand guard!h.counteras well.Dot2AddHalfaccumulation order (src/airconv/dxil_converter.cpp): Computeacc + fma(a.y, b.y, a.x * b.x)so the 2-element dot product completes before accumulating intoacc, matching SM 6.4dot2addsemantics.WaveReadLaneFirstfor helper-only waves (src/airconv/dxil_converter.cpp): When all active lanes in a pixel shader wave are helper lanes (real == 0), return0(Constant::getNullValue(ty)) instead of shuffling from the first helper lane (matchesvkd3d-proton'stest_sm67_helper_lane_only_wave_ops).Verification
SplitBlock,BasicBlock::Create,CreateIsNotNull,PHINode::Create,Constant::getNullValue,CreateFAdd/CreateFMul) againstup/main's LLVM 15 APIs indxil_converter.cppanddxbc_converter_base.cpp.