feat(agc): fold samples of views whose channels all select constants #1417

Merged
gjonn merged 2 commits from upstream-pr/1417 into main 2026-10-10 01:01:22 +00:00
gjonn commented 2026-10-08 03:13:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by gjonn on 2026-10-08T03:13:28Z.


What

When every dst_sel of a sampled view selects constant 0 or 1, a sample or gather returns that constant whatever the texel, filter, LOD or coordinates. Titles sample such placeholders through views the static runtime image interface has no mode for: a 1x1x1 3D R8 texture under a 2D sample with an unnormalized sampler, or a 1D texture under a 2D gather. Both stop at runtime image mode selection ("image descriptor is incompatible with the static runtime image interface"), and the 3D one would then fail the unnormalized proof ("samples a 1D-array, 2D-array, 3D, cube or multisampled image").

  • RuntimeImageModes appends three constant modes (float, uint, sint) to a direct sampled image whose accesses are all non-compare samples or gathers (constantSwizzleCompatible, tracked by ResourceTracker). Storage, depth-compare, packed and table images get none.
  • RuntimeImageMode selects the constant mode of the view's numeric class when all four dst_sel are 0 or 1, before dimensions are matched. FMASK, depth-bits, converted and sRGB-decoded views keep their existing modes.
  • In a constant mode the emitter returns each channel's constant for a sample, and the dmask channel's constant in all four texels for a gather: 1.0f for float views, 1 for integer views. The selectors come from the image's existing swizzle specialization constants; no coordinate or sampler code is emitted and the image is left unbound.
  • ProveUnnormalized skips a constant mode only after the run-time-selected check, so bindless table roots still throw.
  • The two new ImageResource fields are serialized and FormatVersion goes from 20 to 21.

Tested

  • Windows 11, MinGW-w64 GCC 15.2.0, RTX 5090: agc_driver_image_sample_unnormalized has new cases, which fail without the change:
    • a 3D view with dst_sel (1, 0, 1, 0) sampled with image_sample_lz, image_sample_l and image_sample through all five unnormalized samplers returns exactly (1.0f, 0, 1.0f, 0);
    • image_sample_lz dmask 0x6, image_gather4_lz dmask 0x2 and image_gather4_lz dmask 0x4 under a 2D access return (0, 1.0f), all 0 and all 1.0f on a 3D UNORM view selecting (1, 0, 1, 0); (0, 1), all 0 and all 1 on 32_UINT and 32_SINT views; and zeros on a 1D view selecting (0, 0, 0, 0). These are the values measured on gfx1035.
  • agc_shader_memory: a 3D view selecting constants passes the unnormalized proof and is not bound; a table root with the same descriptor still fails with "samples an image selected at run time".
  • Full ctest: 507/507 pass (one skipped as usual).

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: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4781259550 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1417). Originally posted by [gjonn](https://github.com/gjonn) on 2026-10-08T03:13:28Z. --- ### What When every `dst_sel` of a sampled view selects constant 0 or 1, a sample or gather returns that constant whatever the texel, filter, LOD or coordinates. Titles sample such placeholders through views the static runtime image interface has no mode for: a 1x1x1 3D R8 texture under a 2D sample with an unnormalized sampler, or a 1D texture under a 2D gather. Both stop at runtime image mode selection ("image descriptor is incompatible with the static runtime image interface"), and the 3D one would then fail the unnormalized proof ("samples a 1D-array, 2D-array, 3D, cube or multisampled image"). - `RuntimeImageModes` appends three constant modes (float, uint, sint) to a direct sampled image whose accesses are all non-compare samples or gathers (`constantSwizzleCompatible`, tracked by `ResourceTracker`). Storage, depth-compare, packed and table images get none. - `RuntimeImageMode` selects the constant mode of the view's numeric class when all four `dst_sel` are 0 or 1, before dimensions are matched. FMASK, depth-bits, converted and sRGB-decoded views keep their existing modes. - In a constant mode the emitter returns each channel's constant for a sample, and the dmask channel's constant in all four texels for a gather: 1.0f for float views, 1 for integer views. The selectors come from the image's existing swizzle specialization constants; no coordinate or sampler code is emitted and the image is left unbound. - `ProveUnnormalized` skips a constant mode only after the run-time-selected check, so bindless table roots still throw. - The two new `ImageResource` fields are serialized and `FormatVersion` goes from 20 to 21. ### Tested - Windows 11, MinGW-w64 GCC 15.2.0, RTX 5090: `agc_driver_image_sample_unnormalized` has new cases, which fail without the change: - a 3D view with `dst_sel` (1, 0, 1, 0) sampled with `image_sample_lz`, `image_sample_l` and `image_sample` through all five unnormalized samplers returns exactly (1.0f, 0, 1.0f, 0); - `image_sample_lz` dmask 0x6, `image_gather4_lz` dmask 0x2 and `image_gather4_lz` dmask 0x4 under a 2D access return (0, 1.0f), all 0 and all 1.0f on a 3D UNORM view selecting (1, 0, 1, 0); (0, 1), all 0 and all 1 on 32_UINT and 32_SINT views; and zeros on a 1D view selecting (0, 0, 0, 0). These are the values measured on gfx1035. - `agc_shader_memory`: a 3D view selecting constants passes the unnormalized proof and is not bound; a table root with the same descriptor still fails with "samples an image selected at run time". - Full `ctest`: 507/507 pass (one skipped as usual). ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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 - [x] AI-assisted: yes
adriadam10 commented 2026-10-08 13:45:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-08T13:45:11Z.

Review: CHANGES_REQUESTED


Measured on gfx1035 (HW oracle): with all four dst_sel constant, image_sample_lz returns 1.0f/0 for float and unorm formats and integer 1/0 for 32_UINT/32_SINT; image_gather4_lz returns the dst_sel of the dmask component in all four texels; dmask 0x6 packs channels 1 and 2; a 3D T# sampled with a 2D dim and an unnormalized sampler gives the same. That matches what the emitter produces. Build + ctest pass and the new case fails without the change. Three things before it can go in:

  • DescriptorBindingBuilder.cpp:221: the constantSwizzle skip runs before the indirectRoot check, but EmitSamplingOp only folds direct images (SpirvImageEmitter.cpp:1308, access.slot == 0). A bindless table root whose snapshot descriptor has a constant swizzle used to throw "samples an image selected at run time"; now it passes the proof and gets sampled through the table path with an unnormalized sampler, and the other entries of the table don't have to be constant. Skip only direct images (image.constantSwizzle != 0u && image.indirectRoot == ImageResource::NoIndirectImage), so tables keep throwing.
  • The test only covers float formats with dmask 0xf. The gather branch (ImageGatherComponent(EffectiveDmask(...))), the uint/sint constants and a partial dmask aren't exercised. Please add cases pinning them, for example image_gather4_lz with dmask 0x2 and 0x4 on dst_sel (1, 0, 1, 0) (expected all 0 and all 1.0f), a 32_UINT or 32_SINT view (expected integer 1, not 0x3f800000), and image_sample_lz with dmask 0x6 (expected 0, 1.0f). These are the values measured on hardware above.
  • Conflicts with main: ShaderDiskCache.hpp is already at FormatVersion = 9, so this needs 10 after rebasing.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5457562852 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1417#pullrequestreview-5457562852). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-08T13:45:11Z. **Review:** CHANGES_REQUESTED --- Measured on gfx1035 (HW oracle): with all four `dst_sel` constant, `image_sample_lz` returns 1.0f/0 for float and unorm formats and integer 1/0 for `32_UINT`/`32_SINT`; `image_gather4_lz` returns the `dst_sel` of the dmask component in all four texels; dmask 0x6 packs channels 1 and 2; a 3D T# sampled with a 2D dim and an unnormalized sampler gives the same. That matches what the emitter produces. Build + ctest pass and the new case fails without the change. Three things before it can go in: - `DescriptorBindingBuilder.cpp:221`: the `constantSwizzle` skip runs before the `indirectRoot` check, but `EmitSamplingOp` only folds direct images (`SpirvImageEmitter.cpp:1308`, `access.slot == 0`). A bindless table root whose snapshot descriptor has a constant swizzle used to throw "samples an image selected at run time"; now it passes the proof and gets sampled through the table path with an unnormalized sampler, and the other entries of the table don't have to be constant. Skip only direct images (`image.constantSwizzle != 0u && image.indirectRoot == ImageResource::NoIndirectImage`), so tables keep throwing. - The test only covers float formats with dmask 0xf. The gather branch (`ImageGatherComponent(EffectiveDmask(...))`), the uint/sint constants and a partial dmask aren't exercised. Please add cases pinning them, for example `image_gather4_lz` with dmask 0x2 and 0x4 on `dst_sel` (1, 0, 1, 0) (expected all 0 and all 1.0f), a `32_UINT` or `32_SINT` view (expected integer `1`, not `0x3f800000`), and `image_sample_lz` with dmask 0x6 (expected 0, 1.0f). These are the values measured on hardware above. - Conflicts with `main`: `ShaderDiskCache.hpp` is already at `FormatVersion = 9`, so this needs 10 after rebasing.
Pipodi commented 2026-10-09 16:04:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Pipodi on 2026-10-09T16:04:42Z.


After #639, PPSA26344 (Ghost of Yōtei) hits the case this PR covers, at runtime image mode selection rather than in DescriptorBindingBuilder.

A compute program gathers (DIM 2D) through a 1D T# whose four dst_sels all select constant 0: 50091c00 03800000 00000000 80000000 00000000 00700000 00000000 00000000. No runtime mode matches a 1D T# under a 2D access, so it throws "image descriptor is incompatible with the static runtime image interface". Every read through that view returns 0 whatever the texel, so the view's own dimension doesn't matter.

Locally I treat a sampled, non-comparison T# whose dst_sel is all zero (word3 & 0xfff == 0) like a null descriptor: mode 0 in TryRuntimeImageMode, and no texture in ShaderResources. That's the all-zero subset of what this PR does. It gets the title past this stop, and with robustness2's nullDescriptor the reads return zeros.

This PR's base predates #639 and now conflicts with main in ResourceMaterializer, DescriptorBindingBuilder and the disk cache. Are you planning to rebase it? If not, I can open the all-zero runtime-mode version separately, but I didn't want to compete with this one.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6084578406 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1417#issuecomment-6084578406). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-10-09T16:04:42Z. --- After #639, PPSA26344 (Ghost of Yōtei) hits the case this PR covers, at runtime image mode selection rather than in `DescriptorBindingBuilder`. A compute program gathers (DIM 2D) through a 1D T# whose four `dst_sel`s all select constant 0: `50091c00 03800000 00000000 80000000 00000000 00700000 00000000 00000000`. No runtime mode matches a 1D T# under a 2D access, so it throws "image descriptor is incompatible with the static runtime image interface". Every read through that view returns 0 whatever the texel, so the view's own dimension doesn't matter. Locally I treat a sampled, non-comparison T# whose `dst_sel` is all zero (`word3 & 0xfff == 0`) like a null descriptor: mode 0 in `TryRuntimeImageMode`, and no texture in `ShaderResources`. That's the all-zero subset of what this PR does. It gets the title past this stop, and with robustness2's `nullDescriptor` the reads return zeros. This PR's base predates #639 and now conflicts with main in `ResourceMaterializer`, `DescriptorBindingBuilder` and the disk cache. Are you planning to rebase it? If not, I can open the all-zero runtime-mode version separately, but I didn't want to compete with this one.
gjonn commented 2026-10-09 16:11:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by gjonn on 2026-10-09T16:11:14Z.


After #639, PPSA26344 (Ghost of Yōtei) hits the case this PR covers, at runtime image mode selection rather than in DescriptorBindingBuilder.

A compute program gathers (DIM 2D) through a 1D T# whose four dst_sels all select constant 0: 50091c00 03800000 00000000 80000000 00000000 00700000 00000000 00000000. No runtime mode matches a 1D T# under a 2D access, so it throws "image descriptor is incompatible with the static runtime image interface". Every read through that view returns 0 whatever the texel, so the view's own dimension doesn't matter.

Locally I treat a sampled, non-comparison T# whose dst_sel is all zero (word3 & 0xfff == 0) like a null descriptor: mode 0 in TryRuntimeImageMode, and no texture in ShaderResources. That's the all-zero subset of what this PR does. It gets the title past this stop, and with robustness2's nullDescriptor the reads return zeros.

This PR's base predates #639 and now conflicts with main in ResourceMaterializer, DescriptorBindingBuilder and the disk cache. Are you planning to rebase it? If not, I can open the all-zero runtime-mode version separately, but I didn't want to compete with this one.

Lost track of this one. I'll get it rebased now.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6084691706 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1417#issuecomment-6084691706). Originally posted by [gjonn](https://github.com/gjonn) on 2026-10-09T16:11:14Z. --- > After #639, PPSA26344 (Ghost of Yōtei) hits the case this PR covers, at runtime image mode selection rather than in `DescriptorBindingBuilder`. > > A compute program gathers (DIM 2D) through a 1D T# whose four `dst_sel`s all select constant 0: `50091c00 03800000 00000000 80000000 00000000 00700000 00000000 00000000`. No runtime mode matches a 1D T# under a 2D access, so it throws "image descriptor is incompatible with the static runtime image interface". Every read through that view returns 0 whatever the texel, so the view's own dimension doesn't matter. > > Locally I treat a sampled, non-comparison T# whose `dst_sel` is all zero (`word3 & 0xfff == 0`) like a null descriptor: mode 0 in `TryRuntimeImageMode`, and no texture in `ShaderResources`. That's the all-zero subset of what this PR does. It gets the title past this stop, and with robustness2's `nullDescriptor` the reads return zeros. > > This PR's base predates #639 and now conflicts with main in `ResourceMaterializer`, `DescriptorBindingBuilder` and the disk cache. Are you planning to rebase it? If not, I can open the all-zero runtime-mode version separately, but I didn't want to compete with this one. Lost track of this one. I'll get it rebased now.
github-actions[bot] commented 2026-10-09 22:04:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T22:04:01Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#757 core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp L189, L297-298
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp L705-706, L729
#758 core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp L189, L297-298
core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp L705-706, L729
#822 core/libs/prx/libSceAgcDriver/tests/execution/ImageSampleUnnormalized.cpp L45-46, L131, L145
core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp L85
core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp L187-197
core/shader/recompiler/ShaderDiskCache.cpp L476, L553, L577
core/shader/recompiler/ShaderDiskCache.hpp L15
#2133 core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp L85
core/shader/recompiler/Optimization/src/ResourceTracker.cpp L1063
core/shader/recompiler/ShaderDiskCache.cpp L476, L577
#2282 core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp L729
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6090014292 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1417#issuecomment-6090014292). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-09T22:04:01Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #757 | `core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp` [L189](https://github.com/boykopovar/AnyPS5/blob/0c0dc1e98ed295cbef2823a01081f29a2d929aea/core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp#L189), [L297-298](https://github.com/boykopovar/AnyPS5/blob/0c0dc1e98ed295cbef2823a01081f29a2d929aea/core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp#L297-L298)<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp` [L705-706](https://github.com/boykopovar/AnyPS5/blob/0c0dc1e98ed295cbef2823a01081f29a2d929aea/core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp#L705-L706), [L729](https://github.com/boykopovar/AnyPS5/blob/0c0dc1e98ed295cbef2823a01081f29a2d929aea/core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp#L729) | | | | #758 | `core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp` [L189](https://github.com/boykopovar/AnyPS5/blob/0c0dc1e98ed295cbef2823a01081f29a2d929aea/core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp#L189), [L297-298](https://github.com/boykopovar/AnyPS5/blob/0c0dc1e98ed295cbef2823a01081f29a2d929aea/core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp#L297-L298)<br>`core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp` [L705-706](https://github.com/boykopovar/AnyPS5/blob/0c0dc1e98ed295cbef2823a01081f29a2d929aea/core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp#L705-L706), [L729](https://github.com/boykopovar/AnyPS5/blob/0c0dc1e98ed295cbef2823a01081f29a2d929aea/core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp#L729) | | | | #822 | `core/libs/prx/libSceAgcDriver/tests/execution/ImageSampleUnnormalized.cpp` [L45-46](https://github.com/boykopovar/AnyPS5/blob/0c0dc1e98ed295cbef2823a01081f29a2d929aea/core/libs/prx/libSceAgcDriver/tests/execution/ImageSampleUnnormalized.cpp#L45-L46), [L131](https://github.com/boykopovar/AnyPS5/blob/0c0dc1e98ed295cbef2823a01081f29a2d929aea/core/libs/prx/libSceAgcDriver/tests/execution/ImageSampleUnnormalized.cpp#L131), [L145](https://github.com/boykopovar/AnyPS5/blob/0c0dc1e98ed295cbef2823a01081f29a2d929aea/core/libs/prx/libSceAgcDriver/tests/execution/ImageSampleUnnormalized.cpp#L145)<br>`core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp` [L85](https://github.com/boykopovar/AnyPS5/blob/0c0dc1e98ed295cbef2823a01081f29a2d929aea/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp#L85)<br>`core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp` [L187-197](https://github.com/boykopovar/AnyPS5/blob/0c0dc1e98ed295cbef2823a01081f29a2d929aea/core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp#L187-L197)<br>`core/shader/recompiler/ShaderDiskCache.cpp` [L476](https://github.com/boykopovar/AnyPS5/blob/0c0dc1e98ed295cbef2823a01081f29a2d929aea/core/shader/recompiler/ShaderDiskCache.cpp#L476), [L553](https://github.com/boykopovar/AnyPS5/blob/0c0dc1e98ed295cbef2823a01081f29a2d929aea/core/shader/recompiler/ShaderDiskCache.cpp#L553), [L577](https://github.com/boykopovar/AnyPS5/blob/0c0dc1e98ed295cbef2823a01081f29a2d929aea/core/shader/recompiler/ShaderDiskCache.cpp#L577)<br>`core/shader/recompiler/ShaderDiskCache.hpp` [L15](https://github.com/boykopovar/AnyPS5/blob/0c0dc1e98ed295cbef2823a01081f29a2d929aea/core/shader/recompiler/ShaderDiskCache.hpp#L15) | | | | #2133 | `core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp` [L85](https://github.com/boykopovar/AnyPS5/blob/0c0dc1e98ed295cbef2823a01081f29a2d929aea/core/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hpp#L85)<br>`core/shader/recompiler/Optimization/src/ResourceTracker.cpp` [L1063](https://github.com/boykopovar/AnyPS5/blob/0c0dc1e98ed295cbef2823a01081f29a2d929aea/core/shader/recompiler/Optimization/src/ResourceTracker.cpp#L1063)<br>`core/shader/recompiler/ShaderDiskCache.cpp` [L476](https://github.com/boykopovar/AnyPS5/blob/0c0dc1e98ed295cbef2823a01081f29a2d929aea/core/shader/recompiler/ShaderDiskCache.cpp#L476), [L577](https://github.com/boykopovar/AnyPS5/blob/0c0dc1e98ed295cbef2823a01081f29a2d929aea/core/shader/recompiler/ShaderDiskCache.cpp#L577) | | | | #2282 | `core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp` [L729](https://github.com/boykopovar/AnyPS5/blob/0c0dc1e98ed295cbef2823a01081f29a2d929aea/core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp#L729) | | |
adriadam10 commented 2026-10-09 23:26:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-09T23:26:34Z.

Review: APPROVED


Thanks for the rebase. The three points from the earlier review are done: the constant-swizzle skip now runs after the indirectRoot check (table roots still throw), and the tests pin gather dmask 0x2/0x4, dmask 0x6 and the 32_UINT/32_SINT constants.

Checked on current main: build and ctest pass, and agc_shader_memory and agc_driver_image_sample_unnormalized fail without the change. The sample/gather results match what the gfx1035 hardware returns.

Added one commit on top: FormatVersion is 21 on main already, so the 20 → 21 bump disappeared in the rebase; it is now 22 since ImageResource gained two serialized fields.

Merging once CI is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5476302727 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1417#pullrequestreview-5476302727). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-09T23:26:34Z. **Review:** APPROVED --- Thanks for the rebase. The three points from the earlier review are done: the constant-swizzle skip now runs after the `indirectRoot` check (table roots still throw), and the tests pin gather dmask 0x2/0x4, dmask 0x6 and the 32_UINT/32_SINT constants. Checked on current `main`: build and ctest pass, and `agc_shader_memory` and `agc_driver_image_sample_unnormalized` fail without the change. The sample/gather results match what the gfx1035 hardware returns. Added one commit on top: `FormatVersion` is 21 on `main` already, so the 20 → 21 bump disappeared in the rebase; it is now 22 since `ImageResource` gained two serialized fields. Merging once CI is green.
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!1417
No description provided.