Repository navigation
Conversation
|
@AlexWhitehouse this adds direct load/store support for signed codes 31/35/38/42/45/49, separate from #15450’s unsigned formats. The paired main/patch run is in the description: 5/12 → 12/12 on Linux RTX 5070 and llvmpipe, with the same fixtures and no VUID errors. No AMD/PS5 measurement or title run claimed. For the shared mapping, DCC and format-helper lines, can we use #14628 → #15450 → this PR? I’ll handle the rebase and rerun the format tests afterward. @akkadbakkad89 the overlap with #14709, #16253 and #16427 is the format-table array size; none of those formats is implemented here. Are you okay with whichever lands second rebasing that count? @ycbuzi #16260 also shares the table/conversion infrastructure, but its unsigned scaled formats are separate. Happy to keep the same rebase arrangement there if that works for you. #16423 changes the neighboring debt paragraph; this addition does not rewrite it. This stays a draft until the code merge order is agreed. |
|
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.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
330e36b to
f947e6a
Compare
|
Rebased cleanly onto main Fresh paired Linux checks used the identical fixtures and rebuilt the three affected executables on both revisions: main 5/12 pass, rebased patch 12/12 pass, on NVIDIA RTX 5070 (595.99.02) and llvmpipe (LLVM 21.1.8), Ubuntu 26.04.1. Required Vulkan and the Khronos validation layer were enabled and shader caching disabled; neither side logs a VUID error or missing-layer warning. Conventions and all 20 shader-scan Python tests pass. The earlier successful Windows CI belongs to @SHOnnay I checked #17701: its format-131 floating-point loads are distinct from these six signed formats, but the mapping/array/conversion lines overlap. Would you be okay with whichever merges second rebasing those shared lines, or do you prefer a specific order? This remains draft while the existing #14628 → #15450 → #17623 proposal and the newer overlap are coordinated. |
|
Windows and NVIDIA run with the validation layer, for head f947e6a merged with
The six new tests pass: The four failures are not from this PR. AI-assisted: yes. |
f947e6a to
ded4d34
Compare
|
Resolved the main conflict and rebased onto Fresh paired Linux checks rebuilt the three affected executables with identical fixtures: main 5/12 → patch 12/12 on RTX 5070 (595.99.02) and llvmpipe, Ubuntu 26.04.1. Vulkan required, cache disabled and Khronos validation enabled; no VUID or missing-layer warnings on either side. All 20 shader-scan tests and conventions pass. The final full Linux build also passed ( Thanks to NathanFahey23 for the Windows RTX 4080 report on the previous |
ded4d34 to
1370362
Compare
|
Refreshed onto main Fresh paired Linux validation with identical fixtures: main 5/12 → patch 12/12 on RTX 5070 (595.99.02) and llvmpipe (Mesa 26.0.8 / LLVM 21.1.8), Ubuntu 26.04.1. Required Vulkan, cache disabled and Khronos validation enabled; zero skips, VUIDs or missing-layer warnings. Full Linux build, 20 shader-scan tests and conventions pass. The old Windows failure was three worker-spin tests hitting their 20-second limit. This base includes upstream #18213/#18214; all three pass locally with the upstream timeout. Fresh Windows CI is pending; this is not a new local Windows run. Earlier peer Windows evidence remains attributed to its original revision. Keeping this draft while the format overlap order is coordinated. |
|
@johnohhh1 — agreed, the I re-checked the shared lines on current heads: the overlap is the For context: #16427 was just rebased onto current main (head One note: whichever of ours lands first, please keep the rows ordered by format code when rebasing — the table is index-addressed, so an out-of-order insert silently maps wrong formats. |
1370362 to
68732fa
Compare
|
The Windows job for head Its pinned main was Could a maintainer start a fresh Build workflow for #17623 so eligibility captures main including that revert? Our rerun request returned HTTP 403 (repository admin rights required). Rerunning only the failed job would retain the old eligibility base. This remains draft for the existing prerequisite/overlap coordination; this note is not a fresh GPU validation or a green-CI claim. AI-assisted log/source diagnosis: yes (Codex). |
|
Refreshed to Fresh paired Linux results, identical fixtures: main 9/16 → PR 16/16 on both RTX 5070 /595.99.02 and llvmpipe /Mesa 26.0.8 /LLVM 21.1.8, Ubuntu 26.04.1/GCC 15.2/Release. Both full configured builds, the three selected executable builds and all 29 shader-scan tests pass. The four merged unsigned controls pass on both sides. Vulkan required, shader cache disabled, Khronos validation loader insertion confirmed; zero skips, VUIDs or missing-layer warnings. New-head CI is triggered; this is not a fresh Windows/native AMD/PS5 or title run. The description is shorter and names the remaining #14628/overlap-order hold explicitly. Draft retained; no owner agreement or title unblock is assumed. AI-assisted validation/reporting: yes (Codex). |
|
Refreshed this draft to Same final fixtures, full rebuilt Linux builds, Ubuntu 26.04.1/GCC 15.2/Release: main passes 10/17 and this head passes 17/17 on both NVIDIA RTX 5070 (595.99.02) and llvmpipe (Mesa 26.0.8/LLVM 21.1.8). Required Vulkan, cache off, validation 1.4.341 and loader logging: layer insertion confirmed, no VUIDs, skips or missing-layer warnings. All 29 shader-scan tests and current conventions pass. Both shader-memory modes additionally pass 20 consecutive Linux runs each (40 executions); this is not Windows validation. For the old Windows failure: the exact main baseline also crashed Keeping the draft/order hold for #17701/#16260. The fresh overlap report still fails closed on other conflicted peers; no overlap clearance, native AMD/PS5 measurement or title run is claimed. AI-assisted repair, validation and reporting: yes (Codex). |
|
Resolved the new format-table count conflict and refreshed to Same final fixtures, full rebuilt Linux builds, Ubuntu 26.04.1/GCC 15.2/Release:
All four runs require Vulkan, disable the shader cache and confirm Khronos validation 1.4.341 insertion with loader logging. No VUIDs, skips or missing-layer warnings. All 29 shader-scan tests and current conventions pass. The prior head AI-assisted repair, validation and reporting: yes (Codex). |
artor410
left a comment
There was a problem hiding this comment.
Review of the code plus a Windows / NVIDIA Ampere run of the current head. I found no defects.
Windows run of 819b7d08f7
Setup: Windows 11 Pro 10.0.26300, NVIDIA GeForce RTX 3070 Ti (10de:2482, Ampere), driver 610.88, WinLibs GCC 15.2.0 r7, Release. The PR was merged onto main fbaae8a79d with --no-ff (clean merge). Runs used ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1. The first run of each side also had VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer (SDK 1.4.363.0).
These 17 tests are the same set as in your table: agc_driver_image_packed_signed and _35/_38/_42/_45/_49, agc_driver_graphics, and the unsigned controls image_converted_unorm, image_load_packed, image_store_packed, image_packed16_* and image_depth24*.
| tree | result |
|---|---|
main plus only this PR's three test files |
10 of 17 |
| this PR merged | 17 of 17, in 3 of 3 runs |
On main, the six signed tests stop with sampled image descriptor uses an unsupported format. agc_driver_graphics stops with unsupported guest texture format 31. With the PR, each signed format prints load/store, D16, swizzle, clamps and guard checks passed, so CheckRefusals, including the sampling refusal, passes for the SINT codes too. The loader inserts the layer in the 16 tests that open a device (agc_driver_graphics uses mocks). There were no VUID- messages and no missing-layer lines on either side.
Code read
- Load: for SNORM/SINT the unpack switches to
OpBitFieldSExtract, and SNORM then goes through the existingNormalizeFormatComponent. That maps a field tox / (2^(n-1) - 1)with the most negative code clamped to -1.0 and zero kept at +0. For the 2-bit field of2_10_10_10this gives -1, -1, 0 and 1 for codes -2 to 1. - SINT store: the new branch uses
EmitFormatStoreComponent, which clamps to[-2^(n-1), 2^(n-1)-1]before masking ([-2, 1] for the 2-bit field).EmitD16StoreComponentsign-extends the 16-bit value first. - Field layouts: they come from the existing
GetImageFormatInforows that the merged buffer and unsigned image paths already use. I did not re-derive them from the ISA here. - Format 31: the cmake fragment's loop lists 35/38/42/45/49 only, but
agc_driver_image_packed_signedruns the executable without an argument, which selects 31. All six are covered.
Not covered: native AMD or PS5 measurement, sampling (which is still refused, as stated), and titles.
AI-assisted: yes (Claude Code). I ran the tests above and read the code at this head.
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this change; the points below are optional.
What I ran
Reviewed head 819b7d08f7032b5bcf85b671c5079f2fb38a90eb. I did not run commands or tests; execution results in the PR description are author-reported.
Results
| Check | Result | Note |
|---|---|---|
| Code review | passed | Changed implementation and test inspected |
| Build and tests | not run | Reports in description not independently verified |
Findings
Blocking
None.
Non-blocking
- Fresh hosted Windows CI is still pending for this refreshed head, as the description notes. The earlier Windows run was on a different head.
- Native AMD/PS5 behavior, store rounding and NaN conversion remain unmeasured, as documented in the debt entry.
Not verified
I read all eight changed files listed as reviewed in the manifest: TextureFormat.cpp, TextureFormat.cpp (tests), agc_driver_image_packed_signed_tests.cmake, ImagePackedSigned.cpp, ResourceMaterializer.cpp, RdnaDescriptorFormat.hpp, RdnaDescriptorFormat.cpp, and SpirvImageEmitter.cpp; I also read the debt fragment. No changed files were excluded by files.json (that file was not available through the review reader). I did not run builds, tests, CI, console, or hardware checks. Claims about those runs and peer PR coordination were not independently verified.
To get this to a good state
Nothing is required. Optional: obtain fresh hosted Windows CI for this head and retain the documented console measurement follow-up.
|
Hardware measurements for the six formats, since the debt entry says there is no native AMD measurement. I ran Loads: bit-exact on all six formats. I used your texel pattern ( Stores: 5 of 6 formats bit-exact. 31, 35, 38, 42 and 49 match the test's expected words on all 32 lanes, including the NaN → 0, ±inf, denormal and out-of-range inputs. Format 45 differs on the 2-bit X field at ±0.5:
The hardware rounds a 2-bit SNORM field away from zero at ±0.5, not to nearest even. The 10-bit fields of the same words match. The typed-buffer store path has the same bug. #25877 fixes it there, in For reference, the same measurement on 10_10_10_2 SNORM/SINT (51/55, which #22717 refuses because no NVIDIA/AMD/Intel driver exposes Windows run of this PR. Head
The tests were AI-assisted: yes (Claude Code) |
…igned-formats-20261125 # Conflicts: # core/libs/prx/libSceAgcDriver/Graphics/src/TextureFormat.cpp # core/libs/prx/libSceAgcDriver/tests/TextureFormat.cpp # core/shader/recompiler/Optimization/src/ResourceMaterializer.cpp # core/shader/recompiler/RdnaDecoder/src/RdnaDescriptorFormat.cpp # core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp
…igned-formats-20261125
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — changes requested
CMake registers no test named agc_driver_image_packed_signed, so configuring with BUILD_TESTING enabled fails at the test properties call.
What I ran
Reviewed head 1b8c079768a67e96eb5e7df023fbd1075c75e43f using the prepared diff and repository reader. No build or tests were run.
Results
| Check | Result | Note |
|---|---|---|
| Diff and changed code review | failed | Found a CMake configuration defect |
| Build and tests | not run | No commands executed |
Findings
Blocking
core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_image_packed_signed_tests.cmake:2sets properties onagc_driver_image_packed_signed, but this file registers only tests namedagc_driver_image_packed_signed_<format>at line 5. Repository search found no registration for the unsuffixed test name. With testing enabled,set_tests_propertiesnames an unknown test and causes CMake configuration to fail. Remove the unsuffixed property call or register the corresponding test.
Non-blocking
None.
Not verified
No build, test suite, hardware behavior, or CI results were independently verified. The description reports Linux GPU test results and says fresh Windows CI is pending. All nine changed files listed in the manifest were included in the prepared diff; repository source was consulted for the CMake test name.
To get this to a good state
Register the unsuffixed test or remove the invalid property call, then rerun CMake configuration with BUILD_TESTING enabled and the relevant tests.
…ed-test-registration-20261125
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — comments
The signed packed image change is inspected at head d3026eec157984de812051bc14047ac5d6dfbd92; no concrete blocking defect was verified, but the stated draft/order hold and missing PS5 measurements prevent a formal approval.
What I ran
Read the prepared diff and all ten changed files marked included in the manifest. No build or tests were run by me; the build and hardware results in the description are author-reported.
Results
| Check | Result | Note |
|---|---|---|
| Diff and changed files | passed | All ten included files read |
| Build and execution tests | not run | Results reported by author only |
| PS5 behavior | not run | Not verified on console |
Findings
Blocking
None verified.
Non-blocking
- The description records an outstanding format 45 SNORM half-rounding difference and a dependency on #25877, and says ordering with #16260 still needs agreement. Resolve those draft/order holds before treating the implementation and comparison results as final.
- PS5 behavior remains unmeasured; the documented RDNA2 comparison is evidence for that device only.
Not verified
I did not run the build or execution tests, inspect CI output, validate the external comparison, or verify behavior on PS5. No changed files were excluded by the manifest. The test and build results described in the PR were not independently run here.
To get this to a good state
Nothing is required for a code fix based on this review. The PR description identifies the outstanding dependency and ordering agreement as draft holds.
ligmaSec
left a comment
There was a problem hiding this comment.
The added agc_driver_image_packed_signed fixture passed on Linux/lavapipe. In the paired run, agc_driver_gcn_scalar_buffer_base passed and agc_driver_image_table hit its 30-second limit on both main at 9d362fb088fc and this head. The Vulkan runs required the device, disabled the shader cache, and loaded Khronos validation 1.4.369. Neither side reported a missing layer or a VUID.
AI-assisted: yes.
|
Reviewed the signed conversion path against the current tree (static review, no GPU run on this base):
|
What
Adds direct image load/store support for signed packed formats 31/35/38/42/45/49:
11_11_10_SNORM/SINT,10_11_11_SNORM/SINTand2_10_10_10_SNORM/SINT, using this project's little-endian names. Views useR32_UINT; packed fields are sign-extended and use the existing typed-buffer normalization/store conversion, including D16 results and partial masks.Identifiers/layouts: AMD RDNA 1 ISA §8.2.8 Table 47 and Mesa gfx10 tables at 418c4cfa. Conversion uses the existing image-format and typed-buffer helpers. An RDNA2 comparison matched the tested loads for all six formats and stores for five. Exact half values for the 2-bit SNORM field of format 45 were the exception. RDNA2 results Sampling, gathers/LOD queries, image tables, packed accesses and a missing W selector remain refused; render targets and a title unblock are not claimed.
The November 25 refresh resolves five conflicts and preserves the merged format-131 support from #17701. All 103 upstream decoder rows remain in order, plus six signed rows.
The signed-image test fragment now explicitly registers format 31 under the existing
agc_driver_image_packed_signedname and configures all six cases together. Format 31 passes its argument directly. The six test names, timeouts, skip behavior, environment and working directory are unchanged. CMake reviewDraft/order hold. #25877 fixes 2-bit SNORM half rounding in the shared typed-buffer conversion. Ordering with the still-open #16260 also needs agreement. The table-count agreement is preserved.
Tested
Fresh
BUILD_TESTING=ONconfiguration and focused Release build pass atd3026eec157984de812051bc14047ac5d6dfbd92. CTest lists exactly six signed-format cases, with format 31 as the explicit argument to the unsuffixed test. The paired run used the same fixtures against frozen mainfbd2175e5c1a0bcde352b81b19a1cb45db3c7b47.The loader inserted Khronos validation 1.4.341 throughout. No VUIDs or skips. Hosted Windows CI for this head is pending.
Earlier rounding comparison. In a separate comparison, the RDNA2 half-rounding expectation and #25877's buffer fixture reproduced two failures on each device. With #25877 applied, those two cases passed, and the complete selection passed 19/19 on both devices with validation active and no VUIDs. The draft branch retains the standalone fixture while #25877 is under review. The result applies to the earlier tested integration.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)