mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
Increase WGPU limits to what's supported by the adapter (#1251)
* Increase Wgpu limits * Fix compilation of shaders * Unbreak debug options
This commit is contained in:
committed by
Keavon Chambers
parent
7148b199ec
commit
6289d92e02
@@ -15,6 +15,9 @@ pub mod color;
|
||||
pub mod discrete_srgb;
|
||||
pub use adjustments::*;
|
||||
|
||||
#[cfg(target_arch = "spirv")]
|
||||
use num_traits::Float;
|
||||
|
||||
pub trait Linear {
|
||||
fn from_f32(x: f32) -> Self;
|
||||
fn to_f32(self) -> f32;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
use dyn_any::{DynAny, StaticType};
|
||||
use glam::{DAffine2, DVec2};
|
||||
|
||||
#[derive(Debug, Clone, DynAny)]
|
||||
#[cfg_attr(not(target_arch = "spirv"), derive(Debug))]
|
||||
#[derive(Clone, DynAny)]
|
||||
pub struct AxisAlignedBbox {
|
||||
pub start: DVec2,
|
||||
pub end: DVec2,
|
||||
@@ -45,7 +46,8 @@ impl AxisAlignedBbox {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
#[cfg_attr(not(target_arch = "spirv"), derive(Debug))]
|
||||
#[derive(Clone)]
|
||||
pub struct Bbox {
|
||||
pub top_left: DVec2,
|
||||
pub top_right: DVec2,
|
||||
|
||||
@@ -68,7 +68,7 @@ pub fn float_to_srgb_u8(mut f: f32) -> u8 {
|
||||
// We clamped f to [0, 1], and the integer representations
|
||||
// of the positive finite non-NaN floats are monotonic.
|
||||
// This makes the later LUT lookup panicless.
|
||||
unsafe { std::hint::unreachable_unchecked() }
|
||||
unsafe { core::hint::unreachable_unchecked() }
|
||||
}
|
||||
|
||||
// Compute a piecewise linear interpolation that is always
|
||||
|
||||
Reference in New Issue
Block a user