[GH-ISSUE #7178] Shader packs: RenderPearl and Visual Vibrance crash the game (a storage buffer smaller than its shader expects) #3161

Closed
opened 2026-11-03 04:06:20 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @arslanarm on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7178

Originally assigned to: @arslanarm on GitHub.

🤖 Filed by arslanarm's AI agent (Claude Code, Claude Opus 5.5), not by arslanarm personally.

What happens: with RenderPearl v2.7.2 or Visual Vibrance v0.3.5a selected, Horizon crashes on the first frame in a world. This happened with a fast build of main 6d91fa694 (no change to the pack's storage buffers since, up to 0ac35dac7), on Linux with an NVIDIA GPU, under Xvfb, with a fresh game home and one overworld scene. The log ends with:

[Render submit/ERROR]: Handling wgpu errors as fatal by default
wgpu error: Validation Error
Caused by:
  In a CommandEncoder, label = 'Horizon frame'
    In a dispatch command, indirect:false
      In bind group index 4, the buffer bound at binding index 1 is bound with size 40980 where the shader expects 40992.

(RenderPearl.) Visual Vibrance stops on a draw instead: "In bind group index 4, the buffer bound at binding index 0 is bound with size 40 where the shader expects 48." Then: Horizon crashed: panicked at crates/horizon-client-render/src/gfx/submit.rs:143:18: Horizon renderer: the submit thread stopped: RecvError.

Bind group 4 holds the pack's storage buffers (bufferObject.<n> in shaders.properties; Iris ShaderDoc, "Shader Storage Buffer Objects"). gfx/pack_images.rs creates each one at the declared size rounded up to 4 bytes. The shader's own buffer type can be larger: here, by 12 and 8 bytes, a multiple of 16 in both cases. wgpu refuses to bind a buffer smaller than its shader's minimum size, where OpenGL leaves that to the shader's accesses.

The pack's programs are contained when they fail to translate (#3525), but a validation error on the submit thread takes the whole game down, so the player loses the session.

Expected: a pack's storage buffer is at least as large as every shader that binds it expects, so these packs render. Separately, a validation error caused by a pack should turn the pack off rather than crash the game.

Originally created by @arslanarm on GitHub (Nov 2, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7178 Originally assigned to: @arslanarm on GitHub. > 🤖 Filed by arslanarm's AI agent (Claude Code, Claude Opus 5.5), not by arslanarm personally. **What happens:** with RenderPearl v2.7.2 or Visual Vibrance v0.3.5a selected, Horizon crashes on the first frame in a world. This happened with a fast build of main 6d91fa694 (no change to the pack's storage buffers since, up to 0ac35dac7), on Linux with an NVIDIA GPU, under Xvfb, with a fresh game home and one overworld scene. The log ends with: ``` [Render submit/ERROR]: Handling wgpu errors as fatal by default wgpu error: Validation Error Caused by: In a CommandEncoder, label = 'Horizon frame' In a dispatch command, indirect:false In bind group index 4, the buffer bound at binding index 1 is bound with size 40980 where the shader expects 40992. ``` (RenderPearl.) Visual Vibrance stops on a draw instead: "In bind group index 4, the buffer bound at binding index 0 is bound with size 40 where the shader expects 48." Then: `Horizon crashed: panicked at crates/horizon-client-render/src/gfx/submit.rs:143:18: Horizon renderer: the submit thread stopped: RecvError`. Bind group 4 holds the pack's storage buffers (`bufferObject.<n>` in `shaders.properties`; Iris ShaderDoc, "Shader Storage Buffer Objects"). `gfx/pack_images.rs` creates each one at the declared size rounded up to 4 bytes. The shader's own buffer type can be larger: here, by 12 and 8 bytes, a multiple of 16 in both cases. wgpu refuses to bind a buffer smaller than its shader's minimum size, where OpenGL leaves that to the shader's accesses. The pack's programs are contained when they fail to translate (#3525), but a validation error on the submit thread takes the whole game down, so the player loses the session. **Expected:** a pack's storage buffer is at least as large as every shader that binds it expects, so these packs render. Separately, a validation error caused by a pack should turn the pack off rather than crash the game.
Author
Owner

@arslanarm commented on GitHub (Nov 2, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6576739919 --> @arslanarm commented on GitHub (Nov 2, 2026): 🤖 Agent: /claim
Sign in to join this conversation.
No milestone
No project
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.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#3161
No description provided.