Fixes from other forks and upstream: translator, textures, lifetimes #29

Manually merged
github merged 21 commits from github-bot/gh-29 into main 2026-11-26 13:27:03 +00:00 AGit
Owner

@⁠TaynanGT on GitHub · 2026-11-26 13:14 UTC · original
TaynanGT:fix/forks-batch-2 → main · +1136 −216 · 23 files · 21 commits · merged 2026-11-26 13:23 UTC

Fixes from other forks and upstream, plus lifetime and cache fixes of our own. Builds on #27.

Translator

  • 9bb7dbff (port of upstream 0665a0e8, with QB): a wave64 ds_bpermute_b32 permutes within each 32-lane half. It is no longer refused as "a lane permute across two host waves", so the wave64 programs that used it now translate on 32-lane hosts.
  • 8f40c451 (lower.rs part of f6a09d3b, with fxceless): v_mad_legacy/v_mac_legacy run as an FMA with denormals flushed and the zero-factor rule.
  • c125c0c0 (Garu667, #1261): console lanes in groups of several host waves take their thread ids from a group counter. In a 2-D group the old rounding wrote 32 of 64 slots on a 4090; this writes all 64. VICTORY_THREAD_TICKET joins the shader cache key.
  • 90143cef (Garu667, #1287): the loose-LDS fallback, on by default as its author left it. VICTORY_WAVE_LDS_LOOSE and VICTORY_SCC_LOCAL_ANY join the cache key. Our base has no "wide_last" block, so only the fallback came over; 5cf8960c drops a duplicate s_mov_b64 literal fold it added.
  • 037c5315 (rayane-creato1r, upstream #2812): a comparison sampler replaces the filter's reduction instead of OR-ing 0x80 into it.
  • 8fe3ccdd (Bartosz, upstream #3158): v_fmac_f32 in VOP3 applies abs/neg to its accumulator.
  • 17e3e2c8 (shh, upstream #3187): sections() keeps scanning past an unmatched saveexec.
  • d4b32ea6, 1ca0454a: tests only. The base doesn't have the s_andn2 discard pattern behind upstream #2306, and loads and stores of a heap texture share one descriptor here, so the twin-SRV bug seen elsewhere can't happen; both tests pin that.

Textures and formats

  • 8d56dd95 (RVZO6, upstream #3111): BC7 channel rotation only in modes 4 and 5.
  • 724e9527 (fxceless, #1210): a view moved to the first level with memory keeps the title's ResourceMinLODClamp.
  • 7ae1afce (gomeaw, avatarmanz #150): texture readback destinations stay pending until their flight lands.
  • 898c40cb (feanorsun, avatarmanz #198): the idle texture sweep restarts when its cursor passes the last texture.
  • 00a21ef4 (kripotker, part of avatarmanz #206): under PC memory pressure, idle texture copies go after 5 s.
  • 26aeded1: a sparse read that only hits holes keeps the digest of the staged texels.

Lifetimes and caches

  • 18bc367d (kripotker, part of avatarmanz #206): the placed-view shape index is keyed by the shape's hash. The padding part of #206 is already in #27.
  • 4d6a7449: a slot flip keeps the record its upload was made for; the key is read at selection and checked again at the flip.
  • 2a267adb: waits and signals held back keep a reference to their fence until their last use (FenceRef).
  • f31db60c: a translation whose cache write fails still reaches the caller; a failed translation is still an error.

Measured

RTX 4090, Ryzen 9 9950X3D, Series S profile, 30 minutes in the world, against main after #27:

main (#27) this branch
fps median / p10 / 1% low 20.5 / 17.6 / 11.2 21.6 / 18.6 / 15.5
ms per frame 48.8 46.3
private memory, median / max 27.2 / 27.4 GB 25.0 / 25.2 GB
card memory max 12.5 GB 10.1 GB
compute shaders that don't translate 6 3

No errors and no new kinds of warning (96 warnings against 111). Captures along the route show no black screen or new artefacts; the square blocks in clouds are still there.

Checks

ci-local.ps1: clippy with and without all features clean; 963 tests passed, 0 failed, 47 ignored. The merge with main gives the same tree that was tested.

🤖 Generated with Claude Code

**@⁠TaynanGT** on GitHub · 2026-11-26 13:14 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/29) `TaynanGT:fix/forks-batch-2` → `main` · +1136 −216 · 23 files · 21 commits · merged 2026-11-26 13:23 UTC Fixes from other forks and upstream, plus lifetime and cache fixes of our own. Builds on #27. ## Translator - `9bb7dbff` (port of upstream 0665a0e8, with QB): a wave64 `ds_bpermute_b32` permutes within each 32-lane half. It is no longer refused as "a lane permute across two host waves", so the wave64 programs that used it now translate on 32-lane hosts. - `8f40c451` (lower.rs part of f6a09d3b, with fxceless): `v_mad_legacy`/`v_mac_legacy` run as an FMA with denormals flushed and the zero-factor rule. - `c125c0c0` (Garu667, #1261): console lanes in groups of several host waves take their thread ids from a group counter. In a 2-D group the old rounding wrote 32 of 64 slots on a 4090; this writes all 64. `VICTORY_THREAD_TICKET` joins the shader cache key. - `90143cef` (Garu667, #1287): the loose-LDS fallback, on by default as its author left it. `VICTORY_WAVE_LDS_LOOSE` and `VICTORY_SCC_LOCAL_ANY` join the cache key. Our base has no "wide_last" block, so only the fallback came over; `5cf8960c` drops a duplicate `s_mov_b64` literal fold it added. - `037c5315` (rayane-creato1r, upstream #2812): a comparison sampler replaces the filter's reduction instead of OR-ing 0x80 into it. - `8fe3ccdd` (Bartosz, upstream #3158): `v_fmac_f32` in VOP3 applies abs/neg to its accumulator. - `17e3e2c8` (shh, upstream #3187): `sections()` keeps scanning past an unmatched saveexec. - `d4b32ea6`, `1ca0454a`: tests only. The base doesn't have the `s_andn2` discard pattern behind upstream #2306, and loads and stores of a heap texture share one descriptor here, so the twin-SRV bug seen elsewhere can't happen; both tests pin that. ## Textures and formats - `8d56dd95` (RVZO6, upstream #3111): BC7 channel rotation only in modes 4 and 5. - `724e9527` (fxceless, #1210): a view moved to the first level with memory keeps the title's `ResourceMinLODClamp`. - `7ae1afce` (gomeaw, avatarmanz #150): texture readback destinations stay pending until their flight lands. - `898c40cb` (feanorsun, avatarmanz #198): the idle texture sweep restarts when its cursor passes the last texture. - `00a21ef4` (kripotker, part of avatarmanz #206): under PC memory pressure, idle texture copies go after 5 s. - `26aeded1`: a sparse read that only hits holes keeps the digest of the staged texels. ## Lifetimes and caches - `18bc367d` (kripotker, part of avatarmanz #206): the placed-view shape index is keyed by the shape's hash. The padding part of #206 is already in #27. - `4d6a7449`: a slot flip keeps the record its upload was made for; the key is read at selection and checked again at the flip. - `2a267adb`: waits and signals held back keep a reference to their fence until their last use (`FenceRef`). - `f31db60c`: a translation whose cache write fails still reaches the caller; a failed translation is still an error. ## Measured RTX 4090, Ryzen 9 9950X3D, Series S profile, 30 minutes in the world, against main after #27: | | main (#27) | this branch | |---|---|---| | fps median / p10 / 1% low | 20.5 / 17.6 / 11.2 | 21.6 / 18.6 / 15.5 | | ms per frame | 48.8 | 46.3 | | private memory, median / max | 27.2 / 27.4 GB | 25.0 / 25.2 GB | | card memory max | 12.5 GB | 10.1 GB | | compute shaders that don't translate | 6 | 3 | No errors and no new kinds of warning (96 warnings against 111). Captures along the route show no black screen or new artefacts; the square blocks in clouds are still there. ## Checks `ci-local.ps1`: clippy with and without all features clean; 963 tests passed, 0 failed, 47 ignored. The merge with main gives the same tree that was tested. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A partly mapped texture is read through its holes, which come back as
zeros. The partial path stored the digest of every read before checking
for an all-zero buffer, so a read that caught nothing mapped replaced the
digest of the texels already detiled, and the next read that found those
same texels again detiled and uploaded them a second time.

Last::accept_partial now rejects an all-zero read without touching the
digest. The full read path is unchanged and still accepts a texture that
really is black or transparent.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
On a miss the converter translated the container, the cache wrote the
encoded result to disk, and cached() read it back from the path. When
the write failed (a full disk, a locked or broken entry), get_or_convert
returned an error and the shader was reported as untranslatable although
the translator had produced it, so the pipeline that needed it was never
built.

The converter now keeps the shader it made, and cached() hands that to
the caller whether or not the entry reached the disk, warning once about
the failed write. A failure of the translator itself is still an error.
Hits keep reading the entry from disk as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A texture slot that shows another level, or nothing yet, is uploaded and
then flipped to its new view once the upload's list has run. The texture
pass read the slot's view when it picked the slot, but the flip read the
record key again when it was queued. A record the title wrote to the slot
in between (a descriptor slot reused for another texture) was then queued
with the replaced record's upload, and the slot could show the new
texture before any of its levels had been filled.

The pass now reads the view and its key together with prepare_texture_slot
(prepare_bake_slot, which only the synchronous bake used) and passes the
key through texture_slot_flip, texture_slot_show_after and
texture_slot_show_ahead; mirror_after does the same. show_later rejects a
key the slot no longer holds under the slot's lock, and the flip is still
dropped when it is applied to a slot whose record changed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A queue wait or signal that cannot happen yet is kept for later: held by
a waiting queue, put in the behind lane, joined to a submission there, or
queued behind the flights in the air (late_signal). All of these kept
the fence as a bare address. A title that released its fence right after
Signal or Wait, which D3D12 allows since the queue keeps what it uses
alive, left them pointing at freed memory: the later completed() read or
set() wrote a dead object.

FenceRef takes a reference when the operation is put aside and releases
it on drop, and every place that keeps one carries it: Held::Wait and
Held::Signal, the lane's Job::Wait, Job::Signal, the signals of
Job::Joined and the Ask copied out for the readiness check, and
Late::Signal. late_signal takes the fence itself and holds it while it is
queued. Joining a submission no longer swaps a placeholder Job::Wait
into place, which would have needed a fence of its own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The comparison bit was OR-ed into a filter that already holds the
reduction in bits 7-8, which turned a minimum sampler (0x100) into a
maximum one (0x180). StaticSampler::make_comparison replaces the
reduction; comparison_replaces_the_reduction covers standard, minimum and
maximum reductions. immediate_sampler_slots_distinguish_comparison_uses
builds its expectation with it too.

Split out of #1483.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 333e39c37122d9fad2999cd7068a60c7ce9e4e64)
ResourceMinLODClamp counts from the resource's level 0, so moving the view's first level must not lower it; lowered, a view could sample a level the title held back. Its author's test on an RTX 4080 and WARP; read whole, applied as it is; its card test not run here.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
(cherry picked from commit 41f9857e7d9d25e377e9696041a756c4e78bf690)
The relay tracked writeback textures but omitted explicit texture-to-buffer readbacks in its in-flight range index. Use the same destinations for the relay, batching and card-step writer checks so a later CPU copy does not read pre-landing bytes.

(cherry picked from commit 1a4298f2ea343c4a01e965a0b268a8d9402f4952)
Upstream 4a53da72 (Marvisak/VIctory #2306) fixed a structuriser that took
a loop's own exit test (`s_andn2 X, X, exec`, then its SCC branch) for a
discard's "no live lane is left" exit when the program ended with
`exp null done vm`. The back edge became always taken and every lane ran
to the loop limit, 203 ms a draw on an RTX 5090.

This structuriser has no discard exit recognition: a lane is killed only
when it leaves without its done export, and the andn2 test stays a lane
condition. The test pins that down with the upstream program, so the
back edge is neither always nor never taken.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A wave64 backward permute works on lanes 0..31 and 32..63 independently
(RDNA 2 ISA, section 10.4.4; confirmed on gfx1036 in upstream #573). The
lowering masked the source lane with the console wave size, so a lane of
one half could read the other half.

The source lane is now ((address + offset) >> 2) & 31, with this lane's
half added back on a 64-lane host wave. Because a permute never leaves
its half, it no longer counts as cross-half code: a wave64 program whose
only such code is ds_bpermute runs in host waves of 32 without an
exchange, and with an exchange each host wave permutes on its own
instead of refusing the program ("a lane permute across two host waves").
On a host of 32-lane waves (NVIDIA) those programs were refused before.

The tests run the upstream permutes on the host GPU in waves of 32: the
half-wave wrap, EXEC per half, and the address bits a wave32 drops. They
also lower and validate the wave64 cases for 64-lane waves.

Ported from upstream 0665a0e8 (Marvisak/VIctory #573).

Co-authored-by: QB <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
On RDNA 2 the v_mad_legacy_f32 and v_mac_legacy_f32 encodings decode as
v_fma_legacy_f32 and v_fmac_legacy_f32: one fused multiply-add of
sources with their subnormals flushed, keeping the legacy rule that a
zero factor makes the product +0. They were lowered as a rounded legacy
product followed by a separate add, which loses the low bits a single
rounding keeps ((1 + 2^-23) * (1 - 2^-23) - 1 came out 0, not -2^-46).

legacy_fmad flushes the three sources, fuses, and gives +0 + acc where a
factor is zero. The RDNA host form of the separate legacy product no
longer applies to these two, so the RDNA forms test leaves mad_legacy
out; v_mul_legacy_f32 keeps it.

Ported from fxceless/victory-fork f6a09d3b (its lower.rs part, fork PR
#1026), with a v_mac_legacy_f32 case added to its test.

Co-authored-by: fxceless <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
xcl-dev/xcl ec356bc5c8 found an image_load after an image_store of the
same image reading the old value on an RTX 3070: its loads went through
a second, SRV view of each image while stores and atomics wrote the UAV,
and within one dispatch the SRV need not see the UAV's writes.

Here a load and a store of one image read the same heap descriptor, the
view the title made there; there is no separate SRV twin. The test
checks it on the host GPU and WARP with a texture picked from the view
heap, the one case where the load's view kind is not known from the
program's declarations: the stored texel comes back.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit b47f5af749beb6ad71fe7b5e8b955b7c4956d2c5)
A program with console lanes relabels its threads so that each host wave
holds a wave-aligned run of console threads. Outside wave64-in-halves, the
console thread was the flat id of the wave's first lane rounded down to the
wave size, plus the lane. A host need not fill its waves that way: NVIDIA
(and RDNA in 32-lane waves) fill 2-D groups from 16 x 2 tiles, so two waves
of a 32 x 2 group round down to the same base and half the group's threads
get the ids of the other half (issue #1243).

Such programs, in groups larger than one host wave, now take their threads
from an LDS counter, as wave64 programs in host waves of 32 already did
(`wave_base`): every thread zeroes it, the group meets, and each wave's
first active lane adds for its wave. A full wave takes the next aligned
block of w from the low 16 bits; a wave with fewer lanes (the group's last,
partial one) adds its lane count to the high 16 bits and is placed past the
full blocks, so it cannot shift a full wave off its alignment whatever the
order the waves arrive in (this also covers the halves path's groups whose
size is not a multiple of 32, where each wave used to add a fixed 32).
Lanes are placed by their rank among the active lanes.

VICTORY_THREAD_TICKET=0: the old rounding (the switch is read by the
translator, so it is part of the translation's fingerprint).

Test (wave64_tests.rs): a console wave32 program with v_mbcnt in a 32 x 2
group stores 1 at dword 32y + x. On an RTX 3080 (driver 32-lane waves) the
old rounding writes 32 of the 64 dwords, the counter all 64, each once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 61f7df74b486134b069d5cfbfe6dfe55ac45613b)

[Vice-Tay: VICTORY_THREAD_TICKET joins the switches the shader cache
keys on (shader_cache.rs), which this tree lists by name; the test went
in after the wave64 permute tests.]
Console wave64 programs that read and write LDS inside one lane-branch
region were refused outright by a 32-lane host. As a last resort they are
now ordered between the two host waves only where the region is entered
and left (emit/loose_lds.rs; VICTORY_WAVE_LDS_LOOSE=0 turns it off;
approximate). Also from #799: s_pack_{ll,lh,hh}_b32_b16, s_bfm_b32 and the
s_mov_b64 32-bit literal as constant sources, the thread-group info SGPR,
f64 wave sums per host wave in local mode, VICTORY_SCC_LOCAL_ANY=1 (opt-in).

Rebase: #799's CBV clamp is left out (main has its own, PR #911); main's
wave-wide 'last' form is kept and the loose fallback comes after it; the
fallback's helper lives in its own file so lower.rs stays under the asset
policy's 512 KiB.

Co-authored-by: Massive-Adrian <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 4eb3ac94d47d071e6038212e9a87c081605ee863)

[Vice-Tay: this tree tries the wave-wide branches before the approximate
forms and has no wave-wide "last" form, so only the loose fallback goes
after the local waves. The s_bfm_b32 fold this tree already had for
inline constants takes literals too, still for dword 0 only.
VICTORY_WAVE_LDS_LOOSE and VICTORY_SCC_LOCAL_ANY join the switches the
shader cache keys on (shader_cache.rs).]
(cherry picked from commit 796c55ec776da567d9c1566867ac3dc13e5d78f2)
In the VOP3 encoding, bit 2 of abs and of neg names the accumulator of
v_fmac_f32, which is the destination register. RDNA2 computes
fma(a, b, -d) and fma(a, b, |d|) with them; the lowering read the
accumulator without them.

The expected values of the new test are 16 rows measured on RDNA2
(gfx1031) with IEEE mode off and f32 denormals flushed, published by
the AnyPS5 project in VFmacF32AccumulatorModifiers.cpp. No code is
taken from that project.

v_mac_f32 and v_mac_legacy_f32 share the arm and get the same
treatment; there is no measurement for those two.

Co-Authored-By: Gemini 4 Neon <[email protected]>
Co-Authored-By: Claude Fable 5.2 <[email protected]>
(cherry picked from commit cf8f543c64f2c02d2007de922a8ecfe01b0e3e11)

[Vice-Tay: this tree has no semantics_tests.rs; the rows run in
valu_tests.rs on the host GPU and WARP, NaNs compared as any NaN. The
v_mac_legacy_f32 accumulator goes into legacy_fmad with the modifiers
applied.]
(cherry picked from commit d097c310a40be0364c960293390a7e643b4c2265)

[Vice-Tay: this tree's simulate models no half-wave shape, so the test
puts an unmatched s_or_saveexec_b64 before the wave64 OR reduction the
other tests use and expects its section, and its result, at index 1.]
The index from a placed view's shape to its number held a second full
copy of every shape (a flag and 28 words): 2.4 million shapes, some
900 MB with the list, 18 minutes into the world. It is now keyed by the
shape's hash and checked against the list; of two shapes with one hash
the second becomes a table entry, as when the shapes are full.

The shape index part of avatarmanz/VIctory-7900XTX #206. Its padding
words are zeroed here already (f07e54a2, ce914907), every word #206
zeroes and the unused tail of each dimension's union.

(cherry picked from commit e1a125000053bde5b0b93b7eeb29d6a49ef9b68c, in part)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The sweep kept idle host textures for minutes while the card had room,
but what the card spills to system memory is commit too: at 18 minutes
the process held 41 GB private with 1.4 GB of commit left. With idle
copies let go after 5 s under pressure, the same point was 28.5 GB
private and 11.9 GB on the card (was 20.5), at 57.6 ms a frame (was 63.6),
as measured on avatarmanz/VIctory-7900XTX #206.

Here the pressure signal is always on (residency::refresh, no
VICTORY_RESIDENCY switch), so play.ps1 is left as it is.

(cherry picked from commit f4497a7cb2d040aa6126c7fd854ed23f7d8d85e9, in part)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Placed views now leave out the resource description's padding words, so a description with values there read back without them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit f1f52219ec)
The loose-LDS port brought an arm that folds every 32-bit literal of
s_mov_b64 as zero-extended. This tree already folded only literals below
2^31, whose high dword is 0 whether the hardware extends a literal with
zeros or with its sign; the new arm came first and left that one
unreachable, which clippy refuses. The careful arm stays.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 13:16:33 +00:00
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-26 13:14 UTC · original · edited 2026-11-26 13:19 UTC

Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-26T13:17:22.033639Z 5cf8960 PR opened
🔒 Security Review ✅ Completed 2026-11-26T13:19:04.072025Z 5cf8960 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review" or "@⁠codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-26 13:14 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/29#issuecomment-7193070267) · edited 2026-11-26 13:19 UTC <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"5cf8960c2b6877ea727313927d745a6f57033127","has_any_findings":true,"has_unresolved_findings":true,"status":"completed"},"security_review":{"commit_sha":"5cf8960c2b6877ea727313927d745a6f57033127","has_any_findings":null,"has_unresolved_findings":null,"status":"completed"}} --> <!-- codex-security-review:v1 {"blockingSeverityThreshold":"P0","headSha":"5cf8960c2b6877ea727313927d745a6f57033127","mergeGateEnabled":false,"pullRequestNumber":29,"repository":"TaynanGT/Vice-Tay","status":"completed"} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-26T13:17:22.033639Z">2026-11-26T13:17:22.033639Z</relative-time> | `5cf8960` | PR opened | | 🔒 **Security Review** | ✅ **Completed** <relative-time datetime="2026-11-26T13:19:04.072025Z">2026-11-26T13:19:04.072025Z</relative-time> | `5cf8960` | PR opened | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review" or "@⁠codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-26 13:17 UTC · original · reviewed

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5cf8960c2b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@⁠codex address that feedback".

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-26 13:17 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/29#pullrequestreview-6074785414) · **reviewed** <!-- codex-review-receipt:v1 --> ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `5cf8960c2b` <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@⁠codex address that feedback". </details>
@ -2561,0 +2590,4 @@
let (e, i32t) = (self.s.entry, self.s.t.i32);
let flat = self.s.op(e, "flattenedThreadIdInGroup.i32", Attr::ReadNone, i32t, 96, &[]);
let w = self.s.m.i32(wave.trailing_zeros());
let index = self.s.m.bin(e, Bin::LShr, flat, w);
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-26 13:17 UTC · original

P2 Badge Derive group-info wave indices from the relabelled console threads

For compute shaders that read the group-info SGPR and use console-lane operations in a multi-wave group, this derives the wave index from physical host thread IDs, while thread_id() derives console thread IDs from the new ticket counter. These mappings can disagree even in a one-dimensional group because tickets are allocated in arrival order. In the 32×2 NVIDIA layout described by the new regression test, the physical flattened IDs can also produce different wave indices within a single host wave, although this input represents a scalar SGPR. Shaders using that index to select per-wave LDS or output regions can consequently address the wrong region. Derive the index from the same console-thread mapping used by thread_id() and the wave-exchange helpers.

Useful? React with 👍 / 👎.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-26 13:17 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/29#discussion_r4708891404) **<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Derive group-info wave indices from the relabelled console threads** For compute shaders that read the group-info SGPR and use console-lane operations in a multi-wave group, this derives the wave index from physical host thread IDs, while `thread_id()` derives console thread IDs from the new ticket counter. These mappings can disagree even in a one-dimensional group because tickets are allocated in arrival order. In the 32×2 NVIDIA layout described by the new regression test, the physical flattened IDs can also produce different wave indices within a single host wave, although this input represents a scalar SGPR. Shaders using that index to select per-wave LDS or output regions can consequently address the wrong region. Derive the index from the same console-thread mapping used by `thread_id()` and the wave-exchange helpers. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
github manually merged commit a555a0b94f into main 2026-11-26 13:27:03 +00:00
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 01:33 UTC · original

I opened #108 for the group-info finding. On relabelled waves the translator now derives the wave index from the same base as the console thread IDs. The draft extends the 32 × 2 hardware regression to check the group-info word for every thread, and uses a new translator cache version.

**@⁠TaynanGT** on GitHub · 2026-11-27 01:33 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/29#issuecomment-7207390990) I opened #108 for the group-info finding. On relabelled waves the translator now derives the wave index from the same base as the console thread IDs. The draft extends the 32 × 2 hardware regression to check the group-info word for every thread, and uses a new translator cache version.
This discussion has been locked. Commenting is limited to contributors.
No description provided.