From 55ff7a93f26258b13f81d6eee14f6070a2b688dc Mon Sep 17 00:00:00 2001 From: chyyran Date: Thu, 26 Sep 2024 19:12:46 -0400 Subject: [PATCH] cli: rename librashader-test -> librashader-cli --- Cargo.lock | 58 +++++++++---------- Cargo.toml | 5 +- README.md | 6 +- .../Cargo.toml | 5 +- .../src/cli/main.rs | 0 .../src/lib.rs | 0 .../src/render/d3d11.rs | 0 .../src/render/d3d12/descriptor_heap.rs | 0 .../src/render/d3d12/mod.rs | 0 .../src/render/d3d12/util.rs | 0 .../src/render/d3d9.rs | 0 .../src/render/gl/context.rs | 0 .../src/render/gl/mod.rs | 0 .../src/render/mod.rs | 0 .../src/render/mtl.rs | 0 .../src/render/vk/base.rs | 0 .../src/render/vk/memory.rs | 0 .../src/render/vk/mod.rs | 0 .../src/render/vk/physical_device.rs | 0 .../src/render/vk/util.rs | 0 .../src/render/wgpu.rs | 0 21 files changed, 40 insertions(+), 34 deletions(-) rename {librashader-test => librashader-cli}/Cargo.toml (96%) rename {librashader-test => librashader-cli}/src/cli/main.rs (100%) rename {librashader-test => librashader-cli}/src/lib.rs (100%) rename {librashader-test => librashader-cli}/src/render/d3d11.rs (100%) rename {librashader-test => librashader-cli}/src/render/d3d12/descriptor_heap.rs (100%) rename {librashader-test => librashader-cli}/src/render/d3d12/mod.rs (100%) rename {librashader-test => librashader-cli}/src/render/d3d12/util.rs (100%) rename {librashader-test => librashader-cli}/src/render/d3d9.rs (100%) rename {librashader-test => librashader-cli}/src/render/gl/context.rs (100%) rename {librashader-test => librashader-cli}/src/render/gl/mod.rs (100%) rename {librashader-test => librashader-cli}/src/render/mod.rs (100%) rename {librashader-test => librashader-cli}/src/render/mtl.rs (100%) rename {librashader-test => librashader-cli}/src/render/vk/base.rs (100%) rename {librashader-test => librashader-cli}/src/render/vk/memory.rs (100%) rename {librashader-test => librashader-cli}/src/render/vk/mod.rs (100%) rename {librashader-test => librashader-cli}/src/render/vk/physical_device.rs (100%) rename {librashader-test => librashader-cli}/src/render/vk/util.rs (100%) rename {librashader-test => librashader-cli}/src/render/wgpu.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index bb38fff..e3a7306 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1583,6 +1583,35 @@ dependencies = [ "windows 0.58.0", ] +[[package]] +name = "librashader-cli" +version = "0.4.5" +dependencies = [ + "anyhow", + "ash", + "bitvec", + "clap", + "d3d12-descriptor-heap", + "gfx-maths", + "glfw", + "glow 0.14.1", + "gpu-allocator 0.27.0", + "image", + "image-compare", + "librashader", + "librashader-runtime", + "objc2 0.5.2", + "objc2-metal", + "parking_lot", + "pollster", + "serde", + "serde_json", + "spq-spvasm", + "wgpu", + "wgpu-types", + "windows 0.58.0", +] + [[package]] name = "librashader-common" version = "0.4.5" @@ -1812,35 +1841,6 @@ dependencies = [ "winit", ] -[[package]] -name = "librashader-test" -version = "0.1.0" -dependencies = [ - "anyhow", - "ash", - "bitvec", - "clap", - "d3d12-descriptor-heap", - "gfx-maths", - "glfw", - "glow 0.14.1", - "gpu-allocator 0.27.0", - "image", - "image-compare", - "librashader", - "librashader-runtime", - "objc2 0.5.2", - "objc2-metal", - "parking_lot", - "pollster", - "serde", - "serde_json", - "spq-spvasm", - "wgpu", - "wgpu-types", - "windows 0.58.0", -] - [[package]] name = "libredox" version = "0.0.2" diff --git a/Cargo.toml b/Cargo.toml index 34819d9..dbcab1b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,13 +8,16 @@ members = [ "librashader-runtime", "librashader-runtime-d3d11", "librashader-runtime-d3d12", + "librashader-runtime-d3d9", "librashader-runtime-gl", "librashader-runtime-vk", "librashader-runtime-mtl", "librashader-runtime-wgpu", "librashader-cache", "librashader-capi", - "librashader-build-script", "librashader-runtime-d3d9", "librashader-test"] + "librashader-build-script", + "librashader-cli" +] resolver = "2" [workspace.dependencies] diff --git a/README.md b/README.md index 731e808..2ac22ff 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,6 @@ of the internals if you wish to use parts of librashader piecemeal. The librashader C API is best used by including `librashader_ld.h` in your project, which implements a loader that dynamically loads the librashader (`librashader.so`, `librashader.dll`, or `librashader.dylib`) implementation in the search path. - ### C compatibility The recommended way of integrating `librashader` is by the `librashader_ld` single header library which implements a dynamic loader for `librashader.dll` / `librashader.so` / `librashader.dylib`. See the [versioning policy](https://github.com/SnowflakePowered/librashader#versioning) @@ -76,6 +75,7 @@ The Metal runtime is **not thread safe**. However you can still defer submission `filter_chain_create_deferred` function. The Direct3D 9 API is not thread safe, unless `D3DCREATE_MULTITHREADED` is enabled at device creation. + ### Quad vertices and rotations All runtimes render intermediate passes with an identity matrix MVP and a VBO for with range `[-1, 1]`. The final pass uses a Quad VBO with range `[0, 1]` and the following projection matrix by default. @@ -101,6 +101,8 @@ ensure that your runtime has consistent behaviour for uniform and texture semant These types should not be exposed to the end user in the runtime's public API, and should be kept internal to the implementation of the runtime. +## Command-line interface +librashader provides a ## Building @@ -128,7 +130,7 @@ While librashader is intended to be used with nightly Rust until [required featu built with stable Rust with the `stable` feature. ```toml -librashader = { features = "stable" } +librashader = { features = ["stable"] } ``` If building the C API, the `--stable` flag in the build script will enable the `stable` feature. diff --git a/librashader-test/Cargo.toml b/librashader-cli/Cargo.toml similarity index 96% rename from librashader-test/Cargo.toml rename to librashader-cli/Cargo.toml index 7db361c..3e475ed 100644 --- a/librashader-test/Cargo.toml +++ b/librashader-cli/Cargo.toml @@ -1,9 +1,10 @@ [package] -name = "librashader-test" -version = "0.1.0" +name = "librashader-cli" +version = "0.4.5" edition = "2021" [lib] +name = "librashader_test" path = "src/lib.rs" [[bin]] diff --git a/librashader-test/src/cli/main.rs b/librashader-cli/src/cli/main.rs similarity index 100% rename from librashader-test/src/cli/main.rs rename to librashader-cli/src/cli/main.rs diff --git a/librashader-test/src/lib.rs b/librashader-cli/src/lib.rs similarity index 100% rename from librashader-test/src/lib.rs rename to librashader-cli/src/lib.rs diff --git a/librashader-test/src/render/d3d11.rs b/librashader-cli/src/render/d3d11.rs similarity index 100% rename from librashader-test/src/render/d3d11.rs rename to librashader-cli/src/render/d3d11.rs diff --git a/librashader-test/src/render/d3d12/descriptor_heap.rs b/librashader-cli/src/render/d3d12/descriptor_heap.rs similarity index 100% rename from librashader-test/src/render/d3d12/descriptor_heap.rs rename to librashader-cli/src/render/d3d12/descriptor_heap.rs diff --git a/librashader-test/src/render/d3d12/mod.rs b/librashader-cli/src/render/d3d12/mod.rs similarity index 100% rename from librashader-test/src/render/d3d12/mod.rs rename to librashader-cli/src/render/d3d12/mod.rs diff --git a/librashader-test/src/render/d3d12/util.rs b/librashader-cli/src/render/d3d12/util.rs similarity index 100% rename from librashader-test/src/render/d3d12/util.rs rename to librashader-cli/src/render/d3d12/util.rs diff --git a/librashader-test/src/render/d3d9.rs b/librashader-cli/src/render/d3d9.rs similarity index 100% rename from librashader-test/src/render/d3d9.rs rename to librashader-cli/src/render/d3d9.rs diff --git a/librashader-test/src/render/gl/context.rs b/librashader-cli/src/render/gl/context.rs similarity index 100% rename from librashader-test/src/render/gl/context.rs rename to librashader-cli/src/render/gl/context.rs diff --git a/librashader-test/src/render/gl/mod.rs b/librashader-cli/src/render/gl/mod.rs similarity index 100% rename from librashader-test/src/render/gl/mod.rs rename to librashader-cli/src/render/gl/mod.rs diff --git a/librashader-test/src/render/mod.rs b/librashader-cli/src/render/mod.rs similarity index 100% rename from librashader-test/src/render/mod.rs rename to librashader-cli/src/render/mod.rs diff --git a/librashader-test/src/render/mtl.rs b/librashader-cli/src/render/mtl.rs similarity index 100% rename from librashader-test/src/render/mtl.rs rename to librashader-cli/src/render/mtl.rs diff --git a/librashader-test/src/render/vk/base.rs b/librashader-cli/src/render/vk/base.rs similarity index 100% rename from librashader-test/src/render/vk/base.rs rename to librashader-cli/src/render/vk/base.rs diff --git a/librashader-test/src/render/vk/memory.rs b/librashader-cli/src/render/vk/memory.rs similarity index 100% rename from librashader-test/src/render/vk/memory.rs rename to librashader-cli/src/render/vk/memory.rs diff --git a/librashader-test/src/render/vk/mod.rs b/librashader-cli/src/render/vk/mod.rs similarity index 100% rename from librashader-test/src/render/vk/mod.rs rename to librashader-cli/src/render/vk/mod.rs diff --git a/librashader-test/src/render/vk/physical_device.rs b/librashader-cli/src/render/vk/physical_device.rs similarity index 100% rename from librashader-test/src/render/vk/physical_device.rs rename to librashader-cli/src/render/vk/physical_device.rs diff --git a/librashader-test/src/render/vk/util.rs b/librashader-cli/src/render/vk/util.rs similarity index 100% rename from librashader-test/src/render/vk/util.rs rename to librashader-cli/src/render/vk/util.rs diff --git a/librashader-test/src/render/wgpu.rs b/librashader-cli/src/render/wgpu.rs similarity index 100% rename from librashader-test/src/render/wgpu.rs rename to librashader-cli/src/render/wgpu.rs