Reference
One page per public function, structure, or closely related group in RI. Every page has the same shape:
- What it does: a plain explanation.
- Signature: generated from the header, so it is always current.
- Example: RI code taken from a source file that compiles.
- The same in native code: tabs with a canonical Vulkan and D3D12 version.
- Rules and errors: what RI checks and which error it reports.
How names work
You write RI::createDevice, regardless of the backend. Each backend defines its own
functions in its own namespace (RI::Vk:: or RI::D3D12::), and <RI/RI.hpp> aliases
RI:: to the backend your target links. Functions that expose Vulkan or D3D12 types are
not reachable through RI::; they live under Native access.
RI objects are plain structs with public fields and operations are free functions.
Descriptions are filled with C++20 designated initializers, and fields you leave out keep
their defaults:
RI::Device device = RI::createDevice({.gpu = chosen});
GPUs and devices
| Page |
What it is for |
RI::listGpus |
The GPUs that can run RI. |
RI::createDevice, RI::destroyDevice |
Open a GPU for use, and close it. |
RI::Gpu |
The facts about one GPU: name, vendor, memory, ID. |
RI::DeviceDesc, RI::Device |
What you pass to createDevice, and what you get back. |
RI::DeviceLimits |
Descriptor heap limits, root data size, eGPUUpload availability, timestamp frequency, and optional feature flags. |
RI::Window |
A window's OS handles, passed when creating a swapchain. |
Memory and buffers
Textures and views
Descriptors
Pipelines
Command lists
| Page |
What it is for |
RI::createCommandList, RI::resetCommandList, RI::destroyCommandList |
Lists to record GPU work into, reused after their timeline point. |
RI::cmdBegin, RI::cmdEnd |
Open and close a list for recording. |
RI::cmdSetHeap |
Bind the descriptor heap that shaders index (must be called before cmdSetPipeline). |
RI::cmdSetPipeline |
Bind the compute or graphics pipeline that subsequent dispatches or draws run. |
RI::cmdSetRootData |
Set the root data passed to shaders. |
RI::cmdDispatch |
Run a compute shader. |
RI::cmdBarrier |
Make earlier writes visible to later commands. |
RI::cmdCopyBuffer |
Copy bytes between buffers. |
RI::copyLayout and texture copies |
Copy texels between buffers and textures, or between two textures. |
RI::cmdBeginRendering, RI::cmdEndRendering |
Rendering sections: attachments, load and store operations. |
RI::cmdSetViewport, RI::cmdSetScissor, RI::cmdSetStencilReference |
Override a rendering section's viewport, scissor, or stencil reference. |
RI::cmdDraw, RI::cmdDrawIndexed, RI::cmdDrawMesh |
Draw vertices, indexed geometry, or mesh shaders in a rendering section. |
RI::cmdExecuteIndirect, RI::cmdExecuteIndirectWithRootData |
Run draws or dispatches whose arguments the GPU wrote into a buffer. |
RI::cmdDiscard |
Reset a texture that takes over another resource's memory. |
RI::cmdResolve, resolveTo |
Turn a multisampled texture into a single-sampled one. |
RI::cmdClearTexture, RI::cmdClearBuffer |
Clear textures or buffers outside rendering sections. |
RI::cmdWriteSmallData |
A few values written into a buffer from the command list. |
RI::cmdWriteTimestamp, RI::cmdResolveQueries, RI::cmdResetQueries |
Record GPU timestamps, and resolve or reset queries. |
Queries
Submission
Ray tracing
| Page |
What it is for |
| Acceleration structures |
Inline ray tracing: build acceleration structures and cast rays with RayQuery from any shader. |
Work graphs
Swapchains
Debugging