Skip to content
This repository has been archived by the owner on Jun 18, 2021. It is now read-only.

Commit

Permalink
Merge #168
Browse files Browse the repository at this point in the history
168: Enforce life times of render pass attachments r=kvark a=kvark

Fixes #167

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
  • Loading branch information
bors[bot] and kvark authored Jan 31, 2020
2 parents d512e3c + db8109f commit 874950c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,9 @@ pub type RenderPassDepthStencilAttachmentDescriptor<'a> =

/// A description of all the attachments of a render pass.
#[derive(Debug)]
pub struct RenderPassDescriptor<'a> {
pub struct RenderPassDescriptor<'a, 'b> {
/// The color attachments of the render pass.
pub color_attachments: &'a [RenderPassColorAttachmentDescriptor<'a>],
pub color_attachments: &'b [RenderPassColorAttachmentDescriptor<'a>],

/// The depth and stencil attachment of the render pass, if any.
pub depth_stencil_attachment:
Expand Down Expand Up @@ -1071,7 +1071,10 @@ impl CommandEncoder {
/// Begins recording of a render pass.
///
/// This function returns a [`RenderPass`] object which records a single render pass.
pub fn begin_render_pass(&mut self, desc: &RenderPassDescriptor) -> RenderPass {
pub fn begin_render_pass<'a>(
&'a mut self,
desc: &RenderPassDescriptor<'a, '_>,
) -> RenderPass<'a> {
let colors = desc
.color_attachments
.iter()
Expand Down

0 comments on commit 874950c

Please sign in to comment.