fix(agc): color compare emulation: review follow-up to #668 #907

Closed
ThisIsAkill wants to merge 3 commits from upstream-pr/907 into main
ThisIsAkill commented 2026-10-06 15:40:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ThisIsAkill on 2026-10-06T15:40:12Z.


Update after review: rebased onto main cea1ef13. The reduction check is dropped (#815 has it). The array layer is now round-half-even (measured on RDNA2 by adriadam10), correcting floor(z + 0.5) from #668. NaN rows were added, and TRUNC_COORD with bilinear is documented. See the reply below for details.

What

A follow-up to #668, which was merged before the review fixes were pushed. It carries the changes that answer the four review points from that PR; nothing else. Two commits on current main:

  1. fix(agc): compare NOT_EQUAL unordered and refuse reduction filters and TRUNC_COORD in the color compare emulation
  2. test(agc): cover 2D arrays and GREATER in the color compare emulation

How each review point is addressed

  1. 2D array. EmulatedColorCompare gains a 2D array case (two layers, a different red table per layer): it covers the layer size query and the floor(z + 0.5) clamp, with layer coordinates below 0, between layers and past the last one.
  2. NaN. NOT_EQUAL is now OpFUnordNotEqual (true when the reference or the texel is NaN). I could not verify the hardware's NaN behaviour, so the TechnicalDebt entry says so: it is the IEEE != and as Vulkan defines it for its own depth compare, not confirmed on hardware.
  3. Sampler fields. FILTER_MODE (word 0 bits 29 to 30) with a min/max reduction mode throws, and so does TRUNC_COORD (bit 27) with point sampling. The test checks both are rejected and that the default values still run. The TechnicalDebt entry lists both.
  4. Other compare functions. The test now runs GREATER as well as LESSEQUAL, which guards the operand order.

Notes

  • #639 (still open, and already conflicting with main) touches ResourceMaterializer.cpp, which this change edits by four lines. Whichever lands second rebases; the emulated compare then needs the runtime-mode form you described in the review.
  • Nothing here changes behaviour for titles that don't use a compare sampler on a color texture.

Tested

Linux, GCC, NVIDIA RTX 3070, on main at 5895ea72:

  • agc_driver_emulated_color_compare passes, 4 runs in a row (the new 2D array, GREATER and rejection cases included).
  • The full ctest passes: 359 of 359, with one test (agc_driver_pixel_valid_mask) skipping itself.

I did not run the new cases against the unfixed code in this round.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted:
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4761128850 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/907). Originally posted by [ThisIsAkill](https://github.com/ThisIsAkill) on 2026-10-06T15:40:12Z. --- **Update after review:** rebased onto `main` `cea1ef13`. The reduction check is dropped (#815 has it). The array layer is now round-half-even (measured on RDNA2 by adriadam10), correcting `floor(z + 0.5)` from #668. NaN rows were added, and TRUNC_COORD with bilinear is documented. See the reply below for details. ### What A follow-up to #668, which was merged before the review fixes were pushed. It carries the changes that answer the four review points from that PR; nothing else. Two commits on current `main`: 1. `fix(agc): compare NOT_EQUAL unordered and refuse reduction filters and TRUNC_COORD in the color compare emulation` 2. `test(agc): cover 2D arrays and GREATER in the color compare emulation` **How each review point is addressed** 1. **2D array.** `EmulatedColorCompare` gains a 2D array case (two layers, a different red table per layer): it covers the layer size query and the `floor(z + 0.5)` clamp, with layer coordinates below 0, between layers and past the last one. 2. **NaN.** `NOT_EQUAL` is now `OpFUnordNotEqual` (true when the reference or the texel is NaN). I could not verify the hardware's NaN behaviour, so the TechnicalDebt entry says so: it is the IEEE `!=` and as Vulkan defines it for its own depth compare, not confirmed on hardware. 3. **Sampler fields.** `FILTER_MODE` (word 0 bits 29 to 30) with a min/max reduction mode throws, and so does `TRUNC_COORD` (bit 27) with point sampling. The test checks both are rejected and that the default values still run. The TechnicalDebt entry lists both. 4. **Other compare functions.** The test now runs `GREATER` as well as `LESSEQUAL`, which guards the operand order. **Notes** - #639 (still open, and already conflicting with `main`) touches `ResourceMaterializer.cpp`, which this change edits by four lines. Whichever lands second rebases; the emulated compare then needs the runtime-mode form you described in the review. - Nothing here changes behaviour for titles that don't use a compare sampler on a color texture. ### Tested Linux, GCC, NVIDIA RTX 3070, on `main` at `5895ea72`: - `agc_driver_emulated_color_compare` passes, 4 runs in a row (the new 2D array, GREATER and rejection cases included). - The full `ctest` passes: 359 of 359, with one test (`agc_driver_pixel_valid_mask`) skipping itself. I did not run the new cases against the unfixed code in this round. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [ ] AI-assisted:
ThisIsAkill commented 2026-10-06 18:53:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ThisIsAkill on 2026-10-06T18:53:43Z.


Removed code comments per CONVENTIONS.md; no functional change.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6023250269 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/907#issuecomment-6023250269). Originally posted by [ThisIsAkill](https://github.com/ThisIsAkill) on 2026-10-06T18:53:43Z. --- Removed code comments per CONVENTIONS.md; no functional change.
adriadam10 commented 2026-10-07 08:33:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-07T08:33:48Z.

Review: CHANGES_REQUESTED


Thanks for the follow-up. I measured the four points on RDNA2 (gfx1035, image_sample_c_lz on a 32_FLOAT texture, point sampling) with the HW oracle (tools/hw-oracle/):

  • Array layer rounding (blocking). The hardware selects the layer as clamp(roundEven(z), 0, layers - 1), not floor(z + 0.5): with 4 layers, z = 0.5 → 0, 1.5 → 2, 2.5 → 2, 3.5 → 3, 0.49999997 → 0 (in f32, 0.49999997 + 0.5 rounds to 1.0, so floor picks layer 1 there too). SpirvImageEmitter.cpp:936 (from #668) uses Floor(z + 0.5), and the new test pins z = 0.5 → layer 1 (EmulatedColorCompare.cpp:129, Expected at :168), i.e. it locks in the value the hardware disagrees with. GLSLstd450RoundEven (as Vulkan does for its own array layer) and expected values from round-half-even, with rows 0.5, 1.5, 2.5 and 0.49999997 over at least 3 layers, would fix both.
  • NOT_EQUAL. Measured: NOT_EQUAL returns 1 when the reference, the texel or both are NaN; the other functions return 0 for NaN; +0 and -0 compare equal. So OpFUnordNotEqual matches. The TechnicalDebt line can say it was measured on RDNA2 instead of "not verified". No test row covers it now (the test never runs NOT_EQUAL, so it passes with OpFOrdNotEqual too): a case on an emulated float format (e.g. 16_16_16_16_FLOAT; R32 float takes the native path) with a NaN texel and a NaN reference under NOT_EQUAL would pin it.
  • Rebase. This conflicts with main: #815 already throws for a min/max reduction sampler in emulatedCompareState and adds the matching Reject in this test. Please drop the reduction check, its Reject and the reduction field, and keep the TRUNC_COORD part.
  • TRUNC_COORD with bilinear is accepted. On hardware it changes the bilinear weights (e.g. 2.12109 instead of 2.125 at u = 2.4999 texels). That is the same gap as the existing "full float weights" sentence, so either throw for it too or name it in that sentence.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5439697732 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/907#pullrequestreview-5439697732). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-07T08:33:48Z. **Review:** CHANGES_REQUESTED --- Thanks for the follow-up. I measured the four points on RDNA2 (gfx1035, `image_sample_c_lz` on a 32_FLOAT texture, point sampling) with the HW oracle (`tools/hw-oracle/`): - **Array layer rounding (blocking).** The hardware selects the layer as `clamp(roundEven(z), 0, layers - 1)`, not `floor(z + 0.5)`: with 4 layers, z = 0.5 → 0, 1.5 → 2, 2.5 → 2, 3.5 → 3, 0.49999997 → 0 (in f32, `0.49999997 + 0.5` rounds to 1.0, so `floor` picks layer 1 there too). `SpirvImageEmitter.cpp:936` (from #668) uses `Floor(z + 0.5)`, and the new test pins z = 0.5 → layer 1 (`EmulatedColorCompare.cpp:129`, `Expected` at :168), i.e. it locks in the value the hardware disagrees with. `GLSLstd450RoundEven` (as Vulkan does for its own array layer) and expected values from round-half-even, with rows 0.5, 1.5, 2.5 and 0.49999997 over at least 3 layers, would fix both. - **NOT_EQUAL.** Measured: NOT_EQUAL returns 1 when the reference, the texel or both are NaN; the other functions return 0 for NaN; +0 and -0 compare equal. So `OpFUnordNotEqual` matches. The TechnicalDebt line can say it was measured on RDNA2 instead of "not verified". No test row covers it now (the test never runs NOT_EQUAL, so it passes with `OpFOrdNotEqual` too): a case on an emulated float format (e.g. 16_16_16_16_FLOAT; R32 float takes the native path) with a NaN texel and a NaN reference under NOT_EQUAL would pin it. - **Rebase.** This conflicts with `main`: #815 already throws for a min/max reduction sampler in `emulatedCompareState` and adds the matching `Reject` in this test. Please drop the reduction check, its `Reject` and the `reduction` field, and keep the `TRUNC_COORD` part. - **TRUNC_COORD with bilinear** is accepted. On hardware it changes the bilinear weights (e.g. 2.12109 instead of 2.125 at u = 2.4999 texels). That is the same gap as the existing "full float weights" sentence, so either throw for it too or name it in that sentence.
ThisIsAkill commented 2026-10-07 17:25:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ThisIsAkill on 2026-10-07T17:25:43Z.


Note: the branch is rebased onto current main, as requested, so the commit hashes have changed (now fbbe4789, cfcd3d40, 593ffa19).

@adriadam10 thanks for measuring this on hardware. All four points are addressed, and the branch is rebased onto current main (cea1ef13).

  • Array layer rounding. You're right, and the bug is mine: floor(z + 0.5) came in with #668, so this corrects behaviour that's already on main. The layer is now clamp(RoundEven(z), 0, layers - 1) (GLSL.std.450 RoundEven, as Vulkan uses for its own array layer). The test now uses 4 layers whose neighbours are far apart in value, with layer coordinates 0.49999997, 0.5, 1.5, 2.5, 3.5, and values below 0 and past the last layer. Expected values use round-half-even. With the old floor(z + 0.5) put back, the test fails at z = 0.49999997.
  • NOT_EQUAL and NaN. OpFUnordNotEqual stays, and TechnicalDebt now says it was measured by you on RDNA2 (gfx1035): NOT_EQUAL is true for NaN and the other functions are false. There are two new rows on a 16_16_16_16_FLOAT texture (emulated path), NOT_EQUAL and LESSEQUAL, with NaN, +0 and −0 in both the reference and the texel. With OpFOrdNotEqual put back, the NOT_EQUAL row fails.
  • Rebase. Dropped my reduction check, its Reject and the reduction field, since #815 covers them. Kept the TRUNC_COORD refusal for point sampling.
  • TRUNC_COORD with bilinear. Documented in the full-float-weights sentence ("TRUNC_COORD, which changes those weights on hardware, is accepted under bilinear filtering without that change"), rather than throwing.

Tests: agc_driver_emulated_color_compare passes on Linux with GCC on an RTX 3070. The full ctest (default build) passes, 399 of 399.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6043155070 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/907#issuecomment-6043155070). Originally posted by [ThisIsAkill](https://github.com/ThisIsAkill) on 2026-10-07T17:25:43Z. --- Note: the branch is rebased onto current `main`, as requested, so the commit hashes have changed (now `fbbe4789`, `cfcd3d40`, `593ffa19`). @adriadam10 thanks for measuring this on hardware. All four points are addressed, and the branch is rebased onto current `main` (`cea1ef13`). - **Array layer rounding.** You're right, and the bug is mine: `floor(z + 0.5)` came in with #668, so this corrects behaviour that's already on `main`. The layer is now `clamp(RoundEven(z), 0, layers - 1)` (GLSL.std.450 `RoundEven`, as Vulkan uses for its own array layer). The test now uses 4 layers whose neighbours are far apart in value, with layer coordinates 0.49999997, 0.5, 1.5, 2.5, 3.5, and values below 0 and past the last layer. Expected values use round-half-even. With the old `floor(z + 0.5)` put back, the test fails at z = 0.49999997. - **NOT_EQUAL and NaN.** `OpFUnordNotEqual` stays, and TechnicalDebt now says it was measured by you on RDNA2 (gfx1035): NOT_EQUAL is true for NaN and the other functions are false. There are two new rows on a `16_16_16_16_FLOAT` texture (emulated path), NOT_EQUAL and LESSEQUAL, with NaN, +0 and −0 in both the reference and the texel. With `OpFOrdNotEqual` put back, the NOT_EQUAL row fails. - **Rebase.** Dropped my reduction check, its `Reject` and the `reduction` field, since #815 covers them. Kept the `TRUNC_COORD` refusal for point sampling. - **TRUNC_COORD with bilinear.** Documented in the full-float-weights sentence ("TRUNC_COORD, which changes those weights on hardware, is accepted under bilinear filtering without that change"), rather than throwing. Tests: `agc_driver_emulated_color_compare` passes on Linux with GCC on an RTX 3070. The full `ctest` (default build) passes, 399 of 399.
adriadam10 commented 2026-10-11 08:39:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T08:39:30Z.


Ready to merge from my side, but the PR description fails the conventions check:

  • [pr-template] Fill in the pull request template: unchecked: AI-assisted:
  • [pr-template] Fill in the pull request template: answer AI-assisted with yes or no

Please fill those template lines in (only you can answer AI-assisted); it merges once they pass.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6107215530 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/907#issuecomment-6107215530). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T08:39:30Z. --- Ready to merge from my side, but the PR description fails the conventions check: - [pr-template] Fill in the pull request template: unchecked: AI-assisted: - [pr-template] Fill in the pull request template: answer AI-assisted with yes or no Please fill those template lines in (only you can answer AI-assisted); it merges once they pass.
oneandonlydean commented 2026-10-11 23:14:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-11T23:14:48Z.


Conflicts with main in SpirvImageEmitter.cpp, EmulatedColorCompare.cpp and TechnicalDebt; please rebase. Main still has Floor(z + 0.5) for the layer and OpFOrdNotEqual (SpirvImageEmitter.cpp:1307, :1343), so both fixes are still needed.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114984827 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/907#issuecomment-6114984827). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-11T23:14:48Z. --- Conflicts with main in `SpirvImageEmitter.cpp`, `EmulatedColorCompare.cpp` and TechnicalDebt; please rebase. Main still has `Floor(z + 0.5)` for the layer and `OpFOrdNotEqual` (`SpirvImageEmitter.cpp:1307`, `:1343`), so both fixes are still needed.
Roojool commented 2026-10-14 12:03:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Roojool on 2026-10-14T12:03:18Z.


Hi @ThisIsAkill — following up on oneandonlydean's rebase request (Oct 11). I've rebased your branch onto current main and offer the result below; nothing was pushed or posted anywhere — every artifact is yours to take, adapt or ignore.

Not obsoleted. I checked first: main still computes the array layer as Floor(z + 0.5) (SpirvImageEmitter.cpp:1308) and still emits OpFOrdNotEqual for NOT_EQUAL (:1344), so both of your fixes are still needed, exactly as oneandonlydean said.

What moved on main since Oct 6, and how it was resolved (conflicts resolved as union — your semantic changes kept, main's evolution kept):

  • SpirvImageEmitter.cpp replaced your switch with a 6-entry spv::Op table and reworked the texel fetch (runtime swizzle, border select). Your NOT_EQUAL fix is re-applied as OpFOrdNotEqual → OpFUnordNotEqual on the table's entry for compare function 5; the RoundEven change (your third commit) applied cleanly.
  • ResourceMaterializer.cpp gained the constantZero shortcut and the cube DISABLE_CUBE_WRAP check: your truncate bit read and the TRUNC_COORD throw slot into the evolved emulatedCompareState unchanged.
  • The debt entry moved from TechnicalDebt.md to docs/dev/debt/shader.md and gained 8-bit sRGB/unorm and cube coverage: your three edits (TRUNC_COORD with point sampling throws; the round-half-even layer + unordered NOT_EQUAL sentence credited to adriadam10's RDNA2 measurements; TRUNC_COORD-with-bilinear named in the full-float-weights sentence) are applied at the new location.
  • The test file gained cube, view-channel and sRGB-zero suites and renamed compare → function (field order changed): your 2D-array / GREATER / NaN / TRUNC_COORD coverage is re-applied on top — your array program bytes are kept verbatim (as LayerCode, since main's ArrayCode name is taken by its "array instruction on a 2D texture" case), sampler initializers re-mapped to main's field order, and RunLayers/RunNaN follow the existing RunCube runner pattern.

Rebased commits (authorship, messages and Co-Authored-By lines untouched):

  1. 73de775a8 fix(agc): compare NOT_EQUAL unordered and refuse TRUNC_COORD with point sampling in the color compare emulation
  2. 0ebe2c2d8 test(agc): cover 2D arrays, GREATER and NaN in the color compare emulation
  3. 709fbf00b fix(agc): round the color compare array layer half to even

Verification here (Windows, MinGW-w64 via the project toolchain, Ninja/Release, a Vulkan device present — none of the runs skipped):

  • agc_driver_emulated_color_compare_tests builds clean; ctest: agc_driver_emulated_color_compare Passed (1.97 s), agc_driver_emulated_color_compare_srgb_decode Passed (0.91 s); neighbor agc_driver Passed (5.07 s) as a sanity link/run of the touched recompiler sources.
  • python -X utf8 tools/check_conventions.py --base refs/remotes/upstream/main: all checks passed.

(Setup notes: main added the 3rdparty/libusb-cmake submodule — it is initialized in the verification worktree; the ffmpeg prebuilt package was reused from a sibling build directory because cmake's downloader had no CA bundle on this host.)

To take it — force-push from my fork's mirror (a rebase rewrites the commits, so only you can land them; they keep you as author):

git fetch https://github.com/Roojool/AnyPS5 rebase/907
git push --force-with-lease origin FETCH_HEAD:fix/agc-color-compare-review

That branch is exactly the three commits above on top of main c9ee728a7; if main has moved again by the time you take it, a plain git rebase origin/main first should be enough.

One small heads-up: as in your original history, the array/NaN test expectations encode round-half-even (ExpectedLayer uses nearbyint) already in commit 2, while the shader learns RoundEven in commit 3 — you validated at the tip, so nothing new, just don't be surprised if you ever bisect into commit 2's tree.

AI-assisted template field — this is the only thing adriadam10 still waits on, and only you can answer it, so please edit the PR description yourself. Draft suggestion (your commits carry Co-Authored-By: Claude Opus 5.5, so if that reflects how they were written): change the last checklist line to

- [x] AI-assisted: yes

Thanks again for the careful follow-up — the RDNA2-measured layer rounding and the NaN semantics are exactly the kind of grounding that makes this entry trustworthy.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6167890836 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/907#issuecomment-6167890836). Originally posted by [Roojool](https://github.com/Roojool) on 2026-10-14T12:03:18Z. --- Hi @ThisIsAkill — following up on oneandonlydean's rebase request (Oct 11). I've rebased your branch onto current `main` and offer the result below; nothing was pushed or posted anywhere — every artifact is yours to take, adapt or ignore. **Not obsoleted.** I checked first: `main` still computes the array layer as `Floor(z + 0.5)` (`SpirvImageEmitter.cpp:1308`) and still emits `OpFOrdNotEqual` for NOT_EQUAL (`:1344`), so both of your fixes are still needed, exactly as oneandonlydean said. **What moved on `main` since Oct 6, and how it was resolved** (conflicts resolved as union — your semantic changes kept, main's evolution kept): - `SpirvImageEmitter.cpp` replaced your `switch` with a 6-entry `spv::Op` table and reworked the texel fetch (runtime swizzle, border select). Your NOT_EQUAL fix is re-applied as `OpFOrdNotEqual` → `OpFUnordNotEqual` on the table's entry for compare function 5; the `RoundEven` change (your third commit) applied cleanly. - `ResourceMaterializer.cpp` gained the `constantZero` shortcut and the cube `DISABLE_CUBE_WRAP` check: your `truncate` bit read and the TRUNC_COORD throw slot into the evolved `emulatedCompareState` unchanged. - The debt entry moved from `TechnicalDebt.md` to `docs/dev/debt/shader.md` and gained 8-bit sRGB/unorm and cube coverage: your three edits (TRUNC_COORD with point sampling throws; the round-half-even layer + unordered NOT_EQUAL sentence credited to adriadam10's RDNA2 measurements; TRUNC_COORD-with-bilinear named in the full-float-weights sentence) are applied at the new location. - The test file gained cube, view-channel and sRGB-zero suites and renamed `compare` → `function` (field order changed): your 2D-array / GREATER / NaN / TRUNC_COORD coverage is re-applied on top — your array program bytes are kept verbatim (as `LayerCode`, since main's `ArrayCode` name is taken by its "array instruction on a 2D texture" case), sampler initializers re-mapped to main's field order, and `RunLayers`/`RunNaN` follow the existing `RunCube` runner pattern. **Rebased commits** (authorship, messages and Co-Authored-By lines untouched): 1. `73de775a8` fix(agc): compare NOT_EQUAL unordered and refuse TRUNC_COORD with point sampling in the color compare emulation 2. `0ebe2c2d8` test(agc): cover 2D arrays, GREATER and NaN in the color compare emulation 3. `709fbf00b` fix(agc): round the color compare array layer half to even **Verification here** (Windows, MinGW-w64 via the project toolchain, Ninja/Release, a Vulkan device present — none of the runs skipped): - `agc_driver_emulated_color_compare_tests` builds clean; ctest: `agc_driver_emulated_color_compare` **Passed** (1.97 s), `agc_driver_emulated_color_compare_srgb_decode` **Passed** (0.91 s); neighbor `agc_driver` **Passed** (5.07 s) as a sanity link/run of the touched recompiler sources. - `python -X utf8 tools/check_conventions.py --base refs/remotes/upstream/main`: all checks passed. (Setup notes: main added the `3rdparty/libusb-cmake` submodule — it is initialized in the verification worktree; the ffmpeg prebuilt package was reused from a sibling build directory because cmake's downloader had no CA bundle on this host.) **To take it** — force-push from my fork's mirror (a rebase rewrites the commits, so only you can land them; they keep you as author): ``` git fetch https://github.com/Roojool/AnyPS5 rebase/907 git push --force-with-lease origin FETCH_HEAD:fix/agc-color-compare-review ``` That branch is exactly the three commits above on top of `main` `c9ee728a7`; if `main` has moved again by the time you take it, a plain `git rebase origin/main` first should be enough. **One small heads-up:** as in your original history, the array/NaN test expectations encode round-half-even (`ExpectedLayer` uses `nearbyint`) already in commit 2, while the shader learns `RoundEven` in commit 3 — you validated at the tip, so nothing new, just don't be surprised if you ever bisect into commit 2's tree. **AI-assisted template field** — this is the only thing adriadam10 still waits on, and only you can answer it, so please edit the PR description yourself. Draft suggestion (your commits carry `Co-Authored-By: Claude Opus 5.5`, so if that reflects how they were written): change the last checklist line to ``` - [x] AI-assisted: yes ``` Thanks again for the careful follow-up — the RDNA2-measured layer rounding and the NaN semantics are exactly the kind of grounding that makes this entry trustworthy.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!907
No description provided.