Skip to content

Commit

Permalink
Moved spirq- family of crates to spq (#135)
Browse files Browse the repository at this point in the history
* Separated spq set of tools from this crate

* Redirect dependencies
  • Loading branch information
PENGUINLIONG authored Mar 23, 2024
1 parent 3eef68a commit 39cd861
Show file tree
Hide file tree
Showing 61 changed files with 73 additions and 20,681 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ jobs:
cache-on-failure: true
workspaces: |
shader-reflect
spirq-as
spirq-core
spirq-dis
spirq-spvasm
spirq
- name: Cargo Format
id: cargo_format
Expand Down Expand Up @@ -60,10 +57,3 @@ jobs:
cargo run -p shader-reflect assets/spirv-spec.frag.spv -o assets/spirv-spec.frag.spv.json
diff assets/spirv-spec.frag.json assets/spirv-spec.frag.spv.json
cargo run -p shader-reflect assets/moon.spv -o assets/moon.spv.json --reference-all-resources
- name: Assemble Disassemble Roundtrip
id: cargo_build_and_test
run: |
cargo run -p spirq-as assets/gallery.frag.spvasm -o assets/gallery.frag.spv
cargo run -p spirq-dis assets/gallery.frag.spv -o assets/gallery.frag.spvasm --no-indent
echo git diff --exit-code --binary
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## v1.2.0

- Separated `spirq-` family of subcrates to [`spq`](https://github.com/PENGUINLIONG/spq-rs)


## v1.1.2

- Fixed compatibility with `spirv` v0.3. (#130)
Expand Down
98 changes: 44 additions & 54 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
[workspace]
members = [
"spirq",
"spirq-core",
"spirq-spvasm",
"spirq-dis",
"spirq-as",
"shader-reflect",
]
20 changes: 6 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,17 @@
[![Crate](https://img.shields.io/crates/v/spirq)](https://crates.io/crates/spirq)
[![Documentation](https://docs.rs/spirq/badge.svg)](https://docs.rs/spirq)

`spirq` is a family of crates to help you process SPIR-V binary and assembly for Vulkan.
`spirq` is a shader reflection tool to help you process SPIR-V binary and assembly for Vulkan. You can use `spirq` to query host-shader interfaces including descriptor bindings, pipeline inputs and outputs, specialization constants.

| Crate | Purpose |
|-|-|
|[spirq](spirq/README.md) [![Crate](https://img.shields.io/crates/v/spirq)](https://crates.io/crates/spirq)| Shader resource reflection, including descriptor bindings, pipeline inputs and outputs, specialization constants. |
|[spirq-core](spirq-core/README.md) [![Crate](https://img.shields.io/crates/v/spirq-core)](https://crates.io/crates/spirq-core)| Common structures and routines for SPIR-V IR analysis. |
|[spirq-spvasm](spirq-spvasm/README.md) [![Crate](https://img.shields.io/crates/v/spirq-spvasm)](https://crates.io/crates/spirq-spvasm)| SPIR-V assembler and disassembler. |
You can also use the commandline (CLI) tool [`shader-reflect`](shader-reflect/README.md) to use `spirq` without programming in Rust.

Commandline (CLI) tools are also provided for general use.
> Note: `spirq-` family of crates have been moved to [`spq`](https://github.com/PENGUINLIONG/spq-rs).
| Crate | Purpose |
|-|-|
|[shader-reflect](shader-reflect/README.md) [![Crate](https://img.shields.io/crates/v/shader-reflect)](https://crates.io/crates/shader-reflect)| Shader resource declaration reflector. |
|[spirq-dis](spirq-dis/README.md) [![Crate](https://img.shields.io/crates/v/spirq-dis)](https://crates.io/crates/spirq-dis)| SPIR-V disassembler frontend. Drop-in replacement of `spirv-dis`. |
|[spirq-as](spirq-as/README.md) [![Crate](https://img.shields.io/crates/v/spirq-as)](https://crates.io/crates/spirq-as)| SPIR-V assembler frontend. Drop-in replacement of `spirv-as`. |
## Usage

## What's different from other crates?
See [the crate level readme](spirq/README.md) for detail.

A lot of my works stand in an overlapping field of compilers and graphics systems, so I often have to work with weird or even corrupted SPIR-V binaries. Obviously, existing tools like `rspirv` and `spirv-reflect` are not designed for this. I then decided to develop my own toolkit, which is now the spirq family.
## What's different from other crates?

Compared with spirq, `rspirv` has more strict requirements on SPIR-V physical layout, which makes it impossible to process bad test cases for other projects. `spirv-reflect` is a broadly used reflection tool and it's a wrapper crate of Khronos' official [SPIRV-Reflect](https://github.com/KhronosGroup/SPIRV-Reflect) tool. `SPIRV-Reflect`, however, was developed in pretty early days and it has some legacy bad designs (like a limit of 16 descriptors). [SPIRV-Tools](https://github.com/KhronosGroup/SPIRV-Reflect) provides Khronos' official assembler and disassembler, while it's hard to be integrated to other Rust projects.

Expand Down
23 changes: 0 additions & 23 deletions spirq-as/Cargo.toml

This file was deleted.

34 changes: 0 additions & 34 deletions spirq-as/README.md

This file was deleted.

Loading

0 comments on commit 39cd861

Please sign in to comment.