Update dependencies

Update various dependencies to latest.
This commit is contained in:
Raph Levien 2022-09-21 17:20:34 -07:00
parent 9dd4559b00
commit 8e3df2573c
11 changed files with 549 additions and 263 deletions

749
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -7,12 +7,12 @@ license = "MIT/Apache-2.0"
edition = "2018"
[dependencies]
ash = "0.33"
ash-window = "0.7"
raw-window-handle = "0.3"
bitflags = "1.2.1"
smallvec = "1.6.1"
bytemuck = "1.7.2"
ash = "0.37"
ash-window = "0.11"
raw-window-handle = "0.5"
bitflags = "1.3.2"
smallvec = "1.9"
bytemuck = "1.12.1"
[target.'cfg(target_os="windows")'.dependencies]
winapi = { version = "0.3.9", features = [
@ -24,8 +24,10 @@ winapi = { version = "0.3.9", features = [
wio = "0.2.2"
[target.'cfg(target_os="macos")'.dependencies]
metal = "0.22"
objc = "0.2.5"
metal = "0.24"
objc = "0.2.7"
block = "0.1.6"
cocoa-foundation = "0.1"
# Note: foreign-types is up to 0.5 but metal hasn't upgraded to it
foreign-types = "0.3.2"
core-graphics-types = "0.1.1"

View file

@ -29,7 +29,8 @@ use objc::rc::autoreleasepool;
use objc::runtime::{Object, BOOL, YES};
use objc::{class, msg_send, sel, sel_impl};
use metal::{CGFloat, CommandBufferRef, MTLFeatureSet};
use metal::{CommandBufferRef, MTLFeatureSet};
use core_graphics_types::base::CGFloat;
use raw_window_handle::{HasRawWindowHandle, RawWindowHandle};
@ -141,7 +142,7 @@ impl MtlInstance {
&self,
window_handle: &dyn HasRawWindowHandle,
) -> Result<MtlSurface, Error> {
if let RawWindowHandle::MacOS(handle) = window_handle.raw_window_handle() {
if let RawWindowHandle::AppKit(handle) = window_handle.raw_window_handle() {
Ok(Self::make_surface(handle.ns_view as id, handle.ns_window as id).unwrap())
} else {
Err("can't create surface for window handle".into())

View file

@ -16,7 +16,7 @@
//! Utilities and types for Metal integration
use metal::{CGFloat, CGSize};
use core_graphics_types::{base::CGFloat, geometry::CGSize};
#[link(name = "QuartzCore", kind = "framework")]
extern "C" {

View file

@ -28,11 +28,11 @@ path = "../piet-gpu-types"
[dependencies]
piet = "0.2.0"
png = "0.16.2"
rand = "0.7.3"
png = "0.17.6"
rand = "0.8.5"
roxmltree = "0.13"
winit = "0.26.1"
clap = "2.33"
winit = "0.27.3"
clap = "3.2.22"
swash = "0.1.4"
bytemuck = { version = "1.7.2", features = ["derive"] }

View file

@ -218,10 +218,10 @@ fn trace_ptcl(buf: &[u32]) {
fn main() -> Result<(), Error> {
let matches = App::new("piet-gpu test")
.arg(Arg::with_name("INPUT").index(1))
.arg(Arg::with_name("flip").short("f").long("flip"))
.arg(Arg::with_name("flip").short('f').long("flip"))
.arg(
Arg::with_name("scale")
.short("s")
.short('s')
.long("scale")
.takes_value(true),
)
@ -278,7 +278,7 @@ fn main() -> Result<(), Error> {
let ref mut w = BufWriter::new(file);
let mut encoder = png::Encoder::new(w, WIDTH as u32, HEIGHT as u32);
encoder.set_color(png::ColorType::RGBA);
encoder.set_color(png::ColorType::Rgba);
encoder.set_depth(png::BitDepth::Eight);
let mut writer = encoder.write_header().unwrap();

View file

@ -20,10 +20,10 @@ const HEIGHT: usize = 1536;
fn main() -> Result<(), Error> {
let matches = App::new("piet-gpu test")
.arg(Arg::with_name("INPUT").index(1))
.arg(Arg::with_name("flip").short("f").long("flip"))
.arg(Arg::with_name("flip").short('f').long("flip"))
.arg(
Arg::with_name("scale")
.short("s")
.short('s')
.long("scale")
.takes_value(true),
)

View file

@ -2,7 +2,7 @@
use rand::{Rng, RngCore};
use crate::{Blend, BlendMode, Colrv1RadialGradient, CompositionMode, PietGpuRenderContext};
use crate::{Blend, BlendMode, Colrv1RadialGradient, PietGpuRenderContext};
use piet::kurbo::{Affine, BezPath, Circle, Line, Point, Rect, Shape};
use piet::{
Color, GradientStop, LinearGradient, Text, TextAttribute, TextLayoutBuilder, UnitPoint,
@ -34,10 +34,10 @@ pub fn render_scene(rc: &mut PietGpuRenderContext) {
for _ in 0..N_CIRCLES {
let color = Color::from_rgba32_u32(rng.next_u32());
let center = Point::new(
rng.gen_range(0.0, WIDTH as f64),
rng.gen_range(0.0, HEIGHT as f64),
rng.gen_range(0.0..WIDTH as f64),
rng.gen_range(0.0..HEIGHT as f64),
);
let radius = rng.gen_range(0.0, 50.0);
let radius = rng.gen_range(0.0..50.0);
let circle = Circle::new(center, radius);
rc.fill(circle, &color);
}

View file

@ -10,7 +10,7 @@ edition = "2021"
default = ["piet-gpu"]
[dependencies]
clap = "2.33"
clap = "3.2.22"
bytemuck = "1.7.2"
kurbo = "0.7.1"
rand = "0.7.3"

View file

@ -17,7 +17,7 @@
//! Tests for the piet-gpu draw object stage.
use piet_gpu_hal::{BufWrite, BufferUsage};
use rand::{seq::SliceRandom, Rng};
use rand::{seq::SliceRandom};
use crate::{Config, Runner, TestResult};

View file

@ -42,27 +42,27 @@ fn main() {
let matches = App::new("piet-gpu-tests")
.arg(
Arg::with_name("verbose")
.short("v")
.short('v')
.long("verbose")
.help("Verbose reporting of results"),
)
.arg(
Arg::with_name("groups")
.short("g")
.short('g')
.long("groups")
.help("Groups to run")
.takes_value(true),
)
.arg(
Arg::with_name("size")
.short("s")
.short('s')
.long("size")
.help("Size of tests")
.takes_value(true),
)
.arg(
Arg::with_name("n_iter")
.short("n")
.short('n')
.long("n_iter")
.help("Number of iterations")
.takes_value(true),