• Stars
    star
    105
  • Rank 328,196 (Top 7 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created over 6 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Reflection API in rust for SPIR-V shader byte code, intended for Vulkan applications

spirv-reflect

spirv-reflect on travis-ci.com Latest version Documentation MIT APACHE2

Reflection API in rust for SPIR-V shader byte code, intended for Vulkan applications.

This crate provides an FFI layer and idiomatic rust wrappers for the excellent SPIRV-Reflect C/C++ library.

Features

  • Extract descriptor bindings from SPIR-V bytecode, to assist in the generation of Vulkan descriptor set and pipeline layouts.
  • Extract push constant block size from SPIR-V bytecode to assist in the generation of pipeline layouts.
  • Extract full layout data for uniform buffer and push constant blocks from SPIR-V bytecode, to assist in application updates of these structures.
  • Extract input/output variables from SPIR-V bytecode (including semantic decorations for HLSL shaders), to assist in validation of pipeline input/output settings.
  • Easily map Vulkan types to DirectX 12 resource types
  • Remap descriptor bindings, and update the source SPIR-V bytecode accordingly.
  • Log all reflection data as human-readable text.

Planned Features

  • Extensive unit tests and examples.
  • Pure rust version.
  • Command line tool for reflection and manipulation.

Usage

Add this to your Cargo.toml:

[dependencies]
spirv-reflect = "0.2.3"

and add this to your crate root:

extern crate spirv_reflect;

Example

Currently there is only a single monolithic demo example, which shows some usage. A CLI tool is planned that will be useful on its own, and as a clean example of usage patterns.

cargo run --release --example demo

License

Licensed under either of

at your option.

Credits and Special Thanks

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.

Contributions are always welcome; please look at the issue tracker to see what known improvements are documented.

Code of Conduct

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

More Repositories

1

QNodeView

Qt5 suite that supports displaying and editing nodes in a graph-like flow. Similar to Unreal Kismet, Frostbite 3 Schematics or Allegorithmic Substance Designer UIs.
C++
197
star
2

vk-mem-rs

Rust bindings for AMD Vulkan Memory Allocator (VMA)
Rust
166
star
3

meshopt-rs

Rust ffi and idiomatic wrapper for zeux/meshoptimizer, a mesh optimization library that makes indexed meshes more GPU-friendly.
Rust
161
star
4

ash-nv-rt

NV ray tracing with rust and ash!
Rust
56
star
5

vk-sync-rs

Simplified Vulkan synchronization logic, written in rust
Rust
53
star
6

smush-rs

Common rust abstraction around a variety of compression codecs.
Rust
33
star
7

render-rs

Collection of rust crates providing rendering abstractions.
C++
31
star
8

grue-rs

Various tools and algorithms for building role-playing and adventure games
Rust
27
star
9

intel-tex-rs

Rust bindings for Intel's ISPC texture compression
Rust
23
star
10

docker-shader

Docker image with a range of shader compilers available
Dockerfile
23
star
11

dxil-signing

Utility to sign DXIL code after compilation
C++
21
star
12

svc-shader

A gRPC micro-service that exposes a variety of GPU shader compilers under a common cloud-based abstraction.
HLSL
13
star
13

fbx2json

A simple command-line utility to convert Autodesk FBX files to a custom JSON format.
C++
11
star
14

docker-dxc

Docker image with Microsoft DirectX shader compiler (dxil and spirv)
Makefile
11
star
15

include-merkle-rs

Functionality to build a Merkle-tree of a given text file with include references, substituting deterministic identities, and flattening include directives into a single file.
Rust
8
star
16

app-engine-rs

Example of rust + rocket + docker running in a flex environment on Google App Engine.
Rust
7
star
17

cloudstore-rs

A gRPC microservice, written in rust, that marshalls objects and files to cloud storage like AWS S3, Google Cloud Storage, or other providers.
Rust
6
star
18

svc-texture

A gRPC micro-service that exposes texture compression routines under a common cloud-based abstraction.
Rust
6
star
19

hindranch

Global Game Jam 2019!
Rust
5
star
20

svc-mesh

A gRPC micro-service that exposes mesh loading routines under a common cloud-based abstraction.
Rust
5
star
21

docker-protoc

Docker image with protobuf compiler and various language plugins
Makefile
4
star
22

docker-fxc

Docker image of FXC running with Wine
Dockerfile
4
star
23

voxelpipe

Automatically exported from code.google.com/p/voxelpipe
C++
2
star
24

clangelscript

Automatic binding generator for Angelscript using clang and cindex
Python
2
star
25

ltalloc

Automatically exported from code.google.com/p/ltalloc
C++
2
star
26

smol-v-rs

Rust bindings for SMOL-V
Rust
1
star
27

gwihlidal.github.io

HTML
1
star
28

web_kvm

REST service controller for the rack mountable TESmart 8-port HDMI enterprise-grade KVM switch (TES-HKS0801A1U-USBK)
Rust
1
star
29

shader-merkle-rs

HLSL
1
star
30

speechtest-rs

Google Cloud text-to-speech prototype
Rust
1
star