vulkan-ruby 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (350) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +10 -0
  3. data/.simplecov +6 -0
  4. data/.travis.yml +5 -0
  5. data/Gemfile +6 -0
  6. data/Gemfile.lock +51 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +93 -0
  9. data/Rakefile +14 -0
  10. data/bin/console +14 -0
  11. data/bin/setup +9 -0
  12. data/bin/setup.bat +2 -0
  13. data/examples/models/viking_room.obj +16053 -0
  14. data/examples/screenshots/vt10-viking_room.png +0 -0
  15. data/examples/shaders/depth_buffering.vert +25 -0
  16. data/examples/shaders/depth_buffering.vert.spv +0 -0
  17. data/examples/shaders/model_loading.frag +13 -0
  18. data/examples/shaders/model_loading.frag.spv +0 -0
  19. data/examples/shaders/model_loading.vert +25 -0
  20. data/examples/shaders/model_loading.vert.spv +0 -0
  21. data/examples/shaders/textures.frag +13 -0
  22. data/examples/shaders/textures.frag.spv +0 -0
  23. data/examples/shaders/textures.vert +25 -0
  24. data/examples/shaders/textures.vert.spv +0 -0
  25. data/examples/shaders/triangle.frag +10 -0
  26. data/examples/shaders/triangle.frag.spv +0 -0
  27. data/examples/shaders/triangle.vert +25 -0
  28. data/examples/shaders/triangle.vert.spv +0 -0
  29. data/examples/shaders/uniform_buffer.vert +22 -0
  30. data/examples/shaders/uniform_buffer.vert.spv +0 -0
  31. data/examples/shaders/vertex_buffer.vert +16 -0
  32. data/examples/shaders/vertex_buffer.vert.spv +0 -0
  33. data/examples/textures/texture.png +0 -0
  34. data/examples/textures/viking_room.png +0 -0
  35. data/examples/vt00_dump_info.rb +24 -0
  36. data/examples/vt01_triangle.rb +140 -0
  37. data/examples/vt02_vertex_buffer_triangle_host_visible.rb +164 -0
  38. data/examples/vt03_vertex_buffer_triangle_device_local.rb +174 -0
  39. data/examples/vt04_index_buffer_device_local.rb +193 -0
  40. data/examples/vt05_uniform_buffers.rb +237 -0
  41. data/examples/vt06_textures.rb +275 -0
  42. data/examples/vt07_depth_buffering.rb +315 -0
  43. data/examples/vt08_model_loading.rb +321 -0
  44. data/examples/vt09_mipmaps.rb +329 -0
  45. data/examples/vt10_multisampling.rb +344 -0
  46. data/lib/fiddle_ext.rb +15 -0
  47. data/lib/vulkan/buffer.rb +66 -0
  48. data/lib/vulkan/buffer_memory.rb +13 -0
  49. data/lib/vulkan/checks.rb +12 -0
  50. data/lib/vulkan/command_buffer.rb +380 -0
  51. data/lib/vulkan/command_pool.rb +28 -0
  52. data/lib/vulkan/conversions.rb +511 -0
  53. data/lib/vulkan/descriptor_pool.rb +45 -0
  54. data/lib/vulkan/descriptor_set.rb +86 -0
  55. data/lib/vulkan/descriptor_set_layout.rb +39 -0
  56. data/lib/vulkan/dispatch_table.rb +78 -0
  57. data/lib/vulkan/error.rb +43 -0
  58. data/lib/vulkan/fence.rb +32 -0
  59. data/lib/vulkan/finalizer.rb +43 -0
  60. data/lib/vulkan/framebuffer.rb +37 -0
  61. data/lib/vulkan/generated/commands.rb +298 -0
  62. data/lib/vulkan/generated/enums.rb +1049 -0
  63. data/lib/vulkan/generated/extensions/reserved_do_not_use_146.rb +8 -0
  64. data/lib/vulkan/generated/extensions/reserved_do_not_use_94.rb +8 -0
  65. data/lib/vulkan/generated/extensions/vk_amd_buffer_marker.rb +10 -0
  66. data/lib/vulkan/generated/extensions/vk_amd_draw_indirect_count.rb +10 -0
  67. data/lib/vulkan/generated/extensions/vk_amd_extension_134.rb +10 -0
  68. data/lib/vulkan/generated/extensions/vk_amd_extension_135.rb +10 -0
  69. data/lib/vulkan/generated/extensions/vk_amd_extension_136.rb +10 -0
  70. data/lib/vulkan/generated/extensions/vk_amd_extension_140.rb +10 -0
  71. data/lib/vulkan/generated/extensions/vk_amd_extension_142.rb +10 -0
  72. data/lib/vulkan/generated/extensions/vk_amd_extension_143.rb +10 -0
  73. data/lib/vulkan/generated/extensions/vk_amd_extension_17.rb +10 -0
  74. data/lib/vulkan/generated/extensions/vk_amd_extension_18.rb +10 -0
  75. data/lib/vulkan/generated/extensions/vk_amd_extension_182.rb +10 -0
  76. data/lib/vulkan/generated/extensions/vk_amd_extension_183.rb +10 -0
  77. data/lib/vulkan/generated/extensions/vk_amd_extension_184.rb +10 -0
  78. data/lib/vulkan/generated/extensions/vk_amd_extension_187.rb +10 -0
  79. data/lib/vulkan/generated/extensions/vk_amd_extension_188.rb +10 -0
  80. data/lib/vulkan/generated/extensions/vk_amd_extension_189.rb +10 -0
  81. data/lib/vulkan/generated/extensions/vk_amd_extension_20.rb +10 -0
  82. data/lib/vulkan/generated/extensions/vk_amd_extension_214.rb +10 -0
  83. data/lib/vulkan/generated/extensions/vk_amd_extension_226.rb +10 -0
  84. data/lib/vulkan/generated/extensions/vk_amd_extension_227.rb +10 -0
  85. data/lib/vulkan/generated/extensions/vk_amd_extension_228.rb +10 -0
  86. data/lib/vulkan/generated/extensions/vk_amd_extension_229.rb +10 -0
  87. data/lib/vulkan/generated/extensions/vk_amd_extension_230.rb +10 -0
  88. data/lib/vulkan/generated/extensions/vk_amd_extension_231.rb +10 -0
  89. data/lib/vulkan/generated/extensions/vk_amd_extension_232.rb +10 -0
  90. data/lib/vulkan/generated/extensions/vk_amd_extension_233.rb +10 -0
  91. data/lib/vulkan/generated/extensions/vk_amd_extension_234.rb +10 -0
  92. data/lib/vulkan/generated/extensions/vk_amd_extension_235.rb +10 -0
  93. data/lib/vulkan/generated/extensions/vk_amd_extension_236.rb +10 -0
  94. data/lib/vulkan/generated/extensions/vk_amd_extension_24.rb +10 -0
  95. data/lib/vulkan/generated/extensions/vk_amd_extension_25.rb +10 -0
  96. data/lib/vulkan/generated/extensions/vk_amd_extension_32.rb +10 -0
  97. data/lib/vulkan/generated/extensions/vk_amd_extension_33.rb +10 -0
  98. data/lib/vulkan/generated/extensions/vk_amd_extension_35.rb +10 -0
  99. data/lib/vulkan/generated/extensions/vk_amd_extension_39.rb +10 -0
  100. data/lib/vulkan/generated/extensions/vk_amd_extension_40.rb +10 -0
  101. data/lib/vulkan/generated/extensions/vk_amd_extension_41.rb +10 -0
  102. data/lib/vulkan/generated/extensions/vk_amd_extension_44.rb +10 -0
  103. data/lib/vulkan/generated/extensions/vk_amd_extension_45.rb +10 -0
  104. data/lib/vulkan/generated/extensions/vk_amd_extension_46.rb +10 -0
  105. data/lib/vulkan/generated/extensions/vk_amd_gcn_shader.rb +10 -0
  106. data/lib/vulkan/generated/extensions/vk_amd_gpu_shader_half_float.rb +10 -0
  107. data/lib/vulkan/generated/extensions/vk_amd_gpu_shader_int16.rb +10 -0
  108. data/lib/vulkan/generated/extensions/vk_amd_memory_overallocation_behavior.rb +11 -0
  109. data/lib/vulkan/generated/extensions/vk_amd_mixed_attachment_samples.rb +10 -0
  110. data/lib/vulkan/generated/extensions/vk_amd_negative_viewport_height.rb +10 -0
  111. data/lib/vulkan/generated/extensions/vk_amd_rasterization_order.rb +11 -0
  112. data/lib/vulkan/generated/extensions/vk_amd_shader_ballot.rb +10 -0
  113. data/lib/vulkan/generated/extensions/vk_amd_shader_core_properties.rb +11 -0
  114. data/lib/vulkan/generated/extensions/vk_amd_shader_explicit_vertex_parameter.rb +10 -0
  115. data/lib/vulkan/generated/extensions/vk_amd_shader_fragment_mask.rb +10 -0
  116. data/lib/vulkan/generated/extensions/vk_amd_shader_image_load_store_lod.rb +10 -0
  117. data/lib/vulkan/generated/extensions/vk_amd_shader_info.rb +10 -0
  118. data/lib/vulkan/generated/extensions/vk_amd_shader_trinary_minmax.rb +10 -0
  119. data/lib/vulkan/generated/extensions/vk_amd_texture_gather_bias_lod.rb +11 -0
  120. data/lib/vulkan/generated/extensions/vk_android_external_memory_android_hardware_buffer.rb +17 -0
  121. data/lib/vulkan/generated/extensions/vk_android_native_buffer.rb +12 -0
  122. data/lib/vulkan/generated/extensions/vk_arm_extension_01.rb +10 -0
  123. data/lib/vulkan/generated/extensions/vk_arm_extension_198.rb +10 -0
  124. data/lib/vulkan/generated/extensions/vk_ext_acquire_xlib_display.rb +10 -0
  125. data/lib/vulkan/generated/extensions/vk_ext_astc_decode_mode.rb +12 -0
  126. data/lib/vulkan/generated/extensions/vk_ext_blend_operation_advanced.rb +60 -0
  127. data/lib/vulkan/generated/extensions/vk_ext_calibrated_timestamps.rb +11 -0
  128. data/lib/vulkan/generated/extensions/vk_ext_conditional_rendering.rb +16 -0
  129. data/lib/vulkan/generated/extensions/vk_ext_conservative_rasterization.rb +12 -0
  130. data/lib/vulkan/generated/extensions/vk_ext_debug_marker.rb +13 -0
  131. data/lib/vulkan/generated/extensions/vk_ext_debug_report.rb +16 -0
  132. data/lib/vulkan/generated/extensions/vk_ext_debug_utils.rb +16 -0
  133. data/lib/vulkan/generated/extensions/vk_ext_depth_range_unrestricted.rb +10 -0
  134. data/lib/vulkan/generated/extensions/vk_ext_descriptor_indexing.rb +18 -0
  135. data/lib/vulkan/generated/extensions/vk_ext_direct_mode_display.rb +10 -0
  136. data/lib/vulkan/generated/extensions/vk_ext_discard_rectangles.rb +13 -0
  137. data/lib/vulkan/generated/extensions/vk_ext_display_control.rb +14 -0
  138. data/lib/vulkan/generated/extensions/vk_ext_display_surface_counter.rb +12 -0
  139. data/lib/vulkan/generated/extensions/vk_ext_extension_160.rb +10 -0
  140. data/lib/vulkan/generated/extensions/vk_ext_extension_176.rb +10 -0
  141. data/lib/vulkan/generated/extensions/vk_ext_extension_177.rb +10 -0
  142. data/lib/vulkan/generated/extensions/vk_ext_extension_219.rb +15 -0
  143. data/lib/vulkan/generated/extensions/vk_ext_extension_220.rb +10 -0
  144. data/lib/vulkan/generated/extensions/vk_ext_extension_222.rb +10 -0
  145. data/lib/vulkan/generated/extensions/vk_ext_extension_223.rb +10 -0
  146. data/lib/vulkan/generated/extensions/vk_ext_extension_28.rb +10 -0
  147. data/lib/vulkan/generated/extensions/vk_ext_external_memory_dma_buf.rb +11 -0
  148. data/lib/vulkan/generated/extensions/vk_ext_external_memory_host.rb +15 -0
  149. data/lib/vulkan/generated/extensions/vk_ext_global_priority.rb +12 -0
  150. data/lib/vulkan/generated/extensions/vk_ext_hdr_metadata.rb +11 -0
  151. data/lib/vulkan/generated/extensions/vk_ext_image_drm_format_modifier.rb +24 -0
  152. data/lib/vulkan/generated/extensions/vk_ext_inline_uniform_block.rb +15 -0
  153. data/lib/vulkan/generated/extensions/vk_ext_macos_ios_window.rb +10 -0
  154. data/lib/vulkan/generated/extensions/vk_ext_pci_bus_info.rb +11 -0
  155. data/lib/vulkan/generated/extensions/vk_ext_post_depth_coverage.rb +10 -0
  156. data/lib/vulkan/generated/extensions/vk_ext_queue_family_foreign.rb +11 -0
  157. data/lib/vulkan/generated/extensions/vk_ext_sample_locations.rb +17 -0
  158. data/lib/vulkan/generated/extensions/vk_ext_sampler_filter_minmax.rb +13 -0
  159. data/lib/vulkan/generated/extensions/vk_ext_shader_stencil_export.rb +10 -0
  160. data/lib/vulkan/generated/extensions/vk_ext_shader_subgroup_ballot.rb +10 -0
  161. data/lib/vulkan/generated/extensions/vk_ext_shader_subgroup_vote.rb +10 -0
  162. data/lib/vulkan/generated/extensions/vk_ext_shader_viewport_index_layer.rb +10 -0
  163. data/lib/vulkan/generated/extensions/vk_ext_swapchain_colorspace.rb +24 -0
  164. data/lib/vulkan/generated/extensions/vk_ext_transform_feedback.rb +20 -0
  165. data/lib/vulkan/generated/extensions/vk_ext_validation_cache.rb +13 -0
  166. data/lib/vulkan/generated/extensions/vk_ext_validation_flags.rb +11 -0
  167. data/lib/vulkan/generated/extensions/vk_ext_vertex_attribute_divisor.rb +13 -0
  168. data/lib/vulkan/generated/extensions/vk_fuchsia_imagepipe_surface.rb +11 -0
  169. data/lib/vulkan/generated/extensions/vk_google_decorate_string.rb +10 -0
  170. data/lib/vulkan/generated/extensions/vk_google_display_timing.rb +11 -0
  171. data/lib/vulkan/generated/extensions/vk_google_extension_192.rb +10 -0
  172. data/lib/vulkan/generated/extensions/vk_google_extension_193.rb +10 -0
  173. data/lib/vulkan/generated/extensions/vk_google_extension_194.rb +10 -0
  174. data/lib/vulkan/generated/extensions/vk_google_extension_195.rb +10 -0
  175. data/lib/vulkan/generated/extensions/vk_google_extension_196.rb +10 -0
  176. data/lib/vulkan/generated/extensions/vk_google_extension_216.rb +10 -0
  177. data/lib/vulkan/generated/extensions/vk_google_extension_217.rb +10 -0
  178. data/lib/vulkan/generated/extensions/vk_google_extension_49.rb +10 -0
  179. data/lib/vulkan/generated/extensions/vk_google_extension_50.rb +10 -0
  180. data/lib/vulkan/generated/extensions/vk_google_hlsl_functionality1.rb +10 -0
  181. data/lib/vulkan/generated/extensions/vk_img_extension_107.rb +10 -0
  182. data/lib/vulkan/generated/extensions/vk_img_extension_108.rb +10 -0
  183. data/lib/vulkan/generated/extensions/vk_img_extension_109.rb +10 -0
  184. data/lib/vulkan/generated/extensions/vk_img_extension_111.rb +10 -0
  185. data/lib/vulkan/generated/extensions/vk_img_extension_69.rb +10 -0
  186. data/lib/vulkan/generated/extensions/vk_img_filter_cubic.rb +12 -0
  187. data/lib/vulkan/generated/extensions/vk_img_format_pvrtc.rb +18 -0
  188. data/lib/vulkan/generated/extensions/vk_intel_extension_210.rb +10 -0
  189. data/lib/vulkan/generated/extensions/vk_intel_extension_211.rb +10 -0
  190. data/lib/vulkan/generated/extensions/vk_intel_extension_243.rb +10 -0
  191. data/lib/vulkan/generated/extensions/vk_khr_16bit_storage.rb +11 -0
  192. data/lib/vulkan/generated/extensions/vk_khr_8bit_storage.rb +11 -0
  193. data/lib/vulkan/generated/extensions/vk_khr_android_surface.rb +11 -0
  194. data/lib/vulkan/generated/extensions/vk_khr_bind_memory2.rb +13 -0
  195. data/lib/vulkan/generated/extensions/vk_khr_create_renderpass2.rb +17 -0
  196. data/lib/vulkan/generated/extensions/vk_khr_dedicated_allocation.rb +12 -0
  197. data/lib/vulkan/generated/extensions/vk_khr_descriptor_update_template.rb +15 -0
  198. data/lib/vulkan/generated/extensions/vk_khr_device_group.rb +33 -0
  199. data/lib/vulkan/generated/extensions/vk_khr_device_group_creation.rb +14 -0
  200. data/lib/vulkan/generated/extensions/vk_khr_display.rb +14 -0
  201. data/lib/vulkan/generated/extensions/vk_khr_display_swapchain.rb +12 -0
  202. data/lib/vulkan/generated/extensions/vk_khr_draw_indirect_count.rb +10 -0
  203. data/lib/vulkan/generated/extensions/vk_khr_driver_properties.rb +13 -0
  204. data/lib/vulkan/generated/extensions/vk_khr_extension_117.rb +10 -0
  205. data/lib/vulkan/generated/extensions/vk_khr_extension_119.rb +10 -0
  206. data/lib/vulkan/generated/extensions/vk_khr_extension_200.rb +10 -0
  207. data/lib/vulkan/generated/extensions/vk_khr_extension_201.rb +10 -0
  208. data/lib/vulkan/generated/extensions/vk_khr_extension_208.rb +10 -0
  209. data/lib/vulkan/generated/extensions/vk_khr_extension_209.rb +10 -0
  210. data/lib/vulkan/generated/extensions/vk_khr_extension_221.rb +11 -0
  211. data/lib/vulkan/generated/extensions/vk_khr_extension_237.rb +10 -0
  212. data/lib/vulkan/generated/extensions/vk_khr_extension_238.rb +10 -0
  213. data/lib/vulkan/generated/extensions/vk_khr_extension_239.rb +10 -0
  214. data/lib/vulkan/generated/extensions/vk_khr_extension_240.rb +10 -0
  215. data/lib/vulkan/generated/extensions/vk_khr_extension_83.rb +10 -0
  216. data/lib/vulkan/generated/extensions/vk_khr_external_fence.rb +12 -0
  217. data/lib/vulkan/generated/extensions/vk_khr_external_fence_capabilities.rb +19 -0
  218. data/lib/vulkan/generated/extensions/vk_khr_external_fence_fd.rb +12 -0
  219. data/lib/vulkan/generated/extensions/vk_khr_external_fence_win32.rb +13 -0
  220. data/lib/vulkan/generated/extensions/vk_khr_external_memory.rb +15 -0
  221. data/lib/vulkan/generated/extensions/vk_khr_external_memory_capabilities.rb +26 -0
  222. data/lib/vulkan/generated/extensions/vk_khr_external_memory_fd.rb +13 -0
  223. data/lib/vulkan/generated/extensions/vk_khr_external_memory_win32.rb +14 -0
  224. data/lib/vulkan/generated/extensions/vk_khr_external_semaphore.rb +12 -0
  225. data/lib/vulkan/generated/extensions/vk_khr_external_semaphore_capabilities.rb +20 -0
  226. data/lib/vulkan/generated/extensions/vk_khr_external_semaphore_fd.rb +12 -0
  227. data/lib/vulkan/generated/extensions/vk_khr_external_semaphore_win32.rb +14 -0
  228. data/lib/vulkan/generated/extensions/vk_khr_get_display_properties2.rb +15 -0
  229. data/lib/vulkan/generated/extensions/vk_khr_get_memory_requirements2.rb +15 -0
  230. data/lib/vulkan/generated/extensions/vk_khr_get_physical_device_properties2.rb +19 -0
  231. data/lib/vulkan/generated/extensions/vk_khr_get_surface_capabilities2.rb +13 -0
  232. data/lib/vulkan/generated/extensions/vk_khr_image_format_list.rb +11 -0
  233. data/lib/vulkan/generated/extensions/vk_khr_incremental_present.rb +11 -0
  234. data/lib/vulkan/generated/extensions/vk_khr_maintenance1.rb +14 -0
  235. data/lib/vulkan/generated/extensions/vk_khr_maintenance2.rb +22 -0
  236. data/lib/vulkan/generated/extensions/vk_khr_maintenance3.rb +12 -0
  237. data/lib/vulkan/generated/extensions/vk_khr_mir_surface.rb +10 -0
  238. data/lib/vulkan/generated/extensions/vk_khr_multiview.rb +14 -0
  239. data/lib/vulkan/generated/extensions/vk_khr_push_descriptor.rb +13 -0
  240. data/lib/vulkan/generated/extensions/vk_khr_relaxed_block_layout.rb +10 -0
  241. data/lib/vulkan/generated/extensions/vk_khr_sampler_mirror_clamp_to_edge.rb +11 -0
  242. data/lib/vulkan/generated/extensions/vk_khr_sampler_ycbcr_conversion.rb +73 -0
  243. data/lib/vulkan/generated/extensions/vk_khr_shader_atomic_int64.rb +11 -0
  244. data/lib/vulkan/generated/extensions/vk_khr_shader_draw_parameters.rb +10 -0
  245. data/lib/vulkan/generated/extensions/vk_khr_shared_presentable_image.rb +14 -0
  246. data/lib/vulkan/generated/extensions/vk_khr_storage_buffer_storage_class.rb +10 -0
  247. data/lib/vulkan/generated/extensions/vk_khr_surface.rb +13 -0
  248. data/lib/vulkan/generated/extensions/vk_khr_swapchain.rb +24 -0
  249. data/lib/vulkan/generated/extensions/vk_khr_variable_pointers.rb +11 -0
  250. data/lib/vulkan/generated/extensions/vk_khr_vulkan_memory_model.rb +11 -0
  251. data/lib/vulkan/generated/extensions/vk_khr_wayland_surface.rb +11 -0
  252. data/lib/vulkan/generated/extensions/vk_khr_win32_keyed_mutex.rb +11 -0
  253. data/lib/vulkan/generated/extensions/vk_khr_win32_surface.rb +11 -0
  254. data/lib/vulkan/generated/extensions/vk_khr_xcb_surface.rb +11 -0
  255. data/lib/vulkan/generated/extensions/vk_khr_xlib_surface.rb +11 -0
  256. data/lib/vulkan/generated/extensions/vk_mesa_extension_244.rb +10 -0
  257. data/lib/vulkan/generated/extensions/vk_mvk_ios_surface.rb +11 -0
  258. data/lib/vulkan/generated/extensions/vk_mvk_macos_surface.rb +11 -0
  259. data/lib/vulkan/generated/extensions/vk_mvk_moltenvk.rb +10 -0
  260. data/lib/vulkan/generated/extensions/vk_nn_vi_surface.rb +11 -0
  261. data/lib/vulkan/generated/extensions/vk_nv_clip_space_w_scaling.rb +12 -0
  262. data/lib/vulkan/generated/extensions/vk_nv_compute_shader_derivatives.rb +11 -0
  263. data/lib/vulkan/generated/extensions/vk_nv_corner_sampled_image.rb +12 -0
  264. data/lib/vulkan/generated/extensions/vk_nv_dedicated_allocation.rb +13 -0
  265. data/lib/vulkan/generated/extensions/vk_nv_device_diagnostic_checkpoints.rb +12 -0
  266. data/lib/vulkan/generated/extensions/vk_nv_extension_101.rb +10 -0
  267. data/lib/vulkan/generated/extensions/vk_nv_extension_103.rb +10 -0
  268. data/lib/vulkan/generated/extensions/vk_nv_extension_104.rb +10 -0
  269. data/lib/vulkan/generated/extensions/vk_nv_extension_151.rb +10 -0
  270. data/lib/vulkan/generated/extensions/vk_nv_extension_152.rb +10 -0
  271. data/lib/vulkan/generated/extensions/vk_nv_extension_155.rb +10 -0
  272. data/lib/vulkan/generated/extensions/vk_nv_extension_164.rb +10 -0
  273. data/lib/vulkan/generated/extensions/vk_nv_extension_168.rb +10 -0
  274. data/lib/vulkan/generated/extensions/vk_nv_extension_241.rb +10 -0
  275. data/lib/vulkan/generated/extensions/vk_nv_extension_242.rb +10 -0
  276. data/lib/vulkan/generated/extensions/vk_nv_extension_245.rb +10 -0
  277. data/lib/vulkan/generated/extensions/vk_nv_extension_53.rb +10 -0
  278. data/lib/vulkan/generated/extensions/vk_nv_external_memory.rb +12 -0
  279. data/lib/vulkan/generated/extensions/vk_nv_external_memory_capabilities.rb +10 -0
  280. data/lib/vulkan/generated/extensions/vk_nv_external_memory_win32.rb +12 -0
  281. data/lib/vulkan/generated/extensions/vk_nv_fill_rectangle.rb +11 -0
  282. data/lib/vulkan/generated/extensions/vk_nv_fragment_coverage_to_color.rb +11 -0
  283. data/lib/vulkan/generated/extensions/vk_nv_fragment_shader_barycentric.rb +11 -0
  284. data/lib/vulkan/generated/extensions/vk_nv_framebuffer_mixed_samples.rb +11 -0
  285. data/lib/vulkan/generated/extensions/vk_nv_geometry_shader_passthrough.rb +10 -0
  286. data/lib/vulkan/generated/extensions/vk_nv_glsl_shader.rb +11 -0
  287. data/lib/vulkan/generated/extensions/vk_nv_mesh_shader.rb +16 -0
  288. data/lib/vulkan/generated/extensions/vk_nv_ray_tracing.rb +40 -0
  289. data/lib/vulkan/generated/extensions/vk_nv_representative_fragment_test.rb +12 -0
  290. data/lib/vulkan/generated/extensions/vk_nv_sample_mask_override_coverage.rb +10 -0
  291. data/lib/vulkan/generated/extensions/vk_nv_scissor_exclusive.rb +13 -0
  292. data/lib/vulkan/generated/extensions/vk_nv_shader_image_footprint.rb +11 -0
  293. data/lib/vulkan/generated/extensions/vk_nv_shader_subgroup_partitioned.rb +11 -0
  294. data/lib/vulkan/generated/extensions/vk_nv_shading_rate_image.rb +20 -0
  295. data/lib/vulkan/generated/extensions/vk_nv_viewport_array2.rb +10 -0
  296. data/lib/vulkan/generated/extensions/vk_nv_viewport_swizzle.rb +11 -0
  297. data/lib/vulkan/generated/extensions/vk_nv_win32_keyed_mutex.rb +11 -0
  298. data/lib/vulkan/generated/extensions/vk_nvx_device_generated_commands.rb +21 -0
  299. data/lib/vulkan/generated/extensions/vk_nvx_extension_30.rb +10 -0
  300. data/lib/vulkan/generated/extensions/vk_nvx_extension_31.rb +10 -0
  301. data/lib/vulkan/generated/extensions/vk_nvx_extension_48.rb +10 -0
  302. data/lib/vulkan/generated/extensions/vk_nvx_extension_52.rb +10 -0
  303. data/lib/vulkan/generated/extensions/vk_nvx_multiview_per_view_attributes.rb +13 -0
  304. data/lib/vulkan/generated/extensions/vk_qcom_extension_171.rb +10 -0
  305. data/lib/vulkan/generated/extensions/vk_qcom_extension_172.rb +10 -0
  306. data/lib/vulkan/generated/extensions/vk_qcom_extension_173.rb +10 -0
  307. data/lib/vulkan/generated/extensions/vk_qcom_extension_174.rb +10 -0
  308. data/lib/vulkan/generated/extensions.rb +251 -0
  309. data/lib/vulkan/generated/structs.rb +2600 -0
  310. data/lib/vulkan/generated/types.rb +348 -0
  311. data/lib/vulkan/generated/vk.xml +10127 -0
  312. data/lib/vulkan/generated.rb +77 -0
  313. data/lib/vulkan/image.rb +263 -0
  314. data/lib/vulkan/image_memory.rb +13 -0
  315. data/lib/vulkan/image_view.rb +46 -0
  316. data/lib/vulkan/instance.rb +183 -0
  317. data/lib/vulkan/logical_device.rb +165 -0
  318. data/lib/vulkan/memory.rb +171 -0
  319. data/lib/vulkan/mock/swapchain_surface_info.rb +42 -0
  320. data/lib/vulkan/mock.rb +5 -0
  321. data/lib/vulkan/physical_device.rb +162 -0
  322. data/lib/vulkan/pipeline.rb +294 -0
  323. data/lib/vulkan/platform.rb +34 -0
  324. data/lib/vulkan/queue.rb +94 -0
  325. data/lib/vulkan/queue_family.rb +27 -0
  326. data/lib/vulkan/render_pass/subpass.rb +80 -0
  327. data/lib/vulkan/render_pass.rb +71 -0
  328. data/lib/vulkan/sampler.rb +48 -0
  329. data/lib/vulkan/semaphore.rb +16 -0
  330. data/lib/vulkan/shader_stage.rb +33 -0
  331. data/lib/vulkan/surface.rb +10 -0
  332. data/lib/vulkan/swapchain.rb +87 -0
  333. data/lib/vulkan/swapchain_builder.rb +111 -0
  334. data/lib/vulkan/swapchain_surface_info.rb +54 -0
  335. data/lib/vulkan/version.rb +3 -0
  336. data/lib/vulkan/window_surface.rb +13 -0
  337. data/lib/vulkan-ruby.rb +1 -0
  338. data/lib/vulkan.rb +91 -0
  339. data/tasks/examples.rake +29 -0
  340. data/tasks/fetch.rake +9 -0
  341. data/tasks/generate/commands.rake +51 -0
  342. data/tasks/generate/enums.rake +43 -0
  343. data/tasks/generate/extensions.rake +35 -0
  344. data/tasks/generate/structs.rake +117 -0
  345. data/tasks/generate/types.rake +91 -0
  346. data/tasks/generate.rake +2 -0
  347. data/tasks/helpers.rb +59 -0
  348. data/tasks/shaders.rake +8 -0
  349. data/vulkan-ruby.gemspec +45 -0
  350. 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
@@ -0,0 +1,10 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+ /ports
10
+ .DS_Store
data/.simplecov ADDED
@@ -0,0 +1,6 @@
1
+ SimpleCov.add_filter 'vulkan/generated/'
2
+
3
+ if ENV['COVERAGE']
4
+ SimpleCov.command_name ENV['COVERAGE']
5
+ SimpleCov.start
6
+ end
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 3.1.1
5
+ before_install: gem install bundler -v 2.2.0.rc.1
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in vulkan-ruby.gemspec
6
+ gemspec
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
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
9
+ bundle exec ruby bin/build-fiddle.rb
data/bin/setup.bat ADDED
@@ -0,0 +1,2 @@
1
+ call bundle install
2
+ call bundle exec ruby bin\build-fiddle.rb