camel -> snake for command enums + fixes

This commit is contained in:
ashpil
2021-06-26 23:23:50 -04:00
committed by Robin Voetter
parent 0e65efd9d6
commit 8f10cec149
3 changed files with 87 additions and 102 deletions

View File

@@ -5,77 +5,77 @@ const Allocator = std.mem.Allocator;
const required_device_extensions = [_][]const u8{vk.extension_info.khr_swapchain.name};
const BaseDispatch = vk.BaseWrapper([_]vk.BaseCommand{
.create_instance,
const BaseDispatch = vk.BaseWrapper(.{
.CreateInstance,
});
const InstanceDispatch = vk.InstanceWrapper([_]vk.InstanceCommand{
.destroy_instance,
.create_device,
.destroy_surface_khr,
.enumerate_physical_devices,
.get_physical_device_properties,
.enumerate_device_extension_properties,
.get_physical_device_surface_formats_khr,
.get_physical_device_surface_present_modes_khr,
.get_physical_device_surface_capabilities_khr,
.get_physical_device_queue_family_properties,
.get_physical_device_surface_support_khr,
.get_physical_device_memory_properties,
.get_device_proc_addr,
const InstanceDispatch = vk.InstanceWrapper(.{
.DestroyInstance,
.CreateDevice,
.DestroySurfaceKHR,
.EnumeratePhysicalDevices,
.GetPhysicalDeviceProperties,
.EnumerateDeviceExtensionProperties,
.GetPhysicalDeviceSurfaceFormatsKHR,
.GetPhysicalDeviceSurfacePresentModesKHR,
.GetPhysicalDeviceSurfaceCapabilitiesKHR,
.GetPhysicalDeviceQueueFamilyProperties,
.GetPhysicalDeviceSurfaceSupportKHR,
.GetPhysicalDeviceMemoryProperties,
.GetDeviceProcAddr,
});
const DeviceDispatch = vk.DeviceWrapper([_]vk.DeviceCommand{
.destroy_device,
.get_device_queue,
.create_semaphore,
.create_fence,
.create_image_view,
.destroy_image_view,
.destroy_semaphore,
.destroy_fence,
.get_swapchain_images_khr,
.create_swapchain_khr,
.destroy_swapchain_khr,
.acquire_next_image_khr,
.device_wait_idle,
.wait_for_fences,
.reset_fences,
.queue_submit,
.queue_present_khr,
.create_command_pool,
.destroy_command_pool,
.allocate_command_buffers,
.free_command_buffers,
.queue_wait_idle,
.create_shader_module,
.destroy_shader_module,
.create_pipeline_layout,
.destroy_pipeline_layout,
.create_render_pass,
.destroy_render_pass,
.create_graphics_pipelines,
.destroy_pipeline,
.create_framebuffer,
.destroy_framebuffer,
.begin_command_buffer,
.end_command_buffer,
.allocate_memory,
.free_memory,
.create_buffer,
.destroy_buffer,
.get_buffer_memory_requirements,
.map_memory,
.unmap_memory,
.bind_buffer_memory,
.cmd_begin_render_pass,
.cmd_end_render_pass,
.cmd_bind_pipeline,
.cmd_draw,
.cmd_set_viewport,
.cmd_set_scissor,
.cmd_bind_vertex_buffers,
.cmd_copy_buffer,
const DeviceDispatch = vk.DeviceWrapper(.{
.DestroyDevice,
.GetDeviceQueue,
.CreateSemaphore,
.CreateFence,
.CreateImageView,
.DestroyImageView,
.DestroySemaphore,
.DestroyFence,
.GetSwapchainImagesKHR,
.CreateSwapchainKHR,
.DestroySwapchainKHR,
.AcquireNextImageKHR,
.DeviceWaitIdle,
.WaitForFences,
.ResetFences,
.QueueSubmit,
.QueuePresentKHR,
.CreateCommandPool,
.DestroyCommandPool,
.AllocateCommandBuffers,
.FreeCommandBuffers,
.QueueWaitIdle,
.CreateShaderModule,
.DestroyShaderModule,
.CreatePipelineLayout,
.DestroyPipelineLayout,
.CreateRenderPass,
.DestroyRenderPass,
.CreateGraphicsPipelines,
.DestroyPipeline,
.CreateFramebuffer,
.DestroyFramebuffer,
.BeginCommandBuffer,
.EndCommandBuffer,
.AllocateMemory,
.FreeMemory,
.CreateBuffer,
.DestroyBuffer,
.GetBufferMemoryRequirements,
.MapMemory,
.UnmapMemory,
.BindBufferMemory,
.CmdBeginRenderPass,
.CmdEndRenderPass,
.CmdBindPipeline,
.CmdDraw,
.CmdSetViewport,
.CmdSetScissor,
.CmdBindVertexBuffers,
.CmdCopyBuffer,
});
pub const GraphicsContext = struct {