package acorn:device

⌘K
Ctrl+K
or
/

    Types

    CommandBufferContext ¶

    CommandBufferContext :: struct {
    	command_pool:   vulkan.CommandPool,
    	command_buffer: vulkan.CommandBuffer,
    }
    Related Procedures With Parameters
    Related Procedures With Returns

    DeviceContext ¶

    DeviceContext :: struct {
    	enable_validation_layers:                 bool,
    	width:                                    i32,
    	height:                                   i32,
    	window:                                   ^sdl2.Window,
    	instance:                                 vulkan.Instance,
    	debug_messager:                           vulkan.DebugUtilsMessengerEXT,
    	surface:                                  vulkan.SurfaceKHR,
    	physical_device:                          vulkan.PhysicalDevice,
    	physical_device_max_useable_sample_count: vulkan.SampleCountFlag,
    	best_depth_stencil_format:                vulkan.Format,
    	device:                                   vulkan.Device,
    	graphics_queue:                           vulkan.Queue,
    	present_queue:                            vulkan.Queue,
    	command_buffer:                           CommandBufferContext,
    	swap_chain:                               SwapChainContext,
    }
    Related Procedures With Parameters
    Related Procedures With Returns

    FeatureSet ¶

    FeatureSet :: struct {
    	required_physical_device_extentions: []cstring,
    	feature_chain:                       []rawptr,
    }
    Related Procedures With Parameters
    Related Procedures With Returns

    PhysicalDeviceError ¶

    PhysicalDeviceError :: enum untyped integer {
    	None, 
    	NoGPUSSupportVulkan, 
    	NoGPUSSupportRequiredFeatures, 
    }
    Related Procedures With Returns

    QueueInfo ¶

    QueueInfo :: struct {
    	graphics_family_index: u32,
    	present_family_index:  u32,
    	has_graphics_queue:    bool,
    	has_present_queue:     bool,
    	has_all_queues:        bool,
    }
    Related Procedures With Returns

    SwapChainContext ¶

    SwapChainContext :: struct {
    	swap_chain_surface_format_format: vulkan.Format,
    	swap_chain_extent:                vulkan.Extent2D,
    	swap_chain:                       vulkan.SwapchainKHR,
    	swap_chain_images:                [dynamic]vulkan.Image,
    	swap_chain_image_views:           [dynamic]vulkan.ImageView,
    	swap_chain_image_avail_semaphore: vulkan.Semaphore,
    }
    Related Procedures With Parameters
    Related Procedures With Returns

    SwapChainSupportInfo ¶

    SwapChainSupportInfo :: struct {
    	capabilities:  vulkan.SurfaceCapabilitiesKHR,
    	formats:       []vulkan.SurfaceFormatKHR,
    	present_modes: []vulkan.PresentModeKHR,
    }
    Related Procedures With Parameters
    Related Procedures With Returns

    Constants

    VALIDATION_FEATURES ¶

    VALIDATION_FEATURES: [1]vulkan.ValidationFeatureEnableEXT : [1]vk.ValidationFeatureEnableEXT{vk.ValidationFeatureEnableEXT.DEBUG_PRINTF}

    VALIDATION_LAYERS ¶

    VALIDATION_LAYERS: [1]cstring : [1]cstring{"VK_LAYER_KHRONOS_validation"}

    Variables

    This section is empty.

    Procedures

    are_validation_layers_supported ¶

    are_validation_layers_supported :: proc(required_layers: []cstring) -> bool {…}

    begin_single_time_command ¶

    begin_single_time_command :: proc(device_context: ^DeviceContext) -> vulkan.CommandBuffer {…}

    create_image_view ¶

    create_image_view :: proc(device_context: ^DeviceContext, image: vulkan.Image, format: vulkan.Format, aspect_flags: vulkan.ImageAspectFlags) -> vulkan.ImageView {…}

    create_semaphore ¶

    create_semaphore :: proc(device_context: ^DeviceContext) -> vulkan.Semaphore {…}

    debug_callback ¶

    debug_callback :: proc "c" (messageSeverity: vulkan.DebugUtilsMessageSeverityFlagsEXT, messageTypes: vulkan.DebugUtilsMessageTypeFlagsEXT, pCallbackData: ^vulkan.DebugUtilsMessengerCallbackDataEXT, pUserData: rawptr) -> b32 {…}

    delete_command_pool_and_buffer ¶

    delete_command_pool_and_buffer :: proc(device_context: ^DeviceContext, command_buffer: CommandBufferContext) {…}

    delete_device ¶

    delete_device :: proc(device_context: DeviceContext) {…}

    delete_feature_set ¶

    delete_feature_set :: proc(feature_set: FeatureSet) {…}

    delete_semaphore ¶

    delete_semaphore :: proc(device_context: ^DeviceContext, sem: vulkan.Semaphore) {…}

    delete_swap_chain ¶

    delete_swap_chain :: proc(device_context: ^DeviceContext, swap_chain: SwapChainContext) {…}

    delete_swap_chain_support_info ¶

    delete_swap_chain_support_info :: proc(surface_chain_support_info: SwapChainSupportInfo) {…}

    end_single_time_command ¶

    end_single_time_command :: proc(device_context: ^DeviceContext, command_buffer: ^vulkan.CommandBuffer) {…}

    format_has_stencil_component ¶

    format_has_stencil_component :: proc(format: vulkan.Format) -> bool {…}

    get_best_supported_depth_format ¶

    get_best_supported_depth_format :: proc(physical_device: vulkan.PhysicalDevice) -> vulkan.Format {…}

    get_max_useable_sample_count ¶

    get_max_useable_sample_count :: proc(physical_device: vulkan.PhysicalDevice) -> vulkan.SampleCountFlag {…}

    get_next_swap_chain_image ¶

    get_next_swap_chain_image :: proc(device_context: ^DeviceContext) -> (u32, vulkan.Semaphore) {…}

    get_queue_info ¶

    get_queue_info :: proc(selected_physical_device: vulkan.PhysicalDevice, surface: vulkan.SurfaceKHR) -> QueueInfo {…}

    get_required_instance_extensions ¶

    get_required_instance_extensions :: proc(device_context: ^DeviceContext) -> [dynamic]cstring {…}

    get_sampler_max_anisotropy ¶

    get_sampler_max_anisotropy :: proc(device_context: ^DeviceContext) -> f32 {…}

    get_swap_chain_support_info ¶

    get_swap_chain_support_info :: proc(physical_device: vulkan.PhysicalDevice, surface: vulkan.SurfaceKHR) -> SwapChainSupportInfo {…}

    make_command_pool_and_buffer ¶

    make_command_pool_and_buffer :: proc(device_context: ^DeviceContext) -> CommandBufferContext {…}

    make_device ¶

    make_device :: proc(enable_validation_layers: bool, feature_set: FeatureSet, name: cstring, width: i32, height: i32) -> DeviceContext {…}

    make_swap_chain ¶

    make_swap_chain :: proc(device_context: ^DeviceContext) -> SwapChainContext {…}

    present_swap_chain_image ¶

    present_swap_chain_image :: proc(device_context: ^DeviceContext, image_index: u32, wait_semaphore: vulkan.Semaphore) {…}

    select_physical_device ¶

    select_physical_device :: proc(instance: vulkan.Instance, surface: vulkan.SurfaceKHR, required_physical_device_extentions: []cstring) -> (vulkan.PhysicalDevice, PhysicalDeviceError) {…}

    select_swap_extent ¶

    select_swap_extent :: proc(capabilities: ^vulkan.SurfaceCapabilitiesKHR, window: ^sdl2.Window) -> vulkan.Extent2D {…}

    select_swap_preset_mode ¶

    select_swap_preset_mode :: proc(preset_modes: []vulkan.PresentModeKHR) -> vulkan.PresentModeKHR {…}

    select_swap_surface_format ¶

    select_swap_surface_format :: proc(avail_formats: []vulkan.SurfaceFormatKHR) -> vulkan.SurfaceFormatKHR {…}

    setup_image_views ¶

    setup_image_views :: proc(device_context: ^DeviceContext, swap_chain_context: ^SwapChainContext) {…}

    setup_instance_and_setup_debug_layers ¶

    setup_instance_and_setup_debug_layers :: proc(device_context: ^DeviceContext, name: cstring) {…}

    setup_logical_device_and_queues ¶

    setup_logical_device_and_queues :: proc(device_context: ^DeviceContext, required_physical_device_extentions: []cstring, feature_chain: rawptr) {…}

    setup_physical_device ¶

    setup_physical_device :: proc(device_context: ^DeviceContext, required_physical_device_extentions: []cstring) {…}

    setup_sld ¶

    setup_sld :: proc(device_context: ^DeviceContext, name: cstring, width: i32, height: i32) {…}

    setup_surface ¶

    setup_surface :: proc(device_context: ^DeviceContext) {…}

    setup_swap_chain ¶

    setup_swap_chain :: proc(device_context: ^DeviceContext, swap_chain_context: ^SwapChainContext) {…}

    std_ray_trace_feature_set ¶

    std_ray_trace_feature_set :: proc() -> FeatureSet {…}

    Procedure Groups

    This section is empty.

    Source Files

    Generation Information

    Generated with odin version dev-2025-04 (vendor "odin") Linux_amd64 @ 2025-05-13 09:16:02.991572174 +0000 UTC