mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-21 22:34:43 +00:00
Silently ignore new present modes (#1079)
This commit is contained in:
parent
e3c6c3b191
commit
9ea527fa67
@ -949,6 +949,8 @@ pub const PRESENT_MODE_IMMEDIATE_KHR: u32 = 0;
|
||||
pub const PRESENT_MODE_MAILBOX_KHR: u32 = 1;
|
||||
pub const PRESENT_MODE_FIFO_KHR: u32 = 2;
|
||||
pub const PRESENT_MODE_FIFO_RELAXED_KHR: u32 = 3;
|
||||
pub const PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR: u32 = 1000111000;
|
||||
pub const PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR: u32 = 1000111001;
|
||||
|
||||
pub type SurfaceTransformFlagBitsKHR = u32;
|
||||
pub const SURFACE_TRANSFORM_IDENTITY_BIT_KHR: u32 = 0x00000001;
|
||||
|
@ -82,6 +82,11 @@ pub enum PresentMode {
|
||||
///
|
||||
/// This is the equivalent of OpenGL's `SwapInterval` with a value of -1.
|
||||
Relaxed = vk::PRESENT_MODE_FIFO_RELAXED_KHR,
|
||||
|
||||
// TODO: These can't be enabled yet because they have to be used with shared present surfaces
|
||||
// which vulkano doesnt support yet.
|
||||
//SharedDemand = vk::PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR,
|
||||
//SharedContinuous = vk::PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR,
|
||||
}
|
||||
|
||||
/// List of `PresentMode`s that are supported.
|
||||
@ -91,6 +96,8 @@ pub struct SupportedPresentModes {
|
||||
pub mailbox: bool,
|
||||
pub fifo: bool,
|
||||
pub relaxed: bool,
|
||||
pub shared_demand: bool,
|
||||
pub shared_continuous: bool,
|
||||
}
|
||||
|
||||
pub fn supported_present_modes_from_list<I>(elem: I) -> SupportedPresentModes
|
||||
@ -103,7 +110,9 @@ pub fn supported_present_modes_from_list<I>(elem: I) -> SupportedPresentModes
|
||||
vk::PRESENT_MODE_MAILBOX_KHR => result.mailbox = true,
|
||||
vk::PRESENT_MODE_FIFO_KHR => result.fifo = true,
|
||||
vk::PRESENT_MODE_FIFO_RELAXED_KHR => result.relaxed = true,
|
||||
_ => panic!("Wrong value for vk::PresentModeKHR"),
|
||||
vk::PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR => result.shared_demand = true,
|
||||
vk::PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR => result.shared_continuous = true,
|
||||
_ => { }
|
||||
}
|
||||
}
|
||||
result
|
||||
@ -118,6 +127,8 @@ impl SupportedPresentModes {
|
||||
mailbox: false,
|
||||
fifo: false,
|
||||
relaxed: false,
|
||||
shared_demand: false,
|
||||
shared_continuous: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user