diff --git a/.gitignore b/.gitignore index 9d0e23b..6aa1064 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ /target/ -native/vulkan **/*.rs.bk Cargo.lock diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..02aa141 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "modules/vulkan-docs"] + path = modules/vulkan-docs + url = https://github.com/KhronosGroup/Vulkan-Docs diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..2bb3256 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,10 @@ +sudo: false + +rust: + - stable + - nightly +os: + - linux + +script: + - make diff --git a/Cargo.toml b/Cargo.toml index 53a1a22..3781c40 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,6 +7,13 @@ authors = ["Dzmitry Malyshau "] name = "portability" crate-type = ["staticlib"] -[dependencies] -gfx_core = { path = "../gfx/src/core" } -gfx_backend_vulkan = { path = "../gfx/src/backend/vulkan", features = ["portable"] } +[dependencies.gfx_core] +#path = "../gfx/src/core" +git = "https://github.com/kvark/gfx-rs" +branch = "portability" + +[dependencies.gfx_backend_vulkan] +#path = "../gfx/src/backend/vulkan" +git = "https://github.com/kvark/gfx-rs" +branch = "portability" +features = ["portable"] diff --git a/Makefile b/Makefile index 2c672f6..21f1f05 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,19 @@ -CC=gcc -CFLAGS= -DEPS= -LDFLAGS=-lpthread -ldl -lm - -HEADER=native/vulkan/vulkan.h +VULKAN_DIR=modules/vulkan-docs/src BINDING=target/vulkan.rs NATIVE_DIR=target/native TARGET=$(NATIVE_DIR)/test OBJECTS=$(NATIVE_DIR)/test.o LIBRARY=target/debug/libportability.a +CC=gcc +CFLAGS=-I$(VULKAN_DIR) +DEPS= +LDFLAGS=-lpthread -ldl -lm + all: $(TARGET) -$(BINDING): $(HEADER) - bindgen --no-layout-tests --rustfmt-bindings $(HEADER) -o $(BINDING) +$(BINDING): $(VULKAN_DIR)/vulkan/*.h + bindgen --no-layout-tests --rustfmt-bindings $(VULKAN_DIR)/vulkan/vulkan.h -o $(BINDING) $(LIBRARY): $(BINDING) src/*.rs cargo build diff --git a/README.md b/README.md new file mode 100644 index 0000000..846f18b --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +## gfx-portability +[![Build Status](https://travis-ci.org/kvark/portability.svg?branch=master)](https://travis-ci.org/kvark/portability) + +This is a prototype static 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. diff --git a/modules/vulkan-docs b/modules/vulkan-docs new file mode 160000 index 0000000..02185a8 --- /dev/null +++ b/modules/vulkan-docs @@ -0,0 +1 @@ +Subproject commit 02185a829989e43ea13839ec07532c09915c5de0 diff --git a/native/test.c b/native/test.c index 7670b8a..6594cf3 100644 --- a/native/test.c +++ b/native/test.c @@ -1,4 +1,4 @@ -#include "vulkan/vulkan.h" +#include #include #include