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.

59 lines
15 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 `descriptor_set` mod in crate `vulkano`."><meta name="keywords" content="rust, rustlang, rust-lang, descriptor_set"><title>vulkano::descriptor::descriptor_set - 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 mod"><!--[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'>Module descriptor_set</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li></ul></div><p class='location'><a href='../../index.html'>vulkano</a>::<wbr><a href='../index.html'>descriptor</a></p><script>window.sidebarCurrent = {name: 'descriptor_set', ty: 'mod', 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/descriptor/descriptor_set/mod.rs.html#10-155' title='goto source code'>[src]</a></span><span class='in-band'>Module <a href='../../index.html'>vulkano</a>::<wbr><a href='../index.html'>descriptor</a>::<wbr><a class="mod" href=''>descriptor_set</a></span></h1><div class='docblock'><p>Descriptor sets creation and management</p>
<p>This module is dedicated to managing descriptor sets. There are three concepts in Vulkan
related to descriptor sets:</p>
<ul>
<li>A <code>DescriptorSetLayout</code> is a Vulkan object that describes to the Vulkan implementation the
layout of a future descriptor set. When you allocate a descriptor set, you have to pass an
instance of this object. This is represented with the <code>UnsafeDescriptorSetLayout</code> type in
vulkano.</li>
<li>A <code>DescriptorPool</code> is a Vulkan object that holds the memory of descriptor sets and that can
be used to allocate and free individual descriptor sets. This is represented with the
<code>UnsafeDescriptorPool</code> type in vulkano.</li>
<li>A <code>DescriptorSet</code> contains the bindings to resources and is allocated from a pool. This is
represented with the <code>UnsafeDescriptorSet</code> type in vulkano.</li>
</ul>
<p>In addition to this, vulkano defines the following:</p>
<ul>
<li>The <code>DescriptorPool</code> trait can be implemented on types from which you can allocate and free
descriptor sets. However it is different from Vulkan descriptor pools in the sense that an
implementation of the <code>DescriptorPool</code> trait can manage multiple Vulkan descriptor pools.</li>
<li>The <code>StdDescriptorPool</code> type is a default implementation of the <code>DescriptorPool</code> trait.</li>
<li>The <code>DescriptorSet</code> trait is implemented on types that wrap around Vulkan descriptor sets in
a safe way. A Vulkan descriptor set is inherently unsafe, so we need safe wrappers around
them.</li>
<li>The <code>SimpleDescriptorSet</code> type is a default implementation of the <code>DescriptorSet</code> trait.</li>
<li>The <code>DescriptorSetsCollection</code> trait is implemented on collections of types that implement
<code>DescriptorSet</code>. It is what you pass to the draw functions.</li>
</ul>
</div><h2 id='reexports' class='section-header'><a href="#reexports">Re-exports</a></h2>
<table><tr><td><code>pub use self::collection::<a class="trait" href="../../../vulkano/descriptor/descriptor_set/collection/trait.DescriptorSetsCollection.html" title="trait vulkano::descriptor::descriptor_set::collection::DescriptorSetsCollection">DescriptorSetsCollection</a>;</code></td></tr></table><h2 id='modules' class='section-header'><a href="#modules">Modules</a></h2>
<table><tr class='module-item'><td><a class="mod" href="collection/index.html" title='vulkano::descriptor::descriptor_set::collection mod'>collection</a></td><td class='docblock-short'></td></tr></table><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
<table><tr class='module-item'><td><a class="struct" href="struct.DescriptorWrite.html" title='vulkano::descriptor::descriptor_set::DescriptorWrite struct'>DescriptorWrite</a></td><td class='docblock-short'><p>Represents a single write entry to a descriptor set.</p>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.DescriptorsCount.html" title='vulkano::descriptor::descriptor_set::DescriptorsCount struct'>DescriptorsCount</a></td><td class='docblock-short'><p>Number of available descriptors slots in a pool.</p>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.FixedSizeDescriptorSet.html" title='vulkano::descriptor::descriptor_set::FixedSizeDescriptorSet struct'>FixedSizeDescriptorSet</a></td><td class='docblock-short'><p>A descriptor set created from a <code>FixedSizeDescriptorSetsPool</code>.</p>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.FixedSizeDescriptorSetBuilder.html" title='vulkano::descriptor::descriptor_set::FixedSizeDescriptorSetBuilder struct'>FixedSizeDescriptorSetBuilder</a></td><td class='docblock-short'><p>Prototype of a <code>FixedSizeDescriptorSet</code>.</p>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.FixedSizeDescriptorSetBuilderArray.html" title='vulkano::descriptor::descriptor_set::FixedSizeDescriptorSetBuilderArray struct'>FixedSizeDescriptorSetBuilderArray</a></td><td class='docblock-short'><p>Same as <code>FixedSizeDescriptorSetBuilder</code>, but we're in an array.</p>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.FixedSizeDescriptorSetsPool.html" title='vulkano::descriptor::descriptor_set::FixedSizeDescriptorSetsPool struct'>FixedSizeDescriptorSetsPool</a></td><td class='docblock-short'><p>Pool of descriptor sets of a specific capacity and that are automatically reclaimed.</p>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.PersistentDescriptorSet.html" title='vulkano::descriptor::descriptor_set::PersistentDescriptorSet struct'>PersistentDescriptorSet</a></td><td class='docblock-short'><p>An immutable descriptor set that is expected to be long-lived.</p>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.PersistentDescriptorSetBuf.html" title='vulkano::descriptor::descriptor_set::PersistentDescriptorSetBuf struct'>PersistentDescriptorSetBuf</a></td><td class='docblock-short'><p>Internal object related to the <code>PersistentDescriptorSet</code> system.</p>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.PersistentDescriptorSetBufView.html" title='vulkano::descriptor::descriptor_set::PersistentDescriptorSetBufView struct'>PersistentDescriptorSetBufView</a></td><td class='docblock-short'><p>Internal object related to the <code>PersistentDescriptorSet</code> system.</p>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.PersistentDescriptorSetBuilder.html" title='vulkano::descriptor::descriptor_set::PersistentDescriptorSetBuilder struct'>PersistentDescriptorSetBuilder</a></td><td class='docblock-short'><p>Prototype of a <code>PersistentDescriptorSet</code>.</p>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.PersistentDescriptorSetBuilderArray.html" title='vulkano::descriptor::descriptor_set::PersistentDescriptorSetBuilderArray struct'>PersistentDescriptorSetBuilderArray</a></td><td class='docblock-short'><p>Same as <code>PersistentDescriptorSetBuilder</code>, but we're in an array.</p>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.PersistentDescriptorSetImg.html" title='vulkano::descriptor::descriptor_set::PersistentDescriptorSetImg struct'>PersistentDescriptorSetImg</a></td><td class='docblock-short'><p>Internal object related to the <code>PersistentDescriptorSet</code> system.</p>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.PersistentDescriptorSetSampler.html" title='vulkano::descriptor::descriptor_set::PersistentDescriptorSetSampler struct'>PersistentDescriptorSetSampler</a></td><td class='docblock-short'><p>Internal object related to the <code>PersistentDescriptorSet</code> system.</p>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.StdDescriptorPool.html" title='vulkano::descriptor::descriptor_set::StdDescriptorPool struct'>StdDescriptorPool</a></td><td class='docblock-short'><p>Standard implementation of a descriptor pool.</p>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.StdDescriptorPoolAlloc.html" title='vulkano::descriptor::descriptor_set::StdDescriptorPoolAlloc struct'>StdDescriptorPoolAlloc</a></td><td class='docblock-short'><p>A descriptor set allocated from a <code>StdDescriptorPool</code>.</p>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.UnsafeDescriptorPool.html" title='vulkano::descriptor::descriptor_set::UnsafeDescriptorPool struct'>UnsafeDescriptorPool</a></td><td class='docblock-short'><p>Pool from which descriptor sets are allocated from.</p>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.UnsafeDescriptorPoolAllocIter.html" title='vulkano::descriptor::descriptor_set::UnsafeDescriptorPoolAllocIter struct'>UnsafeDescriptorPoolAllocIter</a></td><td class='docblock-short'><p>Iterator to the descriptor sets allocated from an unsafe descriptor pool.</p>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.UnsafeDescriptorSet.html" title='vulkano::descriptor::descriptor_set::UnsafeDescriptorSet struct'>UnsafeDescriptorSet</a></td><td class='docblock-short'><p>Low-level descriptor set.</p>
</td></tr><tr class='module-item'><td><a class="struct" href="struct.UnsafeDescriptorSetLayout.html" title='vulkano::descriptor::descriptor_set::UnsafeDescriptorSetLayout struct'>UnsafeDescriptorSetLayout</a></td><td class='docblock-short'><p>Describes to the Vulkan implementation the layout of all descriptors within a descriptor set.</p>
</td></tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
<table><tr class='module-item'><td><a class="enum" href="enum.DescriptorPoolAllocError.html" title='vulkano::descriptor::descriptor_set::DescriptorPoolAllocError enum'>DescriptorPoolAllocError</a></td><td class='docblock-short'><p>Error that can be returned when creating a device.</p>
</td></tr><tr class='module-item'><td><a class="enum" href="enum.PersistentDescriptorSetBuildError.html" title='vulkano::descriptor::descriptor_set::PersistentDescriptorSetBuildError enum'>PersistentDescriptorSetBuildError</a></td><td class='docblock-short'><p>Error when building a persistent descriptor set.</p>
</td></tr><tr class='module-item'><td><a class="enum" href="enum.PersistentDescriptorSetError.html" title='vulkano::descriptor::descriptor_set::PersistentDescriptorSetError enum'>PersistentDescriptorSetError</a></td><td class='docblock-short'><p>Error related to the persistent descriptor set.</p>
</td></tr></table><h2 id='traits' class='section-header'><a href="#traits">Traits</a></h2>
<table><tr class='module-item'><td><a class="trait" href="trait.DescriptorPool.html" title='vulkano::descriptor::descriptor_set::DescriptorPool trait'>DescriptorPool</a></td><td class='docblock-short'><p>A pool from which descriptor sets can be allocated.</p>
</td></tr><tr class='module-item'><td><a class="trait" href="trait.DescriptorPoolAlloc.html" title='vulkano::descriptor::descriptor_set::DescriptorPoolAlloc trait'>DescriptorPoolAlloc</a></td><td class='docblock-short'><p>An allocated descriptor set.</p>
</td></tr><tr class='module-item'><td><a class="trait" href="trait.DescriptorSet.html" title='vulkano::descriptor::descriptor_set::DescriptorSet trait'>DescriptorSet</a></td><td class='docblock-short'><p>Trait for objects that contain a collection of resources that will be accessible by shaders.</p>
</td></tr><tr class='module-item'><td><a class="trait" href="trait.DescriptorSetDesc.html" title='vulkano::descriptor::descriptor_set::DescriptorSetDesc trait'>DescriptorSetDesc</a></td><td class='docblock-short'><p>Trait for objects that describe the layout of the descriptors of a set.</p>
</td></tr></table></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>