lib/vulkan/instance.rb
# Returns an array of physical device handles. Use these to query the
# capabilities of each physical device, and to create logical devices
# based on the results.
Returns an array of physical device handles. Use these to query the
capabilities of each physical device, and to create logical devices
based on the results.
Returns an array of physical device handles . Use these to query the capabilities of each physical device and to create logical devices based on the results .
def physical_device_handles
      @physical_device_handles ||= begin
        device_count_ptr = Vulkan.create_value("uint32_t", 0)
        check_result @vk.vkEnumeratePhysicalDevices(@handle, device_count_ptr, nil)
        device_count = device_count_ptr.value
        container_struct = Vulkan.struct("handles[#{device_count}]" => ['VkPhysicalDevice handle'])
        container = container_struct.malloc
        check_result @vk.vkEnumeratePhysicalDevices(@handle, device_count_ptr, container)
        container.handles
      end
    end
def physical_device_handles @physical_device_handles ||= begin device_count_ptr = Vulkan . create_value ( "uint32_t" , 0 ) check_result @vk . vkEnumeratePhysicalDevices ( @handle , device_count_ptr , nil ) device_count = device_count_ptr . value container_struct = Vulkan . struct ( "handles[#{device_count}]" => [ 'VkPhysicalDevice handle' ] ) container = container_struct . malloc check_result @vk . vkEnumeratePhysicalDevices ( @handle , device_count_ptr , container ) container . handles end end
Returns an array of physical device handles.
Returns an array of physical device handles .
# get device count # check_result func.call(@handle, device_count_ptr, nil) # allocate n devices # check_result func.call(@handle, device_count_ptr, container)