Game: on Vulkan the game's occlusion culling never culls (every samples-passed count reads 4096) #122
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
beanstalk: approved @ 1697603
beanstalk: approved @ 2c5a62e
beanstalk: approved @ 4fd82b7
beanstalk: approved @ 64d6d09
beanstalk: approved @ 6f91fae
beanstalk: approved @ 70a78f9
beanstalk: approved @ 8015c9a
beanstalk: approved @ 8d361dc
beanstalk: approved @ 9d8356e
beanstalk: approved @ abf2227
beanstalk: approved @ d82f202
beanstalk: approved @ e5f1e40
beanstalk: approved @ ee8ab5f
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
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot#122
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?
Longshot version
Measured on Hookshot
main51da0464(11 November 2026), whose renderer code Longshot carries unchanged here. The fixis Longshot pull request 23 (WIP, opt-in).
What kind of problem
Low fps or stutter: GPU work the game means to skip
What happened
On the Vulkan renderer every samples-passed counter report reads 4096 (
RX_VK_OCC_FIXED, sinceNotRexed/Hookshot#487, which fixed a one-frame sun flicker). Ocarina of
Time uses those counts for its occlusion culling, so it never culls anything hidden behind something:
was 0. A dumped gameplay frame in Kokiri Forest has 491 such reports and no conditional rendering at all, so the counts
only have to reach guest memory in time; no
VK_EXT_conditional_renderingis needed.Measured in Kokiri Forest (first save, standing still about 100 s after loading; headless; RTX 3080; 200 s per run, back
to back on a quiet machine):
RX_VK_OCC_FIXED=0: the ceiling)RX_VK_OCC_QUERIES=1)With real counts about 32% of the reports read 0, and each count reached the game's slot about one recording (a sixth
of a frame) after its report, well inside the frame or two the game waits. Until a count lands the slot keeps today's
4096, so a late count costs culling, never a missing object.
The Occlusion Off switch (no queries at all) gives the same picture, GPU time and frame rate as today on Vulkan, as
expected: nothing was culled before either.
Where in the game
Everywhere the game culls by occlusion. The gain grows with what is hidden: indoors, behind terrain, in dungeons.
How often
Always, on the Vulkan renderer (the default).
Graphics card and driver version
NVIDIA GeForce RTX 3080, driver 621.14
CPU, RAM and operating system
Windows 11
Changes from the defaults
Test runs with
scripts/run-vk.ps1(headless, scene at 1920x864).Wanted
RX_VK_OCC_QUERIES=1 RX_VK_OCC_LOG=1on AMD (RX 6000-9000), a Steam Deck and an integrated GPU,before it could be on by default: the log line reports how many counts were written, how many read 0, and how late.
again once its count says so).
the sun behind a mountain.