RDP namespace
Nintendo 64 fixed-function Reality Display Processor backend, selected by WITH_RHI_RDP.
Drives libdragon's rdpq command queue, with nCine::
Namespaces
- namespace UniformTypeInfo
- Free-function helpers that classify reflected uniform types (component count, float-ness).
Classes
- class RdpAttribute
- Reflected metadata of a single active vertex attribute (aliased as
RHI::Attribute). - class RdpBuffer
- Host-memory buffer object of the RDP backend (aliased as
RHI::Buffer). - class RdpDebug
- Debug-output and object-labelling stub of the RDP backend.
- class RdpDevice
- Pipeline-state and draw-call facade of the RDP backend (aliased as
RHI::Device). - class RdpFramebuffer
- Framebuffer stub of the RDP backend (aliased as
RHI::Framebuffer). - class RdpRenderbuffer
- Renderbuffer stub of the RDP backend (aliased as
RHI::Renderbuffer). - class RdpRenderTarget
- Off-screen render target of the RDP backend (aliased as
RHI::RenderTarget). - class RdpRhiCapabilities
- Runtime capabilities of the RDP backend.
- class RdpShader
- Shader-object stub of the RDP backend.
- class RdpShaderProgram
- Shader program of the RDP backend (aliased as
RHI::ShaderProgram). - class RdpShaderUniformBlocks
- Manages the uniform-block caches of a program (aliased as
RHI::ShaderUniformBlocks). - class RdpShaderUniforms
- Manages the loose-uniform caches of a program (aliased as
RHI::ShaderUniforms). - class RdpTexture
- Texture object of the RDP backend (aliased as
RHI::Texture). - class RdpUniform
- Reflected metadata of a single active uniform (aliased as
RHI::Uniform). - class RdpUniformBlock
- Reflected metadata of a single active uniform block (aliased as
RHI::UniformBlock). - class RdpUniformBlockCache
- Caches the contents of a uniform block (aliased as
RHI::UniformBlockCache). - class RdpUniformCache
- Caches the host-side value of a single uniform (aliased as
RHI::UniformCache). - class RdpVertexArray
- Vertex array object stub of the RDP backend (aliased as
RHI::VertexArray). - class RdpVertexFormat
- Vertex layout description of the RDP backend (aliased as
RHI::VertexFormat). - struct TileRecord
- One tile of a tile-layer mesh in the packed form the RDP dispatch reads.
Functions
-
auto HashPaletteRow(const std::
uint32_t* row) -> std:: uint64_t - Fingerprint of one 256-entry palette row, used to tell a real palette change from a bump.
-
auto Pack5551(std::
uint8_t r, std:: uint8_t g, std:: uint8_t b, std:: uint8_t a) -> std:: uint16_t - Packs one 8-bit-per-channel colour into RGBA5551, the packing
FMT_RGBA16stores and the TLUTs use.
Function documentation
std:: uint64_t nCine:: RHI:: RDP:: HashPaletteRow(const std:: uint32_t* row)
Fingerprint of one 256-entry palette row, used to tell a real palette change from a bump.
Every upload into the shared palette texture advances a GLOBAL generation counter, because a backend cannot know which rows a caller rewrote beyond the range it was told. Keying the derived copies (the TLUT slots, the RG8 bakes) on that counter alone therefore rebuilds all of them whenever anything touches the palette - and a bake is a whole-image conversion, which is far too expensive to repeat for a row whose bytes did not actually change. The fingerprint makes the distinction cheap: 256 words hashed (about a thousand cycles) instead of a rebuild.
std:: uint16_t nCine:: RHI:: RDP:: Pack5551(std:: uint8_t r,
std:: uint8_t g,
std:: uint8_t b,
std:: uint8_t a)
Packs one 8-bit-per-channel colour into RGBA5551, the packing FMT_RGBA16 stores and the TLUTs use.
The single alpha bit is thresholded from the 8-bit alpha - shared by the texture stores, the bakes and the device's TLUT conversion, so the threshold can never drift between them.