summaryrefslogtreecommitdiffstats
path: root/wgpu/src/backend.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-02-19 08:35:21 +0100
committerLibravatar GitHub <noreply@github.com>2024-02-19 08:35:21 +0100
commit121d220532c14e6fa85e333ccf4271477298445b (patch)
treeb107276f229ec3c9b1a05124591fdc6aed0bbdec /wgpu/src/backend.rs
parentc76a9eb2ff08ac242ed27d7fb11f536c1cc4411a (diff)
parent5d09632790fb4c0a756262c667a993e6da856e0c (diff)
downloadiced-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/backend.rs')
-rw-r--r--wgpu/src/backend.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/wgpu/src/backend.rs b/wgpu/src/backend.rs
index 77b6fa83..09ddbe4d 100644
--- a/wgpu/src/backend.rs
+++ b/wgpu/src/backend.rs
@@ -27,7 +27,6 @@ pub struct Backend {
text_pipeline: text::Pipeline,
triangle_pipeline: triangle::Pipeline,
pipeline_storage: pipeline::Storage,
-
#[cfg(any(feature = "image", feature = "svg"))]
image_pipeline: image::Pipeline,
}
@@ -35,6 +34,7 @@ pub struct Backend {
impl Backend {
/// Creates a new [`Backend`].
pub fn new(
+ _adapter: &wgpu::Adapter,
device: &wgpu::Device,
queue: &wgpu::Queue,
settings: Settings,
@@ -46,7 +46,11 @@ impl Backend {
triangle::Pipeline::new(device, format, settings.antialiasing);
#[cfg(any(feature = "image", feature = "svg"))]
- let image_pipeline = image::Pipeline::new(device, format);
+ let image_pipeline = {
+ let backend = _adapter.get_info().backend;
+
+ image::Pipeline::new(device, format, backend)
+ };
Self {
quad_pipeline,