Improve layout handling of Image

This commit is contained in:
hodasemi 2023-01-18 11:41:46 +01:00
parent 6557e2ceee
commit f28a2184f7

View file

@ -678,8 +678,8 @@ impl Image {
self.file_name.as_ref() self.file_name.as_ref()
} }
pub fn convert_layout(me: &Arc<Image>, target_layout: VkImageLayout) -> Result<()> { pub fn convert_layout(self: &Arc<Self>, target_layout: VkImageLayout) -> Result<()> {
into_layout(me, target_layout) into_layout(self, target_layout)
} }
pub fn vk_format(&self) -> VkFormat { pub fn vk_format(&self) -> VkFormat {
@ -714,7 +714,7 @@ impl Image {
*self.image_layout.lock().unwrap() *self.image_layout.lock().unwrap()
} }
pub fn set_image_layout(&self, layout: VkImageLayout) { pub(crate) fn set_image_layout(&self, layout: VkImageLayout) {
*self.image_layout.lock().unwrap() = layout; *self.image_layout.lock().unwrap() = layout;
} }