diff options
author | 2024-02-19 08:35:21 +0100 | |
---|---|---|
committer | 2024-02-19 08:35:21 +0100 | |
commit | 121d220532c14e6fa85e333ccf4271477298445b (patch) | |
tree | b107276f229ec3c9b1a05124591fdc6aed0bbdec /wgpu/src/image.rs | |
parent | c76a9eb2ff08ac242ed27d7fb11f536c1cc4411a (diff) | |
parent | 5d09632790fb4c0a756262c667a993e6da856e0c (diff) | |
download | iced-121d220532c14e6fa85e333ccf4271477298445b.tar.gz iced-121d220532c14e6fa85e333ccf4271477298445b.tar.bz2 iced-121d220532c14e6fa85e333ccf4271477298445b.zip |
Merge pull request #2259 from PolyMeilex/wgpu-image-workaround-wgpu-gl-heuristics
[wgpu.image] Workaround WGPU OpenGL heuristics
Diffstat (limited to 'wgpu/src/image.rs')
-rw-r--r-- | wgpu/src/image.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/wgpu/src/image.rs b/wgpu/src/image.rs index 06c22870..c8e4a4c2 100644 --- a/wgpu/src/image.rs +++ b/wgpu/src/image.rs @@ -176,7 +176,11 @@ impl Data { } impl Pipeline { - pub fn new(device: &wgpu::Device, format: wgpu::TextureFormat) -> Self { + pub fn new( + device: &wgpu::Device, + format: wgpu::TextureFormat, + backend: wgpu::Backend, + ) -> Self { let nearest_sampler = device.create_sampler(&wgpu::SamplerDescriptor { address_mode_u: wgpu::AddressMode::ClampToEdge, address_mode_v: wgpu::AddressMode::ClampToEdge, @@ -318,7 +322,7 @@ impl Pipeline { multiview: None, }); - let texture_atlas = Atlas::new(device); + let texture_atlas = Atlas::new(device, backend); let texture = device.create_bind_group(&wgpu::BindGroupDescriptor { label: Some("iced_wgpu::image texture atlas bind group"), |