Skip to content

Commit 2cce1db

Browse files
committed
gcore: remove most #[cfg(target_arch = "spirv")], keep some potentially useful ones
1 parent 3fe0ba1 commit 2cce1db

6 files changed

Lines changed: 2 additions & 14 deletions

File tree

node-graph/gcore/src/logic.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use glam::{DAffine2, DVec2};
44

55
#[node_macro::node(category("Debug"))]
66
fn log_to_console<T: std::fmt::Debug>(_: impl Ctx, #[implementations(String, bool, f64, u32, u64, DVec2, VectorDataTable, DAffine2, Color, Option<Color>)] value: T) -> T {
7-
#[cfg(not(target_arch = "spirv"))]
87
// KEEP THIS `debug!()` - It acts as the output for the debug node itself
98
log::debug!("{:#?}", value);
109
value

node-graph/gcore/src/ops.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ use rand::{Rng, SeedableRng};
1414
use std::marker::PhantomData;
1515
use std::ops::{Add, Div, Mul, Rem, Sub};
1616

17-
#[cfg(target_arch = "spirv")]
18-
use spirv_std::num_traits::float::Float;
19-
2017
/// The struct that stores the context for the maths parser.
2118
/// This is currently just limited to supplying `a` and `b` until we add better node graph support and UI for variadic inputs.
2219
struct MathNodeContext {

node-graph/gcore/src/raster.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@ use spirv_std::num_traits::float::Float;
1313

1414
pub mod adjustments;
1515
pub mod bbox;
16-
#[cfg(not(target_arch = "spirv"))]
1716
pub mod brush_cache;
1817
pub mod color;
19-
#[cfg(not(target_arch = "spirv"))]
2018
pub mod curve;
2119
pub mod discrete_srgb;
2220

node-graph/gcore/src/raster/adjustments.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ use crate::vector::style::GradientStops;
1010
use crate::{Ctx, Node};
1111
use crate::{GraphicElement, GraphicGroupTable};
1212
use dyn_any::DynAny;
13-
#[cfg(feature = "serde")]
14-
#[cfg(target_arch = "spirv")]
15-
use spirv_std::num_traits::float::Float;
1613
use std::cmp::Ordering;
1714
use std::fmt::Debug;
1815

node-graph/gcore/src/raster/bbox.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
use dyn_any::DynAny;
22
use glam::{DAffine2, DVec2};
33

4-
#[cfg_attr(not(target_arch = "spirv"), derive(Debug))]
5-
#[derive(Clone, DynAny)]
4+
#[derive(Clone, Debug, DynAny)]
65
pub struct AxisAlignedBbox {
76
pub start: DVec2,
87
pub end: DVec2,
@@ -60,8 +59,7 @@ impl From<(DVec2, DVec2)> for AxisAlignedBbox {
6059
}
6160
}
6261

63-
#[cfg_attr(not(target_arch = "spirv"), derive(Debug))]
64-
#[derive(Clone)]
62+
#[derive(Clone, Debug)]
6563
pub struct Bbox {
6664
pub top_left: DVec2,
6765
pub top_right: DVec2,

node-graph/gcore/src/raster/color.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use dyn_any::DynAny;
55
use half::f16;
66
#[cfg(target_arch = "spirv")]
77
use spirv_std::num_traits::Euclid;
8-
#[cfg(feature = "serde")]
98
#[cfg(target_arch = "spirv")]
109
use spirv_std::num_traits::float::Float;
1110
use std::hash::Hash;

0 commit comments

Comments
 (0)