diff options
Diffstat (limited to 'flowy')
-rw-r--r-- | flowy/Cargo.toml | 8 | ||||
-rw-r--r-- | flowy/src/main.rs | 4 | ||||
-rw-r--r-- | flowy/src/motion/debug.rs | 5 | ||||
-rw-r--r-- | flowy/src/motion/dec.rs | 5 | ||||
-rw-r--r-- | flowy/src/motion/enc.rs | 5 | ||||
-rw-r--r-- | flowy/src/motion/enc.wgsl | 3 |
6 files changed, 17 insertions, 13 deletions
diff --git a/flowy/Cargo.toml b/flowy/Cargo.toml index 3c9696b..5829cae 100644 --- a/flowy/Cargo.toml +++ b/flowy/Cargo.toml @@ -4,10 +4,10 @@ version = "0.1.0" edition = "2021" [dependencies] -wgpu = "0.18.0" -bytemuck = { version = "1.14.0", features = ["derive"] } +wgpu = "0.20.0" +bytemuck = { version = "1.15.0", features = ["derive"] } pollster = "0.3.0" -env_logger = "0.10.1" -log = "0.4.20" +env_logger = "0.11.3" +log = "0.4.21" oneshot = "0.1.6" framework = { path = "../framework" } diff --git a/flowy/src/main.rs b/flowy/src/main.rs index 33ab4c9..535de7e 100644 --- a/flowy/src/main.rs +++ b/flowy/src/main.rs @@ -39,8 +39,8 @@ fn main() { .request_device( &DeviceDescriptor { label: None, - features: Features::empty(), - limits: Limits::default(), + required_features: Features::empty(), + required_limits: Limits::default(), }, None, ) diff --git a/flowy/src/motion/debug.rs b/flowy/src/motion/debug.rs index 9029b87..5e5f4ee 100644 --- a/flowy/src/motion/debug.rs +++ b/flowy/src/motion/debug.rs @@ -4,8 +4,8 @@ use std::mem::size_of; use wgpu::{ include_wgsl, BindGroup, BindGroupDescriptor, BindGroupEntry, BindGroupLayoutDescriptor, BindGroupLayoutEntry, BindingType, Buffer, BufferDescriptor, BufferUsages, CommandEncoder, - ComputePipeline, ComputePipelineDescriptor, Device, PipelineLayoutDescriptor, Queue, - ShaderStages, TextureSampleType, TextureViewDimension, + ComputePipeline, ComputePipelineDescriptor, Device, PipelineCompilationOptions, + PipelineLayoutDescriptor, Queue, ShaderStages, TextureSampleType, TextureViewDimension, }; pub struct MotionDebugger { @@ -145,6 +145,7 @@ impl MotionDebugger { layout: Some(&pipeline_layout), module: &module, entry_point: "main", + compilation_options: PipelineCompilationOptions::default(), }); Self { diff --git a/flowy/src/motion/dec.rs b/flowy/src/motion/dec.rs index e62347c..cc1812f 100644 --- a/flowy/src/motion/dec.rs +++ b/flowy/src/motion/dec.rs @@ -4,8 +4,8 @@ use std::mem::size_of; use wgpu::{ include_wgsl, BindGroup, BindGroupDescriptor, BindGroupEntry, BindGroupLayoutDescriptor, BindGroupLayoutEntry, BindingType, Buffer, BufferDescriptor, BufferUsages, CommandEncoder, - ComputePipeline, ComputePipelineDescriptor, Device, PipelineLayoutDescriptor, Queue, - ShaderStages, TextureSampleType, TextureViewDimension, + ComputePipeline, ComputePipelineDescriptor, Device, PipelineCompilationOptions, + PipelineLayoutDescriptor, Queue, ShaderStages, TextureSampleType, TextureViewDimension, }; pub struct MotionDecoder { @@ -123,6 +123,7 @@ impl MotionDecoder { let pipeline = device.create_compute_pipeline(&ComputePipelineDescriptor { label: None, layout: Some(&pipeline_layout), + compilation_options: PipelineCompilationOptions::default(), module: &module, entry_point: "main", }); diff --git a/flowy/src/motion/enc.rs b/flowy/src/motion/enc.rs index 1a46aa6..a8fd96f 100644 --- a/flowy/src/motion/enc.rs +++ b/flowy/src/motion/enc.rs @@ -4,8 +4,8 @@ use std::mem::size_of; use wgpu::{ include_wgsl, BindGroup, BindGroupDescriptor, BindGroupEntry, BindGroupLayoutDescriptor, BindGroupLayoutEntry, BindingType, Buffer, BufferDescriptor, BufferUsages, CommandEncoder, - ComputePipeline, ComputePipelineDescriptor, Device, PipelineLayoutDescriptor, Queue, - ShaderStages, TextureSampleType, TextureViewDimension, + ComputePipeline, ComputePipelineDescriptor, Device, PipelineCompilationOptions, + PipelineLayoutDescriptor, Queue, ShaderStages, TextureSampleType, TextureViewDimension, }; pub struct MotionEncoder { @@ -126,6 +126,7 @@ impl MotionEncoder { let module = device.create_shader_module(include_wgsl!("enc.wgsl")); let pipeline = device.create_compute_pipeline(&ComputePipelineDescriptor { label: None, + compilation_options: PipelineCompilationOptions::default(), layout: Some(&pipeline_layout), module: &module, entry_point: "main", diff --git a/flowy/src/motion/enc.wgsl b/flowy/src/motion/enc.wgsl index ca3c769..dbc6410 100644 --- a/flowy/src/motion/enc.wgsl +++ b/flowy/src/motion/enc.wgsl @@ -21,7 +21,8 @@ var<private> best_offset: vec2<i32> = vec2(0); var<private> best_error: f32 = 100000.; var<private> best_tint: vec3<f32> = vec3(0.); -@compute @workgroup_size(1)fn main(@builtin(global_invocation_id) global_id: vec3<u32>) { +@compute @workgroup_size(1) +fn main(@builtin(global_invocation_id) global_id: vec3<u32>) { let uv = vec2<i32>(global_id.xy) * params.block_size; loop { |