GithubHelp home page GithubHelp logo

siyuanpan / vk-sync-rs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gwihlidal/vk-sync-rs

0.0 0.0 0.0 57 KB

Simplified Vulkan synchronization logic, written in rust

License: Apache License 2.0

Rust 100.00%

vk-sync-rs's Introduction

vk-sync

vk-sync on travis-ci.com vk-sync on appveyor.com Latest version Documentation

Simplified Vulkan synchronization logic, written in rust.

Overview

In an effort to make Vulkan synchronization more accessible, this library provides an efficient simplification of core synchronization mechanisms such as pipeline barriers and events.

Rather than the complex maze of enums and bit flags in Vulkan - many combinations of which are invalid or nonsensical - this library collapses this to a much shorter list of ~40 distinct usage types, and a couple of options for handling image layouts.

Additionally, these usage types provide an easier mapping to other graphics APIs like DirectX 12.

Use of other synchronization mechanisms such as semaphores, fences and render passes are not addressed in this library at present.

Bindings

There are a number of Vulkan ffi bindings available, and I do plan to support the most common bindings, but for now this library only implements support for ash. Please add other bindings you need via a pull-request; I would happily accept it.

Expressiveness

Despite the fact that this library is fairly simple, it expresses 99% of what you'd actually ever want to do in practice. Adding the missing expressiveness would result in increased complexity which does not seem worth the trade-off. If you have any pattern you need express, please file an issue!

Here's a list of known things you cannot express:

  • Execution only dependencies cannot be expressed. These are occasionally useful in conjunction with semaphores, or when trying to be clever with scheduling - but their usage is both limited and fairly tricky to get right anyway.

  • Depth/Stencil Input Attachments can be read in a shader using either ImageLayout::ShaderReadOnlyOptimal or ImageLayout::DepthStencilReadOnlyOptimal - this library always uses ImageLayout::DepthStencilReadOnlyOptimal. It is possible (though highly unlikely) when aliasing images that this results in unnecessary transitions.

Usage

Add this to your Cargo.toml:

[dependencies]
vk-sync = "0.1.6"

and this to your crate root:

extern crate vk_sync;

License

Licensed under either of

at your option.

Credits

This library is heavily based on work by Tobias Hector (https://github.com/Tobski/simple_vulkan_synchronization)

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Code of Conduct

Contribution to the vk-sync crate is organized under the terms of the Contributor Covenant, the maintainer of vk-sync, @gwihlidal, promises to intervene to uphold that code of conduct.

vk-sync-rs's People

Contributors

gwihlidal avatar maikklein avatar expenses avatar h3r2tic avatar siyuanpan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.