vulkan-ruby 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/.simplecov +6 -0
- data/.travis.yml +5 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +51 -0
- data/LICENSE.txt +21 -0
- data/README.md +93 -0
- data/Rakefile +14 -0
- data/bin/console +14 -0
- data/bin/setup +9 -0
- data/bin/setup.bat +2 -0
- data/examples/models/viking_room.obj +16053 -0
- data/examples/screenshots/vt10-viking_room.png +0 -0
- data/examples/shaders/depth_buffering.vert +25 -0
- data/examples/shaders/depth_buffering.vert.spv +0 -0
- data/examples/shaders/model_loading.frag +13 -0
- data/examples/shaders/model_loading.frag.spv +0 -0
- data/examples/shaders/model_loading.vert +25 -0
- data/examples/shaders/model_loading.vert.spv +0 -0
- data/examples/shaders/textures.frag +13 -0
- data/examples/shaders/textures.frag.spv +0 -0
- data/examples/shaders/textures.vert +25 -0
- data/examples/shaders/textures.vert.spv +0 -0
- data/examples/shaders/triangle.frag +10 -0
- data/examples/shaders/triangle.frag.spv +0 -0
- data/examples/shaders/triangle.vert +25 -0
- data/examples/shaders/triangle.vert.spv +0 -0
- data/examples/shaders/uniform_buffer.vert +22 -0
- data/examples/shaders/uniform_buffer.vert.spv +0 -0
- data/examples/shaders/vertex_buffer.vert +16 -0
- data/examples/shaders/vertex_buffer.vert.spv +0 -0
- data/examples/textures/texture.png +0 -0
- data/examples/textures/viking_room.png +0 -0
- data/examples/vt00_dump_info.rb +24 -0
- data/examples/vt01_triangle.rb +140 -0
- data/examples/vt02_vertex_buffer_triangle_host_visible.rb +164 -0
- data/examples/vt03_vertex_buffer_triangle_device_local.rb +174 -0
- data/examples/vt04_index_buffer_device_local.rb +193 -0
- data/examples/vt05_uniform_buffers.rb +237 -0
- data/examples/vt06_textures.rb +275 -0
- data/examples/vt07_depth_buffering.rb +315 -0
- data/examples/vt08_model_loading.rb +321 -0
- data/examples/vt09_mipmaps.rb +329 -0
- data/examples/vt10_multisampling.rb +344 -0
- data/lib/fiddle_ext.rb +15 -0
- data/lib/vulkan/buffer.rb +66 -0
- data/lib/vulkan/buffer_memory.rb +13 -0
- data/lib/vulkan/checks.rb +12 -0
- data/lib/vulkan/command_buffer.rb +380 -0
- data/lib/vulkan/command_pool.rb +28 -0
- data/lib/vulkan/conversions.rb +511 -0
- data/lib/vulkan/descriptor_pool.rb +45 -0
- data/lib/vulkan/descriptor_set.rb +86 -0
- data/lib/vulkan/descriptor_set_layout.rb +39 -0
- data/lib/vulkan/dispatch_table.rb +78 -0
- data/lib/vulkan/error.rb +43 -0
- data/lib/vulkan/fence.rb +32 -0
- data/lib/vulkan/finalizer.rb +43 -0
- data/lib/vulkan/framebuffer.rb +37 -0
- data/lib/vulkan/generated/commands.rb +298 -0
- data/lib/vulkan/generated/enums.rb +1049 -0
- data/lib/vulkan/generated/extensions/reserved_do_not_use_146.rb +8 -0
- data/lib/vulkan/generated/extensions/reserved_do_not_use_94.rb +8 -0
- data/lib/vulkan/generated/extensions/vk_amd_buffer_marker.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_draw_indirect_count.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_134.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_135.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_136.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_140.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_142.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_143.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_17.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_18.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_182.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_183.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_184.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_187.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_188.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_189.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_20.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_214.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_226.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_227.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_228.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_229.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_230.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_231.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_232.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_233.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_234.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_235.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_236.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_24.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_25.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_32.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_33.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_35.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_39.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_40.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_41.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_44.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_45.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_extension_46.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_gcn_shader.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_gpu_shader_half_float.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_gpu_shader_int16.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_memory_overallocation_behavior.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_amd_mixed_attachment_samples.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_negative_viewport_height.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_rasterization_order.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_amd_shader_ballot.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_shader_core_properties.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_amd_shader_explicit_vertex_parameter.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_shader_fragment_mask.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_shader_image_load_store_lod.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_shader_info.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_shader_trinary_minmax.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_amd_texture_gather_bias_lod.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_android_external_memory_android_hardware_buffer.rb +17 -0
- data/lib/vulkan/generated/extensions/vk_android_native_buffer.rb +12 -0
- data/lib/vulkan/generated/extensions/vk_arm_extension_01.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_arm_extension_198.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_ext_acquire_xlib_display.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_ext_astc_decode_mode.rb +12 -0
- data/lib/vulkan/generated/extensions/vk_ext_blend_operation_advanced.rb +60 -0
- data/lib/vulkan/generated/extensions/vk_ext_calibrated_timestamps.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_ext_conditional_rendering.rb +16 -0
- data/lib/vulkan/generated/extensions/vk_ext_conservative_rasterization.rb +12 -0
- data/lib/vulkan/generated/extensions/vk_ext_debug_marker.rb +13 -0
- data/lib/vulkan/generated/extensions/vk_ext_debug_report.rb +16 -0
- data/lib/vulkan/generated/extensions/vk_ext_debug_utils.rb +16 -0
- data/lib/vulkan/generated/extensions/vk_ext_depth_range_unrestricted.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_ext_descriptor_indexing.rb +18 -0
- data/lib/vulkan/generated/extensions/vk_ext_direct_mode_display.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_ext_discard_rectangles.rb +13 -0
- data/lib/vulkan/generated/extensions/vk_ext_display_control.rb +14 -0
- data/lib/vulkan/generated/extensions/vk_ext_display_surface_counter.rb +12 -0
- data/lib/vulkan/generated/extensions/vk_ext_extension_160.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_ext_extension_176.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_ext_extension_177.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_ext_extension_219.rb +15 -0
- data/lib/vulkan/generated/extensions/vk_ext_extension_220.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_ext_extension_222.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_ext_extension_223.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_ext_extension_28.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_ext_external_memory_dma_buf.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_ext_external_memory_host.rb +15 -0
- data/lib/vulkan/generated/extensions/vk_ext_global_priority.rb +12 -0
- data/lib/vulkan/generated/extensions/vk_ext_hdr_metadata.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_ext_image_drm_format_modifier.rb +24 -0
- data/lib/vulkan/generated/extensions/vk_ext_inline_uniform_block.rb +15 -0
- data/lib/vulkan/generated/extensions/vk_ext_macos_ios_window.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_ext_pci_bus_info.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_ext_post_depth_coverage.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_ext_queue_family_foreign.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_ext_sample_locations.rb +17 -0
- data/lib/vulkan/generated/extensions/vk_ext_sampler_filter_minmax.rb +13 -0
- data/lib/vulkan/generated/extensions/vk_ext_shader_stencil_export.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_ext_shader_subgroup_ballot.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_ext_shader_subgroup_vote.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_ext_shader_viewport_index_layer.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_ext_swapchain_colorspace.rb +24 -0
- data/lib/vulkan/generated/extensions/vk_ext_transform_feedback.rb +20 -0
- data/lib/vulkan/generated/extensions/vk_ext_validation_cache.rb +13 -0
- data/lib/vulkan/generated/extensions/vk_ext_validation_flags.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_ext_vertex_attribute_divisor.rb +13 -0
- data/lib/vulkan/generated/extensions/vk_fuchsia_imagepipe_surface.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_google_decorate_string.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_google_display_timing.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_google_extension_192.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_google_extension_193.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_google_extension_194.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_google_extension_195.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_google_extension_196.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_google_extension_216.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_google_extension_217.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_google_extension_49.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_google_extension_50.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_google_hlsl_functionality1.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_img_extension_107.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_img_extension_108.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_img_extension_109.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_img_extension_111.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_img_extension_69.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_img_filter_cubic.rb +12 -0
- data/lib/vulkan/generated/extensions/vk_img_format_pvrtc.rb +18 -0
- data/lib/vulkan/generated/extensions/vk_intel_extension_210.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_intel_extension_211.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_intel_extension_243.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_khr_16bit_storage.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_khr_8bit_storage.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_khr_android_surface.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_khr_bind_memory2.rb +13 -0
- data/lib/vulkan/generated/extensions/vk_khr_create_renderpass2.rb +17 -0
- data/lib/vulkan/generated/extensions/vk_khr_dedicated_allocation.rb +12 -0
- data/lib/vulkan/generated/extensions/vk_khr_descriptor_update_template.rb +15 -0
- data/lib/vulkan/generated/extensions/vk_khr_device_group.rb +33 -0
- data/lib/vulkan/generated/extensions/vk_khr_device_group_creation.rb +14 -0
- data/lib/vulkan/generated/extensions/vk_khr_display.rb +14 -0
- data/lib/vulkan/generated/extensions/vk_khr_display_swapchain.rb +12 -0
- data/lib/vulkan/generated/extensions/vk_khr_draw_indirect_count.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_khr_driver_properties.rb +13 -0
- data/lib/vulkan/generated/extensions/vk_khr_extension_117.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_khr_extension_119.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_khr_extension_200.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_khr_extension_201.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_khr_extension_208.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_khr_extension_209.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_khr_extension_221.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_khr_extension_237.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_khr_extension_238.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_khr_extension_239.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_khr_extension_240.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_khr_extension_83.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_khr_external_fence.rb +12 -0
- data/lib/vulkan/generated/extensions/vk_khr_external_fence_capabilities.rb +19 -0
- data/lib/vulkan/generated/extensions/vk_khr_external_fence_fd.rb +12 -0
- data/lib/vulkan/generated/extensions/vk_khr_external_fence_win32.rb +13 -0
- data/lib/vulkan/generated/extensions/vk_khr_external_memory.rb +15 -0
- data/lib/vulkan/generated/extensions/vk_khr_external_memory_capabilities.rb +26 -0
- data/lib/vulkan/generated/extensions/vk_khr_external_memory_fd.rb +13 -0
- data/lib/vulkan/generated/extensions/vk_khr_external_memory_win32.rb +14 -0
- data/lib/vulkan/generated/extensions/vk_khr_external_semaphore.rb +12 -0
- data/lib/vulkan/generated/extensions/vk_khr_external_semaphore_capabilities.rb +20 -0
- data/lib/vulkan/generated/extensions/vk_khr_external_semaphore_fd.rb +12 -0
- data/lib/vulkan/generated/extensions/vk_khr_external_semaphore_win32.rb +14 -0
- data/lib/vulkan/generated/extensions/vk_khr_get_display_properties2.rb +15 -0
- data/lib/vulkan/generated/extensions/vk_khr_get_memory_requirements2.rb +15 -0
- data/lib/vulkan/generated/extensions/vk_khr_get_physical_device_properties2.rb +19 -0
- data/lib/vulkan/generated/extensions/vk_khr_get_surface_capabilities2.rb +13 -0
- data/lib/vulkan/generated/extensions/vk_khr_image_format_list.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_khr_incremental_present.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_khr_maintenance1.rb +14 -0
- data/lib/vulkan/generated/extensions/vk_khr_maintenance2.rb +22 -0
- data/lib/vulkan/generated/extensions/vk_khr_maintenance3.rb +12 -0
- data/lib/vulkan/generated/extensions/vk_khr_mir_surface.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_khr_multiview.rb +14 -0
- data/lib/vulkan/generated/extensions/vk_khr_push_descriptor.rb +13 -0
- data/lib/vulkan/generated/extensions/vk_khr_relaxed_block_layout.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_khr_sampler_mirror_clamp_to_edge.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_khr_sampler_ycbcr_conversion.rb +73 -0
- data/lib/vulkan/generated/extensions/vk_khr_shader_atomic_int64.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_khr_shader_draw_parameters.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_khr_shared_presentable_image.rb +14 -0
- data/lib/vulkan/generated/extensions/vk_khr_storage_buffer_storage_class.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_khr_surface.rb +13 -0
- data/lib/vulkan/generated/extensions/vk_khr_swapchain.rb +24 -0
- data/lib/vulkan/generated/extensions/vk_khr_variable_pointers.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_khr_vulkan_memory_model.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_khr_wayland_surface.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_khr_win32_keyed_mutex.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_khr_win32_surface.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_khr_xcb_surface.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_khr_xlib_surface.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_mesa_extension_244.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_mvk_ios_surface.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_mvk_macos_surface.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_mvk_moltenvk.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_nn_vi_surface.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_nv_clip_space_w_scaling.rb +12 -0
- data/lib/vulkan/generated/extensions/vk_nv_compute_shader_derivatives.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_nv_corner_sampled_image.rb +12 -0
- data/lib/vulkan/generated/extensions/vk_nv_dedicated_allocation.rb +13 -0
- data/lib/vulkan/generated/extensions/vk_nv_device_diagnostic_checkpoints.rb +12 -0
- data/lib/vulkan/generated/extensions/vk_nv_extension_101.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_nv_extension_103.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_nv_extension_104.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_nv_extension_151.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_nv_extension_152.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_nv_extension_155.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_nv_extension_164.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_nv_extension_168.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_nv_extension_241.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_nv_extension_242.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_nv_extension_245.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_nv_extension_53.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_nv_external_memory.rb +12 -0
- data/lib/vulkan/generated/extensions/vk_nv_external_memory_capabilities.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_nv_external_memory_win32.rb +12 -0
- data/lib/vulkan/generated/extensions/vk_nv_fill_rectangle.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_nv_fragment_coverage_to_color.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_nv_fragment_shader_barycentric.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_nv_framebuffer_mixed_samples.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_nv_geometry_shader_passthrough.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_nv_glsl_shader.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_nv_mesh_shader.rb +16 -0
- data/lib/vulkan/generated/extensions/vk_nv_ray_tracing.rb +40 -0
- data/lib/vulkan/generated/extensions/vk_nv_representative_fragment_test.rb +12 -0
- data/lib/vulkan/generated/extensions/vk_nv_sample_mask_override_coverage.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_nv_scissor_exclusive.rb +13 -0
- data/lib/vulkan/generated/extensions/vk_nv_shader_image_footprint.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_nv_shader_subgroup_partitioned.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_nv_shading_rate_image.rb +20 -0
- data/lib/vulkan/generated/extensions/vk_nv_viewport_array2.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_nv_viewport_swizzle.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_nv_win32_keyed_mutex.rb +11 -0
- data/lib/vulkan/generated/extensions/vk_nvx_device_generated_commands.rb +21 -0
- data/lib/vulkan/generated/extensions/vk_nvx_extension_30.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_nvx_extension_31.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_nvx_extension_48.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_nvx_extension_52.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_nvx_multiview_per_view_attributes.rb +13 -0
- data/lib/vulkan/generated/extensions/vk_qcom_extension_171.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_qcom_extension_172.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_qcom_extension_173.rb +10 -0
- data/lib/vulkan/generated/extensions/vk_qcom_extension_174.rb +10 -0
- data/lib/vulkan/generated/extensions.rb +251 -0
- data/lib/vulkan/generated/structs.rb +2600 -0
- data/lib/vulkan/generated/types.rb +348 -0
- data/lib/vulkan/generated/vk.xml +10127 -0
- data/lib/vulkan/generated.rb +77 -0
- data/lib/vulkan/image.rb +263 -0
- data/lib/vulkan/image_memory.rb +13 -0
- data/lib/vulkan/image_view.rb +46 -0
- data/lib/vulkan/instance.rb +183 -0
- data/lib/vulkan/logical_device.rb +165 -0
- data/lib/vulkan/memory.rb +171 -0
- data/lib/vulkan/mock/swapchain_surface_info.rb +42 -0
- data/lib/vulkan/mock.rb +5 -0
- data/lib/vulkan/physical_device.rb +162 -0
- data/lib/vulkan/pipeline.rb +294 -0
- data/lib/vulkan/platform.rb +34 -0
- data/lib/vulkan/queue.rb +94 -0
- data/lib/vulkan/queue_family.rb +27 -0
- data/lib/vulkan/render_pass/subpass.rb +80 -0
- data/lib/vulkan/render_pass.rb +71 -0
- data/lib/vulkan/sampler.rb +48 -0
- data/lib/vulkan/semaphore.rb +16 -0
- data/lib/vulkan/shader_stage.rb +33 -0
- data/lib/vulkan/surface.rb +10 -0
- data/lib/vulkan/swapchain.rb +87 -0
- data/lib/vulkan/swapchain_builder.rb +111 -0
- data/lib/vulkan/swapchain_surface_info.rb +54 -0
- data/lib/vulkan/version.rb +3 -0
- data/lib/vulkan/window_surface.rb +13 -0
- data/lib/vulkan-ruby.rb +1 -0
- data/lib/vulkan.rb +91 -0
- data/tasks/examples.rake +29 -0
- data/tasks/fetch.rake +9 -0
- data/tasks/generate/commands.rake +51 -0
- data/tasks/generate/enums.rake +43 -0
- data/tasks/generate/extensions.rake +35 -0
- data/tasks/generate/structs.rake +117 -0
- data/tasks/generate/types.rake +91 -0
- data/tasks/generate.rake +2 -0
- data/tasks/helpers.rb +59 -0
- data/tasks/shaders.rake +8 -0
- data/vulkan-ruby.gemspec +45 -0
- metadata +546 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f4e91996880b37a0bcc68cb5de39c77548ac6ea67d58113ddfc65927f27057d2
|
4
|
+
data.tar.gz: 1c7388e401c3ab6333a16692bdef1ea93ed2eb4a679df76e5293689961be5296
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 347af9ac09f59bfa1e6abf7d234a7b4f944948278e437ea6de656da5438ae06b8a70f50bb05013decbae8798a4f5fd20f4d3aa844d27e8b970cebb347387afe6
|
7
|
+
data.tar.gz: ab22ca625acba220effad579ed4a103d43f5bd128ec636b251bd6f98979dc35901a60b777f5fff05415505d2307a2932ef3be5b4538b12d5ea3038b7789725a7
|
data/.gitignore
ADDED
data/.simplecov
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
vulkan-ruby (0.1.0)
|
5
|
+
sorted_set
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
cglm (0.1.1)
|
11
|
+
chunky_png (1.3.12)
|
12
|
+
docile (1.3.2)
|
13
|
+
mini_portile2 (2.4.0)
|
14
|
+
minitest (5.15.0)
|
15
|
+
nokogiri (1.10.10)
|
16
|
+
mini_portile2 (~> 2.4.0)
|
17
|
+
oily_png (1.2.1)
|
18
|
+
chunky_png (~> 1.3.7)
|
19
|
+
rake (13.0.1)
|
20
|
+
rbtree (0.4.5)
|
21
|
+
ruby-sdl2 (0.3.5)
|
22
|
+
sdl2_vulkan (0.1.0)
|
23
|
+
ruby-sdl2 (~> 0.3)
|
24
|
+
set (1.0.2)
|
25
|
+
simplecov (0.19.0)
|
26
|
+
docile (~> 1.1)
|
27
|
+
simplecov-html (~> 0.11)
|
28
|
+
simplecov-html (0.12.3)
|
29
|
+
sorted_set (1.0.3)
|
30
|
+
rbtree
|
31
|
+
set (~> 1.0)
|
32
|
+
tiny_obj (0.2.5)
|
33
|
+
|
34
|
+
PLATFORMS
|
35
|
+
ruby
|
36
|
+
|
37
|
+
DEPENDENCIES
|
38
|
+
bundler (~> 2.1)
|
39
|
+
cglm (~> 0.1)
|
40
|
+
chunky_png (~> 1.3)
|
41
|
+
minitest (~> 5.15)
|
42
|
+
nokogiri (~> 1.8)
|
43
|
+
oily_png (~> 1.2)
|
44
|
+
rake (~> 13.0)
|
45
|
+
sdl2_vulkan (~> 0.1)
|
46
|
+
simplecov (~> 0.16)
|
47
|
+
tiny_obj (~> 0.2)
|
48
|
+
vulkan-ruby!
|
49
|
+
|
50
|
+
BUNDLED WITH
|
51
|
+
2.2.0.rc.1
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 Colin MacKenzie IV
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
# `vulkan-ruby`
|
2
|
+
|
3
|
+
Exposes [Vulkan](https://www.khronos.org/vulkan/), the next-generation graphics library, to Ruby!
|
4
|
+
|
5
|
+
**NOTICE**: Vulkan is neither a small nor simple API to implement. While this library is rapidly reaching a point of usability, it's quite possible you will find that it is insufficient in some way. You are encouraged to open new issues for missing functionality that should otherwise be possible with Vulkan (bonus points for pull requests). The rule of thumb is that if it can be done with Vulkan in C, it should be equally doable using this library.
|
6
|
+
|
7
|
+
Higher level abstractions must be evaluated on a case by case basis and are not guaranteed to be added. For example, something explicitly specified in the Vulkan spec such as `vkCmdBindPipeline` or an official extension such as `vk_nv_external_memory` should definitely work in `vulkan-ruby` and support would absolutely be added for them if they don't already work. An implementation of cascading shadow maps, on the other hand, would be better implemented as a standalone ruby gem and at least at the time of this writing would likely be rejected unless a very good explanation could be given for having it.
|
8
|
+
|
9
|
+
## Screenshots
|
10
|
+
|
11
|
+
![VT10 - Multisampling - Viking Room](https://github.com/sinisterchipmunk/vulkan-ruby/blob/master/examples/screenshots/vt10-viking_room.png)
|
12
|
+
|
13
|
+
|
14
|
+
## Installation
|
15
|
+
|
16
|
+
Add this line to your application's Gemfile:
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
gem 'vulkan-ruby'
|
20
|
+
```
|
21
|
+
|
22
|
+
And then execute:
|
23
|
+
|
24
|
+
$ bundle
|
25
|
+
|
26
|
+
Or install it yourself as:
|
27
|
+
|
28
|
+
$ gem install vulkan-ruby
|
29
|
+
|
30
|
+
## Usage
|
31
|
+
|
32
|
+
This library is intended to be a rather shallow wrapper around the Vulkan APIs. It does some things that are nifty (like tying garbage collection of Vulkan resources to the Ruby garbage collector), but mostly the design goal is to give you an interface into Vulkan without getting in the way. As with Vulkan itself, some things are possible to do in a number of different ways, depending on your specific use case. Nothing that is possible in Vulkan should prove _impossible_ to do with `vulkan-ruby`.
|
33
|
+
|
34
|
+
You are encouraged to [check out the examples](https://github.com/sinisterchipmunk/vulkan-ruby/tree/master/examples/) for some specific usage examples.
|
35
|
+
|
36
|
+
### Extensions and Layers
|
37
|
+
|
38
|
+
If the environment variable `DEBUG` is set, the following extensions and layers will be added (only if supported by the underlying implementation):
|
39
|
+
|
40
|
+
* Instance Extensions
|
41
|
+
|
42
|
+
```
|
43
|
+
VK_EXT_debug_utils
|
44
|
+
```
|
45
|
+
|
46
|
+
* Layers
|
47
|
+
|
48
|
+
```
|
49
|
+
VK_LAYER_GOOGLE_threading
|
50
|
+
VK_LAYER_GOOGLE_unique_objects
|
51
|
+
VK_LAYER_LUNARG_api_dump
|
52
|
+
VK_LAYER_LUNARG_assistant_layer
|
53
|
+
VK_LAYER_LUNARG_core_validation
|
54
|
+
VK_LAYER_LUNARG_demo_layer
|
55
|
+
VK_LAYER_LUNARG_monitor
|
56
|
+
VK_LAYER_LUNARG_object_tracker
|
57
|
+
VK_LAYER_LUNARG_parameter_validation
|
58
|
+
VK_LAYER_LUNARG_standard_validation
|
59
|
+
VK_LAYER_LUNARG_starter_layer
|
60
|
+
```
|
61
|
+
|
62
|
+
In addition to the usual mechanisms for explicit and implicit Vulkan extensions, you can also provide the following environment variables to list extensions/layers to be activated. These get injected into the lists provided by the application to Vulkan, rather than interpreted by Vulkan itself. Multiple entries can be separated by spaces (` `) or by colons (`:`).
|
63
|
+
|
64
|
+
LAYERS
|
65
|
+
INSTANCE_EXTENSIONS
|
66
|
+
DEVICE_EXTENSIONS
|
67
|
+
|
68
|
+
|
69
|
+
## Development
|
70
|
+
|
71
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
72
|
+
|
73
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
74
|
+
|
75
|
+
When running `rake`, you can pass `PATH_TO_VULKAN` to specify the Vulkan library to load during testing. Otherwise `NULL` will be passed into SDL2, indicating that it should search for the library.
|
76
|
+
|
77
|
+
Everything in `lib/vulkan/generated/` was automatically generated by processing the Vulkan `vk.xml` spec file. To (re)generate these files, first fetch `vk.xml` with `rake fetch`, and then generate the files with `rake generate`, or do it all in one command like so:
|
78
|
+
|
79
|
+
```bash
|
80
|
+
$ bundle exec rake fetch generate
|
81
|
+
```
|
82
|
+
|
83
|
+
After (re)generating the files, run `rake` with no arguments, which will invoke both the unit tests and the example files, to (a) check that nothing was broken by the new files, and (b) check that the generated files are correct.
|
84
|
+
|
85
|
+
If you discover that the generated files are not correct (for instance, lacking some structs or enums or some generated results just have wrong values), write a unit test to assert the expected result before modifying the generation Rake tasks in `tasks/**/*.rake`. Or at least write the test once you get the result you're looking for. The point is, since these rake tasks are both complicated and mission-critical, unit tests need to be written to be sure that there are no regressions as they evolve over time.
|
86
|
+
|
87
|
+
## Contributing
|
88
|
+
|
89
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/sinisterchipmunk/vulkan-ruby.
|
90
|
+
|
91
|
+
## License
|
92
|
+
|
93
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require "rake/testtask"
|
3
|
+
|
4
|
+
Rake::TestTask.new(:test) do |t|
|
5
|
+
t.libs << "test"
|
6
|
+
t.libs << "lib"
|
7
|
+
t.test_files = FileList["test/**/*_test.rb"]
|
8
|
+
end
|
9
|
+
|
10
|
+
Dir[File.expand_path('tasks/**/*.{rake,rb}', __dir__)].each do |file|
|
11
|
+
load File.expand_path(file, __dir__)
|
12
|
+
end
|
13
|
+
|
14
|
+
task :default => :test
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "vulkan/ruby"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/bin/setup.bat
ADDED