Crash on AMD RX 580: push constants exceed the 128-byte maxPushConstantsSize limit #238
Labels
No labels
amd
avatars
bug
builder
cannot-reproduce
crash
epic
feature
from-viewer
gl-removal
known-limitation
monitoring
parity
perf
platform
priority
critical
priority
high
priority
low
priority
medium
provenance
rendering
rt
status
in-progress
status
testing
status
up-next
triage
ui
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sky_line/Slipstream#238
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Crashes on AMD RX 580 (Polaris / GCN4). On that hardware/driver
VkPhysicalDeviceLimits::maxPushConstantsSizeis 128 bytes (the Vulkan spec minimum; NVIDIA and RADV expose 256). Several of our pipeline layouts declare push-constant ranges larger than 128 B, so pipeline-layout creation / draws are invalid and the driver crashes.Offending push blocks (vulkan-port-tb, 2026-10-02)
VKDrawPush(vkgfx/llcleanrenderervk.h)VKCullPush(llcleanrenderervk.h)clean_cull.comp(main / HUD / mirror / probe / shadow culls); grew with the probe shared-cull work (probeperf2)TAAPush(llcleanrenderervk.cpp~9608)clean_taa.comp(grew withparams2for the native anti-flicker lock + glow resolve)Everything else is <= 128 B already (
RtMaskPushData,AOPush, god-rayTempPush,RtDebugPushare exactly 128 -- keep them there).vk_descpool.cpp:268already compares the push range againstmaxPushConstantsSizewhen creating layouts, but only reports; it doesn't prevent the crash.Fix
VKDrawPush: view_proj + camera + sun + misc per view -> a per-view UBO array (main, mirror, probe faces, cascades, projector tiles) indexed by a pushuint view_id+ a few per-draw-set words. Most of the 240 B is constant for a whole pass.VKCullPush: same -- per-cull parameters into a small cull-params buffer slot per dispatch (we already record many culls per frame: main, HUD, mirror, 6 probe faces, cascades).TAAPush: move reproj / water plane / params into a TAA UBO.maxPushConstantsSize, log a clear error instead of crashing (and/or fall back to the UBO path everywhere -- preferred: single path for all hardware, no 256 B assumption).static_assert(sizeof(X) <= 128)on every push struct so this can't regress.Notes
vulkaninfo | grep maxPushConstantsSize.Status check (verification sweep): the push-constant fix shipped in v1.0.0-beta.1:
4a8ae7dc10);797b423808);bd3a959ec0);b20960b291,c4f608c616,1e2875a7fb,513e03fcdd,194d10542e).Still outstanding: confirmation on real RX 470/480/570/580 hardware (AMD Windows driver and/or RADV) that the viewer runs. Close once a tester confirms.
Confirmed fixed on real hardware: the RX 580 (Polaris) reporter confirms Slipstream now runs on their machine. Fix: push blocks capped at 128 B with static_asserts (
4a8ae7dc10,797b423808,bd3a959ec0) plus the Polaris fallbacks (32 KiB shared-memory alpha sort variant, probe capture split, metadata bounds). Shipped in the 1.0.0 betas.