{"id":13676875,"url":"https://github.com/gfx-rs/portability","last_synced_at":"2025-04-05T15:07:16.636Z","repository":{"id":24884340,"uuid":"102678270","full_name":"gfx-rs/portability","owner":"gfx-rs","description":"Vulkan Portability Implementation","archived":false,"fork":false,"pushed_at":"2023-06-06T02:15:26.000Z","size":2682,"stargazers_count":385,"open_issues_count":39,"forks_count":25,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-04-03T07:41:53.353Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gfx-rs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-09-07T01:53:52.000Z","updated_at":"2025-03-17T10:00:05.000Z","dependencies_parsed_at":"2023-02-12T06:31:58.330Z","dependency_job_id":null,"html_url":"https://github.com/gfx-rs/portability","commit_stats":{"total_commits":291,"total_committers":19,"mean_commits":15.31578947368421,"dds":0.6185567010309279,"last_synced_commit":"6d55421ea798f23ae84ceb98e45e3f0b58d79900"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gfx-rs%2Fportability","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gfx-rs%2Fportability/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gfx-rs%2Fportability/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gfx-rs%2Fportability/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gfx-rs","download_url":"https://codeload.github.com/gfx-rs/portability/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247123095,"owners_count":20887261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T13:00:34.177Z","updated_at":"2025-04-05T15:07:16.596Z","avatar_url":"https://github.com/gfx-rs.png","language":"C","funding_links":[],"categories":["C","Libraries"],"sub_categories":[],"readme":"## gfx-portability\n[![Build Status](https://github.com/gfx-rs/portability/workflows/Check/badge.svg?branch=master)](https://github.com/gfx-rs/portability/actions)\n[![Matrix](https://img.shields.io/badge/Matrix-%23gfx%3Amatrix.org-blueviolet.svg)](https://matrix.to/#/#gfx:matrix.org)\n\nThis is a prototype library implementing [Vulkan Portability Initiative](https://www.khronos.org/blog/khronos-announces-the-vulkan-portability-initiative) using [gfx-hal](http://gfx-rs.github.io/2017/07/24/low-level.html). See gfx-rs [meta issue](https://github.com/gfx-rs/gfx/issues/1354) for backend limitations and further details.\n\nPlatform support:\n- macOS/Metal (lib, icd)\n- iOS/Metal (lib, icd)\n- Windows/DX12 (lib, icd)\n- UWP/DX12 (lib)\n\nFor those interested in performance, we did a comprehensive benchmarks of Dota2 and Dolphin Emulator on macOS. Results were published to gfx-rs blog [here](https://gfx-rs.github.io/2018/08/10/dota2-macos-performance.html) and [there](https://gfx-rs.github.io/2019/03/22/dolphin-macos-performance.html).\n\nFor the extension support, see `INSTANCE_EXTENSIONS` and `DEVICE_EXTENSIONS` in the code.\n\n## Showcase\n\n### [Dota2](https://github.com/ValveSoftware/Dota-2):\n![Dota2](etc/dota2-river.jpg)\n\n### Quake\n- [vkQuake](https://github.com/Novum/vkQuake)\n- [vkQuake2](https://github.com/kondrak/vkQuake2)\n- [vkQuake3](https://github.com/suijingfeng/vkQuake3)\n\n![VkQuake](etc/quake-main.jpg) ![VkQuake3](etc/quake3-main.jpg)\n\n### [RPCS3](https://github.com/RPCS3/rpcs3):\n\n![RPCS3-cube](etc/rpcs3-cube.jpg) ![RPCS3-scogger](etc/rpcs3-scogger.jpg)\n\n### [Dolphin](https://github.com/dolphin-emu):\n![Dolphin-sb](etc/dolphin-smash-bros.png) ![Dolphin-pm](etc/dolphin-paper-mario.png)\n![Dolphin-mk](etc/dolphin-mario-kart.jpg) ![Dolphin-md](etc/dolphin-metroid.jpg)\n\n## Instructions\n\nDespite the fact it's written in Rust, the produced binaries have standard linking interface compatible with any program (written in the language of your choice). There are multiple ways to link to gfx-portability.\n\n### Dynamic linking\n\nTypically, you'd need to create a symbolic link with a name that a target application expects, e.g. `libvulkan.dylib -\u003e libportability.dylib`.\n\nCheck out and build:\n```\ngit clone --recursive https://github.com/gfx-rs/portability \u0026\u0026 cd portability\ncargo build --manifest-path libportability/Cargo.toml --features \u003cvulkan|dx12|metal\u003e\n```\n\n### ICD provider\n\ngfx-portability can be used with Vulkan loader like any other Vulkan driver. In order to use it this way, you need to build `libportability-icd` and point to it from an ICD json file:\n```\nVK_ICD_FILENAMES=portability/libportability-icd/portability-macos-debug.json \u003csome_vulkan_app\u003e\n```\n\n### Static linking\n\nFor C, you'd need to add `crate-type = [\"cdylib\"]` to `libportability-gfx/Cargo.toml` and build it with the backend of your choice. Note: features of this library are fully-qualified crate names, e.g. `features gfx-backend-metal`. For rust, just point the cargo dependency to `libportability-gfx`.\n\n## Running Samples\n\n### LunarG (API-Samples)\nAfter building `portability` as shown above, grab a copy from https://github.com/LunarG/VulkanSamples.\nManually override the [`VULKAN_LOADER`](https://github.com/LunarG/VulkanSamples/blob/master/API-Samples/CMakeLists.txt#L189-L194) variable and set it to the portability library.\n```\nset (VULKAN_LOADER \"path/to/portability/library\")\n```\nThen proceed with the normal build instructions.\n\n## Vulkan CTS coverage\n\nPlease visit [our wiki](https://github.com/gfx-rs/portability/wiki/Vulkan-CTS-status) for CTS hookup instructions. Once everything is set, you can generate the new results by calling `make cts` on Unix systems. When investigating a particular failure, it's handy to do `make cts debug=\u003ctest_name\u003e`, which runs a single test under system debugger (gdb/lldb). For simply inspecting the log output, one can also do `make cts pick=\u003ctest_name\u003e`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgfx-rs%2Fportability","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgfx-rs%2Fportability","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgfx-rs%2Fportability/lists"}