wgpu 0.16
This commit is contained in:
parent
99fc717b7c
commit
8122904ca4
4 changed files with 6 additions and 7 deletions
|
|
@ -72,7 +72,6 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
backends: backend,
|
backends: backend,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
});
|
});
|
||||||
|
|
||||||
let surface = unsafe { instance.create_surface(&window) }?;
|
let surface = unsafe { instance.create_surface(&window) }?;
|
||||||
|
|
||||||
let (format, (device, queue)) = futures::executor::block_on(async {
|
let (format, (device, queue)) = futures::executor::block_on(async {
|
||||||
|
|
@ -99,7 +98,7 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
capabilities
|
capabilities
|
||||||
.formats
|
.formats
|
||||||
.iter()
|
.iter()
|
||||||
.filter(|format| format.describe().srgb)
|
.filter(|format| format.is_srgb())
|
||||||
.copied()
|
.copied()
|
||||||
.next()
|
.next()
|
||||||
.or_else(|| capabilities.formats.first().copied())
|
.or_else(|| capabilities.formats.first().copied())
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,8 @@ spirv = ["wgpu/spirv"]
|
||||||
webgl = ["wgpu/webgl"]
|
webgl = ["wgpu/webgl"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
wgpu = "0.15"
|
wgpu = "0.16"
|
||||||
wgpu_glyph = "0.19"
|
wgpu_glyph = "0.20"
|
||||||
glyph_brush = "0.7"
|
glyph_brush = "0.7"
|
||||||
raw-window-handle = "0.5"
|
raw-window-handle = "0.5"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
|
|
|
||||||
|
|
@ -209,8 +209,8 @@ impl Atlas {
|
||||||
buffer,
|
buffer,
|
||||||
layout: wgpu::ImageDataLayout {
|
layout: wgpu::ImageDataLayout {
|
||||||
offset: offset as u64,
|
offset: offset as u64,
|
||||||
bytes_per_row: NonZeroU32::new(4 * image_width + padding),
|
bytes_per_row: Some(4 * image_width + padding),
|
||||||
rows_per_image: NonZeroU32::new(image_height),
|
rows_per_image: Some(image_height),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
wgpu::ImageCopyTexture {
|
wgpu::ImageCopyTexture {
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ impl<Theme> Compositor<Theme> {
|
||||||
capabilities
|
capabilities
|
||||||
.formats
|
.formats
|
||||||
.iter()
|
.iter()
|
||||||
.filter(|format| format.describe().srgb)
|
.filter(|format| format.is_srgb())
|
||||||
.copied()
|
.copied()
|
||||||
.next()
|
.next()
|
||||||
.or_else(|| {
|
.or_else(|| {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue