Skip to content

ludus::graphics::rhi::TextureDescription

Ludus Wiki · API overview · Browse API

Struct

Original-format sampled allocation or color attachment with private depth/stencil.

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/raster.h

#include <ludus/graphics/rhi/raster.h>
struct ludus::graphics::rhi::TextureDescription final

Fields

Width

ludus::foundation::uint32 ludus::graphics::rhi::TextureDescription::Width = 0
Pixel width, nonzero and bounded by enabled limits.

Related types: ludus::foundation::uint32

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/raster.h

Height

ludus::foundation::uint32 ludus::graphics::rhi::TextureDescription::Height = 0
Pixel height, nonzero and bounded by enabled limits.

Related types: ludus::foundation::uint32

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/raster.h

Format

RasterFormat ludus::graphics::rhi::TextureDescription::Format = RasterFormat::Rgba8Unorm
Sampling conversion; no automatic upload conversion occurs.

Related types: RasterFormat

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/raster.h

Attachment

bool ludus::graphics::rhi::TextureDescription::Attachment = false
Allocate undefined color and private depth attachments instead of uploading bytes. Attachment textures remain sampleable; clear/store defines color contents.

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/raster.h

MipLevels

ludus::foundation::uint32 ludus::graphics::rhi::TextureDescription::MipLevels = 1
Allocated mips, at most floor(log2(largest spatial extent))+1 and sixteen. D3 includes depth in that extent; array layers and cube face counts do not. Single-sample attachments allow mip chains; initial uploads define all unless DeferredInitialization. Each sampled view requires initialized contents only in its selected range.

Related types: ludus::foundation::uint32

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/raster.h

AsyncUpload

bool ludus::graphics::rhi::TextureDescription::AsyncUpload = false
Request nonblocking native upload readiness; Pending owns staging until completion. Legacy RGBA single-level creation defaults to its existing setup behavior.

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/raster.h

RetainCpuContent

bool ludus::graphics::rhi::TextureDescription::RetainCpuContent = false
Opt-in copied CPU texels for fixed-mip reference shading. Uploaded R8/RG8/RGBA8 only; attachments and RGBA16Float reject. Ordinary textures allocate no shadow.

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/raster.h

DeferredInitialization

bool ludus::graphics::rhi::TextureDescription::DeferredInitialization = false
Allocate undefined RGBA8Unorm sampled mips with an empty upload. R8 full-mip transfers initialize incrementally; full-resource sampled views require every mip. Attachments, non-D2 dimensions and retained CPU content reject this option.

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/raster.h

Dimension

TextureDimension ludus::graphics::rhi::TextureDescription::Dimension = TextureDimension::D2
Allocation dimension, fixed for its lifetime. Attachments exclude D3; CPU shadows require D2.

Related types: TextureDimension

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/raster.h

DepthOrLayers

ludus::foundation::uint32 ludus::graphics::rhi::TextureDescription::DepthOrLayers = 1
Array layers, six cube faces, or base volume depth; D2 requires one.

Related types: ludus::foundation::uint32

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/raster.h

SampleCount

ludus::foundation::uint32 ludus::graphics::rhi::TextureDescription::SampleCount = 1
Attachment sample count: one or capability-enabled four; uploads require one. Four samples require D2, one mip and one layer, and cannot be sampled directly.

Related types: ludus::foundation::uint32

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/raster.h

Stencil

bool ludus::graphics::rhi::TextureDescription::Stencil = false
Allocate a private depth/stencil image instead of depth alone; attachments only. Stencil support is independent of depth sampling and MSAA.

Declared in modules/graphics/rhi/include/ludus/graphics/rhi/raster.h