VkSwapchain: Revert rename surface_resolution
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 0s
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 0s
This commit is contained in:
parent
210a5504ab
commit
fc4a856048
1 changed files with 6 additions and 6 deletions
|
@ -13,7 +13,7 @@ pub struct VkSwapchain {
|
|||
|
||||
pub(super) desired_image_count: u32,
|
||||
pub(super) surface_format: vk::SurfaceFormatKHR,
|
||||
pub(super) swapchain_extent: vk::Extent2D,
|
||||
pub(super) surface_resolution: vk::Extent2D,
|
||||
pub(super) present_mode: vk::PresentModeKHR,
|
||||
pub(super) pre_transform: vk::SurfaceTransformFlagsKHR,
|
||||
|
||||
|
@ -63,7 +63,7 @@ impl VkSwapchain {
|
|||
swapchain_support_details,
|
||||
desired_image_count,
|
||||
surface_format,
|
||||
swapchain_extent,
|
||||
surface_resolution: swapchain_extent,
|
||||
present_mode,
|
||||
pre_transform,
|
||||
present_images: None,
|
||||
|
@ -124,10 +124,10 @@ impl VkSwapchain {
|
|||
vk::Extent2D { width, height },
|
||||
&self.swapchain_support_details.1,
|
||||
);
|
||||
if chosen_extent.width != self.swapchain_extent.width
|
||||
|| chosen_extent.height != self.swapchain_extent.height
|
||||
if chosen_extent.width != self.surface_resolution.width
|
||||
|| chosen_extent.height != self.surface_resolution.height
|
||||
{
|
||||
self.swapchain_extent = chosen_extent;
|
||||
self.surface_resolution = chosen_extent;
|
||||
log::debug!(target: LOG_TARGET, "New resolution applied ({}x{})", chosen_extent.width, chosen_extent.height);
|
||||
|
||||
self.create_swapchain()?;
|
||||
|
@ -144,7 +144,7 @@ impl VkSwapchain {
|
|||
.min_image_count(self.desired_image_count)
|
||||
.image_color_space(self.surface_format.color_space)
|
||||
.image_format(self.surface_format.format)
|
||||
.image_extent(self.swapchain_extent)
|
||||
.image_extent(self.surface_resolution)
|
||||
.image_usage(vk::ImageUsageFlags::COLOR_ATTACHMENT)
|
||||
.image_sharing_mode(vk::SharingMode::EXCLUSIVE)
|
||||
.pre_transform(self.pre_transform)
|
||||
|
|
Loading…
Reference in a new issue