Repository navigation
Tidy the Android Vulkan seams: one frame-slot count, one sort key width - #40
Merged
Merged
Conversation
Every slot array and descriptor pool sized itself from a local copy of 2 (VulkanFrameLoop::kFramesInFlight and a kSlots in each of the visibility, sort, LOD selection and frame compute classes). They now read kFramesInFlight from layout/VulkanFrameSlots.h, so world/, frame/, raster/, cull/, sort/ and selection/ no longer include presentation/ for a constant. The visibility pass and the radix sort each declared their own KeyBits. Both use layout/VulkanSortKeys.h now, which also names the 16 and 32 bit widths that VulkanFrameCompute and the radix pass count passes from. Behaviour, shader text and SPIR-V are unchanged: the generated .spv hashes equal the layout baseline.
VulkanSplatRenderer decided selectsLodOnGpu() by querying the visibility pass and the radix sort itself, so the renderer root knew which passes make up the GPU frame. VulkanFrameCompute::supported(ctx) now answers that, and the renderer no longer includes the sort header. No behaviour change.
uploadWorld, uploadLodWorld and createSlab each repeated the same five steps once the new world and frame compute were ready: store both, apply the stored policy, bind the world to the pipeline and reset the world frame completion. adoptWorld does them in that order. The waitIdle calls stay in the callers exactly where they were, including uploadLodWorld having none after the upload. No behaviour change.
ShaderModule is now VulkanShaderModule, matching device/VulkanShaderModule.h and the other device/ classes. The free function memoryBarrier in device/VulkanBarriers.h is now vulkanMemoryBarrier, so it reads as the Vulkan helper it is at its call sites in the passes. No behaviour change.
Xget7
force-pushed
the
fix-android-seams
branch
from
October 20, 2026 04:44
72321be to
8e11c53
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Final-review fixes for the Android native layout: the shared rulings plus the Android seams and tidy.
kFramesInFlightreplacesVulkanFrameLoop::kFramesInFlightand thekSlotscopies in the visibility, sort, LOD selection and frame compute classes. world/, frame/ and raster/ no longer include presentation/ to read it.KeyBitsreplaces the two enums in VulkanVisibilityPass.h and VulkanRadixSort.h. The 16 and 32 bit widths are named in the same header.VulkanFrameCompute::supported(ctx)answers what the renderer root asked the visibility pass and radix sort directly.adoptWorldholds the store, policy, bind and completion reset repeated in three upload paths. ThewaitIdlecalls stay in the callers where they were, includinguploadLodWorldhaving none after the upload.ShaderModuleisVulkanShaderModuleandmemoryBarrierisvulkanMemoryBarrier.Behaviour, shader text and SPIR-V are unchanged. The four-commit history is one change per commit.
Evidence
mainat 2558fc3; SPIR-V baseline~/.rn-build-external/layout-baseline-spirv.sha..spvhashes equal the baseline, from both the standalone CMake build and the Gradle build.splatkit_*_test(7 targets) andlibsplatkit.sobuild for arm64.scripts/lint-cpp.shclean;apps/android-dev./gradlew :splatkit:assembleRelease :app:assembleRelease :splatkit:testDebugUnitTestsucceeds; the host WorldFrameCompletion check fromandroid.ymlcompiles and exits 0. The native device tests were built, not run.sdk_harness.py, the validation layer,npm run checkandnpm run lintwere skipped: no JS or engine change.Merge Danger
Door: Two-way.
Blast Radius: Android
Renames and constants inside the Vulkan renderer only. The Android test sources changed for the renamed constants; a compile error there would show on the Android CI job, not on a host.