vulkan: don't call vkCmdClearAttachments if damage is empty
This commit is contained in:
parent
8a3a377f61
commit
bbe8fdecf8
1 changed files with 22 additions and 20 deletions
|
|
@ -50,7 +50,7 @@ use {
|
||||||
SubmitInfo2, Viewport, WriteDescriptorSet,
|
SubmitInfo2, Viewport, WriteDescriptorSet,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
isnt::std_1::collections::IsntHashMapExt,
|
isnt::std_1::{collections::IsntHashMapExt, primitive::IsntSliceExt},
|
||||||
linearize::{Linearize, StaticMap, static_map},
|
linearize::{Linearize, StaticMap, static_map},
|
||||||
std::{
|
std::{
|
||||||
cell::{Cell, RefCell},
|
cell::{Cell, RefCell},
|
||||||
|
|
@ -543,6 +543,7 @@ impl VulkanRenderer {
|
||||||
unsafe {
|
unsafe {
|
||||||
self.device.device.cmd_begin_rendering(buf, &rendering_info);
|
self.device.device.cmd_begin_rendering(buf, &rendering_info);
|
||||||
}
|
}
|
||||||
|
if memory.paint_regions.is_not_empty() {
|
||||||
if let Some(clear) = manual_clear {
|
if let Some(clear) = manual_clear {
|
||||||
let clear_attachment = ClearAttachment::default()
|
let clear_attachment = ClearAttachment::default()
|
||||||
.color_attachment(0)
|
.color_attachment(0)
|
||||||
|
|
@ -565,6 +566,7 @@ impl VulkanRenderer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn set_viewport(&self, buf: CommandBuffer, fb: &VulkanImage) {
|
fn set_viewport(&self, buf: CommandBuffer, fb: &VulkanImage) {
|
||||||
zone!("set_viewport");
|
zone!("set_viewport");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue