laplaceliu/tycho/rhi/types does not have a README file
pub(all) struct BlendState {
src_color : BlendFactor
dst_color : BlendFactor
color_op : BlendOp
src_alpha : BlendFactor
dst_alpha : BlendFactor
alpha_op : BlendOp
} derive(Eq, Debug)fn BlendState::new(src_color : BlendFactor, dst_color : BlendFactor, src_alpha : BlendFactor, dst_alpha : BlendFactor, color_op? : BlendOp, alpha_op? : BlendOp) -> BlendStatepub(all) struct BufferUsage {
// private fields
}pub(all) struct ClearColor {
r : Float
g : Float
b : Float
a : Float
}pub(all) struct ColorTargetState {
format : TextureFormat?
write : Bool
blend_mode : BlendMode?
blend_state : BlendState?
}fn ColorTargetState::new(format? : TextureFormat, write? : Bool, blend_mode? : BlendMode, blend_state? : BlendState) -> ColorTargetStatepub(all) struct DepthStencilState {
depth_test : Bool
write : Bool
compare : CompareOp
format : TextureFormat?
depth_only : Bool
bias : Bool
bias_constant : Float
bias_slope : Float
stencil : StencilState?
}fn DepthStencilState::new(depth_test? : Bool, write? : Bool, compare? : CompareOp, format? : TextureFormat, depth_only? : Bool, bias? : Bool, bias_constant? : Float, bias_slope? : Float, stencil? : StencilState) -> DepthStencilStatefn DepthTargetDesc::new(texture : UInt64, load_op? : LoadOp, store_op? : StoreOp, clear_depth? : Float, stencil_load_op? : LoadOp, stencil_store_op? : StoreOp, clear_stencil? : Int) -> DepthTargetDescpub(all) struct DeviceCapabilities {
device_name : String
is_discrete : Bool
api_version : UInt
driver_version : UInt
max_image_dimension_2d : Int
max_framebuffer_samples : Int
max_sampler_anisotropy : Float
min_uniform_buffer_offset_alignment : Int
supports_anisotropy : Bool
supports_indirect_draw : Bool
supports_bindless : Bool
supports_mesh_shader : Bool
supports_ray_query : Bool
}pub(all) struct DeviceDesc {
app_name : String
validation : Bool
headless : Bool
pipeline_cache : Bytes
backend : BackendKind
}fn DeviceDesc::new(app_name : String, validation? : Bool, headless? : Bool, pipeline_cache? : Bytes, backend? : BackendKind) -> DeviceDescpub(all) struct ExternalSurface {
kind : ExternalSurfaceKind
display : UInt64
handle : UInt64
} derive(Eq, Debug)fn ExternalSurface::new(kind : ExternalSurfaceKind, display : UInt64, handle : UInt64) -> ExternalSurfacepub(all) struct MeshPipelineDesc {
task : FixedArray[UInt]?
mesh : FixedArray[UInt]
frag : FixedArray[UInt]
task_entry : String
mesh_entry : String
frag_entry : String
uniform_slots : Int
texture_slots : Int
storage_slots : Int
storage_image_slots : Int
uniform_bindings : Array[Int]
texture_bindings : Array[Int]
storage_bindings : Array[Int]
storage_image_bindings : Array[Int]
push_constant_size : Int
raster : RasterState
depth_stencil : DepthStencilState?
color_targets : Array[ColorTargetState]
bindless_heap : UInt64?
}fn MeshPipelineDesc::new(mesh : FixedArray[UInt], frag : FixedArray[UInt], task? : FixedArray[UInt], task_entry? : String, mesh_entry? : String, frag_entry? : String, uniform_slots? : Int, texture_slots? : Int, storage_slots? : Int, storage_image_slots? : Int, uniform_bindings? : Array[Int], texture_bindings? : Array[Int], storage_bindings? : Array[Int], storage_image_bindings? : Array[Int], push_constant_size? : Int, depth_test? : Bool, depth_write? : Bool, depth_compare? : CompareOp, depth_format? : TextureFormat, cull_mode? : CullMode, front_face? : FrontFace, blend? : Bool, blend_mode? : BlendMode, color_write? : Bool, samples? : SampleCount, color_format? : TextureFormat, color_formats? : Array[TextureFormat], bindless_heap? : UInt64) -> MeshPipelineDescpub(all) struct PipelineDesc {
vert : FixedArray[UInt]
frag : FixedArray[UInt]
vert_entry : String
frag_entry : String
vertex_formats : Array[VertexFormat]
vertex_layouts : Array[VertexBufferLayout]
uniform_slots : Int
texture_slots : Int
layout : BindingLayout
storage_slots : Int
storage_image_slots : Int
accel_slots : Int
uniform_bindings : Array[Int]
texture_bindings : Array[Int]
storage_bindings : Array[Int]
storage_image_bindings : Array[Int]
accel_bindings : Array[Int]
push_constant_size : Int
raster : RasterState
depth_stencil : DepthStencilState?
color_targets : Array[ColorTargetState]
bindless_heap : UInt64?
}fn PipelineDesc::from_spirv(vert : FixedArray[UInt], frag : FixedArray[UInt], topology? : PrimitiveTopology, depth_test? : Bool, depth_write? : Bool, depth_compare? : CompareOp, depth_format? : TextureFormat, depth_only? : Bool, depth_bias? : Bool, depth_bias_constant? : Float, depth_bias_slope? : Float, stencil? : StencilState, cull_mode? : CullMode, front_face? : FrontFace, blend? : Bool, blend_mode? : BlendMode, blend_state? : BlendState, color_write? : Bool, samples? : SampleCount, color_format? : TextureFormat, color_formats? : Array[TextureFormat], vertex_layouts? : Array[VertexBufferLayout], bindless_heap? : UInt64) -> PipelineDescfn PipelineDesc::graphics(vert : FixedArray[UInt], frag : FixedArray[UInt], vert_entry? : String, frag_entry? : String, raster? : RasterState, depth_stencil? : DepthStencilState, color_targets? : Array[ColorTargetState], vertex_formats? : Array[VertexFormat], vertex_layouts? : Array[VertexBufferLayout], uniform_slots? : Int, texture_slots? : Int, storage_slots? : Int, storage_image_slots? : Int, accel_slots? : Int, uniform_bindings? : Array[Int], texture_bindings? : Array[Int], storage_bindings? : Array[Int], storage_image_bindings? : Array[Int], accel_bindings? : Array[Int], push_constant_size? : Int, bindless_heap? : UInt64) -> PipelineDescfn PipelineDesc::new(vert : FixedArray[UInt], frag : FixedArray[UInt], vert_entry? : String, frag_entry? : String, vertex_formats? : Array[VertexFormat], vertex_layouts? : Array[VertexBufferLayout], uniform_slots? : Int, texture_slots? : Int, storage_slots? : Int, storage_image_slots? : Int, accel_slots? : Int, uniform_bindings? : Array[Int], texture_bindings? : Array[Int], storage_bindings? : Array[Int], storage_image_bindings? : Array[Int], accel_bindings? : Array[Int], push_constant_size? : Int, topology? : PrimitiveTopology, depth_test? : Bool, depth_write? : Bool, depth_compare? : CompareOp, depth_format? : TextureFormat, depth_only? : Bool, depth_bias? : Bool, depth_bias_constant? : Float, depth_bias_slope? : Float, stencil? : StencilState, cull_mode? : CullMode, front_face? : FrontFace, blend? : Bool, blend_mode? : BlendMode, blend_state? : BlendState, color_write? : Bool, samples? : SampleCount, color_format? : TextureFormat, color_formats? : Array[TextureFormat], bindless_heap? : UInt64) -> PipelineDescpub(all) struct RasterState {
topology : PrimitiveTopology
cull_mode : CullMode
front_face : FrontFace
samples : SampleCount
}fn RasterState::new(topology? : PrimitiveTopology, cull_mode? : CullMode, front_face? : FrontFace, samples? : SampleCount) -> RasterStatepub(all) struct RayGeometryDesc {
vertex_buffer : UInt64
vertex_count : Int
vertex_stride : Int
index_buffer : UInt64?
index_count : Int
index_type : IndexType
is_opaque : Bool
}fn RayGeometryDesc::new(vertex_buffer : UInt64, vertex_count : Int, vertex_stride? : Int, index_buffer? : UInt64, index_count? : Int, index_type? : IndexType, is_opaque? : Bool) -> RayGeometryDescpub(all) struct RayInstanceDesc {
blas : UInt64
transform : FixedArray[Float]
custom_index : Int
mask : Int
}fn RayInstanceDesc::from_affine3(blas : UInt64, affine : Affine3, custom_index? : Int, mask? : Int) -> RayInstanceDescfn RayInstanceDesc::new(blas : UInt64, transform? : FixedArray[Float], custom_index? : Int, mask? : Int) -> RayInstanceDescpub(all) struct RenderTargetDesc {
texture : UInt64
load_op : LoadOp
store_op : StoreOp
clear_color : ClearColor
resolve_texture : UInt64?
}fn RenderTargetDesc::new(texture : UInt64, load_op? : LoadOp, store_op? : StoreOp, clear_color? : ClearColor, resolve_texture? : UInt64) -> RenderTargetDescpub(all) struct SamplerDesc {
mag : Filter
min : Filter
mipmap : Filter
address : AddressMode
border_color : BorderColor
min_lod : Float
max_lod : Float
mip_lod_bias : Float
anisotropy : Float
compare_op : CompareOp?
}fn SamplerDesc::new(mag? : Filter, min? : Filter, mipmap? : Filter, address? : AddressMode, border_color? : BorderColor, min_lod? : Float, max_lod? : Float, mip_lod_bias? : Float, anisotropy? : Float, compare_op? : CompareOp) -> SamplerDescfn StencilFaceState::new(fail_op? : StencilOp, pass_op? : StencilOp, depth_fail_op? : StencilOp, compare_op? : CompareOp) -> StencilFaceStatepub(all) struct StencilState {
front : StencilFaceState
back : StencilFaceState
compare_mask : UInt
write_mask : UInt
reference : UInt
}fn StencilState::new(front? : StencilFaceState, back? : StencilFaceState, compare_mask? : UInt, write_mask? : UInt, reference? : UInt) -> StencilStatepub(all) struct SwapchainDesc {
title : String
width : Int
height : Int
depth : Bool
depth_format : TextureFormat
clear_color : ClearColor
enable_readback : Bool
present_mode : PresentMode
external_surface : ExternalSurface?
}fn SwapchainDesc::new(title : String, width : Int, height : Int, depth? : Bool, depth_format? : TextureFormat, clear_color? : ClearColor, enable_readback? : Bool, present_mode? : PresentMode, external_surface? : ExternalSurface) -> SwapchainDescpub(all) struct TextureDesc {
width : Int
height : Int
format : TextureFormat
usage : TextureUsage
dimension : TextureDimension
mip_levels : Int
samples : SampleCount
}fn TextureDesc::new(width : Int, height : Int, format : TextureFormat, usage? : TextureUsage, dimension? : TextureDimension, mip_levels? : Int, samples? : SampleCount) -> TextureDescimpl Show for TextureFormatpub(all) struct TextureUsage {
// private fields
}pub(all) struct VertexBufferLayout {
stride : Int
step_mode : VertexStepMode
attributes : Array[VertexAttribute]
}fn VertexBufferLayout::new(stride : Int, attributes : Array[VertexAttribute], step_mode? : VertexStepMode) -> VertexBufferLayoutfn wgsl_words(text : String) -> FixedArray[UInt]Install
Download zipTycho RHI — unified pure-MoonBit render hardware interface: Vulkan 1.3, Direct3D 12, Metal, and WebGPU (native + browser) drivers behind one virtual ABI