laplaceliu/tycho/rhi does not have a README file

    BindingLayout

    Where a pipeline's shader expects each kind of resource.

    The RHI binds by slot; WGSL binds by number. Until now the two agreed only because a single global formula (textures 0..n, samplers n..2n, push 2n) happened to fit the one converted shader. It does not scale: any shader that occupies a binding of its own -- 2d's blur uses binding 2, prim2d uses 0 and 1 for storage buffers -- collides with it.

    So the layout travels with the pipeline. legacy reproduces the old formula exactly, which is what every SPIR-V pipeline still means.

    BufferUsage

    Composable buffer usage flags. BufferKind remains the shortcut for the common single-purpose cases; this type expresses the combinations GPU-driven pipelines need (Storage | Indirect, Storage | Vertex, ...).

    ColorTargetState

    One colour attachment: format plus its write mask and blend state.

    DepthStencilState

    Depth/stencil state, grouped out of the flat PipelineDesc.

    DepthTargetDesc

    DeviceCapabilities

    ExternalSurface

    Host-owned surface handle passed into SwapchainDesc when the OS/app owns window creation (mandatory on iOS/Android, optional on desktop/web). display / handle meanings match ExternalSurfaceKind:
    • Xlib: (Display*, Window)
    • Wayland: (wl_display*, wl_surface*)
    • Win32: (HINSTANCE, HWND)
    • MetalLayer: (0, CAMetalLayer*)
    • AndroidNativeWindow: (0, ANativeWindow*)
    • WebCanvas: (canvas_id, 0)

    ExternalSurfaceKind

    Native surface kind for externally owned surfaces (iOS CAMetalLayer, Android ANativeWindow, embedded desktop windows, or an existing web canvas). Pure L1 data so rhi/types stays independent of plat.

    MeshPipelineDesc

    PrimitiveTopology

    RasterState

    Rasterisation state, grouped out of the flat PipelineDesc.

    RayGeometryDesc

    RayInstanceDesc

    RenderTargetDesc

    ShaderLanguage

    The shader blob format a backend can consume (ADR-005 D7).

    The same FixedArray[UInt32] channel carries whichever of these the device wants -- SPIR-V words as-is, WGSL as UTF-8 zero-padded to a 4-byte boundary -- so a pipeline descriptor does not need a dozen shader fields. What the caller must not do is guess: ask the device.

    Dxil exists so that asking has an honest answer before a DX12 backend can build pipelines; a caller that only knows SPIR-V and WGSL must report it as unsupported rather than shipping the wrong bytes.

    StencilFaceState

    TextureDesc

    One descriptor for every texture shape: 2D, 2D array and cubemap, with composable usage flags instead of a factory per combination.

    TextureDimension

    TextureUsage

    Composable texture usage flags.

    VertexAttribute

    VertexBufferLayout

    RhiError

    pub suberror RhiError {
    BackendFailed(String)
    }

    impl Show for RhiError

    AccelStruct

    pub struct AccelStruct {
    // private fields
    }

    AccelStruct::destroy

    fn AccelStruct::destroy(self : AccelStruct) -> Unit

    AccelStruct::id

    fn AccelStruct::id(self : AccelStruct) -> UInt64

    BindlessHeap

    pub struct BindlessHeap {
    // private fields
    }

    BindlessHeap::destroy

    fn BindlessHeap::destroy(self : BindlessHeap) -> Unit

    BindlessHeap::id

    fn BindlessHeap::id(self : BindlessHeap) -> UInt64

    BindlessHeap::register_texture

    fn BindlessHeap::register_texture(self : BindlessHeap, arg1 : Texture, arg2 : Sampler) -> Int raise RhiError

    BindlessHeap::unregister_texture

    fn BindlessHeap::unregister_texture(self : BindlessHeap, arg1 : Int) -> Unit

    Buffer

    pub struct Buffer {
    // private fields
    }

    Buffer::destroy

    fn Buffer::destroy(self : Buffer) -> Unit

    Buffer::download

    fn Buffer::download(self : Buffer) -> Bytes raise RhiError

    Buffer::id

    fn Buffer::id(self : Buffer) -> UInt64

    Buffer::size

    fn Buffer::size(self : Buffer) -> Int

    Buffer::upload_bytes

    fn Buffer::upload_bytes(self : Buffer, arg1 : Bytes, arg2 : Int, arg3 : Int) -> Unit raise RhiError

    Buffer::upload_floats

    fn Buffer::upload_floats(self : Buffer, arg1 : FixedArray[Float], arg2 : Int, arg3 : Int) -> Unit raise RhiError

    Buffer::upload_mat4

    fn Buffer::upload_mat4(self : Buffer, arg1 :
    Mat4
    , arg2 : Int) -> Unit raise RhiError

    Buffer::upload_uint16

    fn Buffer::upload_uint16(self : Buffer, arg1 : FixedArray[UInt16], arg2 : Int, arg3 : Int) -> Unit raise RhiError

    Buffer::upload_uint32

    fn Buffer::upload_uint32(self : Buffer, arg1 : FixedArray[UInt], arg2 : Int, arg3 : Int) -> Unit raise RhiError

    CommandBuffer

    pub struct CommandBuffer {
    // private fields
    }

    CommandBuffer::barrier

    fn CommandBuffer::barrier(self : CommandBuffer) -> Unit

    CommandBuffer::begin_swapchain_pass

    CommandBuffer::bind_accel_struct

    fn CommandBuffer::bind_accel_struct(self : CommandBuffer, arg1 : Pipeline, arg2 : Int, arg3 : AccelStruct) -> Unit

    CommandBuffer::bind_bindless_heap

    fn CommandBuffer::bind_bindless_heap(self : CommandBuffer, arg1 : Pipeline, arg2 : BindlessHeap, arg3 : Int) -> Unit

    CommandBuffer::bind_index

    fn CommandBuffer::bind_index(self : CommandBuffer, arg1 : Buffer, arg2 :
    IndexType
    , arg3 : Int) -> Unit

    CommandBuffer::bind_pipeline

    fn CommandBuffer::bind_pipeline(self : CommandBuffer, arg1 : Pipeline) -> Unit

    CommandBuffer::bind_storage

    fn CommandBuffer::bind_storage(self : CommandBuffer, arg1 : Pipeline, arg2 : Int, arg3 : Buffer, arg4 : Int, arg5 : Int) -> Unit

    CommandBuffer::bind_storage_image

    fn CommandBuffer::bind_storage_image(self : CommandBuffer, arg1 : Pipeline, arg2 : Int, arg3 : Texture) -> Unit

    CommandBuffer::bind_texture

    fn CommandBuffer::bind_texture(self : CommandBuffer, arg1 : Pipeline, arg2 : Int, arg3 : Texture, arg4 : Sampler) -> Unit

    CommandBuffer::bind_uniform

    fn CommandBuffer::bind_uniform(self : CommandBuffer, arg1 : Pipeline, arg2 : Int, arg3 : Buffer, arg4 : Int, arg5 : Int) -> Unit

    CommandBuffer::bind_vertex

    fn CommandBuffer::bind_vertex(self : CommandBuffer, arg1 : Int, arg2 : Buffer, arg3 : Int) -> Unit

    CommandBuffer::blit_texture

    fn CommandBuffer::blit_texture(self : CommandBuffer, arg1 : Texture, arg2 : Texture, arg3 :
    Filter
    ) -> Unit

    CommandBuffer::blit_to_swapchain

    fn CommandBuffer::blit_to_swapchain(self : CommandBuffer, arg1 : Texture, arg2 : Swapchain) -> Unit

    CommandBuffer::compute_pass

    fn CommandBuffer::compute_pass(self : CommandBuffer, encode : (ComputePass) -> Unit raise RhiError) -> Unit raise RhiError

    CommandBuffer::copy_buffer

    fn CommandBuffer::copy_buffer(self : CommandBuffer, arg1 : Buffer, arg2 : Buffer, arg3 : Int) -> Unit

    CommandBuffer::dispatch

    fn CommandBuffer::dispatch(self : CommandBuffer, arg1 : Int, arg2 : Int, arg3 : Int) -> Unit

    CommandBuffer::dispatch_indirect

    fn CommandBuffer::dispatch_indirect(self : CommandBuffer, arg1 : Buffer, arg2 : Int) -> Unit

    CommandBuffer::draw

    fn CommandBuffer::draw(self : CommandBuffer, arg1 : Int, arg2 : Int) -> Unit

    CommandBuffer::draw_indexed

    fn CommandBuffer::draw_indexed(self : CommandBuffer, arg1 : Int, arg2 : Int) -> Unit

    CommandBuffer::draw_indexed_full

    fn CommandBuffer::draw_indexed_full(self : CommandBuffer, arg1 : Int, arg2 : Int, arg3 : Int, arg4 : Int, arg5 : Int) -> Unit

    CommandBuffer::draw_indexed_indirect

    fn CommandBuffer::draw_indexed_indirect(self : CommandBuffer, arg1 : Buffer, arg2 : Int, arg3 : Int, arg4 : Int) -> Unit

    CommandBuffer::draw_indexed_indirect_count

    fn CommandBuffer::draw_indexed_indirect_count(self : CommandBuffer, arg1 : Buffer, arg2 : Buffer, arg3 : Int, arg4 : Int, arg5 : Int, arg6 : Int) -> Unit

    CommandBuffer::draw_indirect

    fn CommandBuffer::draw_indirect(self : CommandBuffer, arg1 : Buffer, arg2 : Int, arg3 : Int, arg4 : Int) -> Unit

    CommandBuffer::draw_indirect_count

    fn CommandBuffer::draw_indirect_count(self : CommandBuffer, arg1 : Buffer, arg2 : Buffer, arg3 : Int, arg4 : Int, arg5 : Int, arg6 : Int) -> Unit

    CommandBuffer::draw_instanced

    fn CommandBuffer::draw_instanced(self : CommandBuffer, arg1 : Int, arg2 : Int, arg3 : Int, arg4 : Int) -> Unit

    CommandBuffer::draw_mesh_tasks

    fn CommandBuffer::draw_mesh_tasks(self : CommandBuffer, arg1 : Int, arg2 : Int, arg3 : Int) -> Unit

    CommandBuffer::draw_mesh_tasks_indirect

    fn CommandBuffer::draw_mesh_tasks_indirect(self : CommandBuffer, arg1 : Buffer, arg2 : Int, arg3 : Int, arg4 : Int) -> Unit

    CommandBuffer::end_render_pass

    fn CommandBuffer::end_render_pass(self : CommandBuffer) -> Unit

    CommandBuffer::end_swapchain_pass

    fn CommandBuffer::end_swapchain_pass(self : CommandBuffer) -> Unit

    CommandBuffer::first_error

    fn CommandBuffer::first_error(self : CommandBuffer) -> String?

    CommandBuffer::frame_slot

    fn CommandBuffer::frame_slot(self : CommandBuffer) -> Int

    CommandBuffer::push_constants_bytes

    fn CommandBuffer::push_constants_bytes(self : CommandBuffer, arg1 : Pipeline, arg2 : Bytes, arg3 : Int) -> Unit

    CommandBuffer::push_constants_floats

    fn CommandBuffer::push_constants_floats(self : CommandBuffer, arg1 : Pipeline, arg2 : FixedArray[Float], arg3 : Int) -> Unit

    CommandBuffer::push_constants_mat4

    fn CommandBuffer::push_constants_mat4(self : CommandBuffer, arg1 : Pipeline, arg2 :
    Mat4
    , arg3 : Int) -> Unit

    CommandBuffer::render_pass

    Record an offscreen pass: opens the render pass, runs draw, and always closes the pass before re-raising a failure from the callback.

    CommandBuffer::reset_timestamps

    fn CommandBuffer::reset_timestamps(self : CommandBuffer, arg1 : TimestampPool) -> Unit

    CommandBuffer::set_scissor

    fn CommandBuffer::set_scissor(self : CommandBuffer, arg1 : Int, arg2 : Int, arg3 : Int, arg4 : Int) -> Unit

    CommandBuffer::set_stencil_reference

    fn CommandBuffer::set_stencil_reference(self : CommandBuffer, arg1 : Int) -> Unit

    CommandBuffer::set_viewport

    fn CommandBuffer::set_viewport(self : CommandBuffer, arg1 : Float, arg2 : Float, arg3 : Float, arg4 : Float) -> Unit

    CommandBuffer::swapchain_pass

    fn CommandBuffer::swapchain_pass(self : CommandBuffer, swapchain : Swapchain, load_op :
    LoadOp
    , clear_color :
    ClearColor
    , draw : (RenderPass) -> Unit raise RhiError) -> Unit raise RhiError

    Record a swapchain pass: opens the pass (clearing with clear_color), runs draw, then closes it. Mirrors render_pass for the presented image.

    CommandBuffer::transition_for_compute

    fn CommandBuffer::transition_for_compute(self : CommandBuffer, arg1 : Texture) -> Unit

    CommandBuffer::transition_for_sampling

    fn CommandBuffer::transition_for_sampling(self : CommandBuffer, arg1 : Texture) -> Unit

    CommandBuffer::write_timestamp

    fn CommandBuffer::write_timestamp(self : CommandBuffer, arg1 : TimestampPool, arg2 : Int, arg3 : Bool) -> Unit

    ComputePass

    pub struct ComputePass {
    // private fields
    }

    ComputePass::bind_bindless_heap

    fn ComputePass::bind_bindless_heap(self : ComputePass, arg1 : Pipeline, arg2 : BindlessHeap, arg3 : Int) -> Unit

    ComputePass::bind_pipeline

    fn ComputePass::bind_pipeline(self : ComputePass, arg1 : Pipeline) -> Unit

    ComputePass::bind_storage

    fn ComputePass::bind_storage(self : ComputePass, arg1 : Pipeline, arg2 : Int, arg3 : Buffer, arg4 : Int, arg5 : Int) -> Unit

    ComputePass::bind_storage_image

    fn ComputePass::bind_storage_image(self : ComputePass, arg1 : Pipeline, arg2 : Int, arg3 : Texture) -> Unit

    ComputePass::bind_uniform

    fn ComputePass::bind_uniform(self : ComputePass, arg1 : Pipeline, arg2 : Int, arg3 : Buffer, arg4 : Int, arg5 : Int) -> Unit

    ComputePass::dispatch

    fn ComputePass::dispatch(self : ComputePass, arg1 : Int, arg2 : Int, arg3 : Int) -> Unit

    ComputePass::dispatch_indirect

    fn ComputePass::dispatch_indirect(self : ComputePass, arg1 : Buffer, arg2 : Int) -> Unit

    ComputePass::push_constants_bytes

    fn ComputePass::push_constants_bytes(self : ComputePass, arg1 : Pipeline, arg2 : Bytes, arg3 : Int) -> Unit

    ComputePass::push_constants_floats

    fn ComputePass::push_constants_floats(self : ComputePass, arg1 : Pipeline, arg2 : FixedArray[Float], arg3 : Int) -> Unit

    ComputePass::transition_for_compute

    fn ComputePass::transition_for_compute(self : ComputePass, arg1 : Texture) -> Unit

    ComputePass::write_timestamp

    fn ComputePass::write_timestamp(self : ComputePass, arg1 : TimestampPool, arg2 : Int, arg3 : Bool) -> Unit

    Device

    pub struct Device {
    // private fields
    }

    Device::allocator_stats

    fn Device::allocator_stats(self : Device) -> (Int, Int)

    Device::allocator_used_bytes

    fn Device::allocator_used_bytes(self : Device) -> UInt64

    Device::begin_commands

    fn Device::begin_commands(self : Device) -> CommandBuffer raise RhiError

    Device::create_bindless_heap

    fn Device::create_bindless_heap(self : Device, arg1 : Int) -> BindlessHeap raise RhiError

    Device::create_blas

    Device::create_buffer

    fn Device::create_buffer(self : Device, arg1 : Int, arg2 :
    BufferKind
    ) -> Buffer raise RhiError

    Device::create_buffer_usage

    Device::create_buffer_with

    Device::create_compute_pipeline

    fn Device::create_compute_pipeline(self : Device, arg1 : FixedArray[UInt], arg2 : Int, arg3 : Int, arg4 : Int, arg5 : Int, arg6 : Int) -> Pipeline raise RhiError

    Device::create_compute_pipeline_auto

    fn Device::create_compute_pipeline_auto(self : Device, arg1 : FixedArray[UInt]) -> Pipeline raise RhiError

    Device::create_cubemap

    fn Device::create_cubemap(self : Device, arg1 : Int, arg2 :
    TextureFormat
    , arg3 : Array[Bytes]) -> Texture raise RhiError

    Device::create_cubemap_mipmapped

    fn Device::create_cubemap_mipmapped(self : Device, arg1 : Int, arg2 :
    TextureFormat
    , arg3 : Array[Array[Bytes]]) -> Texture raise RhiError

    Device::create_depth_texture

    fn Device::create_depth_texture(self : Device, arg1 : Int, arg2 : Int, arg3 :
    SampleCount
    ) -> Texture raise RhiError

    Device::create_depth_texture_format

    fn Device::create_depth_texture_format(self : Device, arg1 : Int, arg2 : Int, arg3 :
    TextureFormat
    , arg4 :
    SampleCount
    ) -> Texture raise RhiError

    Device::create_fence

    fn Device::create_fence(self : Device, arg1 : Bool) -> Fence raise RhiError

    Device::create_graphics_pipeline

    fn Device::create_graphics_pipeline(self : Device, arg1 :
    PipelineDesc
    ) -> Pipeline raise RhiError

    Device::create_mesh_pipeline

    Device::create_render_target

    Device::create_sampler

    fn Device::create_sampler(self : Device) -> Sampler raise RhiError

    Device::create_sampler_desc

    fn Device::create_sampler_desc(self : Device, arg1 :
    SamplerDesc
    ) -> Sampler raise RhiError

    Device::create_storage_texture

    fn Device::create_storage_texture(self : Device, arg1 : Int, arg2 : Int, arg3 :
    TextureFormat
    ) -> Texture raise RhiError

    Device::create_swapchain

    fn Device::create_swapchain(self : Device, arg1 : String, arg2 : Int, arg3 : Int) -> Swapchain raise RhiError

    Device::create_swapchain_desc

    Device::create_texture

    fn Device::create_texture(self : Device, arg1 : Int, arg2 : Int, arg3 : Bytes) -> Texture raise RhiError

    Device::create_texture_array

    fn Device::create_texture_array(self : Device, arg1 : Int, arg2 : Int, arg3 : Int, arg4 :
    TextureFormat
    , arg5 : Bytes) -> Texture raise RhiError

    Device::create_texture_desc

    fn Device::create_texture_desc(self : Device, arg1 :
    TextureDesc
    , arg2 : Bytes) -> Texture raise RhiError

    Device::create_texture_format

    fn Device::create_texture_format(self : Device, arg1 : Int, arg2 : Int, arg3 :
    TextureFormat
    , arg4 : Bytes) -> Texture raise RhiError

    Device::create_texture_mipmapped

    fn Device::create_texture_mipmapped(self : Device, arg1 : Int, arg2 : Int, arg3 :
    TextureFormat
    , arg4 : Bytes) -> Texture raise RhiError

    Device::create_timestamp_pool

    fn Device::create_timestamp_pool(self : Device, arg1 : Int) -> TimestampPool raise RhiError

    Device::create_tlas

    Device::destroy

    fn Device::destroy(self : Device) -> Unit

    Device::end_commands

    fn Device::end_commands(self : Device, arg1 : CommandBuffer) -> Unit raise RhiError

    Device::new

    fn Device::new(arg1 : String, arg2 : Bool) -> Device raise RhiError

    Device::new_desc

    Device::pipeline_cache_data

    fn Device::pipeline_cache_data(self : Device) -> Bytes

    Device::raytracing_tier

    fn Device::raytracing_tier(self : Device) -> Int

    Device::shader_language

    The shader blob format this device can consume (ADR-005 D7).

    It is derived from BackendKind rather than stored in DeviceCapabilities because it is not a capability: every WebGPU device takes WGSL and every Vulkan device takes SPIR-V, and a device that could do neither would not be a device. Keeping it a method also keeps the capability struct's literal constructors in the backends untouched.

    A renderer asks this before choosing which of its two shader sources to hand over; Dxil is reported honestly so a renderer that only ships SPIR-V and WGSL can refuse instead of submitting the wrong bytes.

    Device::submit_commands

    fn Device::submit_commands(self : Device, arg1 : CommandBuffer, arg2 : Fence) -> Unit raise RhiError

    Device::validation_errors

    fn Device::validation_errors(self : Device) -> Int

    Device::wait_idle

    fn Device::wait_idle(self : Device) -> Unit

    Fence

    pub struct Fence {
    // private fields
    }

    Fence::destroy

    fn Fence::destroy(self : Fence) -> Unit

    Fence::reset

    fn Fence::reset(self : Fence) -> Unit

    Fence::wait

    fn Fence::wait(self : Fence) -> Unit

    Pipeline

    pub struct Pipeline {
    // private fields
    }

    Pipeline::destroy

    fn Pipeline::destroy(self : Pipeline) -> Unit

    Pipeline::id

    fn Pipeline::id(self : Pipeline) -> UInt64

    RenderPass

    pub struct RenderPass {
    // private fields
    }

    RenderPass::bind_accel_struct

    fn RenderPass::bind_accel_struct(self : RenderPass, arg1 : Pipeline, arg2 : Int, arg3 : AccelStruct) -> Unit

    RenderPass::bind_bindless_heap

    fn RenderPass::bind_bindless_heap(self : RenderPass, arg1 : Pipeline, arg2 : BindlessHeap, arg3 : Int) -> Unit

    RenderPass::bind_index

    fn RenderPass::bind_index(self : RenderPass, arg1 : Buffer, arg2 :
    IndexType
    , arg3 : Int) -> Unit

    RenderPass::bind_pipeline

    fn RenderPass::bind_pipeline(self : RenderPass, arg1 : Pipeline) -> Unit

    RenderPass::bind_storage

    fn RenderPass::bind_storage(self : RenderPass, arg1 : Pipeline, arg2 : Int, arg3 : Buffer, arg4 : Int, arg5 : Int) -> Unit

    RenderPass::bind_texture

    fn RenderPass::bind_texture(self : RenderPass, arg1 : Pipeline, arg2 : Int, arg3 : Texture, arg4 : Sampler) -> Unit

    RenderPass::bind_uniform

    fn RenderPass::bind_uniform(self : RenderPass, arg1 : Pipeline, arg2 : Int, arg3 : Buffer, arg4 : Int, arg5 : Int) -> Unit

    RenderPass::bind_vertex

    fn RenderPass::bind_vertex(self : RenderPass, arg1 : Int, arg2 : Buffer, arg3 : Int) -> Unit

    RenderPass::draw

    fn RenderPass::draw(self : RenderPass, arg1 : Int, arg2 : Int) -> Unit

    RenderPass::draw_indexed

    fn RenderPass::draw_indexed(self : RenderPass, arg1 : Int, arg2 : Int) -> Unit

    RenderPass::draw_indexed_full

    fn RenderPass::draw_indexed_full(self : RenderPass, arg1 : Int, arg2 : Int, arg3 : Int, arg4 : Int, arg5 : Int) -> Unit

    RenderPass::draw_indexed_indirect

    fn RenderPass::draw_indexed_indirect(self : RenderPass, arg1 : Buffer, arg2 : Int, arg3 : Int, arg4 : Int) -> Unit

    RenderPass::draw_indexed_indirect_count

    fn RenderPass::draw_indexed_indirect_count(self : RenderPass, arg1 : Buffer, arg2 : Buffer, arg3 : Int, arg4 : Int, arg5 : Int, arg6 : Int) -> Unit

    RenderPass::draw_indirect

    fn RenderPass::draw_indirect(self : RenderPass, arg1 : Buffer, arg2 : Int, arg3 : Int, arg4 : Int) -> Unit

    RenderPass::draw_indirect_count

    fn RenderPass::draw_indirect_count(self : RenderPass, arg1 : Buffer, arg2 : Buffer, arg3 : Int, arg4 : Int, arg5 : Int, arg6 : Int) -> Unit

    RenderPass::draw_instanced

    fn RenderPass::draw_instanced(self : RenderPass, arg1 : Int, arg2 : Int, arg3 : Int, arg4 : Int) -> Unit

    RenderPass::draw_mesh_tasks

    fn RenderPass::draw_mesh_tasks(self : RenderPass, arg1 : Int, arg2 : Int, arg3 : Int) -> Unit

    RenderPass::push_constants_bytes

    fn RenderPass::push_constants_bytes(self : RenderPass, arg1 : Pipeline, arg2 : Bytes, arg3 : Int) -> Unit

    RenderPass::push_constants_floats

    fn RenderPass::push_constants_floats(self : RenderPass, arg1 : Pipeline, arg2 : FixedArray[Float], arg3 : Int) -> Unit

    RenderPass::push_constants_mat4

    fn RenderPass::push_constants_mat4(self : RenderPass, arg1 : Pipeline, arg2 :
    Mat4
    ) -> Unit

    RenderPass::set_scissor

    fn RenderPass::set_scissor(self : RenderPass, arg1 : Int, arg2 : Int, arg3 : Int, arg4 : Int) -> Unit

    RenderPass::set_stencil_reference

    fn RenderPass::set_stencil_reference(self : RenderPass, arg1 : Int) -> Unit

    RenderPass::set_viewport

    fn RenderPass::set_viewport(self : RenderPass, arg1 : Float, arg2 : Float, arg3 : Float, arg4 : Float) -> Unit

    RenderPass::transition_for_sampling

    fn RenderPass::transition_for_sampling(self : RenderPass, arg1 : Texture) -> Unit

    Sampler

    pub struct Sampler {
    // private fields
    }

    Sampler::destroy

    fn Sampler::destroy(self : Sampler) -> Unit

    Swapchain

    pub struct Swapchain {
    // private fields
    }

    Swapchain::begin_frame

    fn Swapchain::begin_frame(self : Swapchain) -> CommandBuffer raise RhiError

    Swapchain::begin_frame_commands

    fn Swapchain::begin_frame_commands(self : Swapchain) -> CommandBuffer raise RhiError

    Swapchain::clipboard_text

    fn Swapchain::clipboard_text(self : Swapchain) -> String

    Swapchain::color_format

    Swapchain::content_scale

    fn Swapchain::content_scale(self : Swapchain) -> Double

    Swapchain::create_mesh_pipeline

    Swapchain::create_pipeline

    fn Swapchain::create_pipeline(self : Swapchain, arg1 : FixedArray[UInt], arg2 : FixedArray[UInt], arg3 : Int) -> Pipeline raise RhiError

    Swapchain::create_pipeline_desc

    Swapchain::depth_format

    Swapchain::destroy

    fn Swapchain::destroy(self : Swapchain) -> Unit

    Swapchain::end_frame

    fn Swapchain::end_frame(self : Swapchain, arg1 : CommandBuffer) -> Unit raise RhiError

    Swapchain::framebuffer_size

    fn Swapchain::framebuffer_size(self : Swapchain) -> (Int, Int)

    Swapchain::has_depth

    fn Swapchain::has_depth(self : Swapchain) -> Bool

    Swapchain::height

    fn Swapchain::height(self : Swapchain) -> Int

    Swapchain::id

    fn Swapchain::id(self : Swapchain) -> UInt64

    Swapchain::is_fullscreen

    fn Swapchain::is_fullscreen(self : Swapchain) -> Bool

    Swapchain::is_mouse_down

    fn Swapchain::is_mouse_down(self : Swapchain, arg1 :
    MouseButton
    ) -> Bool

    Swapchain::mouse_pos

    fn Swapchain::mouse_pos(self : Swapchain) -> (Double, Double)

    Swapchain::poll_events

    Swapchain::present_texture

    fn Swapchain::present_texture(self : Swapchain, arg1 : Texture) -> Unit raise RhiError

    Swapchain::readback

    fn Swapchain::readback(self : Swapchain) -> FixedArray[Byte]

    Swapchain::set_clipboard_text

    fn Swapchain::set_clipboard_text(self : Swapchain, arg1 : String) -> Unit

    Swapchain::set_cursor_mode

    fn Swapchain::set_cursor_mode(self : Swapchain, arg1 :
    CursorMode
    ) -> Unit

    Swapchain::set_cursor_shape

    fn Swapchain::set_cursor_shape(self : Swapchain, arg1 :
    CursorShape
    ) -> Unit

    Swapchain::set_fullscreen

    fn Swapchain::set_fullscreen(self : Swapchain, arg1 : Bool) -> Unit

    Swapchain::set_title

    fn Swapchain::set_title(self : Swapchain, arg1 : String) -> Unit

    Swapchain::should_close

    fn Swapchain::should_close(self : Swapchain) -> Bool

    Swapchain::sync_size

    fn Swapchain::sync_size(self : Swapchain) -> Unit raise RhiError

    Swapchain::time

    fn Swapchain::time() -> Double

    Swapchain::wait_events

    fn Swapchain::wait_events(arg1 : Int) -> Unit

    Swapchain::width

    fn Swapchain::width(self : Swapchain) -> Int

    Texture

    pub struct Texture {
    // private fields
    }

    Texture::destroy

    fn Texture::destroy(self : Texture) -> Unit

    Texture::height

    fn Texture::height(self : Texture) -> Int

    Texture::id

    fn Texture::id(self : Texture) -> UInt64

    Raw handle id. Needed by descriptors that traffic in ids (RenderTargetDesc, DepthTargetDesc, PipelineDesc::bindless_heap), which the core resolves before the backend sees them.

    Texture::layers

    fn Texture::layers(self : Texture) -> Int

    Texture::mip_levels

    fn Texture::mip_levels(self : Texture) -> Int

    Texture::readback

    fn Texture::readback(self : Texture) -> FixedArray[Byte] raise RhiError

    Texture::readback_mip

    fn Texture::readback_mip(self : Texture, arg1 : Int) -> FixedArray[Byte] raise RhiError

    Texture::upload_subregion

    fn Texture::upload_subregion(self : Texture, arg1 : Int, arg2 : Int, arg3 : Int, arg4 : Int, arg5 : Bytes, arg6 : Int, arg7 : Int) -> Unit raise RhiError

    Texture::upload_subregions

    fn Texture::upload_subregions(self : Texture, regions : Array[(Int, Int, Int, Int, Bytes)], layer? : Int, mip_level? : Int) -> Unit raise RhiError

    Upload several subregions with one call. The backend ABI cannot carry an array of tuples, so the loop lives in the core and issues individual upload_subregion calls.

    Texture::width

    fn Texture::width(self : Texture) -> Int

    TimestampPool

    pub struct TimestampPool {
    // private fields
    }

    TimestampPool::destroy

    fn TimestampPool::destroy(self : TimestampPool) -> Unit

    TimestampPool::elapsed_ms

    fn TimestampPool::elapsed_ms(self : TimestampPool, arg1 : Int, arg2 : Int) -> Double raise RhiError

    TimestampPool::resolve_ns

    fn TimestampPool::resolve_ns(self : TimestampPool) -> FixedArray[Double] raise RhiError

    backend_error

    fn backend_error() -> RhiError

    Wrap the message recorded by the last failing backend call.

    check

    fn check(code : Int) -> Unit raise RhiError

    Turn a backend return code into a RhiError, 0 meaning success.

    A backend entry point that fails must record a message, but a missing one used to produce a bare RhiError: with nothing after it, which is impossible to act on. The code goes into the message in that case so the failure still identifies itself.

    external_surface_from_plat

    Convert a platform @tycho_plat.Surface (desktop window, iOS CAMetalLayer, Android ANativeWindow, or web canvas) into an L1 @types.ExternalSurface suitable for SwapchainDesc::new(..., external_surface=...).

    last_backend_error

    fn last_backend_error() -> String

    The bare message recorded by the last failing backend call, for logging.