mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
A few minor lints and docs (#1436)
* A few minor lints and docs * Added required packages to compile on Debian-style linux * Inlined some format args, and removed some `&` in args (they cause about 6% slowdown that compiler cannot inline) * a few spelling mistakes * fix fmt
This commit is contained in:
@@ -206,11 +206,11 @@ impl gpu_executor::GpuExecutor for WgpuExecutor {
|
||||
}
|
||||
|
||||
fn create_output_buffer(&self, len: usize, ty: Type, cpu_readable: bool) -> Result<WgpuShaderInput> {
|
||||
log::debug!("Creating output buffer with len: {}", len);
|
||||
log::debug!("Creating output buffer with len: {len}");
|
||||
let create_buffer = |usage| {
|
||||
Ok::<_, anyhow::Error>(self.context.device.create_buffer(&BufferDescriptor {
|
||||
label: None,
|
||||
size: len as u64 * ty.size().ok_or_else(|| anyhow::anyhow!("Cannot create buffer of type {:?}", ty))? as u64,
|
||||
size: len as u64 * ty.size().ok_or_else(|| anyhow::anyhow!("Cannot create buffer of type {ty:?}"))? as u64,
|
||||
usage,
|
||||
mapped_at_creation: false,
|
||||
}))
|
||||
@@ -290,7 +290,7 @@ impl gpu_executor::GpuExecutor for WgpuExecutor {
|
||||
|
||||
let surface = &canvas.as_ref().surface;
|
||||
let surface_caps = surface.get_capabilities(&self.context.adapter);
|
||||
println!("{:?}", surface_caps);
|
||||
println!("{surface_caps:?}");
|
||||
if surface_caps.formats.is_empty() {
|
||||
log::warn!("No surface formats available");
|
||||
//return Ok(());
|
||||
@@ -455,7 +455,7 @@ impl gpu_executor::GpuExecutor for WgpuExecutor {
|
||||
|
||||
let size = window.surface.inner_size();
|
||||
let surface_caps = surface.get_capabilities(&self.context.adapter);
|
||||
println!("{:?}", surface_caps);
|
||||
println!("{surface_caps:?}");
|
||||
let surface_format = wgpu::TextureFormat::Bgra8Unorm;
|
||||
let config = wgpu::SurfaceConfiguration {
|
||||
usage: wgpu::TextureUsages::RENDER_ATTACHMENT,
|
||||
|
||||
Reference in New Issue
Block a user