mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
[naga] Remove the compact feature
This commit is contained in:
parent
611a2bbede
commit
096f1f1f6d
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -304,7 +304,7 @@ jobs:
|
|||||||
|
|
||||||
# Check with all compatible features
|
# Check with all compatible features
|
||||||
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-types --no-default-features --features strict_asserts,fragile-send-sync-non-atomic-wasm,serde,counters
|
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-types --no-default-features --features strict_asserts,fragile-send-sync-non-atomic-wasm,serde,counters
|
||||||
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p naga --no-default-features --features dot-out,compact
|
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p naga --no-default-features --features dot-out
|
||||||
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-hal --no-default-features --features fragile-send-sync-non-atomic-wasm
|
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-hal --no-default-features --features fragile-send-sync-non-atomic-wasm
|
||||||
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu --no-default-features --features serde
|
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu --no-default-features --features serde
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,6 @@ test = false
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
naga = { workspace = true, features = [
|
naga = { workspace = true, features = [
|
||||||
"compact",
|
|
||||||
"wgsl-in",
|
"wgsl-in",
|
||||||
"wgsl-out",
|
"wgsl-out",
|
||||||
"glsl-in",
|
"glsl-in",
|
||||||
|
|||||||
@ -59,7 +59,7 @@ arbitrary = [
|
|||||||
]
|
]
|
||||||
spv-in = ["dep:petgraph", "petgraph/graphmap", "dep:spirv"]
|
spv-in = ["dep:petgraph", "petgraph/graphmap", "dep:spirv"]
|
||||||
spv-out = ["dep:spirv"]
|
spv-out = ["dep:spirv"]
|
||||||
wgsl-in = ["dep:hexf-parse", "dep:unicode-ident", "compact"]
|
wgsl-in = ["dep:hexf-parse", "dep:unicode-ident"]
|
||||||
wgsl-out = []
|
wgsl-out = []
|
||||||
|
|
||||||
## Enables outputting to HLSL (Microsoft's High-Level Shader Language).
|
## Enables outputting to HLSL (Microsoft's High-Level Shader Language).
|
||||||
@ -73,8 +73,6 @@ hlsl-out = []
|
|||||||
## If you want to enable HLSL output it regardless of the target platform, use `naga/hlsl-out`.
|
## If you want to enable HLSL output it regardless of the target platform, use `naga/hlsl-out`.
|
||||||
hlsl-out-if-target-windows = []
|
hlsl-out-if-target-windows = []
|
||||||
|
|
||||||
compact = []
|
|
||||||
|
|
||||||
## Enables colored output through codespan-reporting and termcolor.
|
## Enables colored output through codespan-reporting and termcolor.
|
||||||
termcolor = ["codespan-reporting/termcolor"]
|
termcolor = ["codespan-reporting/termcolor"]
|
||||||
|
|
||||||
|
|||||||
@ -234,7 +234,6 @@ impl<T> Arena<T> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "compact")]
|
|
||||||
pub(crate) fn retain_mut<P>(&mut self, mut predicate: P)
|
pub(crate) fn retain_mut<P>(&mut self, mut predicate: P)
|
||||||
where
|
where
|
||||||
P: FnMut(Handle<T>, &mut T) -> bool,
|
P: FnMut(Handle<T>, &mut T) -> bool,
|
||||||
|
|||||||
@ -72,7 +72,6 @@ impl<T> UniqueArena<T> {
|
|||||||
.unwrap_or(&Span::default())
|
.unwrap_or(&Span::default())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "compact")]
|
|
||||||
pub(crate) fn drain_all(&mut self) -> UniqueArenaDrain<T> {
|
pub(crate) fn drain_all(&mut self) -> UniqueArenaDrain<T> {
|
||||||
UniqueArenaDrain {
|
UniqueArenaDrain {
|
||||||
inner_elts: self.set.drain(..),
|
inner_elts: self.set.drain(..),
|
||||||
@ -82,14 +81,12 @@ impl<T> UniqueArena<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "compact")]
|
|
||||||
pub struct UniqueArenaDrain<'a, T> {
|
pub struct UniqueArenaDrain<'a, T> {
|
||||||
inner_elts: indexmap::set::Drain<'a, T>,
|
inner_elts: indexmap::set::Drain<'a, T>,
|
||||||
inner_spans: alloc::vec::Drain<'a, Span>,
|
inner_spans: alloc::vec::Drain<'a, Span>,
|
||||||
index: Index,
|
index: Index,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "compact")]
|
|
||||||
impl<T> Iterator for UniqueArenaDrain<'_, T> {
|
impl<T> Iterator for UniqueArenaDrain<'_, T> {
|
||||||
type Item = (Handle<T>, T, Span);
|
type Item = (Handle<T>, T, Span);
|
||||||
|
|
||||||
|
|||||||
@ -109,7 +109,6 @@ mod arena;
|
|||||||
mod as_diagnostic_file_path;
|
mod as_diagnostic_file_path;
|
||||||
pub mod back;
|
pub mod back;
|
||||||
pub mod common;
|
pub mod common;
|
||||||
#[cfg(feature = "compact")]
|
|
||||||
pub mod compact;
|
pub mod compact;
|
||||||
pub mod diagnostic_filter;
|
pub mod diagnostic_filter;
|
||||||
pub mod error;
|
pub mod error;
|
||||||
|
|||||||
@ -422,7 +422,6 @@ fn check_targets(input: &Input, module: &mut naga::Module, source_code: Option<&
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
#[cfg(feature = "compact")]
|
|
||||||
let info = {
|
let info = {
|
||||||
naga::compact::compact(module);
|
naga::compact::compact(module);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user