summaryrefslogtreecommitdiffstats
path: root/wgpu/src/backend.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2023-11-28 23:25:42 +0100
committerLibravatar GitHub <noreply@github.com>2023-11-28 23:25:42 +0100
commit133f4da9014fcdc331ac44269209ee61ca56d007 (patch)
tree4165df808d50fbaa4cb9b27ded59077b769a4135 /wgpu/src/backend.rs
parent100d15f30654d446cffe2fb60a435c79c81b0188 (diff)
parentab7dae554cac801aeed5d9aa4d3850d50be86263 (diff)
downloadiced-133f4da9014fcdc331ac44269209ee61ca56d007.tar.gz
iced-133f4da9014fcdc331ac44269209ee61ca56d007.tar.bz2
iced-133f4da9014fcdc331ac44269209ee61ca56d007.zip
Merge pull request #2149 from iced-rs/fix/custom-pipeline-translation
Provide actual bounds to `Shader` primitives
Diffstat (limited to 'wgpu/src/backend.rs')
-rw-r--r--wgpu/src/backend.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/wgpu/src/backend.rs b/wgpu/src/backend.rs
index 88caad06..25134d68 100644
--- a/wgpu/src/backend.rs
+++ b/wgpu/src/backend.rs
@@ -192,9 +192,9 @@ impl Backend {
format,
device,
queue,
+ pipeline.bounds,
target_size,
scale_factor,
- transformation,
&mut self.pipeline_storage,
);
}
@@ -327,17 +327,17 @@ impl Backend {
let _ = ManuallyDrop::into_inner(render_pass);
for pipeline in &layer.pipelines {
- let bounds = (pipeline.bounds * scale_factor).snap();
+ let viewport = (pipeline.viewport * scale_factor).snap();
- if bounds.width < 1 || bounds.height < 1 {
+ if viewport.width < 1 || viewport.height < 1 {
continue;
}
pipeline.primitive.render(
&self.pipeline_storage,
- bounds,
target,
target_size,
+ viewport,
encoder,
);
}