Skip to content

Water's default probe keeps its irradiance on AMD: one tap for probe 0 - #553

Merged
RyeMutt merged 1 commit into
developfrom
zanibar/amdfix-reflectionprobe_gl_test
Oct 23, 2026
Merged

RyeMutt merged 1 commit into
developfrom
zanibar/amdfix-reflectionprobe_gl_test

Conversation

@taylnos

@taylnos taylnos commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

Problem

reflectionprobe_gl_test fails on an AMD RX 6800 (Windows, driver 26.8.1). It fails only through sampleReflectionProbesWater, at REFMAP_LEVEL 3 with REF_SAMPLE_COUNT 3: 1,630 ambient taps come out far darker than the list's.

Cause

The bad texels fall in 8×8 blocks, one GPU wave of 64 pixels each. They are exactly the 39 waves whose first pixel has a full list. That pixel skips water's own default-probe tap, if (count < REF_SAMPLE_COUNT) probeTap(0, ...).

Every other pixel of those waves that takes the tap gets none of probe 0's irradiance. Many read exactly amblit * (1 - refParams[0].x), which is what a zero irradiance mixes to.

The pixels' inputs are per-pixel hashes, and the shader has no cross-lane operations. So one pixel's branch changing another's result is the driver's compiler. The automatic probes' own tap of probe 0, under automatic && count < REF_SAMPLE_COUNT, was right in all 343 waves whose first pixel skipped it.

Change

sampleProbeTaps takes probe 0 through one tap for both cases. It taps where the list has room and either the automatic probes are not shut out or the point is water's: (automatic || t.water) && count < REF_SAMPLE_COUNT. Water then mixes it in as an automatic probe, as before.

Every entry point taps the same probes in the same order as before, at both probe levels. This replaces three tap sites with one.

Viewer impact: the viewer lists 32 probes a point, so its water met this only where 32 probes hold a pixel. It would show as dark 8×8 blocks in the water's irradiance on AMD. I haven't looked for this in the viewer.

Testing

On the RX 6800:

  • reflectionprobe_gl_test passes, three runs in random order.
  • All 9 alrender_gl_tests pass.
  • reflectionprobe_gl_bench with the old and new shader alternated in the same binary: every fused time is unchanged within noise. Level-3 water is 2.605 ms both ways, and the rest are within ±0.4%.
  • Not run: NVIDIA, and Mesa (CI will run llvmpipe).

🤖 Generated with Claude Code

…h AMD's compiler gave no irradiance under water's own

On the RX 6800 (driver 26.8.1) reflectionprobe_gl_test failed only through
sampleReflectionProbesWater, at REFMAP_LEVEL 3 with 3 probes a point: 1,630
ambient taps far darker than the list's, in 8x8 blocks, one a wave. They were
exactly the 39 waves whose first pixel's list was full, so it skipped water's
own `if (count < REF_SAMPLE_COUNT) probeTap(0, ...)`. Every other pixel of
those waves that took the tap got none of the default probe's irradiance: many
read exactly amblit * (1 - refParams[0].x), the mix of a zero irradiance. The
automatic probes' tap of it under `automatic && count < REF_SAMPLE_COUNT` was
right in all 343 waves whose first pixel skipped it.

Water and the automatic probes now take probe 0 through that one tap, where the
list has room and either the automatic probes are not shut out or the point is
water's, and water mixes it in as an automatic probe after. Every entry point
taps the same probes as before, at both probe levels, and the probe bench's
times are unchanged. The viewer lists 32 probes a point, so its water met this
only where 32 probes hold a pixel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters: 1
  • indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl is excluded by !**/*.glsl

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e805fe12-d36e-449e-a583-12df806b6bdd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@RyeMutt
RyeMutt merged commit 1952c93 into develop Oct 23, 2026
23 checks passed
@RyeMutt
RyeMutt deleted the zanibar/amdfix-reflectionprobe_gl_test branch October 23, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants