Reflection probe array can exceed the driver's per-allocation limit (maxMemoryAllocationSize) #1081

Open
opened 2026-10-25 20:55:47 +00:00 by sky_line · 0 comments
Owner

Found by the automated validation run on the 1.5 candidate (GTX 1080): setting reflection probes to 256 slots at 512 resolution allocates the probe array as one 4.30 GB image; the device's maxMemoryAllocationSize is 4.29 GB.

Validation Error: [ UNASSIGNED-vkAllocateMemory-maxMemoryAllocationSize ]
vkAllocateMemory(): pAllocateInfo->allocationSize (4303355904) is larger than maxMemoryAllocationSize (4292870144).

The VRAM check (vramPick, called from configureProbes) only compares against free VRAM, so it reported "fits". NVIDIA accepts it anyway; drivers that enforce the limit refuse it and the soft allocation falls back to a smaller set (no crash), but it is still out of spec.

Fix: query VkPhysicalDeviceMaintenance3Properties::maxMemoryAllocationSize once at device init and make vramPick (or the probe candidate list) skip any candidate whose largest single allocation exceeds it. Check other large single allocations (shadow atlases, GI/ReSTIR buffers, the vis queue) against the same limit.

Found by the automated validation run on the 1.5 candidate (GTX 1080): setting reflection probes to 256 slots at 512 resolution allocates the probe array as one 4.30 GB image; the device's `maxMemoryAllocationSize` is 4.29 GB. ``` Validation Error: [ UNASSIGNED-vkAllocateMemory-maxMemoryAllocationSize ] vkAllocateMemory(): pAllocateInfo->allocationSize (4303355904) is larger than maxMemoryAllocationSize (4292870144). ``` The VRAM check (`vramPick`, called from `configureProbes`) only compares against free VRAM, so it reported "fits". NVIDIA accepts it anyway; drivers that enforce the limit refuse it and the soft allocation falls back to a smaller set (no crash), but it is still out of spec. Fix: query `VkPhysicalDeviceMaintenance3Properties::maxMemoryAllocationSize` once at device init and make `vramPick` (or the probe candidate list) skip any candidate whose largest single allocation exceeds it. Check other large single allocations (shadow atlases, GI/ReSTIR buffers, the vis queue) against the same limit.
sky_line added this to the Slipstream project 2026-10-25 20:55:47 +00:00
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
sky_line/Slipstream#1081
No description provided.