gfx-rs / portability

Vulkan Portability Implementation
Mozilla Public License 2.0
383 stars 25 forks source link

Portability extensions fixes, README update #175

Closed kvark closed 5 years ago

kvark commented 5 years ago

This version is confirmed to work with VkPI CTS :tada:

kvark commented 5 years ago

Note VK_EXTX_PORTABILITY_SUBSET_SPEC_VERSION changes here. Apparently, the extension header didn't change since version 1, and they group decided to keep the version.

kvark commented 5 years ago

Wow, nicely spotted extension number! Let's discuss the feature names without blocking the release, since those are independent. Bors r=grovesNL

On Feb 9, 2019, at 00:27, Josh Groves notifications@github.com wrote:

@grovesNL commented on this pull request.

In README.md:

@@ -24,14 +24,29 @@ This is a prototype library implementing [Vulkan Portability Initiative](https:/

Instructions

-Despite the fact it's written in Rust, the produced binary is a standard dynamic library that can be linked to from any program (written in the language of your choice). Typically, you'd need to create a symbolic link with a name that a target application expects, e.g. libvulkan.dylib -> libportability.dylib. +Despite the fact it's written in Rust, the produced binaries have standard lining interface compatible with any program (written in the language of your choice). There are multiple ways to link to gfx-portability. “lining”

In README.md:

Check out and build:

git clone --recursive https://github.com/gfx-rs/portability && cd portability
cargo build --manifest-path libportability/Cargo.toml --features <vulkan|dx12|metal>

+### ICD provider + +gfx-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: + +VK_ICD_FILENAMES=portability/libportability-icd/portability-macos-debug.json <some_vulkan_app> + + +### Static linking + +For 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. It seems easier to just list multiple crate-types in our Cargo.toml by default instead, unless there’s a reason to avoid it?

In libportability-gfx/src/lib.rs:

@@ -843,8 +843,8 @@ pub enum VkStructureType { VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000, VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000, VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT = 1000248000,

  • VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_EXTX = 100163000,
  • VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_EXTX = 100163001,
  • VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_EXTX = 1000163000,
  • VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_EXTX = 1000163001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_SUPPORT_EXTX = 100163002, Should this be 1000163002 too?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

bors[bot] commented 5 years ago

Build succeeded