Skip to content

rendervulkan: align upload ring allocations to the uniform offset limit - #2511

Merged
matte-schwartz merged 1 commit into
ValveSoftware:masterfrom
matte-schwartz:uniform-offset-alignment
Oct 23, 2026
Merged

matte-schwartz merged 1 commit into
ValveSoftware:masterfrom
matte-schwartz:uniform-offset-alignment

Conversation

@matte-schwartz

Copy link
Copy Markdown
Collaborator

The upload ring aligns every allocation to 16 bytes, but constants are bound as a uniform buffer at that offset and NVIDIA requires 64. With eight composite layers BlitPushData_t is 584 bytes, so the RGB to NV12 constants that follow it in vulkan_screenshot land at offset 592. The convert pass then never writes the NV12 image, and Steam Remote Play shows a green frame.

Align to minUniformBufferOffsetAlignment, floored at 16 so buffer to image copies from the same ring keep their texel alignment.

Closes: #2489

The upload ring aligns every allocation to 16 bytes, but constants are
bound as a uniform buffer at that offset and NVIDIA requires 64. With
eight composite layers BlitPushData_t is 584 bytes, so the RGB to NV12
constants that follow it in vulkan_screenshot land at offset 592. The
convert pass then never writes the NV12 image, and Steam Remote Play
shows a green frame.

Align to minUniformBufferOffsetAlignment, floored at 16 so buffer to
image copies from the same ring keep their texel alignment.

Closes: ValveSoftware#2489
@matte-schwartz
matte-schwartz merged commit e6674a9 into ValveSoftware:master Oct 23, 2026
1 check passed
@matte-schwartz
matte-schwartz deleted the uniform-offset-alignment branch October 23, 2026 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant