1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 22:30:03 -04:00
* Adapt to latest wgpu changes

* Point to latest wgpu commit

* Fix egui-wgpu winit

* wgpu 0.16

* Fix web compilation issue

* Add libloading to deny.toml skip

* lock fix after merge, sort deny skip list

---------

Co-authored-by: Andreas Reich <r_andreas2@web.de>
This commit is contained in:
Niklas Korz
2023-04-21 11:40:25 +02:00
committed by GitHub
parent 4d357b0f02
commit f962378243
7 changed files with 91 additions and 83 deletions

View File

@@ -116,7 +116,7 @@ pollster = { version = "0.3", optional = true } # needed for wgpu
glutin = { version = "0.30", optional = true }
glutin-winit = { version = "0.3.0", optional = true }
puffin = { version = "0.14", optional = true }
wgpu = { version = "0.15.0", optional = true }
wgpu = { version = "0.16.0", optional = true }
# mac:
[target.'cfg(any(target_os = "macos"))'.dependencies]
@@ -182,4 +182,4 @@ web-sys = { version = "0.3.58", features = [
# optional web:
egui-wgpu = { version = "0.21.0", path = "../egui-wgpu", optional = true } # if wgpu is used, use it without (!) winit
tts = { version = "0.25", optional = true, default-features = false }
wgpu = { version = "0.15.0", optional = true, features = ["webgl"] }
wgpu = { version = "0.16.0", optional = true, features = ["webgl"] }

View File

@@ -66,7 +66,7 @@ impl WebPainterWgpu {
dx12_shader_compiler: Default::default(),
});
let surface = instance
.create_surface_from_canvas(&canvas)
.create_surface_from_canvas(canvas.clone())
.map_err(|err| format!("failed to create wgpu surface: {err}"))?;
let adapter = instance

View File

@@ -43,7 +43,7 @@ epaint = { version = "0.21.0", path = "../epaint", default-features = false, fea
bytemuck = "1.7"
log = { version = "0.4", features = ["std"] }
type-map = "0.5.0"
wgpu = "0.15.0"
wgpu = "0.16.0"
#! ### Optional dependencies
## Enable this when generating docs.

View File

@@ -2,7 +2,7 @@
use std::num::NonZeroU64;
use std::ops::Range;
use std::{borrow::Cow, collections::HashMap, num::NonZeroU32};
use std::{borrow::Cow, collections::HashMap};
use type_map::concurrent::TypeMap;
use wgpu;
@@ -295,7 +295,7 @@ impl Renderer {
fragment: Some(wgpu::FragmentState {
module: &module,
entry_point: if output_color_format.describe().srgb {
entry_point: if output_color_format.is_srgb() {
log::warn!("Detected a linear (sRGBA aware) framebuffer {:?}. egui prefers Rgba8Unorm or Bgra8Unorm", output_color_format);
"fs_main_linear_framebuffer"
} else {
@@ -535,8 +535,8 @@ impl Renderer {
data_bytes,
wgpu::ImageDataLayout {
offset: 0,
bytes_per_row: NonZeroU32::new(4 * width),
rows_per_image: NonZeroU32::new(height),
bytes_per_row: Some(4 * width),
rows_per_image: Some(height),
},
size,
);

View File

@@ -407,7 +407,7 @@ impl Painter {
buffer,
layout: wgpu::ImageDataLayout {
offset: 0,
bytes_per_row: Some(std::num::NonZeroU32::new(padding.padded_bytes_per_row)?),
bytes_per_row: Some(padding.padded_bytes_per_row),
rows_per_image: None,
},
},