diff --git a/CHANGELOG_VULKANO.md b/CHANGELOG_VULKANO.md index 67abf86c..635dbae9 100644 --- a/CHANGELOG_VULKANO.md +++ b/CHANGELOG_VULKANO.md @@ -2,6 +2,7 @@ - Add support for `#include "..."` and `#include <...>` directives within source files. +- Add a `union` method for the extensions types. # Version 0.11.1 (2018-11-16) diff --git a/vulkano/src/extensions.rs b/vulkano/src/extensions.rs index 5b40e15c..302fc198 100644 --- a/vulkano/src/extensions.rs +++ b/vulkano/src/extensions.rs @@ -42,6 +42,17 @@ macro_rules! extensions { } } + /// Returns the union of this list and another list. + #[inline] + pub fn union(&self, other: &$sname) -> $sname { + $sname { + $( + $ext: self.$ext || other.$ext, + )* + _unbuildable: Unbuildable(()) + } + } + /// Returns the intersection of this list and another list. #[inline] pub fn intersection(&self, other: &$sname) -> $sname {