535 lines
92 KiB
HTML
535 lines
92 KiB
HTML
<!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="Encoder and allocation pool for `CommandBuffer`s."><title>CommandEncoder in wgpu_hal - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="wgpu_hal" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.0 (9fc6b4312 2025-01-07)" data-channel="1.84.0" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../wgpu_hal/index.html">wgpu_<wbr>hal</a><span class="version">23.0.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Command<wbr>Encoder</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#safety" title="Safety">Safety</a></li></ul><h3><a href="#required-associated-types">Required Associated Types</a></h3><ul class="block"><li><a href="#associatedtype.A" title="A">A</a></li></ul><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.begin_compute_pass" title="begin_compute_pass">begin_compute_pass</a></li><li><a href="#tymethod.begin_debug_marker" title="begin_debug_marker">begin_debug_marker</a></li><li><a href="#tymethod.begin_encoding" title="begin_encoding">begin_encoding</a></li><li><a href="#tymethod.begin_query" title="begin_query">begin_query</a></li><li><a href="#tymethod.begin_render_pass" title="begin_render_pass">begin_render_pass</a></li><li><a href="#tymethod.build_acceleration_structures" title="build_acceleration_structures">build_acceleration_structures</a></li><li><a href="#tymethod.clear_buffer" title="clear_buffer">clear_buffer</a></li><li><a href="#tymethod.copy_buffer_to_buffer" title="copy_buffer_to_buffer">copy_buffer_to_buffer</a></li><li><a href="#tymethod.copy_buffer_to_texture" title="copy_buffer_to_texture">copy_buffer_to_texture</a></li><li><a href="#tymethod.copy_query_results" title="copy_query_results">copy_query_results</a></li><li><a href="#tymethod.copy_texture_to_buffer" title="copy_texture_to_buffer">copy_texture_to_buffer</a></li><li><a href="#tymethod.copy_texture_to_texture" title="copy_texture_to_texture">copy_texture_to_texture</a></li><li><a href="#tymethod.discard_encoding" title="discard_encoding">discard_encoding</a></li><li><a href="#tymethod.dispatch" title="dispatch">dispatch</a></li><li><a href="#tymethod.dispatch_indirect" title="dispatch_indirect">dispatch_indirect</a></li><li><a href="#tymethod.draw" title="draw">draw</a></li><li><a href="#tymethod.draw_indexed" title="draw_indexed">draw_indexed</a></li><li><a href="#tymethod.draw_indexed_indirect" title="draw_indexed_indirect">draw_indexed_indirect</a></li><li><a href="#tymethod.draw_indexed_indirect_count" title="draw_indexed_indirect_count">draw_indexed_indirect_count</a></li><li><a href="#tymethod.draw_indirect" title="draw_indirect">draw_indirect</a></li><li><a href="#tymethod.draw_indirect_count" title="draw_indirect_count">draw_indirect_count</a></li><li><a href="#tymethod.end_compute_pass" title="end_compute_pass">end_compute_pass</a></li><li><a href="#tymethod.end_debug_marker" title="end_debug_marker">end_debug_marker</a></li><li><a href="#tymethod.end_encoding" title="end_encoding">end_encoding</a></li><li><a href="#tymethod.end_query" title="end_query">end_query</a></li><li><a href="#tymethod.end_render_pass" title="end_render_pass">end_render_pass</a></li><li><a href="#tymethod.insert_debug_marker" title="insert_debug_marker">insert_debug_marker</a></li><li><a href="#tymethod.place_acceleration_structure_barrier" title="place_acceleration_structure_barrier">place_acceleration_structure_barrier</a></li><li><a href="#tymethod.reset_all" title="reset_all">reset_all</a></li><li><a href="#tymethod.reset_queries" title="reset_queries">reset_queries</a></li><li><a href="#tymethod.set_bind_group" title="set_bind_group">set_bind_group</a></li><li><a href="#tymethod.set_blend_constants" title="set_blend_constants">set_blend_constants</a></li><li><a href="#tymethod.set_compute_pipeline" title="set_compute_pipeline">set_compute_pipeline</a></li><li><a href="#tymethod.set_index_buffer" title="set_index_buffer">set_index_buffer</a></li><li><a href="#tymethod.set_push_constants" title="set_push_constants">set_push_constants</a></li><li><a href="#tymethod.set_render_pipeline" title="set_render_pipeline">set_render_pipeline</a></li><li><a href="#tymethod.set_scissor_rect" title="set_scissor_rect">set_scissor_rect</a></li><li><a href="#tymethod.set_stencil_reference" title="set_stencil_reference">set_stencil_reference</a></li><li><a href="#tymethod.set_vertex_buffer" title="set_vertex_buffer">set_vertex_buffer</a></li><li><a href="#tymethod.set_viewport" title="set_viewport">set_viewport</a></li><li><a href="#tymethod.transition_buffers" title="transition_buffers">transition_buffers</a></li><li><a href="#tymethod.transition_textures" title="transition_textures">transition_textures</a></li><li><a href="#tymethod.write_timestamp" title="write_timestamp">write_timestamp</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate wgpu_<wbr>hal</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">wgpu_hal</a></span><h1>Trait <span class="trait">CommandEncoder</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/wgpu_hal/lib.rs.html#1115-1510">Source</a> </span></div><pre class="rust item-decl"><code>pub trait CommandEncoder: <a class="trait" href="../wgpu_types/send_sync/trait.WasmNotSendSync.html" title="trait wgpu_types::send_sync::WasmNotSendSync">WasmNotSendSync</a> + <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> {
|
||
type <a href="#associatedtype.A" class="associatedtype">A</a>: <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>;
|
||
|
||
<details class="toggle type-contents-toggle"><summary class="hideme"><span>Show 43 methods</span></summary> // Required methods
|
||
unsafe fn <a href="#tymethod.begin_encoding" class="fn">begin_encoding</a>(
|
||
&mut self,
|
||
label: <a class="type" href="type.Label.html" title="type wgpu_hal::Label">Label</a><'_>,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.unit.html">()</a>, <a class="enum" href="enum.DeviceError.html" title="enum wgpu_hal::DeviceError">DeviceError</a>>;
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.discard_encoding" class="fn">discard_encoding</a>(&mut self);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.end_encoding" class="fn">end_encoding</a>(
|
||
&mut self,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.CommandBuffer" title="type wgpu_hal::Api::CommandBuffer">CommandBuffer</a>, <a class="enum" href="enum.DeviceError.html" title="enum wgpu_hal::DeviceError">DeviceError</a>>;
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.reset_all" class="fn">reset_all</a><I>(&mut self, command_buffers: I)
|
||
<span class="where">where I: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.CommandBuffer" title="type wgpu_hal::Api::CommandBuffer">CommandBuffer</a>></span>;
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.transition_buffers" class="fn">transition_buffers</a><'a, T>(&mut self, barriers: T)
|
||
<span class="where">where T: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="struct" href="struct.BufferBarrier.html" title="struct wgpu_hal::BufferBarrier">BufferBarrier</a><'a, <Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>>></span>;
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.transition_textures" class="fn">transition_textures</a><'a, T>(&mut self, barriers: T)
|
||
<span class="where">where T: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="struct" href="struct.TextureBarrier.html" title="struct wgpu_hal::TextureBarrier">TextureBarrier</a><'a, <Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Texture" title="type wgpu_hal::Api::Texture">Texture</a>>></span>;
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.clear_buffer" class="fn">clear_buffer</a>(
|
||
&mut self,
|
||
buffer: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>,
|
||
range: <a class="type" href="type.MemoryRange.html" title="type wgpu_hal::MemoryRange">MemoryRange</a>,
|
||
);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.copy_buffer_to_buffer" class="fn">copy_buffer_to_buffer</a><T>(
|
||
&mut self,
|
||
src: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>,
|
||
dst: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>,
|
||
regions: T,
|
||
)
|
||
<span class="where">where T: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="struct" href="struct.BufferCopy.html" title="struct wgpu_hal::BufferCopy">BufferCopy</a>></span>;
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.copy_texture_to_texture" class="fn">copy_texture_to_texture</a><T>(
|
||
&mut self,
|
||
src: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Texture" title="type wgpu_hal::Api::Texture">Texture</a>,
|
||
src_usage: <a class="struct" href="struct.TextureUses.html" title="struct wgpu_hal::TextureUses">TextureUses</a>,
|
||
dst: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Texture" title="type wgpu_hal::Api::Texture">Texture</a>,
|
||
regions: T,
|
||
)
|
||
<span class="where">where T: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="struct" href="struct.TextureCopy.html" title="struct wgpu_hal::TextureCopy">TextureCopy</a>></span>;
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.copy_buffer_to_texture" class="fn">copy_buffer_to_texture</a><T>(
|
||
&mut self,
|
||
src: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>,
|
||
dst: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Texture" title="type wgpu_hal::Api::Texture">Texture</a>,
|
||
regions: T,
|
||
)
|
||
<span class="where">where T: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="struct" href="struct.BufferTextureCopy.html" title="struct wgpu_hal::BufferTextureCopy">BufferTextureCopy</a>></span>;
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.copy_texture_to_buffer" class="fn">copy_texture_to_buffer</a><T>(
|
||
&mut self,
|
||
src: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Texture" title="type wgpu_hal::Api::Texture">Texture</a>,
|
||
src_usage: <a class="struct" href="struct.TextureUses.html" title="struct wgpu_hal::TextureUses">TextureUses</a>,
|
||
dst: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>,
|
||
regions: T,
|
||
)
|
||
<span class="where">where T: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="struct" href="struct.BufferTextureCopy.html" title="struct wgpu_hal::BufferTextureCopy">BufferTextureCopy</a>></span>;
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.set_bind_group" class="fn">set_bind_group</a>(
|
||
&mut self,
|
||
layout: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.PipelineLayout" title="type wgpu_hal::Api::PipelineLayout">PipelineLayout</a>,
|
||
index: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
group: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.BindGroup" title="type wgpu_hal::Api::BindGroup">BindGroup</a>,
|
||
dynamic_offsets: &[<a class="type" href="../wgpu_types/type.DynamicOffset.html" title="type wgpu_types::DynamicOffset">DynamicOffset</a>],
|
||
);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.set_push_constants" class="fn">set_push_constants</a>(
|
||
&mut self,
|
||
layout: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.PipelineLayout" title="type wgpu_hal::Api::PipelineLayout">PipelineLayout</a>,
|
||
stages: <a class="struct" href="../wgpu_types/struct.ShaderStages.html" title="struct wgpu_types::ShaderStages">ShaderStages</a>,
|
||
offset_bytes: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
data: &[<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>],
|
||
);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.insert_debug_marker" class="fn">insert_debug_marker</a>(&mut self, label: &<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.begin_debug_marker" class="fn">begin_debug_marker</a>(&mut self, group_label: &<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.end_debug_marker" class="fn">end_debug_marker</a>(&mut self);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.begin_query" class="fn">begin_query</a>(
|
||
&mut self,
|
||
set: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.QuerySet" title="type wgpu_hal::Api::QuerySet">QuerySet</a>,
|
||
index: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.end_query" class="fn">end_query</a>(&mut self, set: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.QuerySet" title="type wgpu_hal::Api::QuerySet">QuerySet</a>, index: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.write_timestamp" class="fn">write_timestamp</a>(
|
||
&mut self,
|
||
set: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.QuerySet" title="type wgpu_hal::Api::QuerySet">QuerySet</a>,
|
||
index: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.reset_queries" class="fn">reset_queries</a>(
|
||
&mut self,
|
||
set: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.QuerySet" title="type wgpu_hal::Api::QuerySet">QuerySet</a>,
|
||
range: <a class="struct" href="https://doc.rust-lang.org/1.84.0/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>>,
|
||
);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.copy_query_results" class="fn">copy_query_results</a>(
|
||
&mut self,
|
||
set: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.QuerySet" title="type wgpu_hal::Api::QuerySet">QuerySet</a>,
|
||
range: <a class="struct" href="https://doc.rust-lang.org/1.84.0/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>>,
|
||
buffer: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>,
|
||
offset: <a class="type" href="../wgpu_types/type.BufferAddress.html" title="type wgpu_types::BufferAddress">BufferAddress</a>,
|
||
stride: <a class="type" href="../wgpu_types/type.BufferSize.html" title="type wgpu_types::BufferSize">BufferSize</a>,
|
||
);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.begin_render_pass" class="fn">begin_render_pass</a>(
|
||
&mut self,
|
||
desc: &<a class="struct" href="struct.RenderPassDescriptor.html" title="struct wgpu_hal::RenderPassDescriptor">RenderPassDescriptor</a><'_, <Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.QuerySet" title="type wgpu_hal::Api::QuerySet">QuerySet</a>, <Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.TextureView" title="type wgpu_hal::Api::TextureView">TextureView</a>>,
|
||
);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.end_render_pass" class="fn">end_render_pass</a>(&mut self);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.set_render_pipeline" class="fn">set_render_pipeline</a>(
|
||
&mut self,
|
||
pipeline: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.RenderPipeline" title="type wgpu_hal::Api::RenderPipeline">RenderPipeline</a>,
|
||
);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.set_index_buffer" class="fn">set_index_buffer</a><'a>(
|
||
&mut self,
|
||
binding: <a class="struct" href="struct.BufferBinding.html" title="struct wgpu_hal::BufferBinding">BufferBinding</a><'a, <Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>>,
|
||
format: <a class="enum" href="../wgpu_types/enum.IndexFormat.html" title="enum wgpu_types::IndexFormat">IndexFormat</a>,
|
||
);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.set_vertex_buffer" class="fn">set_vertex_buffer</a><'a>(
|
||
&mut self,
|
||
index: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
binding: <a class="struct" href="struct.BufferBinding.html" title="struct wgpu_hal::BufferBinding">BufferBinding</a><'a, <Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>>,
|
||
);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.set_viewport" class="fn">set_viewport</a>(&mut self, rect: &<a class="struct" href="struct.Rect.html" title="struct wgpu_hal::Rect">Rect</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>>, depth_range: <a class="struct" href="https://doc.rust-lang.org/1.84.0/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>>);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.set_scissor_rect" class="fn">set_scissor_rect</a>(&mut self, rect: &<a class="struct" href="struct.Rect.html" title="struct wgpu_hal::Rect">Rect</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>>);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.set_stencil_reference" class="fn">set_stencil_reference</a>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.set_blend_constants" class="fn">set_blend_constants</a>(&mut self, color: &[<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.array.html">4</a>]);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.draw" class="fn">draw</a>(
|
||
&mut self,
|
||
first_vertex: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
vertex_count: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
first_instance: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
instance_count: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.draw_indexed" class="fn">draw_indexed</a>(
|
||
&mut self,
|
||
first_index: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
index_count: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
base_vertex: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.i32.html">i32</a>,
|
||
first_instance: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
instance_count: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.draw_indirect" class="fn">draw_indirect</a>(
|
||
&mut self,
|
||
buffer: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>,
|
||
offset: <a class="type" href="../wgpu_types/type.BufferAddress.html" title="type wgpu_types::BufferAddress">BufferAddress</a>,
|
||
draw_count: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.draw_indexed_indirect" class="fn">draw_indexed_indirect</a>(
|
||
&mut self,
|
||
buffer: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>,
|
||
offset: <a class="type" href="../wgpu_types/type.BufferAddress.html" title="type wgpu_types::BufferAddress">BufferAddress</a>,
|
||
draw_count: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.draw_indirect_count" class="fn">draw_indirect_count</a>(
|
||
&mut self,
|
||
buffer: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>,
|
||
offset: <a class="type" href="../wgpu_types/type.BufferAddress.html" title="type wgpu_types::BufferAddress">BufferAddress</a>,
|
||
count_buffer: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>,
|
||
count_offset: <a class="type" href="../wgpu_types/type.BufferAddress.html" title="type wgpu_types::BufferAddress">BufferAddress</a>,
|
||
max_count: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.draw_indexed_indirect_count" class="fn">draw_indexed_indirect_count</a>(
|
||
&mut self,
|
||
buffer: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>,
|
||
offset: <a class="type" href="../wgpu_types/type.BufferAddress.html" title="type wgpu_types::BufferAddress">BufferAddress</a>,
|
||
count_buffer: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>,
|
||
count_offset: <a class="type" href="../wgpu_types/type.BufferAddress.html" title="type wgpu_types::BufferAddress">BufferAddress</a>,
|
||
max_count: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.begin_compute_pass" class="fn">begin_compute_pass</a>(
|
||
&mut self,
|
||
desc: &<a class="struct" href="struct.ComputePassDescriptor.html" title="struct wgpu_hal::ComputePassDescriptor">ComputePassDescriptor</a><'_, <Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.QuerySet" title="type wgpu_hal::Api::QuerySet">QuerySet</a>>,
|
||
);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.end_compute_pass" class="fn">end_compute_pass</a>(&mut self);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.set_compute_pipeline" class="fn">set_compute_pipeline</a>(
|
||
&mut self,
|
||
pipeline: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.ComputePipeline" title="type wgpu_hal::Api::ComputePipeline">ComputePipeline</a>,
|
||
);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.dispatch" class="fn">dispatch</a>(&mut self, count: [<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.array.html">3</a>]);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.dispatch_indirect" class="fn">dispatch_indirect</a>(
|
||
&mut self,
|
||
buffer: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>,
|
||
offset: <a class="type" href="../wgpu_types/type.BufferAddress.html" title="type wgpu_types::BufferAddress">BufferAddress</a>,
|
||
);
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.build_acceleration_structures" class="fn">build_acceleration_structures</a><'a, T>(
|
||
&mut self,
|
||
descriptor_count: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
descriptors: T,
|
||
)
|
||
<span class="where">where Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a>: 'a,
|
||
T: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = <a class="struct" href="struct.BuildAccelerationStructureDescriptor.html" title="struct wgpu_hal::BuildAccelerationStructureDescriptor">BuildAccelerationStructureDescriptor</a><'a, <Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>, <Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.AccelerationStructure" title="type wgpu_hal::Api::AccelerationStructure">AccelerationStructure</a>>></span>;
|
||
<span class="item-spacer"></span> unsafe fn <a href="#tymethod.place_acceleration_structure_barrier" class="fn">place_acceleration_structure_barrier</a>(
|
||
&mut self,
|
||
barrier: <a class="struct" href="struct.AccelerationStructureBarrier.html" title="struct wgpu_hal::AccelerationStructureBarrier">AccelerationStructureBarrier</a>,
|
||
);
|
||
</details>}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Encoder and allocation pool for <code>CommandBuffer</code>s.</p>
|
||
<p>A <code>CommandEncoder</code> not only constructs <code>CommandBuffer</code>s but also
|
||
acts as the allocation pool that owns the buffers’ underlying
|
||
storage. Thus, <code>CommandBuffer</code>s must not outlive the
|
||
<code>CommandEncoder</code> that created them.</p>
|
||
<p>The life cycle of a <code>CommandBuffer</code> is as follows:</p>
|
||
<ul>
|
||
<li>
|
||
<p>Call <a href="trait.Device.html#tymethod.create_command_encoder" title="method wgpu_hal::Device::create_command_encoder"><code>Device::create_command_encoder</code></a> to create a new
|
||
<code>CommandEncoder</code>, in the “closed” state.</p>
|
||
</li>
|
||
<li>
|
||
<p>Call <code>begin_encoding</code> on a closed <code>CommandEncoder</code> to begin
|
||
recording commands. This puts the <code>CommandEncoder</code> in the
|
||
“recording” state.</p>
|
||
</li>
|
||
<li>
|
||
<p>Call methods like <code>copy_buffer_to_buffer</code>, <code>begin_render_pass</code>,
|
||
etc. on a “recording” <code>CommandEncoder</code> to add commands to the
|
||
list. (If an error occurs, you must call <code>discard_encoding</code>; see
|
||
below.)</p>
|
||
</li>
|
||
<li>
|
||
<p>Call <code>end_encoding</code> on a recording <code>CommandEncoder</code> to close the
|
||
encoder and construct a fresh <code>CommandBuffer</code> consisting of the
|
||
list of commands recorded up to that point.</p>
|
||
</li>
|
||
<li>
|
||
<p>Call <code>discard_encoding</code> on a recording <code>CommandEncoder</code> to drop
|
||
the commands recorded thus far and close the encoder. This is
|
||
the only safe thing to do on a <code>CommandEncoder</code> if an error has
|
||
occurred while recording commands.</p>
|
||
</li>
|
||
<li>
|
||
<p>Call <code>reset_all</code> on a closed <code>CommandEncoder</code>, passing all the
|
||
live <code>CommandBuffers</code> built from it. All the <code>CommandBuffer</code>s
|
||
are destroyed, and their resources are freed.</p>
|
||
</li>
|
||
</ul>
|
||
<h2 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h2>
|
||
<ul>
|
||
<li>
|
||
<p>The <code>CommandEncoder</code> must be in the states described above to
|
||
make the given calls.</p>
|
||
</li>
|
||
<li>
|
||
<p>A <code>CommandBuffer</code> that has been submitted for execution on the
|
||
GPU must live until its execution is complete.</p>
|
||
</li>
|
||
<li>
|
||
<p>A <code>CommandBuffer</code> must not outlive the <code>CommandEncoder</code> that
|
||
built it.</p>
|
||
</li>
|
||
<li>
|
||
<p>A <code>CommandEncoder</code> must not outlive its <code>Device</code>.</p>
|
||
</li>
|
||
</ul>
|
||
<p>It is the user’s responsibility to meet this requirements. This
|
||
allows <code>CommandEncoder</code> implementations to keep their state
|
||
tracking to a minimum.</p>
|
||
</div></details><h2 id="required-associated-types" class="section-header">Required Associated Types<a href="#required-associated-types" class="anchor">§</a></h2><div class="methods"><section id="associatedtype.A" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1116">Source</a><h4 class="code-header">type <a href="#associatedtype.A" class="associatedtype">A</a>: <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a></h4></section></div><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.begin_encoding" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1125">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.begin_encoding" class="fn">begin_encoding</a>(&mut self, label: <a class="type" href="type.Label.html" title="type wgpu_hal::Label">Label</a><'_>) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.unit.html">()</a>, <a class="enum" href="enum.DeviceError.html" title="enum wgpu_hal::DeviceError">DeviceError</a>></h4></section></summary><div class="docblock"><p>Begin encoding a new command buffer.</p>
|
||
<p>This puts this <code>CommandEncoder</code> in the “recording” state.</p>
|
||
<h5 id="safety-1"><a class="doc-anchor" href="#safety-1">§</a>Safety</h5>
|
||
<p>This <code>CommandEncoder</code> must be in the “closed” state.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.discard_encoding" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1141">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.discard_encoding" class="fn">discard_encoding</a>(&mut self)</h4></section></summary><div class="docblock"><p>Discard the command list under construction.</p>
|
||
<p>If an error has occurred while recording commands, this
|
||
is the only safe thing to do with the encoder.</p>
|
||
<p>This puts this <code>CommandEncoder</code> in the “closed” state.</p>
|
||
<h5 id="safety-2"><a class="doc-anchor" href="#safety-2">§</a>Safety</h5>
|
||
<p>This <code>CommandEncoder</code> must be in the “recording” state.</p>
|
||
<p>Callers must not assume that implementations of this
|
||
function are idempotent, and thus should not call it
|
||
multiple times in a row.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.end_encoding" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1162">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.end_encoding" class="fn">end_encoding</a>(
|
||
&mut self,
|
||
) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.CommandBuffer" title="type wgpu_hal::Api::CommandBuffer">CommandBuffer</a>, <a class="enum" href="enum.DeviceError.html" title="enum wgpu_hal::DeviceError">DeviceError</a>></h4></section></summary><div class="docblock"><p>Return a fresh <a href="trait.Api.html#associatedtype.CommandBuffer" title="associated type wgpu_hal::Api::CommandBuffer"><code>CommandBuffer</code></a> holding the recorded commands.</p>
|
||
<p>The returned <a href="trait.Api.html#associatedtype.CommandBuffer" title="associated type wgpu_hal::Api::CommandBuffer"><code>CommandBuffer</code></a> holds all the commands recorded
|
||
on this <code>CommandEncoder</code> since the last call to
|
||
<a href="trait.CommandEncoder.html#tymethod.begin_encoding" title="method wgpu_hal::CommandEncoder::begin_encoding"><code>begin_encoding</code></a>.</p>
|
||
<p>This puts this <code>CommandEncoder</code> in the “closed” state.</p>
|
||
<h5 id="safety-3"><a class="doc-anchor" href="#safety-3">§</a>Safety</h5>
|
||
<p>This <code>CommandEncoder</code> must be in the “recording” state.</p>
|
||
<p>The returned <a href="trait.Api.html#associatedtype.CommandBuffer" title="associated type wgpu_hal::Api::CommandBuffer"><code>CommandBuffer</code></a> must not outlive this
|
||
<code>CommandEncoder</code>. Implementations are allowed to build
|
||
<code>CommandBuffer</code>s that depend on storage owned by this
|
||
<code>CommandEncoder</code>.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.reset_all" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1175-1177">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.reset_all" class="fn">reset_all</a><I>(&mut self, command_buffers: I)<div class="where">where
|
||
I: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.CommandBuffer" title="type wgpu_hal::Api::CommandBuffer">CommandBuffer</a>>,</div></h4></section></summary><div class="docblock"><p>Reclaim all resources belonging to this <code>CommandEncoder</code>.</p>
|
||
<h5 id="safety-4"><a class="doc-anchor" href="#safety-4">§</a>Safety</h5>
|
||
<p>This <code>CommandEncoder</code> must be in the “closed” state.</p>
|
||
<p>The <code>command_buffers</code> iterator must produce all the live
|
||
<a href="trait.Api.html#associatedtype.CommandBuffer" title="associated type wgpu_hal::Api::CommandBuffer"><code>CommandBuffer</code></a>s built using this <code>CommandEncoder</code> — that
|
||
is, every extant <code>CommandBuffer</code> returned from <code>end_encoding</code>.</p>
|
||
</div></details><section id="tymethod.transition_buffers" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1179-1181">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.transition_buffers" class="fn">transition_buffers</a><'a, T>(&mut self, barriers: T)<div class="where">where
|
||
T: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="struct" href="struct.BufferBarrier.html" title="struct wgpu_hal::BufferBarrier">BufferBarrier</a><'a, <Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>>>,</div></h4></section><section id="tymethod.transition_textures" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1183-1185">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.transition_textures" class="fn">transition_textures</a><'a, T>(&mut self, barriers: T)<div class="where">where
|
||
T: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="struct" href="struct.TextureBarrier.html" title="struct wgpu_hal::TextureBarrier">TextureBarrier</a><'a, <Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Texture" title="type wgpu_hal::Api::Texture">Texture</a>>>,</div></h4></section><section id="tymethod.clear_buffer" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1189">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.clear_buffer" class="fn">clear_buffer</a>(
|
||
&mut self,
|
||
buffer: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>,
|
||
range: <a class="type" href="type.MemoryRange.html" title="type wgpu_hal::MemoryRange">MemoryRange</a>,
|
||
)</h4></section><section id="tymethod.copy_buffer_to_buffer" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1191-1197">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.copy_buffer_to_buffer" class="fn">copy_buffer_to_buffer</a><T>(
|
||
&mut self,
|
||
src: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>,
|
||
dst: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>,
|
||
regions: T,
|
||
)<div class="where">where
|
||
T: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="struct" href="struct.BufferCopy.html" title="struct wgpu_hal::BufferCopy">BufferCopy</a>>,</div></h4></section><details class="toggle method-toggle" open><summary><section id="tymethod.copy_texture_to_texture" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1217-1224">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.copy_texture_to_texture" class="fn">copy_texture_to_texture</a><T>(
|
||
&mut self,
|
||
src: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Texture" title="type wgpu_hal::Api::Texture">Texture</a>,
|
||
src_usage: <a class="struct" href="struct.TextureUses.html" title="struct wgpu_hal::TextureUses">TextureUses</a>,
|
||
dst: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Texture" title="type wgpu_hal::Api::Texture">Texture</a>,
|
||
regions: T,
|
||
)<div class="where">where
|
||
T: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="struct" href="struct.TextureCopy.html" title="struct wgpu_hal::TextureCopy">TextureCopy</a>>,</div></h4></section></summary><div class="docblock"><p>Copy from one texture to another.
|
||
Works with a single array layer.
|
||
Note: <code>dst</code> current usage has to be <code>TextureUses::COPY_DST</code>.
|
||
Note: the copy extent is in physical size (rounded to the block size)</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.copy_buffer_to_texture" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1230-1236">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.copy_buffer_to_texture" class="fn">copy_buffer_to_texture</a><T>(
|
||
&mut self,
|
||
src: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>,
|
||
dst: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Texture" title="type wgpu_hal::Api::Texture">Texture</a>,
|
||
regions: T,
|
||
)<div class="where">where
|
||
T: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="struct" href="struct.BufferTextureCopy.html" title="struct wgpu_hal::BufferTextureCopy">BufferTextureCopy</a>>,</div></h4></section></summary><div class="docblock"><p>Copy from buffer to texture.
|
||
Works with a single array layer.
|
||
Note: <code>dst</code> current usage has to be <code>TextureUses::COPY_DST</code>.
|
||
Note: the copy extent is in physical size (rounded to the block size)</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.copy_texture_to_buffer" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1241-1248">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.copy_texture_to_buffer" class="fn">copy_texture_to_buffer</a><T>(
|
||
&mut self,
|
||
src: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Texture" title="type wgpu_hal::Api::Texture">Texture</a>,
|
||
src_usage: <a class="struct" href="struct.TextureUses.html" title="struct wgpu_hal::TextureUses">TextureUses</a>,
|
||
dst: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>,
|
||
regions: T,
|
||
)<div class="where">where
|
||
T: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/iter/traits/iterator/trait.Iterator.html" title="trait core::iter::traits::iterator::Iterator">Iterator</a><Item = <a class="struct" href="struct.BufferTextureCopy.html" title="struct wgpu_hal::BufferTextureCopy">BufferTextureCopy</a>>,</div></h4></section></summary><div class="docblock"><p>Copy from texture to buffer.
|
||
Works with a single array layer.
|
||
Note: the copy extent is in physical size (rounded to the block size)</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.set_bind_group" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1286-1292">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.set_bind_group" class="fn">set_bind_group</a>(
|
||
&mut self,
|
||
layout: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.PipelineLayout" title="type wgpu_hal::Api::PipelineLayout">PipelineLayout</a>,
|
||
index: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
group: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.BindGroup" title="type wgpu_hal::Api::BindGroup">BindGroup</a>,
|
||
dynamic_offsets: &[<a class="type" href="../wgpu_types/type.DynamicOffset.html" title="type wgpu_types::DynamicOffset">DynamicOffset</a>],
|
||
)</h4></section></summary><div class="docblock"><p>Sets the bind group at <code>index</code> to <code>group</code>.</p>
|
||
<p>If this is not the first call to <code>set_bind_group</code> within the current
|
||
render or compute pass:</p>
|
||
<ul>
|
||
<li>
|
||
<p>If <code>layout</code> contains <code>n</code> bind group layouts, then any previously set
|
||
bind groups at indices <code>n</code> or higher are cleared.</p>
|
||
</li>
|
||
<li>
|
||
<p>If the first <code>m</code> bind group layouts of <code>layout</code> are equal to those of
|
||
the previously passed layout, but no more, then any previously set
|
||
bind groups at indices <code>m</code> or higher are cleared.</p>
|
||
</li>
|
||
</ul>
|
||
<p>It follows from the above that passing the same layout as before doesn’t
|
||
clear any bind groups.</p>
|
||
<h5 id="safety-5"><a class="doc-anchor" href="#safety-5">§</a>Safety</h5>
|
||
<ul>
|
||
<li>
|
||
<p>This <a href="trait.CommandEncoder.html" title="trait wgpu_hal::CommandEncoder"><code>CommandEncoder</code></a> must be within a render or compute pass.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>index</code> must be the valid index of some bind group layout in <code>layout</code>.
|
||
Call this the “relevant bind group layout”.</p>
|
||
</li>
|
||
<li>
|
||
<p>The layout of <code>group</code> must be equal to the relevant bind group layout.</p>
|
||
</li>
|
||
<li>
|
||
<p>The length of <code>dynamic_offsets</code> must match the number of buffer
|
||
bindings <a href="../wgpu_types/enum.BindingType.html#variant.Buffer.field.has_dynamic_offset" title="field wgpu_types::BindingType::has_dynamic_offset">with dynamic offsets</a> in the relevant bind group
|
||
layout.</p>
|
||
</li>
|
||
<li>
|
||
<p>If those buffer bindings are ordered by increasing <a href="../wgpu_types/struct.BindGroupLayoutEntry.html#structfield.binding" title="field wgpu_types::BindGroupLayoutEntry::binding"><code>binding</code> number</a>
|
||
and paired with elements from <code>dynamic_offsets</code>, then each offset must
|
||
be a valid offset for the binding’s corresponding buffer in <code>group</code>.</p>
|
||
</li>
|
||
</ul>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.set_push_constants" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1302-1308">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.set_push_constants" class="fn">set_push_constants</a>(
|
||
&mut self,
|
||
layout: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.PipelineLayout" title="type wgpu_hal::Api::PipelineLayout">PipelineLayout</a>,
|
||
stages: <a class="struct" href="../wgpu_types/struct.ShaderStages.html" title="struct wgpu_types::ShaderStages">ShaderStages</a>,
|
||
offset_bytes: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
data: &[<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>],
|
||
)</h4></section></summary><div class="docblock"><p>Sets a range in push constant data.</p>
|
||
<p>IMPORTANT: while the data is passed as words, the offset is in bytes!</p>
|
||
<h5 id="safety-6"><a class="doc-anchor" href="#safety-6">§</a>Safety</h5>
|
||
<ul>
|
||
<li><code>offset_bytes</code> must be a multiple of 4.</li>
|
||
<li>The range of push constants written must be valid for the pipeline layout at draw time.</li>
|
||
</ul>
|
||
</div></details><section id="tymethod.insert_debug_marker" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1310">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.insert_debug_marker" class="fn">insert_debug_marker</a>(&mut self, label: &<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>)</h4></section><section id="tymethod.begin_debug_marker" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1311">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.begin_debug_marker" class="fn">begin_debug_marker</a>(&mut self, group_label: &<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>)</h4></section><section id="tymethod.end_debug_marker" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1312">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.end_debug_marker" class="fn">end_debug_marker</a>(&mut self)</h4></section><details class="toggle method-toggle" open><summary><section id="tymethod.begin_query" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1319">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.begin_query" class="fn">begin_query</a>(&mut self, set: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.QuerySet" title="type wgpu_hal::Api::QuerySet">QuerySet</a>, index: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>)</h4></section></summary><div class="docblock"><h5 id="safety-7"><a class="doc-anchor" href="#safety-7">§</a>Safety:</h5>
|
||
<ul>
|
||
<li>If <code>set</code> is an occlusion query set, it must be the same one as used in the <a href="struct.RenderPassDescriptor.html#structfield.occlusion_query_set" title="field wgpu_hal::RenderPassDescriptor::occlusion_query_set"><code>RenderPassDescriptor::occlusion_query_set</code></a> parameter.</li>
|
||
</ul>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.end_query" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1323">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.end_query" class="fn">end_query</a>(&mut self, set: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.QuerySet" title="type wgpu_hal::Api::QuerySet">QuerySet</a>, index: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>)</h4></section></summary><div class="docblock"><h5 id="safety-8"><a class="doc-anchor" href="#safety-8">§</a>Safety:</h5>
|
||
<ul>
|
||
<li>If <code>set</code> is an occlusion query set, it must be the same one as used in the <a href="struct.RenderPassDescriptor.html#structfield.occlusion_query_set" title="field wgpu_hal::RenderPassDescriptor::occlusion_query_set"><code>RenderPassDescriptor::occlusion_query_set</code></a> parameter.</li>
|
||
</ul>
|
||
</div></details><section id="tymethod.write_timestamp" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1324">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.write_timestamp" class="fn">write_timestamp</a>(
|
||
&mut self,
|
||
set: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.QuerySet" title="type wgpu_hal::Api::QuerySet">QuerySet</a>,
|
||
index: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
)</h4></section><section id="tymethod.reset_queries" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1325">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.reset_queries" class="fn">reset_queries</a>(
|
||
&mut self,
|
||
set: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.QuerySet" title="type wgpu_hal::Api::QuerySet">QuerySet</a>,
|
||
range: <a class="struct" href="https://doc.rust-lang.org/1.84.0/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>>,
|
||
)</h4></section><section id="tymethod.copy_query_results" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1326-1333">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.copy_query_results" class="fn">copy_query_results</a>(
|
||
&mut self,
|
||
set: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.QuerySet" title="type wgpu_hal::Api::QuerySet">QuerySet</a>,
|
||
range: <a class="struct" href="https://doc.rust-lang.org/1.84.0/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>>,
|
||
buffer: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>,
|
||
offset: <a class="type" href="../wgpu_types/type.BufferAddress.html" title="type wgpu_types::BufferAddress">BufferAddress</a>,
|
||
stride: <a class="type" href="../wgpu_types/type.BufferSize.html" title="type wgpu_types::BufferSize">BufferSize</a>,
|
||
)</h4></section><details class="toggle method-toggle" open><summary><section id="tymethod.begin_render_pass" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1360-1363">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.begin_render_pass" class="fn">begin_render_pass</a>(
|
||
&mut self,
|
||
desc: &<a class="struct" href="struct.RenderPassDescriptor.html" title="struct wgpu_hal::RenderPassDescriptor">RenderPassDescriptor</a><'_, <Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.QuerySet" title="type wgpu_hal::Api::QuerySet">QuerySet</a>, <Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.TextureView" title="type wgpu_hal::Api::TextureView">TextureView</a>>,
|
||
)</h4></section></summary><div class="docblock"><p>Begin a new render pass, clearing all active bindings.</p>
|
||
<p>This clears any bindings established by the following calls:</p>
|
||
<ul>
|
||
<li><a href="trait.CommandEncoder.html#tymethod.set_bind_group" title="method wgpu_hal::CommandEncoder::set_bind_group"><code>set_bind_group</code></a></li>
|
||
<li><a href="trait.CommandEncoder.html#tymethod.set_push_constants" title="method wgpu_hal::CommandEncoder::set_push_constants"><code>set_push_constants</code></a></li>
|
||
<li><a href="trait.CommandEncoder.html#tymethod.begin_query" title="method wgpu_hal::CommandEncoder::begin_query"><code>begin_query</code></a></li>
|
||
<li><a href="trait.CommandEncoder.html#tymethod.set_render_pipeline" title="method wgpu_hal::CommandEncoder::set_render_pipeline"><code>set_render_pipeline</code></a></li>
|
||
<li><a href="trait.CommandEncoder.html#tymethod.set_index_buffer" title="method wgpu_hal::CommandEncoder::set_index_buffer"><code>set_index_buffer</code></a></li>
|
||
<li><a href="trait.CommandEncoder.html#tymethod.set_vertex_buffer" title="method wgpu_hal::CommandEncoder::set_vertex_buffer"><code>set_vertex_buffer</code></a></li>
|
||
</ul>
|
||
<h5 id="safety-9"><a class="doc-anchor" href="#safety-9">§</a>Safety</h5>
|
||
<ul>
|
||
<li>
|
||
<p>All prior calls to <a href="trait.CommandEncoder.html#tymethod.begin_render_pass" title="method wgpu_hal::CommandEncoder::begin_render_pass"><code>begin_render_pass</code></a> on this <a href="trait.CommandEncoder.html" title="trait wgpu_hal::CommandEncoder"><code>CommandEncoder</code></a> must have been followed
|
||
by a call to <a href="trait.CommandEncoder.html#tymethod.end_render_pass" title="method wgpu_hal::CommandEncoder::end_render_pass"><code>end_render_pass</code></a>.</p>
|
||
</li>
|
||
<li>
|
||
<p>All prior calls to <a href="trait.CommandEncoder.html#tymethod.begin_compute_pass" title="method wgpu_hal::CommandEncoder::begin_compute_pass"><code>begin_compute_pass</code></a> on this <a href="trait.CommandEncoder.html" title="trait wgpu_hal::CommandEncoder"><code>CommandEncoder</code></a> must have been followed
|
||
by a call to <a href="trait.CommandEncoder.html#tymethod.end_compute_pass" title="method wgpu_hal::CommandEncoder::end_compute_pass"><code>end_compute_pass</code></a>.</p>
|
||
</li>
|
||
</ul>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.end_render_pass" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1374">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.end_render_pass" class="fn">end_render_pass</a>(&mut self)</h4></section></summary><div class="docblock"><p>End the current render pass.</p>
|
||
<h5 id="safety-10"><a class="doc-anchor" href="#safety-10">§</a>Safety</h5>
|
||
<ul>
|
||
<li>There must have been a prior call to <a href="trait.CommandEncoder.html#tymethod.begin_render_pass" title="method wgpu_hal::CommandEncoder::begin_render_pass"><code>begin_render_pass</code></a> on this <a href="trait.CommandEncoder.html" title="trait wgpu_hal::CommandEncoder"><code>CommandEncoder</code></a>
|
||
that has not been followed by a call to <a href="trait.CommandEncoder.html#tymethod.end_render_pass" title="method wgpu_hal::CommandEncoder::end_render_pass"><code>end_render_pass</code></a>.</li>
|
||
</ul>
|
||
</div></details><section id="tymethod.set_render_pipeline" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1376">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.set_render_pipeline" class="fn">set_render_pipeline</a>(
|
||
&mut self,
|
||
pipeline: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.RenderPipeline" title="type wgpu_hal::Api::RenderPipeline">RenderPipeline</a>,
|
||
)</h4></section><section id="tymethod.set_index_buffer" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1378-1382">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.set_index_buffer" class="fn">set_index_buffer</a><'a>(
|
||
&mut self,
|
||
binding: <a class="struct" href="struct.BufferBinding.html" title="struct wgpu_hal::BufferBinding">BufferBinding</a><'a, <Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>>,
|
||
format: <a class="enum" href="../wgpu_types/enum.IndexFormat.html" title="enum wgpu_types::IndexFormat">IndexFormat</a>,
|
||
)</h4></section><section id="tymethod.set_vertex_buffer" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1383-1387">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.set_vertex_buffer" class="fn">set_vertex_buffer</a><'a>(
|
||
&mut self,
|
||
index: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
binding: <a class="struct" href="struct.BufferBinding.html" title="struct wgpu_hal::BufferBinding">BufferBinding</a><'a, <Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>>,
|
||
)</h4></section><section id="tymethod.set_viewport" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1388">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.set_viewport" class="fn">set_viewport</a>(&mut self, rect: &<a class="struct" href="struct.Rect.html" title="struct wgpu_hal::Rect">Rect</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>>, depth_range: <a class="struct" href="https://doc.rust-lang.org/1.84.0/core/ops/range/struct.Range.html" title="struct core::ops::range::Range">Range</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>>)</h4></section><section id="tymethod.set_scissor_rect" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1389">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.set_scissor_rect" class="fn">set_scissor_rect</a>(&mut self, rect: &<a class="struct" href="struct.Rect.html" title="struct wgpu_hal::Rect">Rect</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>>)</h4></section><section id="tymethod.set_stencil_reference" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1390">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.set_stencil_reference" class="fn">set_stencil_reference</a>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>)</h4></section><section id="tymethod.set_blend_constants" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1391">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.set_blend_constants" class="fn">set_blend_constants</a>(&mut self, color: &[<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f32.html">f32</a>; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.array.html">4</a>])</h4></section><section id="tymethod.draw" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1393-1399">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.draw" class="fn">draw</a>(
|
||
&mut self,
|
||
first_vertex: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
vertex_count: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
first_instance: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
instance_count: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
)</h4></section><section id="tymethod.draw_indexed" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1400-1407">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.draw_indexed" class="fn">draw_indexed</a>(
|
||
&mut self,
|
||
first_index: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
index_count: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
base_vertex: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.i32.html">i32</a>,
|
||
first_instance: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
instance_count: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
)</h4></section><section id="tymethod.draw_indirect" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1408-1413">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.draw_indirect" class="fn">draw_indirect</a>(
|
||
&mut self,
|
||
buffer: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>,
|
||
offset: <a class="type" href="../wgpu_types/type.BufferAddress.html" title="type wgpu_types::BufferAddress">BufferAddress</a>,
|
||
draw_count: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
)</h4></section><section id="tymethod.draw_indexed_indirect" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1414-1419">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.draw_indexed_indirect" class="fn">draw_indexed_indirect</a>(
|
||
&mut self,
|
||
buffer: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>,
|
||
offset: <a class="type" href="../wgpu_types/type.BufferAddress.html" title="type wgpu_types::BufferAddress">BufferAddress</a>,
|
||
draw_count: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
)</h4></section><section id="tymethod.draw_indirect_count" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1420-1427">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.draw_indirect_count" class="fn">draw_indirect_count</a>(
|
||
&mut self,
|
||
buffer: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>,
|
||
offset: <a class="type" href="../wgpu_types/type.BufferAddress.html" title="type wgpu_types::BufferAddress">BufferAddress</a>,
|
||
count_buffer: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>,
|
||
count_offset: <a class="type" href="../wgpu_types/type.BufferAddress.html" title="type wgpu_types::BufferAddress">BufferAddress</a>,
|
||
max_count: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
)</h4></section><section id="tymethod.draw_indexed_indirect_count" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1428-1435">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.draw_indexed_indirect_count" class="fn">draw_indexed_indirect_count</a>(
|
||
&mut self,
|
||
buffer: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>,
|
||
offset: <a class="type" href="../wgpu_types/type.BufferAddress.html" title="type wgpu_types::BufferAddress">BufferAddress</a>,
|
||
count_buffer: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>,
|
||
count_offset: <a class="type" href="../wgpu_types/type.BufferAddress.html" title="type wgpu_types::BufferAddress">BufferAddress</a>,
|
||
max_count: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
)</h4></section><details class="toggle method-toggle" open><summary><section id="tymethod.begin_compute_pass" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1460-1463">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.begin_compute_pass" class="fn">begin_compute_pass</a>(
|
||
&mut self,
|
||
desc: &<a class="struct" href="struct.ComputePassDescriptor.html" title="struct wgpu_hal::ComputePassDescriptor">ComputePassDescriptor</a><'_, <Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.QuerySet" title="type wgpu_hal::Api::QuerySet">QuerySet</a>>,
|
||
)</h4></section></summary><div class="docblock"><p>Begin a new compute pass, clearing all active bindings.</p>
|
||
<p>This clears any bindings established by the following calls:</p>
|
||
<ul>
|
||
<li><a href="trait.CommandEncoder.html#tymethod.set_bind_group" title="method wgpu_hal::CommandEncoder::set_bind_group"><code>set_bind_group</code></a></li>
|
||
<li><a href="trait.CommandEncoder.html#tymethod.set_push_constants" title="method wgpu_hal::CommandEncoder::set_push_constants"><code>set_push_constants</code></a></li>
|
||
<li><a href="trait.CommandEncoder.html#tymethod.begin_query" title="method wgpu_hal::CommandEncoder::begin_query"><code>begin_query</code></a></li>
|
||
<li><a href="trait.CommandEncoder.html#tymethod.set_compute_pipeline" title="method wgpu_hal::CommandEncoder::set_compute_pipeline"><code>set_compute_pipeline</code></a></li>
|
||
</ul>
|
||
<h5 id="safety-11"><a class="doc-anchor" href="#safety-11">§</a>Safety</h5>
|
||
<ul>
|
||
<li>
|
||
<p>All prior calls to <a href="trait.CommandEncoder.html#tymethod.begin_render_pass" title="method wgpu_hal::CommandEncoder::begin_render_pass"><code>begin_render_pass</code></a> on this <a href="trait.CommandEncoder.html" title="trait wgpu_hal::CommandEncoder"><code>CommandEncoder</code></a> must have been followed
|
||
by a call to <a href="trait.CommandEncoder.html#tymethod.end_render_pass" title="method wgpu_hal::CommandEncoder::end_render_pass"><code>end_render_pass</code></a>.</p>
|
||
</li>
|
||
<li>
|
||
<p>All prior calls to <a href="trait.CommandEncoder.html#tymethod.begin_compute_pass" title="method wgpu_hal::CommandEncoder::begin_compute_pass"><code>begin_compute_pass</code></a> on this <a href="trait.CommandEncoder.html" title="trait wgpu_hal::CommandEncoder"><code>CommandEncoder</code></a> must have been followed
|
||
by a call to <a href="trait.CommandEncoder.html#tymethod.end_compute_pass" title="method wgpu_hal::CommandEncoder::end_compute_pass"><code>end_compute_pass</code></a>.</p>
|
||
</li>
|
||
</ul>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.end_compute_pass" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1474">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.end_compute_pass" class="fn">end_compute_pass</a>(&mut self)</h4></section></summary><div class="docblock"><p>End the current compute pass.</p>
|
||
<h5 id="safety-12"><a class="doc-anchor" href="#safety-12">§</a>Safety</h5>
|
||
<ul>
|
||
<li>There must have been a prior call to <a href="trait.CommandEncoder.html#tymethod.begin_compute_pass" title="method wgpu_hal::CommandEncoder::begin_compute_pass"><code>begin_compute_pass</code></a> on this <a href="trait.CommandEncoder.html" title="trait wgpu_hal::CommandEncoder"><code>CommandEncoder</code></a>
|
||
that has not been followed by a call to <a href="trait.CommandEncoder.html#tymethod.end_compute_pass" title="method wgpu_hal::CommandEncoder::end_compute_pass"><code>end_compute_pass</code></a>.</li>
|
||
</ul>
|
||
</div></details><section id="tymethod.set_compute_pipeline" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1476">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.set_compute_pipeline" class="fn">set_compute_pipeline</a>(
|
||
&mut self,
|
||
pipeline: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.ComputePipeline" title="type wgpu_hal::Api::ComputePipeline">ComputePipeline</a>,
|
||
)</h4></section><section id="tymethod.dispatch" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1478">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.dispatch" class="fn">dispatch</a>(&mut self, count: [<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>; <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.array.html">3</a>])</h4></section><section id="tymethod.dispatch_indirect" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1479-1483">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.dispatch_indirect" class="fn">dispatch_indirect</a>(
|
||
&mut self,
|
||
buffer: &<Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>,
|
||
offset: <a class="type" href="../wgpu_types/type.BufferAddress.html" title="type wgpu_types::BufferAddress">BufferAddress</a>,
|
||
)</h4></section><details class="toggle method-toggle" open><summary><section id="tymethod.build_acceleration_structures" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1492-1504">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.build_acceleration_structures" class="fn">build_acceleration_structures</a><'a, T>(
|
||
&mut self,
|
||
descriptor_count: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.u32.html">u32</a>,
|
||
descriptors: T,
|
||
)<div class="where">where
|
||
Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a>: 'a,
|
||
T: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/iter/traits/collect/trait.IntoIterator.html" title="trait core::iter::traits::collect::IntoIterator">IntoIterator</a><Item = <a class="struct" href="struct.BuildAccelerationStructureDescriptor.html" title="struct wgpu_hal::BuildAccelerationStructureDescriptor">BuildAccelerationStructureDescriptor</a><'a, <Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.Buffer" title="type wgpu_hal::Api::Buffer">Buffer</a>, <Self::<a class="associatedtype" href="trait.CommandEncoder.html#associatedtype.A" title="type wgpu_hal::CommandEncoder::A">A</a> as <a class="trait" href="trait.Api.html" title="trait wgpu_hal::Api">Api</a>>::<a class="associatedtype" href="trait.Api.html#associatedtype.AccelerationStructure" title="type wgpu_hal::Api::AccelerationStructure">AccelerationStructure</a>>>,</div></h4></section></summary><div class="docblock"><p>To get the required sizes for the buffer allocations use <code>get_acceleration_structure_build_sizes</code> per descriptor
|
||
All buffers must be synchronized externally
|
||
All buffer regions, which are written to may only be passed once per function call,
|
||
with the exception of updates in the same descriptor.
|
||
Consequences of this limitation:</p>
|
||
<ul>
|
||
<li>scratch buffers need to be unique</li>
|
||
<li>a tlas can’t be build in the same call with a blas it contains</li>
|
||
</ul>
|
||
</div></details><section id="tymethod.place_acceleration_structure_barrier" class="method"><a class="src rightside" href="../src/wgpu_hal/lib.rs.html#1506-1509">Source</a><h4 class="code-header">unsafe fn <a href="#tymethod.place_acceleration_structure_barrier" class="fn">place_acceleration_structure_barrier</a>(
|
||
&mut self,
|
||
barrier: <a class="struct" href="struct.AccelerationStructureBarrier.html" title="struct wgpu_hal::AccelerationStructureBarrier">AccelerationStructureBarrier</a>,
|
||
)</h4></section></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.84.0/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><details class="toggle implementors-toggle"><summary><section id="impl-CommandEncoder-for-Encoder" class="impl"><a class="src rightside" href="../src/wgpu_hal/empty.rs.html#315-510">Source</a><a href="#impl-CommandEncoder-for-Encoder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.CommandEncoder.html" title="trait wgpu_hal::CommandEncoder">CommandEncoder</a> for <a class="struct" href="empty/struct.Encoder.html" title="struct wgpu_hal::empty::Encoder">Encoder</a></h3></section></summary><div class="impl-items"><section id="associatedtype.A-1" class="associatedtype trait-impl"><a class="src rightside" href="../src/wgpu_hal/empty.rs.html#316">Source</a><a href="#associatedtype.A-1" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.A" class="associatedtype">A</a> = <a class="struct" href="empty/struct.Api.html" title="struct wgpu_hal::empty::Api">Api</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-CommandEncoder-for-CommandEncoder" class="impl"><a class="src rightside" href="../src/wgpu_hal/gles/command.rs.html#259-1211">Source</a><a href="#impl-CommandEncoder-for-CommandEncoder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.CommandEncoder.html" title="trait wgpu_hal::CommandEncoder">CommandEncoder</a> for wgpu_hal::gles::<a class="struct" href="gles/struct.CommandEncoder.html" title="struct wgpu_hal::gles::CommandEncoder">CommandEncoder</a></h3></section></summary><div class="impl-items"><section id="associatedtype.A-2" class="associatedtype trait-impl"><a class="src rightside" href="../src/wgpu_hal/gles/command.rs.html#260">Source</a><a href="#associatedtype.A-2" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.A" class="associatedtype">A</a> = <a class="struct" href="gles/struct.Api.html" title="struct wgpu_hal::gles::Api">Api</a></h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-CommandEncoder-for-CommandEncoder-1" class="impl"><a class="src rightside" href="../src/wgpu_hal/vulkan/command.rs.html#61-1151">Source</a><a href="#impl-CommandEncoder-for-CommandEncoder-1" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.CommandEncoder.html" title="trait wgpu_hal::CommandEncoder">CommandEncoder</a> for wgpu_hal::vulkan::<a class="struct" href="vulkan/struct.CommandEncoder.html" title="struct wgpu_hal::vulkan::CommandEncoder">CommandEncoder</a></h3></section></summary><div class="impl-items"><section id="associatedtype.A-3" class="associatedtype trait-impl"><a class="src rightside" href="../src/wgpu_hal/vulkan/command.rs.html#62">Source</a><a href="#associatedtype.A-3" class="anchor">§</a><h4 class="code-header">type <a href="#associatedtype.A" class="associatedtype">A</a> = <a class="struct" href="vulkan/struct.Api.html" title="struct wgpu_hal::vulkan::Api">Api</a></h4></section></div></details></div><script src="../trait.impl/wgpu_hal/trait.CommandEncoder.js" async></script></section></div></main></body></html> |