Skip to content

Tracker: luma.gl v10 #2550

Description

@ibgreen

Themes: deck.gl WebGPU support

Dynamic Shaders

Finding the right level of support for dynamic shaders. In particular, the ability to control attribute/storagebuffer/constants

Batched Vector support

  • Add GPUTable, GPUVector, GPUData, GPURecordBatch @ibgreen
  • Add GPUTableMode that can accept a GPUArrowTable for attributes and storage buffers. @ibgreen
  • Add TableBufferPlanner @ibgreen

Apache Arrow support

  • Well defined mappings from common Arrow type columns to GPUVectors.
  • Streaming support
  • ...

GPGPU support

We want a good base set of GPU powered computations and use them when preparing buffers for rendering.

Buffer Budget Optimization

WebGPU has a strict 8 buffer limit per pipeline, and attribute budget is also limited to 16+. We'd like to keep as many buffers unallocated as possible

  • Remove need for instancePickingColor attributes (no buffer, use instance_index in shaders)
  • Use interleaved primitive geometries (single buffer)

Reduce deck.gl WebGPU porting friction

A goal of luma.gl v10 is to remove friction encountered when porting deck.gl layers:

  • Make shader layout generation tolerant of unused supplied attributes. If a model gets a buffer for instancePickingColors but the WGSL shader does not declare it, that should be ignored cleanly, not turn into a malformed shaderLocation path.
  • Give modules a stable ownership model for textures/samplers. Texture bindings should not depend on naming conventions like fooTexture and fooTextureSampler sprinkled through layers. Luma should formalize that in module metadata.
  • Make WebGPU constant/noAlloc attributes behave like first-class attributes. - The base attribute system currently works well for WebGL, but on WebGPU the “constant” and noAlloc paths can leave required vertex slots unbound. Luma/deck should either:
  • emulate constant attributes with small real GPU buffers automatically, or make vertex-state generation skip attributes not present in shader layout cleanly. - That would remove the matrix/picking attribute workarounds.
  • Add a real bind-group allocation model for shader modules. - Right now WGSL modules are effectively hardcoding @group/@binding, which makes module composition brittle. Luma should let modules declare logical bindings and have the assembler assign final binding locations. That removes the layer-local binding hacks around simpleMesh, phongMaterial, textures, and samplers.
  • Include attachment formats in the WebGPU render-pipeline cache key. The stale BGRA8/Depth24Plus vs RGBA8/Depth16 mismatch should never have reached the layer. colorAttachmentFormats and depthStencilAttachmentFormat need to participate in pipeline hashing so a model can safely render into screen and picking passes without custom no-cache workarounds.

General Features

@luma.gl/core

  • Move readPixels*() to CommandEncoder and update all usage

@luma.gl/shadertools

@luma.gl/core/shadertypes

  • Update shader module type system to handle arrays and structs
    • Update shader types to handle structs and arrays
    • Re-implement offset generation for plain types using the new shadertypes
    • Implement offset generation for arrays and structs
  • Support multiple lights in lighting module (Leverage new support for "struct / array" uniform type decls in shader modules).

@luma.gl/engine

@luma.gl/effects

@luma.gl/gltf

Bugs

Docs / Website

Continued Documentation Improvements. Tracker: #2407

Tests

  • Restore all luma.gl render tests (update golden images?) - P2
  • Tests: Port all classic webgl test suites to core classes - P2

Deprecations

  • Remove Model.updateModuleSettings.
  • Remove device.setGLParameters & Co
  • ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions