Skip to content

ludus::graphics::rhi::NativeTextureInfo

Ludus Wiki · API overview · Browse API

Struct

Borrowed image descriptor; no ownership or GPU completion is implied by copying it. Queue ordering makes a newly acquired read usable without CPU waiting: enqueue and submit its foreign reads on Device.Identity.CommandQueue after acquisition returns.

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

#include <ludus/graphics/rhi/native_interop.h>
struct ludus::graphics::rhi::NativeTextureInfo final

Fields

Device

NativeDeviceInfo ludus::graphics::rhi::NativeTextureInfo::Device {}
Pinned exact native context and RHI incarnation.

Related types: NativeDeviceInfo

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

Revision

ludus::foundation::uint64 ludus::graphics::rhi::NativeTextureInfo::Revision = 0
Texture state revision captured at publication.

Related types: ludus::foundation::uint64

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

ProducerOrdinal

ludus::foundation::uint64 ludus::graphics::rhi::NativeTextureInfo::ProducerOrdinal = 0
Producer submission ordinal, retained independently of the public texture owner.

Related types: ludus::foundation::uint64

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

Format

RasterFormat ludus::graphics::rhi::NativeTextureInfo::Format = RasterFormat::Rgba8Unorm
Shared color encoding; currently Rgba8Unorm only.

Related types: RasterFormat

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

Width

ludus::foundation::uint32 ludus::graphics::rhi::NativeTextureInfo::Width = 0
Pixel width of the single mip/layer; texture origin is top-left.

Related types: ludus::foundation::uint32

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

Height

ludus::foundation::uint32 ludus::graphics::rhi::NativeTextureInfo::Height = 0
Pixel height of the single mip/layer; no scaling is performed by the bridge.

Related types: ludus::foundation::uint32

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

MetalTexture

NativeMetalTexture ludus::graphics::rhi::NativeTextureInfo::MetalTexture {nullptr}
id<MTLTexture> for Metal; null for Vulkan. Valid only during the read lease.

Related types: NativeMetalTexture

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

VulkanImage

NativeVulkanImage ludus::graphics::rhi::NativeTextureInfo::VulkanImage {0}
VkImage bits for Vulkan; zero for Metal. Convert according to the native VkImage type.

Related types: NativeVulkanImage

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

VulkanLayout

ludus::foundation::uint32 ludus::graphics::rhi::NativeTextureInfo::VulkanLayout = 0
Current Vulkan image layout: VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; zero for Metal.

Related types: ludus::foundation::uint32

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

SampledReadOnly

bool ludus::graphics::rhi::NativeTextureInfo::SampledReadOnly = true
Native image is borrowed for sampled reads only; foreign writes/ownership transfers reject.

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