mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-22 23:05:43 +00:00
RenderPassCompatible now uses RenderPassDesc
This commit is contained in:
parent
9b09f3f3ba
commit
52cd9a022b
@ -137,7 +137,7 @@ impl<Rp, A> Framebuffer<Rp, A> {
|
||||
pub fn is_compatible_with<R>(&self, render_pass: &R) -> bool
|
||||
where R: RenderPassRef, Rp: RenderPassRef
|
||||
{
|
||||
self.render_pass.is_compatible_with(render_pass)
|
||||
self.render_pass.desc().is_compatible_with(render_pass.desc())
|
||||
}
|
||||
|
||||
/// Returns the width, height and layers of this framebuffer.
|
||||
|
@ -543,19 +543,19 @@ unsafe impl<A, B> RenderPassSubpassInterface<B> for A
|
||||
/// Trait implemented on render pass objects to check whether they are compatible
|
||||
/// with another render pass.
|
||||
///
|
||||
/// The trait is automatically implemented for all type that implement `RenderPassRef`.
|
||||
/// The trait is automatically implemented for all type that implement `RenderPassDesc`.
|
||||
// TODO: once specialization lands, this trait can be specialized for pairs that are known to
|
||||
// always be compatible
|
||||
// TODO: maybe this can be unimplemented on some pairs, to provide compile-time checks?
|
||||
pub unsafe trait RenderPassCompatible<Other>: RenderPassRef where Other: RenderPassRef {
|
||||
pub unsafe trait RenderPassCompatible<Other: ?Sized>: RenderPassDesc where Other: RenderPassDesc {
|
||||
/// Returns `true` if this layout is compatible with the other layout, as defined in the
|
||||
/// `Render Pass Compatibility` section of the Vulkan specs.
|
||||
// TODO: return proper error
|
||||
fn is_compatible_with(&self, other: &Other) -> bool;
|
||||
}
|
||||
|
||||
unsafe impl<A, B> RenderPassCompatible<B> for A
|
||||
where A: RenderPassRef, B: RenderPassRef
|
||||
unsafe impl<A, B: ?Sized> RenderPassCompatible<B> for A
|
||||
where A: RenderPassDesc, B: RenderPassDesc
|
||||
{
|
||||
fn is_compatible_with(&self, other: &B) -> bool {
|
||||
// FIXME:
|
||||
|
Loading…
Reference in New Issue
Block a user