gpu library

The GPU layer under just_graphics_engine's renderer.

Nothing here exposes a flutter_gpu type, so this library loads on every platform; createGpuDevice returns null where Flutter GPU can't run (the web, Impeller off, Android without Vulkan). NullGpuDevice records commands instead of drawing, for tests and headless runs.

Classes

ClipFixup
The one place the engine's clip space meets Flutter GPU's.
GpuBuffer
GPU memory holding vertices, indices or uniforms.
GpuBufferView
A range of a buffer, as bound to a draw.
GpuCaps
What a GpuDevice can do. Read once when the device is created; the renderer chooses its paths (HDR, MSAA, skinning, compression) from it.
GpuColorTarget
One colour attachment.
GpuCommands
Commands recorded for one submission.
GpuDepthTarget
The depth (and stencil) attachment.
GpuDevice
A GPU the renderer draws with.
GpuPass
Records draws into one set of targets.
GpuPipeline
A vertex and fragment shader with a vertex layout, ready to draw.
GpuRenderTargets
What a pass draws into.
GpuSampler
How a texture is sampled.
GpuShader
One compiled shader stage.
GpuShaderLibrary
Compiled shader stages, by name.
GpuSurface
A pool of presentable textures Flutter draws as an image.
GpuSurfaceFrame
A texture leased from a GpuSurface for one frame.
GpuTexture
An image on the GPU.
GpuTextureDesc
A texture's size, format and uses.
GpuUniformBlock
A uniform block's layout, from shader reflection.
GpuVertexAttribute
One attribute read from a vertex buffer.
GpuVertexBufferLayout
One vertex buffer slot.
GpuVertexLayout
All of a pipeline's vertex buffer slots, slot 0 first.
NullGpuDevice
A GpuDevice that draws nothing and records what it was asked to do.
NullUniformBlock
A uniform block a NullGpuDevice shader declares.
PipelineSet
Every pipeline a renderer draws with, created up front.
PipelineSpec
A pipeline the renderer needs, named by its shaders in a bundle.
RenderTargetPool
Reuses intermediate render targets (depth, MSAA colour, shadow maps, post-processing buffers) from frame to frame instead of allocating new ones.
SortKey
Draw sort keys: one integer per draw, sorted ascending.
UniformWriter
Fills one uniform block's bytes: 32-bit floats and ints in host byte order, at member offsets taken from shader reflection.

Enums

GpuAddress
What sampling does outside 0..1.
GpuBlend
Colour blending presets.
GpuCompare
Depth comparison.
GpuCompression
A family of block-compressed texture formats a device may support.
GpuCull
Which faces to skip.
GpuFilter
Texture filtering.
GpuFormat
A texture's pixel format.
GpuIndexType
Size of each index.
GpuLoad
How an attachment starts a pass.
GpuStorage
Where a texture lives and who can write it.
GpuStore
What happens to an attachment when its pass ends.
GpuTopology
What a draw's vertices form.
GpuVertexFormat
One vertex attribute's type.

Functions

createGpuDevice({void onUnsupported(String reason)?}) → GpuDevice?
On the web there is no Flutter GPU: always null, with the reason given to onUnsupported.