tree: e46845f3bbf7193ab4eb43c3a9dcbe7e67b2bca7 [path history] [tgz]
  1. docs/
  2. platforms/
  3. tests/
  4. allocator_host.c
  5. allocator_host.h
  6. BUILD.gn
  7. composition.c
  8. composition.h
  9. context.c
  10. context.h
  11. core.h
  12. core_c.h
  13. extent_ring.c
  14. extent_ring.h
  15. handle.h
  16. path_builder.c
  17. path_builder.h
  18. raster_builder.c
  19. raster_builder.h
  20. README.md
  21. spinel.h
  22. spinel_assert.c
  23. spinel_assert.h
  24. spinel_result.h
  25. spinel_types.h
  26. state_assert.h
  27. styling.c
  28. styling.h
  29. suballocator.c
  30. suballocator.h
  31. weakref.c
  32. weakref.h
src/graphics/lib/compute/spinel/README.md

Spinel

Spinel is a high-performance GPU-accelerated vector graphics, compositing and image processing pipeline for Vulkan 1.1 GPUs.

Spinel differs from other vector graphics implementations by providing explicit APIs for defining:

  • Paths: first-class standalone objects
  • Rasters: transformed-to-screen-space rasterized Paths
  • Compositions: an arrangement of Rasters on Layers
  • Stylings: rendering instructions for each Layer in a Composition

These new explicit sub-APIs allow new programming idioms that “untangle” the canonical immediate-mode 2D API.

Advantages

The Spinel API and its new idioms achieve a number of advantages over existing 2D APIs. These include:

Spinel scales with available GFLOPS

Every stage in the pipeline is parallelized. This drives both performance and efficiency. It also frees the CPU to perform other processing.

Contrast this to traditional APIs that are either single-threaded or GPU-starved because.

Spinel’s rendering model is extensible

Most of the Spinel pipeline is focused on rasterizing paths, building a proto-scene graph of where these paths appear on layers, and encoding how each layer is rendered. These inputs are passed to an extremely performant tile-based renderer that is effectively a small “virtual machine” for rendering vector graphics, blending layers, applying masks, and more.

Spinel’s Composition and Styling idioms enable both animation and inexpensive “redraw”

Layers are explicit and their rules and stylings can be defined in any order.

Furthermore, rasters can be “placed” onto layers in any order.

These two capabilities can enable significant work reuse.

Benchmarks

🚧

Usage

There is a Vulkan 1.1 implementation that targets modern GPUs.

Vulkan

The following architectures are under development:

VendorArchitectureStatusNotes
AMDGCN3+🚧Under construction
ARMBifrost (4-wide)🚧Under construction
ARMBifrost (8-wide)🚧Under construction
NVIDIAsm_35,sm_37,sm_50,sm_52,sm_60,sm_61,sm_70🚧Under construction
NVIDIAsm_30,sm_32,sm_53,sm_62
IntelGEN8+🚧Under construction
IntelAPL/GLK using a 2x9 or 1x12 thread pool

Programming Idioms

🚧

Spinel API blocks

Architecture

🚧

Spinel pipeline diagram

Future Enhancements

🚧