Skip to content

fix(agc): restrict sampled storage texture view usage - #862

Draft
lvmino97 wants to merge 1 commit into
boykopovar:mainfrom
lvmino97:fix/sampled-storage-view-usage
Draft

lvmino97 wants to merge 1 commit into
boykopovar:mainfrom
lvmino97:fix/sampled-storage-view-usage

Conversation

@lvmino97

@lvmino97 lvmino97 commented Oct 6, 2026

Copy link
Copy Markdown

What

Sampled sRGB views of storage textures inherit STORAGE usage from the backing image. This triggers VUID-VkImageViewCreateInfo-usage-02275 when the sRGB format does not support storage images.

Set VkImageViewUsageCreateInfo to SAMPLED for these views. Keep the minimum LOD chain and first-layer array views intact.

The recorder test checks both array views, checks that minimum LOD chaining preserves the usage restriction, and samples the selected layer to verify sRGB decoding.

Tested

Windows, Core Ultra 7 265K, RTX 5080, GCC 15.2.0.

  • Clean build of agc_driver_recorder_tests and agc_driver_graphics_tests on main at 5895ea7 with this change.
  • Both tests pass. Removing the three-line fix makes the recorder test fail with the unsupported storage usage error. Restoring it makes the test pass again.
  • git diff --check passes.

Found while testing Astro Bot PPSA21564 v01.007.000 with Vulkan validation. This fixes the view usage error; the separate device-loss failure remains. The full repository test suite was not run.

Checklist

  • Based on current main; no matching open PR found
  • One topic per PR
  • No new code comments
  • No unimplemented paths or silent stubs added
  • No investigation notes, images, or game data in the patch
  • No third-party code added
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes, with OpenAI Codex

@frankea

frankea commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Full Windows suite for this draft, since the description says it was not run. Head bbcaad4b merged onto current main c72d5ce1 (clean); Windows 11 10.0.26200, RTX 4090 (NVIDIA 616.92), MinGW-w64 GCC 15.2.0 r7, Release, BUILD_TESTING=ON.

No title was run. Tested with AI assistance (Claude Code).

@Mouhand-Kaddo

Copy link
Copy Markdown
Contributor

Additional platform validation on standalone PR head bbcaad4b2f0fd8b91dd4430e520c86c1bacb147f:

Linux: passed — Arch Linux in WSL2 (kernel 6.6.87.2), GCC 16.2.1 20260810; CMake 4.3.1 / Ninja.

Release / BUILD_TESTING=ON: built the selected test targets; 1 CTest cases, 0 failures, 0 CTest skips.

Tests: agc_driver_graphics.

Reproduce after building the test targets: ctest --test-dir <build> --verbose --no-tests=error --timeout 30 -R "^(agc_driver_graphics|agc_pipeline_cache|agc_unchanged_cpu_stamps|agc_host_import_unmap|agc_recorder_kept_bytes)$".

Vulkan: Mesa lavapipe 26.2.4 software Vulkan; no native Linux GPU/retail-title validation.

Internal limitation: write-watched guest-heap mirror subcases returned early because WSL userfaultfd async write protection is unavailable. The other graphics assertions ran; zero CTest skips does not include this internal early return.

Direct recorder executable: passed, including firstLayerViewTests sRGB usage assertions.

This was referenced Oct 15, 2026
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

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.

Pull request Shared files not compared
PR 1368 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 1395 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 5021 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 5609 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 5925 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6186 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6187 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6188 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6192 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6209 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6280 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6481 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6970 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6987 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6989 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 6995 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7002 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7085 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7256 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7457 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7514 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7604 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 7642 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 8246 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 8484 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 8707 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 9712 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 9884 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 9898 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10049 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10193 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10249 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 10256 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 10442 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 10743 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 10920 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 11444 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 11485 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 12746 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 12921 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 13646 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 13796 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 13863 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 13920 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 13928 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 13929 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 13963 core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 14261 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 14262 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 14302 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
PR 14311 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 14943 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp

@milescoviello

Copy link
Copy Markdown
Contributor

Title data for this PR from Super Meat Boy 3D (PPSA31162) under the Khronos validation layer (1.3.275). Linux 6.8, RTX 4070 Ti, NVIDIA 595.99.02, Release, 180 s with pad input, warm cache, one run per build.

The base is main 195d0d0 plus three unrelated perf PRs of mine (#6917, #7288, #6179). The other build is the same plus this PR's head bbcaad4, which merged cleanly.

Build VUID-VkImageViewCreateInfo-usage-02275 Textures viewed from storage images
base 31 595
+ this PR 0 937

All 31 errors on the base are R8G8B8A8_SRGB views of a 3840x2160 storage image of guest format 130, created by the Texture ... viewed from storage image (vk=43) path. With the PR none are reported, although that run created more such textures. The other errors are the same in both runs: pAttachments-00605 (independentBlend, #6782), plus pLibraries-06681 and VkDeviceCreateInfo-pNext-pNext, which this older layer also reports on main.

Forspoken (PPSA03984) on main shows the same error once in 200 s.

AI-assisted: yes (Claude Code)

@Amoenus

Amoenus commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

2026-10-21 UTC baseline follow-up: unmodified literal main e10b4d6190479edcabfe3f805169b76b18ffaaaa, without #6280 or our extra-mip change, still reports the same diagnostic. agc_driver_image_srgb_sample_copy returns CTest success3/3 on each actual RTX5080 and Radeon Graphics, with one VUID-VkImageViewCreateInfo-usage-02275 validation error per process: six errors total. The forced-copy group passes3/3 per GPU with zero VUIDs/errors/warnings. Loaded Khronos1.4.363, required Vulkan, application shader cache/pipeline journal disabled, fresh serial processes,30s bounds, no skips/timeouts; same Windows11 Enterprise26200/drivers610.62 and32.0.21036.18 setup below.

This is a fresh baseline-only observation, not a new run of your unchanged bbcaad4b2f head. The earlier exact-peer composition/fault comparison remains at its original source pins below. The current extra-mip qualification keeps this existing diagnostic explicit; its candidate results are still pending. AI-assisted: yes (Codex).

Earlier peer-fix validation at its original pins

Independent confirmation of the constructor usage fix on both physical vendors.

Baseline 918ffdb509 is main218aa8f00b plus #6280/#6934 and our extra-mip proposal. The newly merged upstream agc_driver_image_srgb_sample_copy fixture returns success3/3 on each GPU, but every process reports one VUID-VkImageViewCreateInfo-usage-02275: its R8_SRGB sampled view inherits STORAGE usage. That is3 errors per vendor (6 VUID text occurrences per vendor because each diagnostic repeats the ID), not a clean pass. The forced-copy mode is already validation-clean before this patch.

I merged your exact head bbcaad4b2f0fd8b91dd4430e520c86c1bacb147f, preserving its original authorship and both changed files, into validation composition d1a9126a5b. No production adaptation was needed: its only production delta from918 is your3-line usage restriction.

Full Windows relinker/library and affected fixture builds pass. The ordinary sRGB copy, forced-copy and existing agc_sampled_storage_base_level_usage groups each pass3/3 per physical GPU: 9 NVIDIA +9 AMD, plus3 CPU graphics passes. Actual device identity and Khronos1.4.363 loading are verified per GPU process; zero VUIDs, validation errors/warnings or skips. All processes fit30s. This validates the existing upstream base-level mode and R8 fixture; it does not claim execution of every Recorder.cpp case.

Hardware: RTX5080 10de:2c02, driver610.62/32.0.16.1062; AMD Radeon(TM) Graphics 1002:13c0, driver32.0.21036.18; Windows11 Enterprise26200, WinLibs GCC15.2r7. Source pins were frozen. Conventions pass against later main5057673804. These are composition/component results, not a standalone-head Linux or game-unblock claim. No duplicate issue or implementation PR is being opened.

AI-assisted validation/report: yes (Codex).

@DavidAmsellem

Copy link
Copy Markdown
Contributor

First AMD-on-Linux (RADV) data for this PR. Merged onto main c4708fa20 (clean merge) and compared with the same main, on the same machine.

Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release. AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8. Khronos validation layer 1.3.275, confirmed loaded with VK_LOADER_DEBUG=layer.

Validation run, ANYPS5_NO_SHADER_CACHE=1 main with this PR
VUID-VkImageViewCreateInfo-usage-02275 3 (2 in agc_sampled_storage_base_level_usage for R8G8B8A8_SRGB, also on lavapipe; 1 in agc_driver_image_srgb_sample_copy for R8_SRGB, on RADV only) 0
agc_sampled_storage_base_level_usage, agc_driver_image_srgb_sample_copy Passed Passed

The only other VUID- lines in these runs come from the old layer: VkDeviceCreateInfo-pNext-pNext, because it predates VK_KHR_maintenance8, and VkGraphicsPipelineCreateInfo-pLibraries-06681. Their counts are identical with and without the PR (4 and 26). The PR adds no new VUID-.

Full suite without the layer (ANYPS5_REQUIRE_VULKAN=1 ctest -j8): 1631/1633 on both main and with this PR. The two failures are the same on both: agc_driver_image_table_vouched_lookups (#7766, fix in #7916) and agc_driver_guest_memory_lifetime (#7784).

GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38

AI-assisted: yes

@DavidSamir

Copy link
Copy Markdown
Contributor

AMD Radeon 680M (Windows 11, AMD 32.0.21030.2001), VK_LAYER_KHRONOS_validation (SDK 1.4.363), ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1. main 2f161d4f3 with and without this PR:

  • main: agc_sampled_storage_base_level_usage logs VUID-VkImageViewCreateInfo-usage-02275 x2 (R8G8B8A8_SRGB view inheriting STORAGE), and agc_driver_image_srgb_sample_copy logs it x1 (R8_SRGB).
  • This PR merged into main: both tests pass, with 0 02275 lines.

AI-assisted: yes

@embersas

embersas commented Oct 21, 2026 •

Copy link
Copy Markdown

Independent Windows GPU confirmation against the standalone PR head, rather than a merge onto newer main:

  • Parent: 5895ea721a43f48547cc996aee0bb65b603622ac
  • PR head: bbcaad4b2f0fd8b91dd4430e520c86c1bacb147f
  • Ryzen 9 3900X, RTX 3080 Ti, WinLibs MinGW-w64 GCC 15.2.0, Release, SPIRV-Tools disabled.

The paired runs used identical test executables and support libraries, changing only libSceAgcDriver.prx between the two revisions.

Verified fix: our synthetic RGBA8 storage-to-sRGB sampling test reports VUID-VkImageViewCreateInfo-usage-02275 once on the parent and zero times on the head. Two GPU stores, sampled decoding and surrounding-byte checks pass on both, so pixel checks alone would miss the parent's invalid view usage. Your added Recorder.cpp regression also fails on the parent with the sRGB sampled view inherits unsupported storage usage and passes on the head.

Follow-up: the three separate, pre-existing validation errors already have upstream fixes:

The common recorder executable emits the same 10 command-buffer and 7 barrier messages with either original driver. Validation suppresses duplicates after 10 reports, so these are emitted-message counts, not total violation counts. The graphics mock suite passes on both.

Follow-up isolated controls confirmed each cause: the reset flag removes only the command-buffer errors, adding HOST removes only the barrier errors, and both together give a clean recorder pass. A minimal import probe identifies its exact buffer/memory handles in the teardown diagnostic; reconciling the import table removes that error. Backporting the existing host-import teardown cleanup also makes the original sRGB test validation-clean while preserving its pixel and guard checks.

All six GPU processes in the original paired comparison positively loaded Khronos validation 1.4.363 with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. The follow-up controls used the same required validation settings. Full stdout/stderr was checked; no missing-layer warnings or GPU skips.

All three upstream corrections were confirmed by source and ancestry at main 950388bfd242c0939536d40ce8cc170d2bf069a1. The follow-up executions tested the old revision with isolated corrections; current main was not rebuilt in that investigation.

This confirms the narrow sampled-view correction. The other diagnostics are older issues already addressed upstream, not regressions introduced by this PR. This is not a validation-clean full-suite or game-performance claim. No game was run.

AI-assisted testing and report: Codex.

@embersas

Copy link
Copy Markdown

Additional integration validation on base cc0078595d4f24e9df0698ca5a4a062c61592f6f, with the production corrections from #6782 (4433a62b3bf6248df830994a255701c72581cc95), #862 (bbcaad4b2f0fd8b91dd4430e520c86c1bacb147f) and #8667 (47e1539ac5afe87b602fe450d744999cd97cae9e) applied together. This was a local integration of the corrections, not a merge of the three PR branches.

Windows, Ryzen 9 3900X / RTX 3080 Ti, WinLibs GCC 15.2, Release. All 25 focused CTest selections qualified. The 23 GPU executions positively loaded Khronos validation 1.4.363 and identified the RTX 3080 Ti; full stdout/stderr contained no VUID errors, synchronization hazards, missing-layer warnings or skipped tests. The other two selections were non-GPU controls.

The sampled-storage usage, sRGB sample-copy and separate storage/sRGB alias fixtures all qualified in this integration. This supplements the parent/head comparison above; it does not replace that isolated attribution.

Focused correctness testing on this configuration; not a full repository suite or a performance result.

AI-assisted testing and report: Codex.

@JJenkx

JJenkx commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

A data point from the AMD proprietary driver on Windows, where this VUID actually fires. The earlier report is from an RTX 5080, and whether usage-02275 triggers depends on the device not supporting storage for R8G8B8A8_SRGB.

Setup: AMD Radeon RX 6700 XT, driver 32.0.21045.16010, Windows 11 22H2 (10.0.22621), MinGW-w64 GCC 15.2 UCRT r7, Release. Khronos validation layer 1.4.309 (built locally), ANYPS5_REQUIRE_VULKAN=1, shader cache off. 3 runs per arm of agc_sampled_storage_base_level_usage, agc_driver_image_srgb_sample_copy and agc_driver_image_srgb_sample_copy_forced. The PR's base (5895ea721a) predates these tests, so I merged this head onto main b3e42bd1eb locally (clean, fbe40f4ed8, not pushed).

arm result validation lines per run
main 21554447d0 3/3 pass 6× VUID-VkImageViewCreateInfo-usage-02275: "format VK_FORMAT_R8G8B8A8_SRGB with tiling VK_IMAGE_TILING_OPTIMAL doesn't support VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT"
main b3e42bd1eb + this PR 3/3 pass 0

The 6 lines per run are 4 from agc_sampled_storage_base_level_usage and 2 from agc_driver_image_srgb_sample_copy. On the same main, a full ^agc_ run under this layer (932 tests) logs usage-02275 only from these two tests. The main arm is 75 commits older than the merged arm's base. Between those two main commits, six commits change Texture.cpp (image store and readback paths: #6948, #6682), and none changes a usage line, so the drop in this VUID comes from this PR's change.

AI-assisted: yes (Claude Code).

@BKlaasWerkman

Copy link
Copy Markdown
Contributor

Confirmed on current main with a second sRGB path.

Windows 11 Pro 10.0.26300, WinLibs GCC 15.2.0 r7, Release. NVIDIA GeForce RTX 3060 Ti (driver 617.42) and Intel Arc Graphics (Meteor Lake, 0x7d55, driver 101.9150), selected with ANYPS5_GPU. ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (1.4.363).

A full ctest run of main b7a451d on the RTX 3060 Ti reports VUID-VkImageViewCreateInfo-usage-02275 in two tests:

  • agc_sampled_storage_base_level_usage ×2: VK_FORMAT_R8G8B8A8_SRGB ... doesn't support VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT, usage inherited from an image with STORAGE.
  • agc_driver_image_srgb_sample_copy ×1: the same for VK_FORMAT_R8_SRGB.

With head bbcaad4 merged into b7a451d (clean merge), both tests pass on both GPUs with no VUID-. Intel Arc reported no 02275 in a full run of main 83462cc either, so only the NVIDIA side shows the change.

AI-assisted: yes (Claude Code)

@JJenkx

JJenkx commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

The three-line production usage restriction is already in main through 812928af24 (#6218). I refreshed the remaining 30-line regression from this PR on main d5f5cd8db4ea6c2d1dc8f504931f529580ff8c9e, retaining lvmino97’s authorship, and added a separate focused CTest selector. There is no production change in the proposed refresh.

On RX 6650 XT/RADV with Vulkan required, shader cache disabled and Khronos validation verified loaded, the focused first-layer test passes on baseline and the test-only candidate (8667f105a0df1062aa6cd42fec06c2da6f65d581), with zero VUIDs. Removing only the three production usage-restriction lines makes the new test fail its targeted sRGB sampled-view usage assertion before the driver call. Repeating the unchanged candidate passes. Optional minLOD coverage is feature-gated. This is a focused test result, not a full Recorder suite, title, or performance result.

Attributed two-commit patch, exact revisions, four logs and negative control. Offered here for this existing PR rather than opening a duplicate.

@fogydes

fogydes commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Read from the backlog and re-measured: the fix is real and correctly placed, but main has since implemented the same thing with test evidence, so the actual question for a maintainer is whether this PR adds anything on top.

Current merge state: base 5895ea72, 12,656 commits behind (664648356c), 1 commit ahead. git merge-tree is clean — the branch's Texture.cpp edit still applies as a small delta. [verified]

The supersession:

  • The PR creates a sampled view of a StorageTexture with VkImageViewUsageCreateInfo restricting it to VK_IMAGE_USAGE_SAMPLED_BIT. On current main, Texture::prepareSrgbView/SrgbView() (Graphics/src/Texture.cpp) create the lazy sRGB view with exactly that usage pNext. [verified on main]
  • Main also carries a dedicated probe: SampledViewProbe in tests/Recorder.cpp:8666 intercepts vkCreateImageView and asserts the sRGB views carry the SAMPLED usage; the PR's own recorder-test addition (to firstLayerViewTests) would overlap that coverage. From reading both, the PR's variant still covers two shapes main's probe checks differently (sRGB first-layer array view sampling and a minLod'd variant), so it is not literally valueless — but it would now be duplicate coverage of the same VUID rather than a fix of a gap. [read-only]

The PR's own mechanism was checked: derived-view creation path is the right place for the usage restriction, and the format involved (130 = VK_FORMAT_R8G8B8A8_SRGB) matches main's TextureFormat.cpp mapping. [verified]

Runtime claims (Astro Bot validation repro, "removing the three lines makes the test fail") are [author-reported only] — not reproducible without a GPU run here.

Envelope: base 5895ea72, behind 12,656, ahead 1; main touched Texture.cpp heavily since the base (hundreds of commits, representative c0dbd1871c, 1499ae961d) — the clean merge-tree is mechanical, not a sign the fix is still needed as written.

Disclosure: Windows host; diffed the branch against merge-base and against current main's implementation; no GPU test executed by me.

Suggested outcome for the author or maintainer: rebase and reconcile — either drop the PR in favor of main's prepareSrgbView implementation, or, if the two extra test shapes are worth keeping, re-target the test addition onto main's existing probe instead of a parallel hook.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc*

Projects

None yet

Development

Successfully merging this pull request may close these issues.