mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-16 06:38:03 +08:00
rust-gpu alpha.1: update rust-gpu to 0.10.0-alpha.1 on crates
This commit is contained in:
@@ -40,7 +40,6 @@ glam_array!(glam::Vec2, [f32; 2]);
|
||||
glam_array!(glam::Vec3, [f32; 3]);
|
||||
// glam_array!(Vec3A, [f32; 4]);
|
||||
glam_array!(glam::Vec4, [f32; 4]);
|
||||
glam_array!(glam::Quat, [f32; 4]);
|
||||
glam_cols_array!(glam::Mat2, [f32; 4]);
|
||||
glam_cols_array!(glam::Mat3, [f32; 9]);
|
||||
// glam_cols_array!(Mat3A, [f32; 4]);
|
||||
@@ -51,7 +50,6 @@ glam_cols_array!(glam::Affine3A, [f32; 12]);
|
||||
glam_array!(glam::DVec2, [f64; 2]);
|
||||
glam_array!(glam::DVec3, [f64; 3]);
|
||||
glam_array!(glam::DVec4, [f64; 4]);
|
||||
glam_array!(glam::DQuat, [f64; 4]);
|
||||
glam_cols_array!(glam::DMat2, [f64; 4]);
|
||||
glam_cols_array!(glam::DMat3, [f64; 9]);
|
||||
glam_cols_array!(glam::DMat4, [f64; 16]);
|
||||
|
||||
@@ -26,7 +26,6 @@ identity!(isize);
|
||||
identity!(f32);
|
||||
identity!(f64);
|
||||
|
||||
identity!(spirv_std::arch::SubgroupMask);
|
||||
identity!(spirv_std::memory::Semantics);
|
||||
identity!(spirv_std::ray_tracing::RayFlags);
|
||||
identity!(spirv_std::indirect_command::DrawIndirectCommand);
|
||||
|
||||
@@ -6,12 +6,9 @@ description = "graphene raster data format"
|
||||
authors = ["Graphite Authors <contact@graphite.art>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
[lib]
|
||||
crate-type = ["rlib", "dylib"]
|
||||
|
||||
[dependencies]
|
||||
|
||||
[build-dependencies]
|
||||
cargo-gpu = { workspace = true }
|
||||
cargo-gpu-install = { workspace = true }
|
||||
env_logger = { workspace = true }
|
||||
log = { workspace = true }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use cargo_gpu::InstalledBackend;
|
||||
use cargo_gpu::spirv_builder::{MetadataPrintout, SpirvMetadata};
|
||||
use cargo_gpu_install::install::{Install, InstalledBackend};
|
||||
use cargo_gpu_install::spirv_builder::SpirvMetadata;
|
||||
use std::path::PathBuf;
|
||||
|
||||
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
@@ -29,19 +29,18 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let rustc_codegen_spirv_path = std::env::var("RUSTC_CODEGEN_SPIRV_PATH").unwrap_or_default();
|
||||
let backend = if rustc_codegen_spirv_path.is_empty() {
|
||||
// install the toolchain and build the `rustc_codegen_spirv` codegen backend with it
|
||||
cargo_gpu::Install::from_shader_crate(shader_crate.clone()).run()?
|
||||
Install::from_shader_crate(shader_crate.clone()).run()?
|
||||
} else {
|
||||
// use the `RUSTC_CODEGEN_SPIRV` environment variable to find the codegen backend
|
||||
let mut backend = InstalledBackend::default();
|
||||
backend.rustc_codegen_spirv_location = PathBuf::from(rustc_codegen_spirv_path);
|
||||
backend.toolchain_channel = "nightly".to_string();
|
||||
backend.target_spec_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||
backend
|
||||
};
|
||||
|
||||
// build the shader crate
|
||||
let mut builder = backend.to_spirv_builder(shader_crate, "spirv-unknown-naga-wgsl");
|
||||
builder.print_metadata = MetadataPrintout::DependencyOnly;
|
||||
builder.build_script.defaults = true;
|
||||
builder.spirv_metadata = SpirvMetadata::Full;
|
||||
let wgsl_result = builder.build()?;
|
||||
let path_to_spv = wgsl_result.module.unwrap_single();
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
{
|
||||
"allows-weak-linkage": false,
|
||||
"arch": "spirv",
|
||||
"crt-objects-fallback": "false",
|
||||
"crt-static-allows-dylibs": true,
|
||||
"crt-static-respected": true,
|
||||
"data-layout": "e-m:e-p:32:32:32-i64:64-n8:16:32:64",
|
||||
"dll-prefix": "",
|
||||
"dll-suffix": ".spv.json",
|
||||
"dynamic-linking": true,
|
||||
"emit-debug-gdb-scripts": false,
|
||||
"env": "naga-wgsl",
|
||||
"linker-flavor": "unix",
|
||||
"linker-is-gnu": false,
|
||||
"llvm-target": "spirv-unknown-naga-wgsl",
|
||||
"main-needs-argc-argv": false,
|
||||
"metadata": {
|
||||
"description": null,
|
||||
"host_tools": null,
|
||||
"std": null,
|
||||
"tier": null
|
||||
},
|
||||
"panic-strategy": "abort",
|
||||
"simd-types-indirect": false,
|
||||
"target-pointer-width": "32"
|
||||
}
|
||||
Reference in New Issue
Block a user