Stray (PPSA02101): a pixel shader at 0x20eec20000 reads an image descriptor as its buffer 0 and stops on "buffer descriptor uses an unsupported type" #5894

Closed
opened 2026-10-14 14:49:56 +00:00 by ThatsLeo · 3 comments
ThatsLeo commented 2026-10-14 14:49:56 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by ThatsLeo on 2026-10-14T14:49:56Z.


After #5573, Stray gets into its opening cinematic and then stops on

[videoout] presentation failed: buffer descriptor uses an unsupported type
terminate called after throwing an instance of 'std::runtime_error'

@oneandonlydean mentioned this stop in #5099 as a separate issue; this is it with the descriptor.

Setup: Fedora 44, Intel Arc (Meteor Lake iGPU, Mesa 26.2.3 ANV), Stray PPSA02101 EU. Getting this far on this iGPU needs more than main: main 66f89476 with #5405 (plus a local change that lets its spanned waves run without a required subgroup size), #5181, and smaller GPU caches for an integrated GPU (the staging pool from #5893, the storage image cache cut locally). The stop is in descriptor materialization, which none of those touch, and it happened in each of the 3 runs that stayed in the cinematic long enough, between 490 and 710 s.

What is read. With a print added at the throw in ResourceMaterializer.cpp (materializeTables):

[diag] materialized buffer 0 V# 20722c00 c3800000 001dc13f a1b00fac type 2 stage 2 (pixel) shader 0x20eec20000

Word 3 is 0xa1b00fac. Its top bits give buffer type 2, but as a T# word 3 they read as an image type, and words 0-1 (0x20722c00, 0xc3800000) look like an image's base address and format. So the shader's first buffer slot holds what is most likely an image descriptor.

The shader address. The line just before is

[Shaders/ShaderRegistry.cpp:418 ReportPreparedAtUse] Shader 0x20eec20000 stage 5 has no artifact prepared at registration for the state of this draw or dispatch; preparing it at use

and 17,000 lines earlier the same address was a texture:

[src/Texture.cpp:260 Texture] Texture address=0x20eec20000 128x128 mips=8 layers=1 dim=1 tile=3 format=177 vk=141 element=16

I haven't established which is the case: the title loading a pixel shader where it had a texture (streaming would do that), or the draw's program address pointing at memory that no longer holds that program, as with the fused programs #5573 fixed. I could not dump the request: the throw comes after PrepareShaderWithDiagnostics, so APS5_DUMP_SHADERS does not catch it. A line naming the shader and the descriptor at that throw would make the next report shorter.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5850007262 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5894). Originally posted by [ThatsLeo](https://github.com/ThatsLeo) on 2026-10-14T14:49:56Z. --- After #5573, Stray gets into its opening cinematic and then stops on ``` [videoout] presentation failed: buffer descriptor uses an unsupported type terminate called after throwing an instance of 'std::runtime_error' ``` @oneandonlydean mentioned this stop in #5099 as a separate issue; this is it with the descriptor. **Setup:** Fedora 44, Intel Arc (Meteor Lake iGPU, Mesa 26.2.3 ANV), Stray PPSA02101 EU. Getting this far on this iGPU needs more than `main`: `main` 66f89476 with #5405 (plus a local change that lets its spanned waves run without a required subgroup size), #5181, and smaller GPU caches for an integrated GPU (the staging pool from #5893, the storage image cache cut locally). The stop is in descriptor materialization, which none of those touch, and it happened in each of the 3 runs that stayed in the cinematic long enough, between 490 and 710 s. **What is read.** With a print added at the throw in `ResourceMaterializer.cpp` (`materializeTables`): ``` [diag] materialized buffer 0 V# 20722c00 c3800000 001dc13f a1b00fac type 2 stage 2 (pixel) shader 0x20eec20000 ``` Word 3 is `0xa1b00fac`. Its top bits give buffer type 2, but as a T# word 3 they read as an image type, and words 0-1 (`0x20722c00`, `0xc3800000`) look like an image's base address and format. So the shader's first buffer slot holds what is most likely an image descriptor. **The shader address.** The line just before is ``` [Shaders/ShaderRegistry.cpp:418 ReportPreparedAtUse] Shader 0x20eec20000 stage 5 has no artifact prepared at registration for the state of this draw or dispatch; preparing it at use ``` and 17,000 lines earlier the same address was a texture: ``` [src/Texture.cpp:260 Texture] Texture address=0x20eec20000 128x128 mips=8 layers=1 dim=1 tile=3 format=177 vk=141 element=16 ``` I haven't established which is the case: the title loading a pixel shader where it had a texture (streaming would do that), or the draw's program address pointing at memory that no longer holds that program, as with the fused programs #5573 fixed. I could not dump the request: the throw comes after `PrepareShaderWithDiagnostics`, so `APS5_DUMP_SHADERS` does not catch it. A line naming the shader and the descriptor at that throw would make the next report shorter. AI-assisted: yes.
YossiYad commented 2026-10-14 15:03:38 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by YossiYad on 2026-10-14T15:03:38Z.


#5897 adds the line you asked for. A draw refused here now reads

shader 0x<address> stage 5: buffer descriptor uses an unsupported type (buffer 0 V# 20722c00 c3800000 001dc13f a1b00fac)

and with APS5_DUMP_SHADERS=1 the stage's request is dumped and its path goes in the same prefix, so the case can be replayed without a local print. It does not change which descriptors are refused. #5879 (PPSA02100) stops on the same throw, so a run of either with that PR should show whether the address is a stale program or a real pixel shader that reads a T# as its buffer 0.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6171431276 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5894#issuecomment-6171431276). Originally posted by [YossiYad](https://github.com/YossiYad) on 2026-10-14T15:03:38Z. --- #5897 adds the line you asked for. A draw refused here now reads ``` shader 0x<address> stage 5: buffer descriptor uses an unsupported type (buffer 0 V# 20722c00 c3800000 001dc13f a1b00fac) ``` and with `APS5_DUMP_SHADERS=1` the stage's request is dumped and its path goes in the same prefix, so the case can be replayed without a local print. It does not change which descriptors are refused. #5879 (PPSA02100) stops on the same throw, so a run of either with that PR should show whether the address is a stale program or a real pixel shader that reads a T# as its buffer 0.
nikowolf123 commented 2026-10-14 17:13:21 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by nikowolf123 on 2026-10-14T17:13:21Z.


@ThatsLeo, on the two cases you list. The ShaderRegistry line is printed only for a program that the registry holds with a header (ShaderRegistry.cpp#L450-L453), and such a draw compiles the copy of the code taken at registration, not the bytes now at the address (#L395-L410). So the failing pixel shader is a program the title registered at 0x20eec20000; the texture's bytes were not compiled. A run with APS5_TRACE_SHADER_REGS=all tells your two cases apart: it prints a [shader] 0x<address> type ... line for each new registration (#L1416-L1429). A 0x20eec20000 registration after the texture line means the title put a shader there (your first case). If it only comes before, the registry still holds a program whose memory was reused (your second).

There is a third case: a real pixel program that this draw should not run at all. #5631 by @moong15 (head 75083acb3) handles that one:

  • In Stellar Blade, depth-only draws clear CB_TARGET_MASK, CB_SHADER_MASK and DB_SHADER_CONTROL but leave the previous pixel program bound and SPI_SHADER_Z_FORMAT non-zero.
  • main skips the pixel stage only when Z_FORMAT is 0 (State.cpp#L1404-L1415). Otherwise it reads the program's resources from user data written for another program. #5631 drops that condition, and such a draw gets the null pixel program.
  • The PR found that the program's code matched live memory. In its matched runs, main stopped at presentation on this same message in 2 of 6 runs and the PR in 0 of 6 (PR body); the PR notes this link is inferred, not traced to a draw.
  • On #5879, @p3n1cillin sees the same pixel shader's buffer slot hold different T#s from run to run, and a 3D T# in a 2D slot once that buffer is bound as empty, which fits.

Could you add #5631 to your stack? It is one commit, and by git merge-tree it cherry-picks without conflicts onto 66f89476 + #5405 + #5181 + #5893 (without your local changes, which I can't see). #5897's three commits cherry-pick cleanly on top. If runs then stay in the cinematic past the 490 to 710 s where it stopped before, that points at this state. If it still stops, #5897's message names the shader and the V#, and context registers 0x8e, 0x8f, 0x203 and 0x2dc at that draw (what #5631's check reads) would show why it was not skipped.

AI-assisted: written with Claude Code; I checked when ReportPreparedAtUse prints that line, what RegisteredProgram returns, when APS5_TRACE_SHADER_REGS prints and that registry entries are only replaced by a new registration, #5631's predicate change against PixelProgramSkipped on main e34c47921, and the Stellar Blade runs in #5631's body and gist. I ran git merge-tree to cherry-pick #5631 and then #5897's commits onto 66f89476 + #5405 + #5181 + #5893. I did not run Stray or build these PRs.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6174006248 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5894#issuecomment-6174006248). Originally posted by [nikowolf123](https://github.com/nikowolf123) on 2026-10-14T17:13:21Z. --- @ThatsLeo, on the two cases you list. The `ShaderRegistry` line is printed only for a program that the registry holds with a header ([ShaderRegistry.cpp#L450-L453](https://github.com/boykopovar/AnyPS5/blob/e34c479210c78d7b160d7054f3e72de422b23d7a/core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp#L450-L453)), and such a draw compiles the copy of the code taken at registration, not the bytes now at the address ([#L395-L410](https://github.com/boykopovar/AnyPS5/blob/e34c479210c78d7b160d7054f3e72de422b23d7a/core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp#L395-L410)). So the failing pixel shader is a program the title registered at `0x20eec20000`; the texture's bytes were not compiled. A run with `APS5_TRACE_SHADER_REGS=all` tells your two cases apart: it prints a `[shader] 0x<address> type ...` line for each new registration ([#L1416-L1429](https://github.com/boykopovar/AnyPS5/blob/e34c479210c78d7b160d7054f3e72de422b23d7a/core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp#L1416-L1429)). A `0x20eec20000` registration after the texture line means the title put a shader there (your first case). If it only comes before, the registry still holds a program whose memory was reused (your second). There is a third case: a real pixel program that this draw should not run at all. #5631 by @moong15 (head `75083acb3`) handles that one: - In Stellar Blade, depth-only draws clear `CB_TARGET_MASK`, `CB_SHADER_MASK` and `DB_SHADER_CONTROL` but leave the previous pixel program bound and `SPI_SHADER_Z_FORMAT` non-zero. - `main` skips the pixel stage only when Z_FORMAT is 0 ([State.cpp#L1404-L1415](https://github.com/boykopovar/AnyPS5/blob/e34c479210c78d7b160d7054f3e72de422b23d7a/core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp#L1404-L1415)). Otherwise it reads the program's resources from user data written for another program. #5631 drops that condition, and such a draw gets the null pixel program. - The PR found that the program's code matched live memory. In its matched runs, `main` stopped at presentation on this same message in 2 of 6 runs and the PR in 0 of 6 ([PR body](https://github.com/boykopovar/AnyPS5/pull/5631)); the PR notes this link is inferred, not traced to a draw. - On #5879, @p3n1cillin sees the same pixel shader's buffer slot hold different T#s from run to run, and a 3D T# in a 2D slot once that buffer is bound as empty, which fits. Could you add #5631 to your stack? It is one commit, and by `git merge-tree` it cherry-picks without conflicts onto `66f89476` + #5405 + #5181 + #5893 (without your local changes, which I can't see). #5897's three commits cherry-pick cleanly on top. If runs then stay in the cinematic past the 490 to 710 s where it stopped before, that points at this state. If it still stops, #5897's message names the shader and the V#, and context registers `0x8e`, `0x8f`, `0x203` and `0x2dc` at that draw (what #5631's check reads) would show why it was not skipped. AI-assisted: written with Claude Code; I checked when `ReportPreparedAtUse` prints that line, what `RegisteredProgram` returns, when `APS5_TRACE_SHADER_REGS` prints and that registry entries are only replaced by a new registration, #5631's predicate change against `PixelProgramSkipped` on `main` `e34c47921`, and the Stellar Blade runs in #5631's body and gist. I ran `git merge-tree` to cherry-pick #5631 and then #5897's commits onto `66f89476` + #5405 + #5181 + #5893. I did not run Stray or build these PRs.
oneandonlydean commented 2026-10-14 20:29:47 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T20:29:47Z.


Same stop as #5879 (Stray, the other region): an image descriptor read through a buffer slot of a pixel shader. Closing as a duplicate to keep the data in one place; your V# words and setup are linked from there.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6177776767 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5894#issuecomment-6177776767). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-14T20:29:47Z. --- Same stop as #5879 (Stray, the other region): an image descriptor read through a buffer slot of a pixel shader. Closing as a duplicate to keep the data in one place; your V# words and setup are linked from there.
Sign in to join this conversation.
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#5894
No description provided.