mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Fix msaa-line example's unnecessary MSAA data store
This commit is contained in:
committed by
Dzmitry Malyshau
parent
39a0256bcb
commit
77b2c25684
@@ -250,21 +250,25 @@ impl framework::Example for Example {
|
||||
let mut encoder =
|
||||
device.create_command_encoder(&wgpu::CommandEncoderDescriptor { label: None });
|
||||
{
|
||||
let ops = wgpu::Operations {
|
||||
load: wgpu::LoadOp::Clear(wgpu::Color::BLACK),
|
||||
store: true,
|
||||
};
|
||||
let rpass_color_attachment = if self.sample_count == 1 {
|
||||
wgpu::RenderPassColorAttachment {
|
||||
view,
|
||||
resolve_target: None,
|
||||
ops,
|
||||
ops: wgpu::Operations {
|
||||
load: wgpu::LoadOp::Clear(wgpu::Color::BLACK),
|
||||
store: true,
|
||||
},
|
||||
}
|
||||
} else {
|
||||
wgpu::RenderPassColorAttachment {
|
||||
view: &self.multisampled_framebuffer,
|
||||
resolve_target: Some(view),
|
||||
ops,
|
||||
ops: wgpu::Operations {
|
||||
load: wgpu::LoadOp::Clear(wgpu::Color::BLACK),
|
||||
// Storing pre-resolve MSAA data is unnecessary if it isn't used later.
|
||||
// On tile-based GPU, avoid store can reduce your app's memory footprint.
|
||||
store: false,
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user