Namespace Apogee.Graphics¶
Namespaces¶
Classes¶
The one set of resources every pipeline sees: arrays of sampled images, samplers and storage images that shaders index with integers, plus the push constants. Slot 0 of the images and samplers is a white texel and a linear repeat sampler, so an unset index still reads something sane; slot 0 of the storage images is never handed out (0 means "none").
A command buffer being recorded, with the operations the engine needs on it. Everything here is on the one queue family the device uses.
One frame in flight: its command buffer, the window's image, per-frame upload memory, and deferred destruction.
Keeps frames in flight (two by default): each has its own command buffer, upload arena and timer queries, and
A buffer in GPU memory. Every buffer has a device address, so shaders reach it through a pointer in push constants.
An image with a view of the whole of it (the aspect a shader samples).
A GPU a backend found, and whether the engine can use it.
The logical device of one graphics API and everything created with it. The renderer talks to this class and the abstract classes it hands out (buffers, images, pipelines, a
command recorder, a swapchain and frame loop); Apogee.Graphics.Vulkan has the Vulkan implementation, and a Metal one follows. The engine's baseline is the same
on every API: dynamic rendering, explicit barriers, buffer device addresses and bindless textures; a GPU without them is rejected with the reason.
A graphics call failed or the machine cannot do what the engine needs (no usable GPU, a missing feature); the message says which. Each backend has its own subclass.
Everything that makes a graphics pipeline (front faces are counter-clockwise by default, as in glTF). Geometry is pulled from buffers by the vertex shader (no vertex input state), depth is reverse-Z
(the near plane is 1, so
A view of (part of) an image, as the API of a backend sees it. Opaque: the backend that made it knows what is in it.
Records a command buffer, submits it and waits for it: for loading and tools, where stalling is fine. A frame never uses this. Safe to call from several threads (the calls are serialized).
A compiled pipeline; bind it with
Which states write a resource.
The images of a window, which the frame loop acquires, renders to and presents. Made by
Structs¶
The image of the window the frame renders to. It starts in
A color attachment to render into: its view (the image is in
Closes a debug label group when disposed.
The depth attachment. The engine uses reverse-Z, so the usual clear value is 0 (the far plane).
The arguments of one indirect dispatch, as
The arguments of one indexed indirect draw, as
Space in a frame's upload arena: an address for shaders and memory for the CPU to fill.
A debug label with a GPU timer; dispose it to end the section.
How long a named part of a frame took on the GPU.
One image transition: from the state it was last used in to the state the next use needs.
What an image is: format, size, mip chain, layers and what it will be used for.
Where in a staging buffer the bytes of one image subresource are.
What a sampler does.
One shader stage: the compiled code for the device's
The size of a compute shader's thread group, [numthreads(x, y, z)]. Vulkan pipelines have it inside; a Metal dispatch has to be told.
Enums¶
How a buffer is being used.
What a buffer will be used for. Every buffer can also be copied from and to, and is reachable by address.
The graphics API a device runs on.
How an image is being used; each state means one layout and one set of pipeline stages and accesses (in a backend that has them).
What an image will be used for. Every image can also be copied from and to.
Where a buffer's memory lives.
How a sampler combines the texels of its filter footprint. Minimum and maximum (Hi-Z depth pyramids, clamping) need