Skip to main content

Module gpu_wgpu

Module gpu_wgpu 

Source
Expand description

Hardware-accelerated wgpu 3D renderer with double-single RTE precision and single-draw-call programmable vertex pulling for planetary/terrain tile pyramids.

Structs§

GpuPassTimings
Hardware GPU pass durations resolved asynchronously from wgpu::Features::TIMESTAMP_QUERY.
Wgpu3DRenderer
Hardware-accelerated wgpu 3D renderer capable of rendering directly into any TextureView (swapchain surface) or offscreen RGBA target.

Constants§

ATLAS_TILE_SIZE
Standard terrain imagery tile dimension in the GPU Texture2DArray atlas.
DEFAULT_MESH_UPLOAD_BUDGET
Default maximum new tile meshes copied to the GPU storage slab per frame.
DEFAULT_TEXTURE_UPLOAD_BUDGET
Default maximum new tile textures uploaded to the GPU atlas per frame during continuous flight.
MAX_ATLAS_LAYERS
Maximum imagery layers pre-allocated in the GPU Texture2DArray atlas.

Functions§

build_terrain_grid_indices
Builds a shared triangle index buffer for a terrain grid (grid_res x grid_res) with optional skirts.
fallback_frame_from_scene3d
Converts a regular Scene3D (primitives/custom meshes) into a RetainedTerrainFrame so standard 3D scenes also accelerate seamlessly through Wgpu3DRenderer.
preferred_wgpu_limits
Returns adapter-supported wgpu::Limits requesting up to MAX_ATLAS_LAYERS texture array layers.
request_working_adapter_and_device
Acquires the first compatible wgpu::Adapter whose request_device succeeds, preferring discrete GPUs first and automatically failing over across integrated/software adapters when the primary GPU driver reports device loss or resource exhaustion.
split_f64_to_f32
Splits a 64-bit float into (hi, lo) 32-bit floats for GPU double-single emulation.