From 0a5a12dfc2e6e442139a6840bc4d311e609409d5 Mon Sep 17 00:00:00 2001 From: Zac Harrold Date: Tue, 22 Apr 2025 20:09:18 +1000 Subject: [PATCH] Remove default features from `petgraph` --- Cargo.lock | 1 - naga/Cargo.toml | 4 ++-- naga/src/front/spv/mod.rs | 7 ++++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 978ee4796cf..e509502b75a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3000,7 +3000,6 @@ dependencies = [ "fixedbitset 0.5.7", "hashbrown", "indexmap", - "serde", ] [[package]] diff --git a/naga/Cargo.toml b/naga/Cargo.toml index a522a7998de..beeabeb33ee 100644 --- a/naga/Cargo.toml +++ b/naga/Cargo.toml @@ -56,7 +56,7 @@ arbitrary = [ "half/arbitrary", "half/std", ] -spv-in = ["dep:petgraph", "dep:spirv"] +spv-in = ["dep:petgraph", "petgraph/graphmap", "dep:spirv"] spv-out = ["dep:spirv"] wgsl-in = ["dep:hexf-parse", "dep:strum", "dep:unicode-ident", "compact"] wgsl-out = [] @@ -102,7 +102,7 @@ serde = { version = "1.0.219", features = [ "default", "derive", ], optional = true } -petgraph = { version = "0.8", optional = true } +petgraph = { version = "0.8", optional = true, default-features = false } pp-rs = { version = "0.2.1", optional = true } hexf-parse = { version = "0.2.1", optional = true } unicode-ident = { version = "1.0", optional = true } diff --git a/naga/src/front/spv/mod.rs b/naga/src/front/spv/mod.rs index 4ba44e61f01..3b1b8fe5cac 100644 --- a/naga/src/front/spv/mod.rs +++ b/naga/src/front/spv/mod.rs @@ -617,7 +617,12 @@ pub struct Frontend { // Graph of all function calls through the module. // It's used to sort the functions (as nodes) topologically, // so that in the IR any called function is already known. - function_call_graph: GraphMap, + function_call_graph: GraphMap< + spirv::Word, + (), + petgraph::Directed, + core::hash::BuildHasherDefault, + >, options: Options, /// Maps for a switch from a case target to the respective body and associated literals that