18011801< a href =#1801 id =1801 data-nosnippet > 1801</ a > }
18021802< a href =#1802 id =1802 data-nosnippet > 1802</ a > }
18031803< a href =#1803 id =1803 data-nosnippet > 1803</ a > }
1804- < a href =#1804 id =1804 data-nosnippet > 1804</ a > {
1805- < a href =#1805 id =1805 data-nosnippet > 1805</ a > < span class ="macro "> profiling::scope!</ span > (< span class ="string "> "bind groups"</ span > );
1806- < a href =#1806 id =1806 data-nosnippet > 1806</ a > < span class ="kw "> for </ span > bind_group < span class ="kw "> in </ span > < span class ="kw-2 "> &</ span > cmd_buf_data.trackers.bind_groups {
1807- < a href =#1807 id =1807 data-nosnippet > 1807</ a > bind_group.try_raw(snatch_guard)< span class ="question-mark "> ?</ span > ;
1808- < a href =#1808 id =1808 data-nosnippet > 1808</ a > }
1809- < a href =#1809 id =1809 data-nosnippet > 1809</ a > }
1810- < a href =#1810 id =1810 data-nosnippet > 1810</ a >
1811- < a href =#1811 id =1811 data-nosnippet > 1811</ a > < span class ="kw "> if let </ span > < span class ="prelude-val "> Err</ span > (e) =
1812- < a href =#1812 id =1812 data-nosnippet > 1812</ a > cmd_buf_data.validate_acceleration_structure_actions(snatch_guard, command_index_guard)
1813- < a href =#1813 id =1813 data-nosnippet > 1813</ a > {
1814- < a href =#1814 id =1814 data-nosnippet > 1814</ a > < span class ="kw "> return </ span > < span class ="prelude-val "> Err</ span > (e.into());
1815- < a href =#1815 id =1815 data-nosnippet > 1815</ a > }
1816- < a href =#1816 id =1816 data-nosnippet > 1816</ a > }
1817- < a href =#1817 id =1817 data-nosnippet > 1817</ a > < span class ="prelude-val "> Ok</ span > (())
1818- < a href =#1818 id =1818 data-nosnippet > 1818</ a > }</ code > </ pre > </ div > </ section > </ main > </ body > </ html >
1804+ < a href =#1804 id =1804 data-nosnippet > 1804</ a > < span class ="comment "> // WebGPU requires that we check every bind group referenced during
1805+ < a href =#1805 id =1805 data-nosnippet > 1805</ a > // encoding, even ones that may have been replaced before being used.
1806+ < a href =#1806 id =1806 data-nosnippet > 1806</ a > // TODO(<https://github.com/gfx-rs/wgpu/issues/8510>): Optimize this.
1807+ < a href =#1807 id =1807 data-nosnippet > 1807</ a > </ span > {
1808+ < a href =#1808 id =1808 data-nosnippet > 1808</ a > < span class ="macro "> profiling::scope!</ span > (< span class ="string "> "bind groups"</ span > );
1809+ < a href =#1809 id =1809 data-nosnippet > 1809</ a > < span class ="kw "> for </ span > bind_group < span class ="kw "> in </ span > < span class ="kw-2 "> &</ span > cmd_buf_data.trackers.bind_groups {
1810+ < a href =#1810 id =1810 data-nosnippet > 1810</ a > < span class ="comment "> // This checks the bind group and all resources it references.
1811+ < a href =#1811 id =1811 data-nosnippet > 1811</ a > </ span > bind_group.try_raw(snatch_guard)< span class ="question-mark "> ?</ span > ;
1812+ < a href =#1812 id =1812 data-nosnippet > 1812</ a > }
1813+ < a href =#1813 id =1813 data-nosnippet > 1813</ a > }
1814+ < a href =#1814 id =1814 data-nosnippet > 1814</ a >
1815+ < a href =#1815 id =1815 data-nosnippet > 1815</ a > < span class ="kw "> if let </ span > < span class ="prelude-val "> Err</ span > (e) =
1816+ < a href =#1816 id =1816 data-nosnippet > 1816</ a > cmd_buf_data.validate_acceleration_structure_actions(snatch_guard, command_index_guard)
1817+ < a href =#1817 id =1817 data-nosnippet > 1817</ a > {
1818+ < a href =#1818 id =1818 data-nosnippet > 1818</ a > < span class ="kw "> return </ span > < span class ="prelude-val "> Err</ span > (e.into());
1819+ < a href =#1819 id =1819 data-nosnippet > 1819</ a > }
1820+ < a href =#1820 id =1820 data-nosnippet > 1820</ a > }
1821+ < a href =#1821 id =1821 data-nosnippet > 1821</ a > < span class ="prelude-val "> Ok</ span > (())
1822+ < a href =#1822 id =1822 data-nosnippet > 1822</ a > }</ code > </ pre > </ div > </ section > </ main > </ body > </ html >
0 commit comments