reinitialise image slice on resize
This commit is contained in:
parent
81bf301666
commit
ecaac2afc1
1 changed files with 16 additions and 0 deletions
|
@ -479,6 +479,22 @@ impl VulkanWindowInner {
|
||||||
SwapchainData::new(resolutions, manager, &self.surface, &self.vulkan_data);
|
SwapchainData::new(resolutions, manager, &self.surface, &self.vulkan_data);
|
||||||
self.framebuffers =
|
self.framebuffers =
|
||||||
FramebufferData::new(&self.swapchain, &self.vulkan_data, self.renderpass);
|
FramebufferData::new(&self.swapchain, &self.vulkan_data, self.renderpass);
|
||||||
|
|
||||||
|
let image_ptr = self
|
||||||
|
.vulkan_data
|
||||||
|
.device
|
||||||
|
.map_memory(
|
||||||
|
self.swapchain.shader_input_image_buffer_memory,
|
||||||
|
0,
|
||||||
|
self.swapchain.shader_input_image_buffer_memory_req.size,
|
||||||
|
vk::MemoryMapFlags::empty(),
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
|
self.image_slice = Align::new(
|
||||||
|
image_ptr,
|
||||||
|
std::mem::align_of::<u8>() as u64,
|
||||||
|
self.swapchain.shader_input_image_buffer_memory_req.size,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe fn new_frame(&mut self, buffer: &[[u8; 4]]) {
|
unsafe fn new_frame(&mut self, buffer: &[[u8; 4]]) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue