Skip to content

ACR GitHub integration test 967 isolated#2

Draft
amarpMSFT wants to merge 1 commit into
acr-gh-pr967-basefrom
acr-gh-pr967-head
Draft

ACR GitHub integration test 967 isolated#2
amarpMSFT wants to merge 1 commit into
acr-gh-pr967-basefrom
acr-gh-pr967-head

Conversation

@amarpMSFT

Copy link
Copy Markdown
Owner

Private-fork integration fixture for AgentCodeReview GitHub PR support. Base and head are copied refs pinned to the same commits as upstream PR 967. Safe for comments, reviews, resolution, and added test iterations. Do not merge.

… filters

The CalculateMeanVariance and DisocclusionBlur compute shaders exchanged each
row's values across wave lanes assuming WaveGetLaneIndex() == SV_GroupIndex
(row-major thread->lane packing) and a wave width >= 16. HLSL guarantees
neither: for 2D thread groups (these use [numthreads(8,8,1)]) the SM 6.6
derivatives spec explicitly states no relation between SV_GroupIndex and
WaveGetLaneIndex() should be assumed. On WARP (wave width 4) the reads address
lanes that do not exist and the denoiser output is wrong on every interior
pixel.

Changes:
- Make a portable groupshared-memory row exchange the default permutation
  (correct on any device); keep the original wave-intrinsic exchange as an
  opt-in fast path behind the RTAO_WAVE_READ_LANE_PATH define (thin wrapper
  shaders CalculateMeanVarianceCS_WaveReadLaneAt / DisocclusionBlur3x3CS_
  WaveReadLaneAt).
- Select the fast path at runtime, per kernel, only when the device reports
  wave ops and WaveLaneCountMin >= 16 (SupportsWaveIntrinsicDenoiserFilterPath).
- Expose it as a "Filter row exchange" EnumVar; the option collapses to
  groupshared-only (SetListLength(1)) on devices that cannot run the wave path.
- Apply the same fix to the currently-unused DepthAwareSeparableGaussianFilter
  3x3CS_AnyToAnyWaveReadLaneAt variant for consistency.
- Remove now-stale measured performance numbers from the readme and shader
  comments; note the preview video predates the fix.

Validated on WARP against a CPU reference: the groupshared path matches to
half-precision, while the wave path is wrong on 576/576 mean/variance and
35/36 disocclusion interior pixels.

@amarpMSFT amarpMSFT left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ACR-TEST-TEMP] live smoke review

@amarpMSFT amarpMSFT left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ACR-TEST-TEMP] live smoke review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant