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/image/traits/trait.ImageAccess.html

126 lines
68 KiB

5 years ago
<!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 `ImageAccess` trait in crate `vulkano`."><meta name="keywords" content="rust, rustlang, rust-lang, ImageAccess"><title>vulkano::image::traits::ImageAccess - 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 ImageAccess</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.conflict_key">conflict_key</a><a href="#tymethod.conflicts_buffer">conflicts_buffer</a><a href="#tymethod.conflicts_image">conflicts_image</a><a href="#tymethod.final_layout_requirement">final_layout_requirement</a><a href="#tymethod.increase_gpu_lock">increase_gpu_lock</a><a href="#tymethod.initial_layout_requirement">initial_layout_requirement</a><a href="#tymethod.inner">inner</a><a href="#tymethod.try_gpu_lock">try_gpu_lock</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.dimensions">dimensions</a><a href="#method.forced_undefined_initial_layout">forced_undefined_initial_layout</a><a href="#method.format">format</a><a href="#method.has_color">has_color</a><a href="#method.has_depth">has_depth</a><a href="#method.has_stencil">has_stencil</a><a href="#method.is_layout_initialized">is_layout_initialized</a><a href="#method.layout_initialized">layout_initialized</a><a href="#method.mipmap_levels">mipmap_levels</a><a href="#method.preinitialized_layout">preinitialized_layout</a><a href="#method.samples">samples</a><a href="#method.supports_blit_destination">supports_blit_destination</a><a href="#method.supports_blit_source">supports_blit_source</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'>image</a>::<wbr><a href='index.html'>traits</a></p><script>window.sidebarCurrent = {name: 'ImageAccess', 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
fn <a href='#tymethod.inner' class='fnname'>inner</a>(&amp;self) -&gt; <a class="struct" href="../../../vulkano/image/traits/struct.ImageInner.html" title="struct vulkano::image::traits::ImageInner">ImageInner</a>;
<div class='item-spacer'></div> fn <a href='#tymethod.initial_layout_requirement' class='fnname'>initial_layout_requirement</a>(&amp;self) -&gt; <a class="enum" href="../../../vulkano/image/enum.ImageLayout.html" title="enum vulkano::image::ImageLayout">ImageLayout</a>;
<div class='item-spacer'></div> fn <a href='#tymethod.final_layout_requirement' class='fnname'>final_layout_requirement</a>(&amp;self) -&gt; <a class="enum" href="../../../vulkano/image/enum.ImageLayout.html" title="enum vulkano::image::ImageLayout">ImageLayout</a>;
<div class='item-spacer'></div> fn <a href='#tymethod.conflicts_buffer' class='fnname'>conflicts_buffer</a>(&amp;self, other: &amp;dyn <a class="trait" href="../../../vulkano/buffer/trait.BufferAccess.html" title="trait vulkano::buffer::BufferAccess">BufferAccess</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>;
<div class='item-spacer'></div> fn <a href='#tymethod.conflicts_image' class='fnname'>conflicts_image</a>(&amp;self, other: &amp;dyn <a class="trait" href="../../../vulkano/image/traits/trait.ImageAccess.html" title="trait vulkano::image::traits::ImageAccess">ImageAccess</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>;
<div class='item-spacer'></div> fn <a href='#tymethod.conflict_key' class='fnname'>conflict_key</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>;
<div class='item-spacer'></div> fn <a href='#tymethod.try_gpu_lock' class='fnname'>try_gpu_lock</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exclusive_access: <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;expected_layout: <a class="enum" href="../../../vulkano/image/enum.ImageLayout.html" title="enum vulkano::image::ImageLayout">ImageLayout</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/sync/enum.AccessError.html" title="enum vulkano::sync::AccessError">AccessError</a>&gt;;
<div class='item-spacer'></div> unsafe fn <a href='#tymethod.increase_gpu_lock' class='fnname'>increase_gpu_lock</a>(&amp;self);
<div class='item-spacer'></div> unsafe fn <a href='#tymethod.unlock' class='fnname'>unlock</a>(&amp;self, transitioned_layout: <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="enum" href="../../../vulkano/image/enum.ImageLayout.html" title="enum vulkano::image::ImageLayout">ImageLayout</a>&gt;);
fn <a href='#method.format' class='fnname'>format</a>(&amp;self) -&gt; <a class="enum" href="../../../vulkano/format/enum.Format.html" title="enum vulkano::format::Format">Format</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.has_color' class='fnname'>has_color</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.has_depth' class='fnname'>has_depth</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.has_stencil' class='fnname'>has_stencil</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.mipmap_levels' class='fnname'>mipmap_levels</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.samples' class='fnname'>samples</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.dimensions' class='fnname'>dimensions</a>(&amp;self) -&gt; <a class="enum" href="../../../vulkano/image/enum.ImageDimensions.html" title="enum vulkano::image::ImageDimensions">ImageDimensions</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.supports_blit_source' class='fnname'>supports_blit_source</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> { ... }
<div class='item-spacer'></div> fn <a href='#method.supports_blit_destination' class='fnname'>supports_blit_destination</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> { ... }
<div class='item-spacer'></div> unsafe fn <a href='#method.layout_initialized' class='fnname'>layout_initialized</a>(&amp;self) { ... }
<div class='item-spacer'></div> fn <a href='#method.is_layout_initialized' class='fnname'>is_layout_initialized</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> { ... }
<div class='item-spacer'></div> unsafe fn <a href='#method.preinitialized_layout' class='fnname'>preinitialized_layout</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> { ... }
<div class='item-spacer'></div> unsafe fn <a href='#method.forced_undefined_initial_layout' class='fnname'>forced_undefined_initial_layout</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;preinitialized: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><br>&nbsp;&nbsp;&nbsp;&nbsp;) -&gt; <a class="struct" href="../../../vulkano/image/traits/struct.ImageAccessFromUndefinedLayout.html" title="struct vulkano::image::traits::ImageAccessFromUndefinedLayout">ImageAccessFromUndefinedLayout</a>&lt;Self&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></span>,
{ ... }
}</pre></div><div class='docblock'><p>Trait for types that represent the way a GPU can access an image.</p>
</div>
<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; <a class="struct" href="../../../vulkano/image/traits/struct.ImageInner.html" title="struct vulkano::image::traits::ImageInner">ImageInner</a></code></h3><div class='docblock'><p>Returns the inner unsafe image object used by this image.</p>
</div><h3 id='tymethod.initial_layout_requirement' class='method'><code id='initial_layout_requirement.v'>fn <a href='#tymethod.initial_layout_requirement' class='fnname'>initial_layout_requirement</a>(&amp;self) -&gt; <a class="enum" href="../../../vulkano/image/enum.ImageLayout.html" title="enum vulkano::image::ImageLayout">ImageLayout</a></code></h3><div class='docblock'><p>Returns the layout that the image has when it is first used in a primary command buffer.</p>
<p>The first time you use an image in an <code>AutoCommandBufferBuilder</code>, vulkano will suppose that
the image is in the layout returned by this function. Later when the command buffer is
submitted vulkano will check whether the image is actually in this layout, and if it is not
the case then an error will be returned.
TODO: ^ that check is not yet implemented</p>
</div><h3 id='tymethod.final_layout_requirement' class='method'><code id='final_layout_requirement.v'>fn <a href='#tymethod.final_layout_requirement' class='fnname'>final_layout_requirement</a>(&amp;self) -&gt; <a class="enum" href="../../../vulkano/image/enum.ImageLayout.html" title="enum vulkano::image::ImageLayout">ImageLayout</a></code></h3><div class='docblock'><p>Returns the layout that the image must be returned to before the end of the command buffer.</p>
<p>When an image is used in an <code>AutoCommandBufferBuilder</code> vulkano will automatically
transition this image to the layout returned by this function at the end of the command
buffer, if necessary.</p>
<p>Except for special cases, this value should likely be the same as the one returned by
<code>initial_layout_requirement</code> so that the user can submit multiple command buffers that use
this image one after the other.</p>
</div><h3 id='tymethod.conflicts_buffer' class='method'><code id='conflicts_buffer.v'>fn <a href='#tymethod.conflicts_buffer' class='fnname'>conflicts_buffer</a>(&amp;self, other: &amp;dyn <a class="trait" href="../../../vulkano/buffer/trait.BufferAccess.html" title="trait vulkano::buffer::BufferAccess">BufferAccess</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h3><div class='docblock'><p>Returns true if an access to <code>self</code> potentially overlaps the same memory as an
access to <code>other</code>.</p>
<p>If this function returns <code>false</code>, this means that we are allowed to access the content
of <code>self</code> at the same time as the content of <code>other</code> without causing a data race.</p>
<p>Note that the function must be transitive. In other words if <code>conflicts(a, b)</code> is true and
<code>conflicts(b, c)</code> is true, then <code>conflicts(a, c)</code> must be true as well.</p>
</div><h3 id='tymethod.conflicts_image' class='method'><code id='conflicts_image.v'>fn <a href='#tymethod.conflicts_image' class='fnname'>conflicts_image</a>(&amp;self, other: &amp;dyn <a class="trait" href="../../../vulkano/image/traits/trait.ImageAccess.html" title="trait vulkano::image::traits::ImageAccess">ImageAccess</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h3><div class='docblock'><p>Returns true if an access to <code>self</code> potentially overlaps the same memory as an
access to <code>other</code>.</p>
<p>If this function returns <code>false</code>, this means that we are allowed to access the content
of <code>self</code> at the same time as the content of <code>other</code> without causing a data race.</p>
<p>Note that the function must be transitive. In other words if <code>conflicts(a, b)</code> is true and
<code>conflicts(b, c)</code> is true, then <code>conflicts(a, c)</code> must be true as well.</p>
</div><h3 id='tymethod.conflict_key' class='method'><code id='conflict_key.v'>fn <a href='#tymethod.conflict_key' class='fnname'>conflict_key</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code></h3><div class='docblock'><p>Returns a key that uniquely identifies the memory content of the image.
Two ranges that potentially overlap in memory must return the same key.</p>
<p>The key is shared amongst all buffers and images, which means that you can make several
different image objects share the same memory, or make some image objects share memory
with buffers, as long as they return the same key.</p>
<p>Since it is possible to accidentally return the same key for memory ranges that don't
overlap, the <code>conflicts_image</code> or <code>conflicts_buffer</code> function should always be called to
verify whether they actually overlap.</p>
</div><h3 id='tymethod.try_gpu_lock' class='method'><code id='try_gpu_lock.v'>fn <a href='#tymethod.try_gpu_lock' class='fnname'>try_gpu_lock</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;exclusive_access: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;expected_layout: <a class="enum" href="../../../vulkano/image/enum.ImageLayout.html" title="enum vulkano::image::ImageLayout">ImageLayout</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/sync/enum.AccessError.html" title="enum vulkano::sync::AccessError">AccessError</a>&gt;</code></h3><div class='docblock'><p>Locks the resource for usage on the GPU. Returns an error if the lock can't be acquired.</p>
<p>After this function returns <code>Ok</code>, you are authorized to use the image on the GPU. If the
GPU operation requires an exclusive access to the image (which includes image layout
transitions) then <code>exclusive_access</code> should be true.</p>
<p>The <code>expected_layout</code> is the layout we expect the image to be in when we lock it. If the
actual layout doesn't match this expected layout, then an error should be returned. If
<code>Undefined</code> is passed, that means that the caller doesn't care about the actual layout,
and that a layout mismatch shouldn't return an error.</p>
<p>This function exists to prevent the user from causing a data race by reading and writing
to the same resource at the same time.</p>
<p>If you call this function, you should call <code>unlock()</code> once the resource is no longer in use
by the GPU. The implementation is not expected to automatically perform any unlocking and
can rely on the fact that <code>unlock()</code> is going to be called.</p>
</div><h3 id='tymethod.increase_gpu_lock' class='method'><code id='increase_gpu_lock.v'>unsafe fn <a href='#tymethod.increase_gpu_lock' class='fnname'>increase_gpu_lock</a>(&amp;self)</code></h3><div class='docblock'><p>Locks the resource for usage on the GPU. Supposes that the resource is already locked, and
simply increases the lock by one.</p>
<p>Must only be called after <code>try_gpu_lock()</code> succeeded.</p>
<p>If you call this function, you should call <code>unlock()</code> once the resource is no longer in use
by the GPU. The implementation is not expected to automatically perform any unlocking and
can rely on the fact that <code>unlock()</code> is going to be called.</p>
</div><h3 id='tymethod.unlock' class='method'><code id='unlock.v'>unsafe fn <a href='#tymethod.unlock' class='fnname'>unlock</a>(&amp;self, transitioned_layout: <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="enum" href="../../../vulkano/image/enum.ImageLayout.html" title="enum vulkano::image::ImageLayout">ImageLayout</a>&gt;)</code></h3><div class='docblock'><p>Unlocks the resource previously acquired with <code>try_gpu_lock</code> or <code>increase_gpu_lock</code>.</p>
<p>If the GPU operation that we unlock from transitioned the image to another layout, then
it should be passed as parameter.</p>
<p>A layout transition requires exclusive access to the image, which means two things:</p>
<ul>
<li>The implementation can panic if it finds out that the layout is not the same as it
currently is and that it is not locked in exclusive mode.</li>
<li>There shouldn't be any possible race between <code>unlock</code> and <code>try_gpu_lock</code>, since
<code>try_gpu_lock</code> should fail if the image is already locked in exclusive mode.</li>
</ul>
<h1 id="safety" class="section-header"><a href="#safety">Safety</a></h1>
<ul>
<li>Must only be called once per previous lock.</li>
<li>The transitioned layout must be supported by the image (eg. the layout shouldn't be
<code>ColorAttachmentOptimal</code> if the image wasn't created with the <code>color_attachment</code> usage).</li>
<li>The transitioned layout must not be <code>Undefined</code>.</li>
</ul>
</div></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.format' class='method'><code id='format.v'>fn <a href='#method.format' class='fnname'>format</a>(&amp;self) -&gt; <a class="enum" href="../../../vulkano/format/enum.Format.html" title="enum vulkano::format::Format">Format</a></code></h3><div class='docblock'><p>Returns the format of this image.</p>
</div><h3 id='method.has_color' class='method'><code id='has_color.v'>fn <a href='#method.has_color' class='fnname'>has_color</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h3><div class='docblock'><p>Returns true if the image is a color image.</p>
</div><h3 id='method.has_depth' class='method'><code id='has_depth.v'>fn <a href='#method.has_depth' class='fnname'>has_depth</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h3><div class='docblock'><p>Returns true if the image has a depth component. In other words, if it is a depth or a
depth-stencil format.</p>
</div><h3 id='method.has_stencil' class='method'><code id='has_stencil.v'>fn <a href='#method.has_stencil' class='fnname'>has_stencil</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h3><div class='docblock'><p>Returns true if the image has a stencil component. In other words, if it is a stencil or a
depth-stencil format.</p>
</div><h3 id='method.mipmap_levels' class='method'><code id='mipmap_levels.v'>fn <a href='#method.mipmap_levels' class='fnname'>mipmap_levels</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></h3><div class='docblock'><p>Returns the number of mipmap levels of this image.</p>
</div><h3 id='method.samples' class='method'><code id='samples.v'>fn <a href='#method.samples' class='fnname'>samples</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></code></h3><div class='docblock'><p>Returns the number of samples of this image.</p>
</div><h3 id='method.dimensions' class='method'><code id='dimensions.v'>fn <a href='#method.dimensions' class='fnname'>dimensions</a>(&amp;self) -&gt; <a class="enum" href="../../../vulkano/image/enum.ImageDimensions.html" title="enum vulkano::image::ImageDimensions">ImageDimensions</a></code></h3><div class='docblock'><p>Returns the dimensions of the image.</p>
</div><h3 id='method.supports_blit_source' class='method'><code id='supports_blit_source.v'>fn <a href='#method.supports_blit_source' class='fnname'>supports_blit_source</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h3><div class='docblock'><p>Returns true if the image can be used as a source for blits.</p>
</div><h3 id='method.supports_blit_destination' class='method'><code id='supports_blit_destination.v'>fn <a href='#method.supports_blit_destination' class='fnname'>supports_blit_destination</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h3><div class='docblock'><p>Returns true if the image can be used as a destination for blits.</p>
</div><h3 id='method.layout_initialized' class='method'><code id='layout_initialized.v'>unsafe fn <a href='#method.layout_initialized' class='fnname'>layout_initialized</a>(&amp;self)</code></h3><div class='docblock'><p>When images are created their memory layout is initially <code>Undefined</code> or <code>Preinitialized</code>.
This method allows the image memory barrier creation process to signal when an image
has been transitioned out of its initial <code>Undefined</code> or <code>Preinitialized</code> state. This
allows vulkano to avoid creating unnecessary image memory barriers between future
uses of the image.</p>
<h2 id="unsafe" class="section-header"><a href="#unsafe">Unsafe</a></h2>
<p>If a user calls this method outside of the intended context and signals that the layout
is no longer <code>Undefined</code> or <code>Preinitialized</code> when it is still in an <code>Undefined</code> or
<code>Preinitialized</code> state, this may result in the vulkan implementation attempting to use
an image in an invalid layout. The same problem must be considered by the implementer
of the method.</p>
</div><h3 id='method.is_layout_initialized' class='method'><code id='is_layout_initialized.v'>fn <a href='#method.is_layout_initialized' class='fnname'>is_layout_initialized</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h3><h3 id='method.preinitialized_layout' class='method'><code id='preinitialized_layout.v'>unsafe fn <a href='#method.preinitialized_layout' class='fnname'>preinitialized_layout</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></h3><h3 id='method.forced_undefined_initial_layout' class='method'><code id='forced_undefined_initial_layout.v'>unsafe fn <a href='#method.forced_undefined_initial_layout' class='fnname'>forced_undefined_initial_layout</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;preinitialized: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><br>) -&gt; <a class="struct" href="../../../vulkano/image/traits/struct.ImageAccessFromUndefinedLayout.html" title="struct vulkano::image::traits::ImageAccessFromUndefinedLayout">ImageAccessFromUndefinedLayout</a>&lt;Self&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>,&nbsp;</span></code></h3><div class='docblock'><p>Wraps around this <code>ImageAccess</code> and returns an identical <code>ImageAccess</code> but whose initial
layout requirement is either <code>Undefined</code> or <code>Preinitialized</code>.</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-ImageAccess' class='impl'><code class='in-band'>impl&lt;F, A&gt; ImageAccess for <a class="struct" href="../../../vulkano/image/attachment/struct.AttachmentImage.html" title="struct vulkano::image::attachment::AttachmentImage">AttachmentImage</a>&lt;F, A&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: 'static + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a>,&nbsp;</span></code><a href='#impl-ImageAccess' class='anchor'></a><a class='srclink' href='../../../src/vulkano/image/attachment.rs.html#416-510' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.inner' class="method hidden"><code id='inner.v-1'>fn <a href='#method.inner' class='fnname'>inner</a>(&amp;self) -&gt; <a class="struct" href="../../../vulkano/image/traits/struct.ImageInner.html" title="struct vulkano::image::traits::ImageInner">ImageInner</a></code><a class='srclink' href='../../../src/vulkano/image/attachment.rs.html#420-428' title='goto source code'>[src]</a></h4><h4 id='method.initial_layout_requirement' class="method hidden"><code id='initial_layout_requirement.v-1'>fn <a href='#method.initial_layout_requirement' class='fnname'>initial_layout_requirement</a>(&amp;self) -&gt; <a class="enum" href="../../../vulkano/image/enum.ImageLayout.html" title="enum vulkano::image::ImageLayout">ImageLayout</a></code><a class='srclink' href='../../../src/vulkano/image/attachment.rs.html#431-433' title='goto source code'>[src]</a></h4><h4 id='method.final_layout_requirement' class="method hidden"><code id='final_layout_requirement.v-1'>fn <a href='#method.final_layout_requirement' class='fnname'>final_layout_requirement</a>(&amp;self) -&gt; <a class="enum" href="../../../vulkano/image/enum.ImageLayout.html" title="enum vulkano::image::ImageLayout">ImageLayout</a></code><a class='srclink' href='../../../src/vulkano/image/attachment.rs.html#436-438' title='goto source code'>[src]</a></h4><h4 id='method.conflicts_buffer' class="method hidden"><code id='conflicts_buffer.v-1'>fn <a href='#method.conflicts_buffer' class='fnname'>conflicts_buffer</a>(&amp;self, other: &amp;dyn <a class="trait" href="../../../vulkano/buffer/trait.BufferAccess.html" title="trait vulkano::buffer::BufferAccess">BufferAccess</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../../src/vulkano/image/attachment.rs.html#441-443' title='goto source code'>[src]</a></h4><h4 id='method.conflicts_image' class="method hidden"><code id='conflicts_image.v-1'>fn <a href='#method.conflicts_image' class='fnname'>conflicts_image</a>(&amp;self, other: &amp;dyn <a class="trait" href="../../../vulkano/image/traits/trait.ImageAccess.html" title="trait vulkano::image::traits::ImageAccess">ImageAccess</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><a class='srclink' href='../../../src/vulkano/image/attachment.rs.html#446-448' title='goto source code'>[src]</a></h4><h4 id='method.conflict_key' class="method hidden"><code id='conflict_key.v-1'>fn <a href='#method.conflict_key' class='fnname'>conflict_key</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a></code><a class='srclink' href='../../../src/vulkano/image/attachment.rs.html#451-453' title='goto source code'>[src]</a></h4><h4 id='method.try_gpu_lock' class="method hidden"><code id='try_gpu_lock.v-1'>fn <a href='#method.try_gpu_lock' class='fnname'>try_gpu_lock</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self, <br>&nbsp;&nbsp;&nbsp;&nbsp;_: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.h
src="../../../implementors/vulkano/image/traits/trait.ImageAccess.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>