mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Merge #168
168: Enforce life times of render pass attachments r=kvark a=kvark Fixes #167 Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
This commit is contained in:
@@ -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:
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user