Repository navigation
Android (Adreno 740): uniform tables, kernel switches, an on-disk pipeline cache - #61
Merged
Merged
Conversation
…rnel switches, an on-disk pipeline cache; dynamic resolution by the clock On Adreno 740 the kernel read its small read-only storage tables wrongly (textures from another table, dark emissives). The four bounded ones (tex_info, objects, instances, media) are bound as uniform copies there, synced each frame; kernel switches (a guard on non-finite rays, cheaper sampling) are source patches chosen by GpuOptions / THREERT_* variables, on by default on Android only, so other platforms' kernels are unchanged. Compiled pipelines are kept on disk when the embedder names a directory (THREERT_PIPELINE_CACHE): a scene opened again starts in seconds. Dynamic resolution can settle by the clock instead of by frame count. docs/RUNTIME.md: Android (Adreno), with what was measured on the device. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
The renderer did not draw correctly on Qualcomm's Adreno 740 (Vulkan ray queries): the kernel read its small read-only storage tables wrongly, so textures came from another table and emissive surfaces were dark.
tex_info,objects,instances,media) are bound as uniform copies, synced each frame. On by default on Android, switchable (THREERT_UNIFORM_TABLES,GpuOptions), never with the merged layout. Bounds (64 KiB a table) are said on stderr when a scene passes them.gpu::KernelSwitches): a guard on non-finite rays, cheaper cut-outs, direct light on the last bounce, no light sampling of a baked sky. Android defaults; other platforms' kernel sources stay hash-identical.THREERT_PIPELINE_CACHE=<dir>(orGpuOptions::pipeline_cache) compiled pipelines are kept on disk, one sealed file an adapter: a scene opened again starts in seconds instead of half a minute. Helps every Vulkan driver.THREERT_GOVERN_CLOCK, on by default on Android): a slow GPU reaches its frame rate in seconds, not after hundreds of slow frames.Checked on a Mac: all 126 offline render tests are byte-identical with and without the uniform tables and the strict kernel;
cargo test --releasepasses. Checked on the device (Snapdragon 8 Gen 2, Adreno 740): pictures match the Mac's (mean difference 0.8 to 3.0 of 255 on four scenes), the cache works, no GPU faults.docs/RUNTIME.md(Android (Adreno)) has the numbers.🤖 Generated with Claude Code