Skip to content

Vulkan: maintenance5 for points without PointSize, no empty vkCmdCopyBuffer regions - #255

Merged
mamcjr merged 2 commits into
mamcjr:mainfrom
Propinbo:pr-maintenance5
Nov 8, 2026
Merged

mamcjr merged 2 commits into
mamcjr:mainfrom
Propinbo:pr-maintenance5

Conversation

@Propinbo

@Propinbo Propinbo commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

BOTW draws one POINT_LIST draw a frame from a vertex shader that writes no PointSize, and without VK_KHR_maintenance5 the point size is undefined (VUID-vkCmdDrawIndexed-primitiveTopology-10748, VUID-VkGraphicsPipelineCreateInfo-topology-08773). Separately, a zero-size region can reach vkCmdCopyBuffer (VUID-VkBufferCopy-size-01988).

What changes

  • VK_KHR_maintenance5 is enabled on Android only when the driver supports it; with it the size of these points is defined as 1. LARECOMP_NO_MAINTENANCE5=1 leaves it off.
  • All vkCmdCopyBuffer call sites go through copy_buffer, which drops empty regions and logs the line that had them.

How it was tested

Samsung SM-X730, Mali-G925 r49p1, Recompiled mode, the same scripted route (walk, map, two fast travels, inventory) on a scratch save, debug builds of v0.3.1-beta (c48606c) and this branch.

Validation layer 1.4.363, one run each (counts from logcat, so lower bounds):

0.3.1 (4224 frames) this branch (4094 frames)
primitiveTopology-10748 5057 0
topology-08773 6 0
new message ids - none

size-01988 occurred in neither run; it is rare (about one validation run in six on 0.2.13), so that fix is covered by tools/test_buffer_copy.c, not by these runs.

Without validation, after one warm-up run per build, order 0.3.1 / branch / branch / 0.3.1 (mean FPS over the time past 60 s, median FPS 30 in all):

run 1 run 2
0.3.1 29.30 29.34
this branch 29.34 29.25

The difference between the builds' means (0.03) is smaller than the spread within a build (up to 0.09). I compared captures at six points of the route side by side and saw no difference beyond what two runs of the same build show (walk position, time of day). Mali-G925 draws these points at 1 pixel with or without the extension, so no visible change is expected there. Not tested: Native mode, other GPUs.

tools/test_android_runtime.ps1 -DeviceSerial <device>: exit 0, no SKIP.

Propinbo and others added 2 commits November 4, 2026 17:23
…at write no PointSize are defined

BOTW draws one POINT_LIST draw a frame from a vertex shader with no PointSize. Without maintenance5 that is undefined
(VUID-VkGraphicsPipelineCreateInfo-topology-08773, VUID-vkCmdDrawIndexed-primitiveTopology-10748); with it the size is 1.
Mali-G925 r49p1 draws 1 pixel in both cases, so nothing changes there. LARECOMP_NO_MAINTENANCE5=1 leaves it off.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A zero-size region is invalid (VUID-VkBufferCopy-size-01988). On Mali-G925 one came up in about one validation run of six,
from a call its message doesn't name: all six call sites go through copy_buffer now, which drops such regions and logs the
line that had them. The check is in buffer_copy.h, with a test on the device.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants