Game: oversized simulated-turf mesh draw exceeds device workgroup limit #2251
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot#2251
Loading…
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?
Version and system
mainata2dc5385; the adaptive simulated-turf backend under test is already onmainfrom #2093 and #2174.What happens
At sufficiently large simulated-turf ranges, turf patches flicker in and out continuously. This is persistent rather than the brief population delay expected immediately after a live setting change. It can affect nearby patches as well as the far edge.
The adaptive private record pool is not full when this happens. The failure begins downstream, when a mesh-only indirect draw asks for more X workgroups than the physical device reports through
VkPhysicalDeviceMeshShaderPropertiesEXT::maxMeshWorkGroupCount[0].Expected: renderer-generated indirect mesh workloads remain within the device's advertised limits, or otherwise degrade safely.
Actual: the oversized indirect mesh draw is submitted and simulated turf flickers persistently.
Reproduction
The submitted Extreme preset in PR #2241 uses endpoint 110.5 in this area and stayed below the observed boundary. Raising the endpoint toward 195 made the problem repeatable.
Measured boundary
In the reproduced frame sequence:
maxMeshWorkGroupCount[0]The relevant simulated-turf mesh reader consumes 32 pool records per X workgroup (
workgroup_id * 32 + lane). On this device that makes the largest single-draw addressable prefix:65,535 workgroups * 32 records = 2,097,120 recordsRecord 2,097,121 requires a 65,536th X workgroup and is therefore beyond this device's advertised per-dimension limit. The observed 70,195-workgroup command crosses that boundary even though the backing private pool still has room.
The pool peak and draw count were sampled from the same settled stress run but are not asserted to be the exact same counter sample; the decisive comparison is the indirect command's 70,195 X workgroups against the device limit of 65,535.
Renderer path and scope
gpu/vk/eden/shader_recompiler/ir_opt/sim_turf_pool_pass.hderives simulated-turf producer and reader caps from the bound storage-buffer length. This protects record memory and permits capacities above the game's original fixed lists.gpu/vk/vk_draw.cppsubmits the converted/native indirect arguments throughvkCmdDrawMeshTasksIndirectEXTorvkCmdDrawMeshTasksIndirectCountEXT; the recorded X count is not currently bounded bymaxMeshWorkGroupCount[0]on this path.This report intentionally does not prescribe a simulated-turf-specific implementation. The general renderer requirement is that GPU-generated indirect mesh workloads larger than a device's advertised mesh-workgroup limits be handled without submitting an invalid oversized draw.
Related
No game files, saves, generated shaders, frame dumps or caches are attached.
Possibly related, for context: