Module Sarek_vulkan.Vulkan_api_base

val memcpy : unit Ctypes_static.ptr -> unit Ctypes_static.ptr -> Unsigned.size_t -> unit Ctypes_static.ptr

memcpy from libc for memory transfers

val u32 : int -> Unsigned.UInt32.t

Helper to convert OCaml int to Unsigned.UInt32.t

Exceptions

exception Vk_result_error of Vulkan_types.vk_result * string

Deprecated: no longer raised. check below now raises the canonical Vulkan_error.Vulkan_error (a Backend_error alias) via the shared Sarek_backend_error.Backend_error.Make.check funnel. Kept only so out-of-tree code matching on Vulkan_api_base.Vk_result_error (code, ctx) (or the re-exported Vulkan_api.Vk_result_error) still compiles (this library is opam-published).

  • deprecated no longer raised; Vulkan_api_base.check now raises Vulkan_error.Vulkan_error (Backend_error) - catch that instead
val check : string -> Vulkan_types.vk_result -> unit

Check Vulkan result and raise a canonical Backend_error on failure.

SPIR-V Compilation

val compile_glsl_to_spirv_cli : entry_point:string -> string -> string

Compile GLSL to SPIR-V using glslangValidator. Requires glslangValidator in PATH.

val compile_glsl_to_spirv : entry_point:string -> string -> string

Compile GLSL to SPIR-V using Shaderc if available, otherwise fallback to CLI

val glslang_available : unit -> bool

Check if glslangValidator is available