mirror of
https://github.com/italicsjenga/portability.git
synced 2024-11-26 08:51:31 +11:00
Merge #144
144: Dolphin emulator fixes r=grovesNL a=kvark [New README](https://github.com/kvark/portability/blob/emulate/README.md) Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
This commit is contained in:
commit
2093fa470d
22
Cargo.lock
generated
22
Cargo.lock
generated
|
@ -1,6 +1,6 @@
|
|||
[[package]]
|
||||
name = "aho-corasick"
|
||||
version = "0.6.7"
|
||||
version = "0.6.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"memchr 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -224,7 +224,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "env_logger"
|
||||
version = "0.5.12"
|
||||
version = "0.5.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -297,7 +297,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
[[package]]
|
||||
name = "gfx-backend-dx11"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/gfx-rs/gfx#ff97cb38666e911451134118c6127057aa4a8ba3"
|
||||
source = "git+https://github.com/gfx-rs/gfx#4a1b5516c002684f892ecfc3fba890bafc19d288"
|
||||
dependencies = [
|
||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"derivative 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -314,7 +314,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gfx-backend-dx12"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/gfx-rs/gfx#ff97cb38666e911451134118c6127057aa4a8ba3"
|
||||
source = "git+https://github.com/gfx-rs/gfx#4a1b5516c002684f892ecfc3fba890bafc19d288"
|
||||
dependencies = [
|
||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"derivative 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -330,7 +330,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gfx-backend-metal"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/gfx-rs/gfx#ff97cb38666e911451134118c6127057aa4a8ba3"
|
||||
source = "git+https://github.com/gfx-rs/gfx#4a1b5516c002684f892ecfc3fba890bafc19d288"
|
||||
dependencies = [
|
||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"block 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -351,7 +351,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gfx-backend-vulkan"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/gfx-rs/gfx#ff97cb38666e911451134118c6127057aa4a8ba3"
|
||||
source = "git+https://github.com/gfx-rs/gfx#4a1b5516c002684f892ecfc3fba890bafc19d288"
|
||||
dependencies = [
|
||||
"ash 0.24.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -368,7 +368,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gfx-hal"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/gfx-rs/gfx#ff97cb38666e911451134118c6127057aa4a8ba3"
|
||||
source = "git+https://github.com/gfx-rs/gfx#4a1b5516c002684f892ecfc3fba890bafc19d288"
|
||||
dependencies = [
|
||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"failure 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -627,7 +627,7 @@ dependencies = [
|
|||
name = "portability-gfx"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"env_logger 0.5.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx-backend-dx11 0.1.0 (git+https://github.com/gfx-rs/gfx)",
|
||||
"gfx-backend-dx12 0.1.0 (git+https://github.com/gfx-rs/gfx)",
|
||||
"gfx-backend-metal 0.1.0 (git+https://github.com/gfx-rs/gfx)",
|
||||
|
@ -716,7 +716,7 @@ name = "regex"
|
|||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"aho-corasick 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memchr 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex-syntax 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1163,7 +1163,7 @@ dependencies = [
|
|||
]
|
||||
|
||||
[metadata]
|
||||
"checksum aho-corasick 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "7ee94e9463ccb9d681e7b708082687b2c56d2bd420ca8a3d3157d27d59508ec0"
|
||||
"checksum aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "68f56c7353e5a9547cbd76ed90f7bb5ffc3ba09d4ea9bd1d8c06c8b1142eeb5a"
|
||||
"checksum android_glue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "000444226fcff248f2bc4c7625be32c63caccfecc2723a2b9f78a7487a49c407"
|
||||
"checksum ash 0.24.4 (registry+https://github.com/rust-lang/crates.io-index)" = "11f080bc0414ee1b6b959442cb36478d56c6e6b9bb2b04079a5048d9acc91a30"
|
||||
"checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652"
|
||||
|
@ -1190,7 +1190,7 @@ dependencies = [
|
|||
"checksum dlib 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "77e51249a9d823a4cb79e3eca6dcd756153e8ed0157b6c04775d04bf1b13b76a"
|
||||
"checksum downcast-rs 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "18df8ce4470c189d18aa926022da57544f31e154631eb4cfe796aea97051fe6c"
|
||||
"checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0"
|
||||
"checksum env_logger 0.5.12 (registry+https://github.com/rust-lang/crates.io-index)" = "f4d7e69c283751083d53d01eac767407343b8b69c4bd70058e08adc2637cb257"
|
||||
"checksum env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)" = "15b0a4d2e39f8420210be8b27eeda28029729e2fd4291019455016c348240c38"
|
||||
"checksum failure 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7efb22686e4a466b1ec1a15c2898f91fa9cb340452496dca654032de20ff95b9"
|
||||
"checksum failure_derive 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "946d0e98a50d9831f5d589038d2ca7f8f455b1c21028c0db0e84116a12696426"
|
||||
"checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
|
||||
|
|
43
README.md
43
README.md
|
@ -2,36 +2,31 @@
|
|||
[![Build Status](https://travis-ci.org/gfx-rs/portability.svg?branch=master)](https://travis-ci.org/gfx-rs/portability)
|
||||
[![Gitter](https://badges.gitter.im/gfx-rs/portability.svg)](https://gitter.im/gfx-rs/portability)
|
||||
|
||||
This is a prototype library implementing [Vulkan Portability Initiative](https://www.khronos.org/blog/khronos-announces-the-vulkan-portability-initiative) using gfx-rs [low-level core](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.
|
||||
This 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.
|
||||
|
||||
## Check out
|
||||
## Showcase
|
||||
|
||||
### [Dota2](https://github.com/ValveSoftware/Dota-2):
|
||||
![Dota2](etc/dota2-river.jpg)
|
||||
|
||||
### [RPCS3](https://github.com/RPCS3/rpcs3):
|
||||
![RPCS3-cube](etc/rpcs3-cube.jpg)
|
||||
![RPCS3-scogger](etc/rpcs3-scogger.jpg)
|
||||
|
||||
### [Dolphin](https://github.com/dolphin-emu):
|
||||
![Dolphin-sb](etc/dolphin-smash-bros.png)
|
||||
![Dolphin-pm](etc/dolphin-paper-mario.png)
|
||||
|
||||
## 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`.
|
||||
|
||||
Check out and build:
|
||||
```
|
||||
git clone --recursive https://github.com/gfx-rs/portability && cd portability
|
||||
```
|
||||
|
||||
## Build
|
||||
|
||||
### Makefile (Unix)
|
||||
```
|
||||
make
|
||||
```
|
||||
|
||||
### CMake (Window)
|
||||
Build the Rust library (portability implementation):
|
||||
|
||||
```
|
||||
cargo build --manifest-path libportability/Cargo.toml --features <vulkan|dx12|metal>
|
||||
```
|
||||
|
||||
Build the native example:
|
||||
|
||||
```
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
cmake --build . --target native_test
|
||||
```
|
||||
|
||||
## Running Samples
|
||||
|
||||
### LunarG (API-Samples)
|
||||
|
|
BIN
etc/dolphin-paper-mario.png
Normal file
BIN
etc/dolphin-paper-mario.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 141 KiB |
BIN
etc/dolphin-smash-bros.png
Normal file
BIN
etc/dolphin-smash-bros.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 168 KiB |
BIN
etc/dota2-river.jpg
Normal file
BIN
etc/dota2-river.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 114 KiB |
BIN
etc/rpcs3-cube.jpg
Normal file
BIN
etc/rpcs3-cube.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
BIN
etc/rpcs3-scogger.jpg
Normal file
BIN
etc/rpcs3-scogger.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 36 KiB |
|
@ -25,6 +25,7 @@ pub fn limits_from_hal(limits: Limits) -> VkPhysicalDeviceLimits {
|
|||
maxVertexOutputComponents: limits.max_vertex_output_components as _,
|
||||
maxComputeWorkGroupCount: limits.max_compute_group_count,
|
||||
maxComputeWorkGroupSize: limits.max_compute_group_size,
|
||||
bufferImageGranularity: 1, //TODO
|
||||
optimalBufferCopyOffsetAlignment: limits.min_buffer_copy_offset_alignment,
|
||||
optimalBufferCopyRowPitchAlignment: limits.min_buffer_copy_pitch_alignment,
|
||||
minTexelBufferOffsetAlignment: limits.min_texel_buffer_offset_alignment,
|
||||
|
|
Loading…
Reference in a new issue