Upgrade to wgpu 24 (#127)
This commit is contained in:
parent
7264e5f324
commit
bff018f6af
7 changed files with 23 additions and 15 deletions
|
@ -7,7 +7,7 @@ use lru::LruCache;
|
|||
use rustc_hash::FxHasher;
|
||||
use std::{collections::HashSet, hash::BuildHasherDefault, sync::Arc};
|
||||
use wgpu::{
|
||||
BindGroup, DepthStencilState, Device, Extent3d, ImageCopyTexture, ImageDataLayout,
|
||||
BindGroup, DepthStencilState, Device, Extent3d, TexelCopyTextureInfo, TexelCopyBufferLayout,
|
||||
MultisampleState, Origin3d, Queue, RenderPipeline, Texture, TextureAspect, TextureDescriptor,
|
||||
TextureDimension, TextureFormat, TextureUsages, TextureView, TextureViewDescriptor,
|
||||
};
|
||||
|
@ -186,7 +186,7 @@ impl InnerAtlas {
|
|||
};
|
||||
|
||||
queue.write_texture(
|
||||
ImageCopyTexture {
|
||||
TexelCopyTextureInfo {
|
||||
texture: &self.texture,
|
||||
mip_level: 0,
|
||||
origin: Origin3d {
|
||||
|
@ -197,7 +197,7 @@ impl InnerAtlas {
|
|||
aspect: TextureAspect::All,
|
||||
},
|
||||
&image_data,
|
||||
ImageDataLayout {
|
||||
TexelCopyBufferLayout {
|
||||
offset: 0,
|
||||
bytes_per_row: Some(width as u32 * self.kind.num_channels() as u32),
|
||||
rows_per_image: None,
|
||||
|
|
|
@ -6,8 +6,8 @@ use crate::{
|
|||
use cosmic_text::{Color, SubpixelBin};
|
||||
use std::{slice, sync::Arc};
|
||||
use wgpu::{
|
||||
Buffer, BufferDescriptor, BufferUsages, DepthStencilState, Device, Extent3d, ImageCopyTexture,
|
||||
ImageDataLayout, MultisampleState, Origin3d, Queue, RenderPass, RenderPipeline, TextureAspect,
|
||||
Buffer, BufferDescriptor, BufferUsages, DepthStencilState, Device, Extent3d, TexelCopyTextureInfo,
|
||||
TexelCopyBufferLayout, MultisampleState, Origin3d, Queue, RenderPass, RenderPipeline, TextureAspect,
|
||||
COPY_BUFFER_ALIGNMENT,
|
||||
};
|
||||
|
||||
|
@ -468,7 +468,7 @@ where
|
|||
let atlas_min = allocation.rectangle.min;
|
||||
|
||||
queue.write_texture(
|
||||
ImageCopyTexture {
|
||||
TexelCopyTextureInfo {
|
||||
texture: &inner.texture,
|
||||
mip_level: 0,
|
||||
origin: Origin3d {
|
||||
|
@ -479,7 +479,7 @@ where
|
|||
aspect: TextureAspect::All,
|
||||
},
|
||||
&image.data,
|
||||
ImageDataLayout {
|
||||
TexelCopyBufferLayout {
|
||||
offset: 0,
|
||||
bytes_per_row: Some(image.width as u32 * inner.num_channels() as u32),
|
||||
rows_per_image: None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue