Expand description
Bounded, caller-buffered PNG/JPEG decode from verified external texture resources. Bounded cold-path image decoding for renderer resources.
Decoders write into caller-owned RGBA8 and scratch buffers. Image payloads remain external to the semantic arena; this module only enforces per-image decode limits before GPU admission.
Structs§
Enums§
- Texture
Color Space - Transfer-function information carried across a decode/transcode boundary.
- Texture
Decode Error - Texture
Decode Plan - Allocation-free HMC admission result. A transcode request is not reported as a decoded image; callers can preserve the source and attach a device/worker-specific refinement later.
- Texture
Fallback - Texture
Refinement State - Texture
Transcode Target - A transcode target with an explicit transfer function.
Unknownis intentional for Basis payloads whose color metadata has not been interpreted by this crate.
Functions§
- decode_
hmc_ texture_ rgba8 - Bounded cold-path convenience for asset loaders that own the destination allocation. The
maximum output and scratch sizes are established from codec metadata before either vector is
allocated; use the
_intoform when the caller already has workspace buffers. - decode_
hmc_ texture_ rgba8_ into - Decode a verified HMC texture to tightly packed RGBA8.
- inspect_
hmc_ texture_ plan - Inspect a resource for HMC without collapsing a known compressed/Basis source into a generic
decode failure. This is the capability/refinement boundary: only the returned
DecodeRgba8branch may be admitted as CPU RGBA8, while the other branch preserves the verified source. - inspect_
hmc_ texture_ requirements - Validate codec metadata and report exact RGBA8 output and decoder scratch requirements without allocating or decoding the image. Asset admission can use this to plan texture residency before materializing pixel buffers.