Flutter GPU Draft PRs Bring Real 3D Textures with Hardware Trilinear Filtering
Developers doing volume rendering on Flutter can drop hand-rolled eight-voxel mixing and atlas bookkeeping for GPU-side trilinear filtering, but only on Metal and Vulkan, and only for sampling: no mip levels, no block compression, no render target.
Two draft Flutter Pull Requests add a real third dimension to GPU textures. #197354 introduces kTexture3D in Impeller's TextureDescriptor, and #197355 exposes it through the Flutter GPU Dart API. A 3D texture lets the GPU interpolate across X, Y, and Z in one texture() call; the existing 2D Texture Array only picks a layer on the third axis and forces manual two-layer mixing.
Volume rendering is the intended workload: temperature fields, fluid density, voxel scans, SDF. Without 3D textures, a Flutter developer packs slices into atlases, reconstructs 16-bit values from RGBA8 texels, gathers eight neighboring voxels, and performs seven mix operations to get one interpolated sample. With the new type, those lines collapse to a single hardware sample.
The Impeller patch maps the depth field to Vulkan's VK_IMAGE_TYPE_3D, Metal's MTLTextureType3D, and GL_TEXTURE_3D on GLES. The Dart layer reuses the slice parameter, so a simulation can upload each Z-slice as it arrives without first building a full CPU-side buffer. GLES stays out of the Dart API because the shader bundle lacks a GLSL ES 3.0 variant. The texture is sampling-only for now: one mip level, no block compression, no render target. Memory runs out quickly: a 256^3 RGBA8 volume needs 64 MiB, and 512^3 needs 512 MiB.
The slice-by-slice upload design spares CPU memory, but the full volume still must be allocated on the GPU, so VRAM is the real constraint.
The GLES gap points to shader compilation infrastructure as the bottleneck, not the absence of backend hardware support.
Cubic memory growth means the practical resolution of a 3D texture is dictated by VRAM budgets long before the reported max dimension.