From b5b8e7e569e88d6e6c0f3564ce52d9d2e6b4ee89 Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Wed, 13 Mar 2024 15:30:06 +0800 Subject: [PATCH 1/2] Bump version to spirq v1.3 --- CHANGELOG.md | 6 ++++++ Cargo.lock | 4 ++-- README.md | 10 +++++----- shader-reflect/Cargo.toml | 4 ++-- spirq-spvasm/src/generated/mod.rs | 2 +- spirq/Cargo.toml | 2 +- 6 files changed, 17 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a226aa5..44562cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## v1.1.2 + +- Fixed compatibility with `spirv` v0.3. (#130) +- Properly support mesh shader reflection. (#127) +- From this version SPIR-Q is renamed to spirq (all lower case). + ## v1.1.1 - Better readme. diff --git a/Cargo.lock b/Cargo.lock index 76c44d0..d30514d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -337,7 +337,7 @@ dependencies = [ [[package]] name = "shader-reflect" -version = "0.2.5" +version = "0.2.6" dependencies = [ "clap", "serde", @@ -368,7 +368,7 @@ dependencies = [ [[package]] name = "spirq" -version = "1.1.2" +version = "1.1.3" dependencies = [ "byteorder", "bytes", diff --git a/README.md b/README.md index 88a1116..2a7d804 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -# SPIR-Q +# spirq [![Crate](https://img.shields.io/crates/v/spirq)](https://crates.io/crates/spirq) [![Documentation](https://docs.rs/spirq/badge.svg)](https://docs.rs/spirq) -SPIR-Q is a family of crates to help you process SPIR-V binary and assembly for Vulkan. +`spirq` is a family of crates to help you process SPIR-V binary and assembly for Vulkan. | Crate | Purpose | |-|-| @@ -21,11 +21,11 @@ Commandline (CLI) tools are also provided for general use. ## What's different from other crates? -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 SPIR-Q family. +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. -Compared with SPIR-Q, `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. +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. -On the other hand, the tools in SPIR-Q are more tolerant of the input quality. They don't check the semantics strictly to the spec. They won't stop processing unless there is a fatal structural problem making the input totally indecipherable. As a result, you might have to be familiar with the SPIR-V specification so that it serves you well, if you are developing other tools based on SPIR-Q. +On the other hand, the tools in spirq are more tolerant of the input quality. They don't check the semantics strictly to the spec. They won't stop processing unless there is a fatal structural problem making the input totally indecipherable. As a result, you might have to be familiar with the SPIR-V specification so that it serves you well, if you are developing other tools based on spirq. ## License diff --git a/shader-reflect/Cargo.toml b/shader-reflect/Cargo.toml index 9b3ed9d..efa9590 100644 --- a/shader-reflect/Cargo.toml +++ b/shader-reflect/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "shader-reflect" -version = "0.2.5" +version = "0.2.6" authors = ["PENGUINLIONG "] edition = "2018" license = "MIT OR Apache-2.0" @@ -18,7 +18,7 @@ maintenance = { status = "actively-developed" } # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -spirq = { version = "1.1.2", path = "../spirq" } +spirq = { version = "1.1.3", path = "../spirq" } clap = { version = "4.0.6", features = ["derive"] } serde = "1.0" serde_json = { version = "1.0", features = ["preserve_order"] } diff --git a/spirq-spvasm/src/generated/mod.rs b/spirq-spvasm/src/generated/mod.rs index 026d693..456d2cf 100644 --- a/spirq-spvasm/src/generated/mod.rs +++ b/spirq-spvasm/src/generated/mod.rs @@ -10,7 +10,7 @@ mod print_operand; pub use decorate_parameter_enum_type::decorate_parameter_enum_type; pub use enum_from_str::enum_from_str; -pub use enum_to_str::enum_to_str; +//pub use enum_to_str::enum_to_str; pub use op_from_str::op_from_str; pub use op_has_result_id::op_has_result_id; pub use op_has_result_type_id::op_has_result_type_id; diff --git a/spirq/Cargo.toml b/spirq/Cargo.toml index 4d6bb39..4050c67 100644 --- a/spirq/Cargo.toml +++ b/spirq/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "spirq" -version = "1.1.2" +version = "1.1.3" authors = ["PENGUINLIONG "] edition = "2018" license = "MIT OR Apache-2.0" From 040f0e0cfb3e5f3dcad80f5263732d1efc216aad Mon Sep 17 00:00:00 2001 From: PENGUINLIONG Date: Thu, 14 Mar 2024 01:49:31 +0800 Subject: [PATCH 2/2] Tweak pin spirv version --- spirq-core/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spirq-core/Cargo.toml b/spirq-core/Cargo.toml index d599026..98b7e81 100644 --- a/spirq-core/Cargo.toml +++ b/spirq-core/Cargo.toml @@ -19,7 +19,7 @@ maintenance = { status = "actively-developed" } [dependencies] fnv = "1.0.7" -spirv = ">=0.3" +spirv = "0.3" anyhow = "1.0" ordered-float = "3.4" num-traits = "0.2"