You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Trac3r-rust/doc/vulkano/command_buffer/trait.CommandBuffer.html

61 lines
38 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `CommandBuffer` trait in crate `vulkano`."><meta name="keywords" content="rust, rustlang, rust-lang, CommandBuffer"><title>vulkano::command_buffer::CommandBuffer - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../vulkano/index.html'><div class='logo-container'><img src='https://raw.githubusercontent.com/vulkano-rs/vulkano/master/logo.png' alt='logo'></div></a><p class='location'>Trait CommandBuffer</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#associated-types">Associated Types</a><div class="sidebar-links"><a href="#associatedtype.PoolAlloc">PoolAlloc</a></div><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.check_buffer_access">check_buffer_access</a><a href="#tymethod.check_image_access">check_image_access</a><a href="#tymethod.inner">inner</a><a href="#tymethod.lock_submit">lock_submit</a><a href="#tymethod.unlock">unlock</a></div><a class="sidebar-title" href="#provided-methods">Provided Methods</a><div class="sidebar-links"><a href="#method.execute">execute</a><a href="#method.execute_after">execute_after</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='../index.html'>vulkano</a>::<wbr><a href='index.html'>command_buffer</a></p><script>window.sidebarCurrent = {name: 'CommandBuffer', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/vulkano/command_buffer/traits.rs.html#38-147' title='goto source code'>[src]</a></span><span class='in-band'>Trait <a href='../index.html'>vulkano</a>::<wbr><a href='index.html'>command_buffer</a>::<wbr><a class="trait" href=''>CommandBuffer</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust trait'>pub unsafe trait CommandBuffer: <a class="trait" href="../../vulkano/device/trait.DeviceOwned.html" title="trait vulkano::device::DeviceOwned">DeviceOwned</a> {
type <a href='#associatedtype.PoolAlloc' class="type">PoolAlloc</a>;
fn <a href='#tymethod.inner' class='fnname'>inner</a>(&amp;self) -&gt; &amp;<a class="struct" href="../../vulkano/command_buffer/sys/struct.UnsafeCommandBuffer.html" title="struct vulkano::command_buffer::sys::UnsafeCommandBuffer">UnsafeCommandBuffer</a>&lt;Self::<a class="type" href="../../vulkano/command_buffer/trait.CommandBuffer.html#associatedtype.PoolAlloc" title="type vulkano::command_buffer::CommandBuffer::PoolAlloc">PoolAlloc</a>&gt;;
<div class='item-spacer'></div> fn <a href='#tymethod.lock_submit' class='fnname'>lock_submit</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;future: &amp;dyn <a class="trait" href="../../vulkano/sync/trait.GpuFuture.html" title="trait vulkano::sync::GpuFuture">GpuFuture</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue: &amp;<a class="struct" href="../../vulkano/device/struct.Queue.html" title="struct vulkano::device::Queue">Queue</a><br>&nbsp;&nbsp;&nbsp;&nbsp;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="../../vulkano/command_buffer/enum.CommandBufferExecError.html" title="enum vulkano::command_buffer::CommandBufferExecError">CommandBufferExecError</a>&gt;;
<div class='item-spacer'></div> unsafe fn <a href='#tymethod.unlock' class='fnname'>unlock</a>(&amp;self);
<div class='item-spacer'></div> fn <a href='#tymethod.check_buffer_access' class='fnname'>check_buffer_access</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;buffer: &amp;dyn <a class="trait" href="../../vulkano/buffer/trait.BufferAccess.html" title="trait vulkano::buffer::BufferAccess">BufferAccess</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exclusive: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue: &amp;<a class="struct" href="../../vulkano/device/struct.Queue.html" title="struct vulkano::device::Queue">Queue</a><br>&nbsp;&nbsp;&nbsp;&nbsp;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../vulkano/sync/struct.PipelineStages.html" title="struct vulkano::sync::PipelineStages">PipelineStages</a>, <a class="struct" href="../../vulkano/sync/struct.AccessFlagBits.html" title="struct vulkano::sync::AccessFlagBits">AccessFlagBits</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;, <a class="enum" href="../../vulkano/sync/enum.AccessCheckError.html" title="enum vulkano::sync::AccessCheckError">AccessCheckError</a>&gt;;
<div class='item-spacer'></div> fn <a href='#tymethod.check_image_access' class='fnname'>check_image_access</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;image: &amp;dyn <a class="trait" href="../../vulkano/image/traits/trait.ImageAccess.html" title="trait vulkano::image::traits::ImageAccess">ImageAccess</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;layout: <a class="enum" href="../../vulkano/image/enum.ImageLayout.html" title="enum vulkano::image::ImageLayout">ImageLayout</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exclusive: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue: &amp;<a class="struct" href="../../vulkano/device/struct.Queue.html" title="struct vulkano::device::Queue">Queue</a><br>&nbsp;&nbsp;&nbsp;&nbsp;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../vulkano/sync/struct.PipelineStages.html" title="struct vulkano::sync::PipelineStages">PipelineStages</a>, <a class="struct" href="../../vulkano/sync/struct.AccessFlagBits.html" title="struct vulkano::sync::AccessFlagBits">AccessFlagBits</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;, <a class="enum" href="../../vulkano/sync/enum.AccessCheckError.html" title="enum vulkano::sync::AccessCheckError">AccessCheckError</a>&gt;;
fn <a href='#method.execute' class='fnname'>execute</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a>&lt;<a class="struct" href="../../vulkano/device/struct.Queue.html" title="struct vulkano::device::Queue">Queue</a>&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../../vulkano/command_buffer/struct.CommandBufferExecFuture.html" title="struct vulkano::command_buffer::CommandBufferExecFuture">CommandBufferExecFuture</a>&lt;<a class="struct" href="../../vulkano/sync/struct.NowFuture.html" title="struct vulkano::sync::NowFuture">NowFuture</a>, Self&gt;, <a class="enum" href="../../vulkano/command_buffer/enum.CommandBufferExecError.html" title="enum vulkano::command_buffer::CommandBufferExecError">CommandBufferExecError</a>&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'static</span>,
{ ... }
<div class='item-spacer'></div> fn <a href='#method.execute_after' class='fnname'>execute_after</a>&lt;F&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;future: F, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;queue: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a>&lt;<a class="struct" href="../../vulkano/device/struct.Queue.html" title="struct vulkano::device::Queue">Queue</a>&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../../vulkano/command_buffer/struct.CommandBufferExecFuture.html" title="struct vulkano::command_buffer::CommandBufferExecFuture">CommandBufferExecFuture</a>&lt;F, Self&gt;, <a class="enum" href="../../vulkano/command_buffer/enum.CommandBufferExecError.html" title="enum vulkano::command_buffer::CommandBufferExecError">CommandBufferExecError</a>&gt;<br>&nbsp;&nbsp;&nbsp; <span class="where">where<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'static,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="../../vulkano/sync/trait.GpuFuture.html" title="trait vulkano::sync::GpuFuture">GpuFuture</a></span>,
{ ... }
}</pre></div>
<h2 id='associated-types' class='small-section-header'>Associated Types<a href='#associated-types' class='anchor'></a></h2><div class='methods'><h3 id='associatedtype.PoolAlloc' class='method'><code id='PoolAlloc.t'>type <a href='#associatedtype.PoolAlloc' class="type">PoolAlloc</a></code></h3><div class='docblock'><p>The command pool of the command buffer.</p>
</div></div><span class='loading-content'>Loading content...</span>
<h2 id='required-methods' class='small-section-header'>Required methods<a href='#required-methods' class='anchor'></a></h2><div class='methods'><h3 id='tymethod.inner' class='method'><code id='inner.v'>fn <a href='#tymethod.inner' class='fnname'>inner</a>(&amp;self) -&gt; &amp;<a class="struct" href="../../vulkano/command_buffer/sys/struct.UnsafeCommandBuffer.html" title="struct vulkano::command_buffer::sys::UnsafeCommandBuffer">UnsafeCommandBuffer</a>&lt;Self::<a class="type" href="../../vulkano/command_buffer/trait.CommandBuffer.html#associatedtype.PoolAlloc" title="type vulkano::command_buffer::CommandBuffer::PoolAlloc">PoolAlloc</a>&gt;</code></h3><div class='docblock'><p>Returns the underlying <code>UnsafeCommandBuffer</code> of this command buffer.</p>
</div><h3 id='tymethod.lock_submit' class='method'><code id='lock_submit.v'>fn <a href='#tymethod.lock_submit' class='fnname'>lock_submit</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;future: &amp;dyn <a class="trait" href="../../vulkano/sync/trait.GpuFuture.html" title="trait vulkano::sync::GpuFuture">GpuFuture</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;queue: &amp;<a class="struct" href="../../vulkano/device/struct.Queue.html" title="struct vulkano::device::Queue">Queue</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="../../vulkano/command_buffer/enum.CommandBufferExecError.html" title="enum vulkano::command_buffer::CommandBufferExecError">CommandBufferExecError</a>&gt;</code></h3><div class='docblock'><p>Checks whether this command buffer is allowed to be submitted after the <code>future</code> and on
the given queue, and if so locks it.</p>
<p>If you call this function, then you should call <code>unlock</code> afterwards.</p>
</div><h3 id='tymethod.unlock' class='method'><code id='unlock.v'>unsafe fn <a href='#tymethod.unlock' class='fnname'>unlock</a>(&amp;self)</code></h3><div class='docblock'><p>Unlocks the command buffer. Should be called once for each call to <code>lock_submit</code>.</p>
<h1 id="safety" class="section-header"><a href="#safety">Safety</a></h1>
<p>Must not be called if you haven't called <code>lock_submit</code> before.</p>
</div><h3 id='tymethod.check_buffer_access' class='method'><code id='check_buffer_access.v'>fn <a href='#tymethod.check_buffer_access' class='fnname'>check_buffer_access</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;buffer: &amp;dyn <a class="trait" href="../../vulkano/buffer/trait.BufferAccess.html" title="trait vulkano::buffer::BufferAccess">BufferAccess</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;exclusive: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;queue: &amp;<a class="struct" href="../../vulkano/device/struct.Queue.html" title="struct vulkano::device::Queue">Queue</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../vulkano/sync/struct.PipelineStages.html" title="struct vulkano::sync::PipelineStages">PipelineStages</a>, <a class="struct" href="../../vulkano/sync/struct.AccessFlagBits.html" title="struct vulkano::sync::AccessFlagBits">AccessFlagBits</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;, <a class="enum" href="../../vulkano/sync/enum.AccessCheckError.html" title="enum vulkano::sync::AccessCheckError">AccessCheckError</a>&gt;</code></h3><h3 id='tymethod.check_image_access' class='method'><code id='check_image_access.v'>fn <a href='#tymethod.check_image_access' class='fnname'>check_image_access</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;image: &amp;dyn <a class="trait" href="../../vulkano/image/traits/trait.ImageAccess.html" title="trait vulkano::image::traits::ImageAccess">ImageAccess</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;layout: <a class="enum" href="../../vulkano/image/enum.ImageLayout.html" title="enum vulkano::image::ImageLayout">ImageLayout</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;exclusive: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;queue: &amp;<a class="struct" href="../../vulkano/device/struct.Queue.html" title="struct vulkano::device::Queue">Queue</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../vulkano/sync/struct.PipelineStages.html" title="struct vulkano::sync::PipelineStages">PipelineStages</a>, <a class="struct" href="../../vulkano/sync/struct.AccessFlagBits.html" title="struct vulkano::sync::AccessFlagBits">AccessFlagBits</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;, <a class="enum" href="../../vulkano/sync/enum.AccessCheckError.html" title="enum vulkano::sync::AccessCheckError">AccessCheckError</a>&gt;</code></h3></div><span class='loading-content'>Loading content...</span>
<h2 id='provided-methods' class='small-section-header'>Provided methods<a href='#provided-methods' class='anchor'></a></h2><div class='methods'><h3 id='method.execute' class='method'><code id='execute.v'>fn <a href='#method.execute' class='fnname'>execute</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;queue: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a>&lt;<a class="struct" href="../../vulkano/device/struct.Queue.html" title="struct vulkano::device::Queue">Queue</a>&gt;<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../../vulkano/command_buffer/struct.CommandBufferExecFuture.html" title="struct vulkano::command_buffer::CommandBufferExecFuture">CommandBufferExecFuture</a>&lt;<a class="struct" href="../../vulkano/sync/struct.NowFuture.html" title="struct vulkano::sync::NowFuture">NowFuture</a>, Self&gt;, <a class="enum" href="../../vulkano/command_buffer/enum.CommandBufferExecError.html" title="enum vulkano::command_buffer::CommandBufferExecError">CommandBufferExecError</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'static,&nbsp;</span></code></h3><div class='docblock'><p>Executes this command buffer on a queue.</p>
<p>This function returns an object that implements the <code>GpuFuture</code> trait. See the
documentation of the <code>sync</code> module for more information.</p>
<p>The command buffer is not actually executed until you call <code>flush()</code> on the object.
You are encouraged to chain together as many futures as possible before calling <code>flush()</code>,
and call <code>.then_signal_future()</code> before doing so. Note however that once you called
<code>execute()</code> there is no way to cancel the execution, even if you didn't flush yet.</p>
<blockquote>
<p><strong>Note</strong>: In the future this function may return <code>-&gt; impl GpuFuture</code> instead of a
concrete type.</p>
</blockquote>
<blockquote>
<p><strong>Note</strong>: This is just a shortcut for <code>execute_after(vulkano::sync::now(), queue)</code>.</p>
</blockquote>
<h1 id="panic" class="section-header"><a href="#panic">Panic</a></h1>
<p>Panics if the device of the command buffer is not the same as the device of the future.</p>
</div><h3 id='method.execute_after' class='method'><code id='execute_after.v'>fn <a href='#method.execute_after' class='fnname'>execute_after</a>&lt;F&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;future: F, <br>&nbsp;&nbsp;&nbsp;&nbsp;queue: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/sync/struct.Arc.html" title="struct alloc::sync::Arc">Arc</a>&lt;<a class="struct" href="../../vulkano/device/struct.Queue.html" title="struct vulkano::device::Queue">Queue</a>&gt;<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../../vulkano/command_buffer/struct.CommandBufferExecFuture.html" title="struct vulkano::command_buffer::CommandBufferExecFuture">CommandBufferExecFuture</a>&lt;F, Self&gt;, <a class="enum" href="../../vulkano/command_buffer/enum.CommandBufferExecError.html" title="enum vulkano::command_buffer::CommandBufferExecError">CommandBufferExecError</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'static,<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="../../vulkano/sync/trait.GpuFuture.html" title="trait vulkano::sync::GpuFuture">GpuFuture</a>,&nbsp;</span></code></h3><div class='docblock'><p>Executes the command buffer after an existing future.</p>
<p>This function returns an object that implements the <code>GpuFuture</code> trait. See the
documentation of the <code>sync</code> module for more information.</p>
<p>The command buffer is not actually executed until you call <code>flush()</code> on the object.
You are encouraged to chain together as many futures as possible before calling <code>flush()</code>,
and call <code>.then_signal_future()</code> before doing so. Note however that once you called
<code>execute()</code> there is no way to cancel the execution, even if you didn't flush yet.</p>
<blockquote>
<p><strong>Note</strong>: In the future this function may return <code>-&gt; impl GpuFuture</code> instead of a
concrete type.</p>
</blockquote>
<p>This function requires the <code>'static</code> lifetime to be on the command buffer. This is because
this function returns a <code>CommandBufferExecFuture</code> whose job is to lock resources and keep
them alive while they are in use by the GPU. If <code>'static</code> wasn't required, you could call
<code>std::mem::forget</code> on that object and &quot;unlock&quot; these resources. For more information about
this problem, search the web for &quot;rust thread scoped leakpocalypse&quot;.</p>
<h1 id="panic-1" class="section-header"><a href="#panic-1">Panic</a></h1>
<p>Panics if the device of the command buffer is not the same as the device of the future.</p>
</div></div><span class='loading-content'>Loading content...</span>
<h2 id='implementors' class='small-section-header'>Implementors<a href='#implementors' class='anchor'></a></h2><div class='item-list' id='implementors-list'><h3 id='impl-CommandBuffer' class='impl'><code class='in-band'>impl&lt;P&gt; CommandBuffer for <a class="struct" href="../../vulkano/command_buffer/struct.AutoCommandBuffer.html" title="struct vulkano::command_buffer::AutoCommandBuffer">AutoCommandBuffer</a>&lt;P&gt;</code><a href='#impl-CommandBuffer' class='anchor'></a><a class='srclink' href='../../src/vulkano/command_buffer/auto.rs.html#1500-1576' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.PoolAlloc-1' class="type"><code id='PoolAlloc.t-1'>type <a href='#associatedtype.PoolAlloc-1' class="type">PoolAlloc</a> = P</code></h4><h4 id='method.inner' class="method hidden"><code id='inner.v-1'>fn <a href='#method.inner' class='fnname'>inner</a>(&amp;self) -&gt; &amp;<a class="struct" href="../../vulkano/command_buffer/sys/struct.UnsafeCommandBuffer.html" title="struct vulkano::command_buffer::sys::UnsafeCommandBuffer">UnsafeCommandBuffer</a>&lt;P&gt;</code><a class='srclink' href='../../src/vulkano/command_buffer/auto.rs.html#1504-1506' title='goto source code'>[src]</a></h4><h4 id='method.lock_submit' class="method hidden"><code id='lock_submit.v-1'>fn <a href='#method.lock_submit' class='fnname'>lock_submit</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;future: &amp;dyn <a class="trait" href="../../vulkano/sync/trait.GpuFuture.html" title="trait vulkano::sync::GpuFuture">GpuFuture</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;queue: &amp;<a class="struct" href="../../vulkano/device/struct.Queue.html" title="struct vulkano::device::Queue">Queue</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="../../vulkano/command_buffer/enum.CommandBufferExecError.html" title="enum vulkano::command_buffer::CommandBufferExecError">CommandBufferExecError</a>&gt;</code><a class='srclink' href='../../src/vulkano/command_buffer/auto.rs.html#1509-1543' title='goto source code'>[src]</a></h4><h4 id='method.unlock' class="method hidden"><code id='unlock.v-1'>unsafe fn <a href='#method.unlock' class='fnname'>unlock</a>(&amp;self)</code><a class='srclink' href='../../src/vulkano/command_buffer/auto.rs.html#1546-1560' title='goto source code'>[src]</a></h4><h4 id='method.check_buffer_access' class="method hidden"><code id='check_buffer_access.v-1'>fn <a href='#method.check_buffer_access' class='fnname'>check_buffer_access</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;buffer: &amp;dyn <a class="trait" href="../../vulkano/buffer/trait.BufferAccess.html" title="trait vulkano::buffer::BufferAccess">BufferAccess</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;exclusive: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;queue: &amp;<a class="struct" href="../../vulkano/device/struct.Queue.html" title="struct vulkano::device::Queue">Queue</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../vulkano/sync/struct.PipelineStages.html" title="struct vulkano::sync::PipelineStages">PipelineStages</a>, <a class="struct" href="../../vulkano/sync/struct.AccessFlagBits.html" title="struct vulkano::sync::AccessFlagBits">AccessFlagBits</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;, <a class="enum" href="../../vulkano/sync/enum.AccessCheckError.html" title="enum vulkano::sync::AccessCheckError">AccessCheckError</a>&gt;</code><a class='srclink' href='../../src/vulkano/command_buffer/auto.rs.html#1563-1567' title='goto source code'>[src]</a></h4><h4 id='method.check_image_access' class="method hidden"><code id='check_image_access.v-1'>fn <a href='#method.check_image_access' class='fnname'>check_image_access</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;image: &amp;dyn <a class="trait" href="../../vulkano/image/traits/trait.ImageAccess.html" title="trait vulkano::image::traits::ImageAccess">ImageAccess</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;layout: <a class="enum" href="../../vulkano/image/enum.ImageLayout.html" title="enum vulkano::image::ImageLayout">ImageLayout</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;exclusive: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;queue: &amp;<a class="struct" href="../../vulkano/device/struct.Queue.html" title="struct vulkano::device::Queue">Queue</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../vulkano/sync/struct.PipelineStages.html" title="struct vulkano::sync::PipelineStages">PipelineStages</a>, <a class="struct" href="../../vulkano/sync/struct.AccessFlagBits.html" title="struct vulkano::sync::AccessFlagBits">AccessFlagBits</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;, <a class="enum" href="../../vulkano/sync/enum.AccessCheckError.html" title="enum vulkano::sync::AccessCheckError">AccessCheckError</a>&gt;</code><a class='srclink' href='../../src/vulkano/command_buffer/auto.rs.html#1570-1575' title='goto source code'>[src]</a></h4></div><h3 id='impl-CommandBuffer-1' class='impl'><code class='in-band'>impl&lt;T&gt; CommandBuffer for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="../../vulkano/trait.SafeDeref.html" title="trait vulkano::SafeDeref">SafeDeref</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;T::<a class="type" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#associatedtype.Target" title="type core::ops::deref::Deref::Target">Target</a>: <a class="trait" href="../../vulkano/command_buffer/trait.CommandBuffer.html" title="trait vulkano::command_buffer::CommandBuffer">CommandBuffer</a>,&nbsp;</span></code><a href='#impl-CommandBuffer-1' class='anchor'></a><a class='srclink' href='../../src/vulkano/command_buffer/traits.rs.html#149-183' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='associatedtype.PoolAlloc-2' class="type"><code id='PoolAlloc.t-2'>type <a href='#associatedtype.PoolAlloc-2' class="type">PoolAlloc</a> = &lt;T::<a class="type" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#associatedtype.Target" title="type core::ops::deref::Deref::Target">Target</a> as <a class="trait" href="../../vulkano/command_buffer/trait.CommandBuffer.html" title="trait vulkano::command_buffer::CommandBuffer">CommandBuffer</a>&gt;::<a class="type" href="../../vulkano/command_buffer/trait.CommandBuffer.html#associatedtype.PoolAlloc" title="type vulkano::command_buffer::CommandBuffer::PoolAlloc">PoolAlloc</a></code></h4><h4 id='method.inner-1' class="method hidden"><code id='inner.v-2'>fn <a href='#method.inner-1' class='fnname'>inner</a>(&amp;self) -&gt; &amp;<a class="struct" href="../../vulkano/command_buffer/sys/struct.UnsafeCommandBuffer.html" title="struct vulkano::command_buffer::sys::UnsafeCommandBuffer">UnsafeCommandBuffer</a>&lt;Self::<a class="type" href="../../vulkano/command_buffer/trait.CommandBuffer.html#associatedtype.PoolAlloc" title="type vulkano::command_buffer::CommandBuffer::PoolAlloc">PoolAlloc</a>&gt;</code><a class='srclink' href='../../src/vulkano/command_buffer/traits.rs.html#156-158' title='goto source code'>[src]</a></h4><h4 id='method.lock_submit-1' class="method hidden"><code id='lock_submit.v-2'>fn <a href='#method.lock_submit-1' class='fnname'>lock_submit</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;future: &amp;dyn <a class="trait" href="../../vulkano/sync/trait.GpuFuture.html" title="trait vulkano::sync::GpuFuture">GpuFuture</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;queue: &amp;<a class="struct" href="../../vulkano/device/struct.Queue.html" title="struct vulkano::device::Queue">Queue</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="../../vulkano/command_buffer/enum.CommandBufferExecError.html" title="enum vulkano::command_buffer::CommandBufferExecError">CommandBufferExecError</a>&gt;</code><a class='srclink' href='../../src/vulkano/command_buffer/traits.rs.html#161-163' title='goto source code'>[src]</a></h4><h4 id='method.unlock-1' class="method hidden"><code id='unlock.v-2'>unsafe fn <a href='#method.unlock-1' class='fnname'>unlock</a>(&amp;self)</code><a class='srclink' href='../../src/vulkano/command_buffer/traits.rs.html#166-168' title='goto source code'>[src]</a></h4><h4 id='method.check_buffer_access-1' class="method hidden"><code id='check_buffer_access.v-2'>fn <a href='#method.check_buffer_access-1' class='fnname'>check_buffer_access</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;buffer: &amp;dyn <a class="trait" href="../../vulkano/buffer/trait.BufferAccess.html" title="trait vulkano::buffer::BufferAccess">BufferAccess</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;exclusive: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;queue: &amp;<a class="struct" href="../../vulkano/device/struct.Queue.html" title="struct vulkano::device::Queue">Queue</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../vulkano/sync/struct.PipelineStages.html" title="struct vulkano::sync::PipelineStages">PipelineStages</a>, <a class="struct" href="../../vulkano/sync/struct.AccessFlagBits.html" title="struct vulkano::sync::AccessFlagBits">AccessFlagBits</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;, <a class="enum" href="../../vulkano/sync/enum.AccessCheckError.html" title="enum vulkano::sync::AccessCheckError">AccessCheckError</a>&gt;</code><a class='srclink' href='../../src/vulkano/command_buffer/traits.rs.html#171-175' title='goto source code'>[src]</a></h4><h4 id='method.check_image_access-1' class="method hidden"><code id='check_image_access.v-2'>fn <a href='#method.check_image_access-1' class='fnname'>check_image_access</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;image: &amp;dyn <a class="trait" href="../../vulkano/image/traits/trait.ImageAccess.html" title="trait vulkano::image::traits::ImageAccess">ImageAccess</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;layout: <a class="enum" href="../../vulkano/image/enum.ImageLayout.html" title="enum vulkano::image::ImageLayout">ImageLayout</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;exclusive: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;queue: &amp;<a class="struct" href="../../vulkano/device/struct.Queue.html" title="struct vulkano::device::Queue">Queue</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="struct" href="../../vulkano/sync/struct.PipelineStages.html" title="struct vulkano::sync::PipelineStages">PipelineStages</a>, <a class="struct" href="../../vulkano/sync/struct.AccessFlagBits.html" title="struct vulkano::sync::AccessFlagBits">AccessFlagBits</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;, <a class="enum" href="../../vulkano/sync/enum.AccessCheckError.html" title="enum vulkano::sync::AccessCheckError">AccessCheckError</a>&gt;</code><a class='srclink' href='../../src/vulkano/command_buffer/traits.rs.html#178-182' title='goto source code'>[src]</a></h4></div></div><span class='loading-content'>Loading content...</span><script type="text/javascript">window.inlined_types=new Set([]);</script><script type="text/javascript" async
src="../../implementors/vulkano/command_buffer/trait.CommandBuffer.js">
</script></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd></kbd></dt><dd>Move up in search results</dd><dt><kbd></kbd></dt><dd>Move down in search results</dd><dt><kbd></kbd></dt><dd>Switch tab</dd><dt><kbd>&#9166;</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "vulkano";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>