From 726ad0f8290bedb6ced60fa06200a6b574f9990d Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Sun, 15 Nov 2026 13:59:20 -0500 Subject: [PATCH] Document DDS result fields and errors --- crates/texture/src/dds.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/texture/src/dds.rs b/crates/texture/src/dds.rs index 6ba5569e8..77b053c31 100644 --- a/crates/texture/src/dds.rs +++ b/crates/texture/src/dds.rs @@ -7,10 +7,13 @@ use crate::{ImageError, Kind, Limits}; +/// A malformed DDS/backend failure or rejected output allocation. #[derive(Debug, thiserror::Error)] pub enum DecodeError { + /// Output size or allocation failed shared image limits. #[error(transparent)] Image(#[from] ImageError), + /// The decoder rejected input or output geometry. #[error("DDS decode failed: {0}")] Decode(String), } @@ -18,8 +21,11 @@ pub enum DecodeError { /// Unmodified backend output. Alpha and out-of-range float values are not clamped. #[derive(Debug)] pub struct Surface { + /// Width of the first surface in pixels. pub width: u32, + /// Height of the first surface in pixels. pub height: u32, + /// Row-major RGBA float samples without transfer conversion. pub rgba: Vec, /// Exactly the backend's `Precision::F32` classification, as used by MaterialCraft. pub source_precision_is_f32: bool,