File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ pub extern "C" fn wgpu_render_pass_set_pipeline(
212
212
213
213
let pipeline_layout_guard = HUB . pipeline_layouts . read ( ) ;
214
214
let pipeline_layout = & pipeline_layout_guard[ pipeline. layout_id ] ;
215
- let bing_group_guard = HUB . bind_groups . read ( ) ;
215
+ let bind_group_guard = HUB . bind_groups . read ( ) ;
216
216
217
217
pass. binder . pipeline_layout_id = Some ( pipeline. layout_id . clone ( ) ) ;
218
218
pass. binder . ensure_length ( pipeline_layout. bind_group_layout_ids . len ( ) ) ;
@@ -223,7 +223,7 @@ pub extern "C" fn wgpu_render_pass_set_pipeline(
223
223
. enumerate ( )
224
224
{
225
225
if let Some ( bg_id) = entry. expect_layout ( bgl_id) {
226
- let desc_set = & bing_group_guard [ bg_id] . raw ;
226
+ let desc_set = & bind_group_guard [ bg_id] . raw ;
227
227
unsafe {
228
228
pass. raw . bind_graphics_descriptor_sets (
229
229
& pipeline_layout. raw ,
Original file line number Diff line number Diff line change @@ -1659,7 +1659,12 @@ pub extern "C" fn wgpu_buffer_set_sub_data(
1659
1659
range : None .. None , //TODO: could be partial
1660
1660
} ) ;
1661
1661
1662
+ // Note: this is not pretty. If we need one-time service command buffers,
1663
+ // we'll need to have some internal abstractions for them to be safe.
1662
1664
let mut comb = device. com_allocator . allocate ( buffer. device_id . clone ( ) , & device. raw ) ;
1665
+ // mark as used by the next submission, conservatively
1666
+ let last_submit_index = device. life_guard . submission_index . load ( Ordering :: Acquire ) ;
1667
+ comb. life_guard . submission_index . store ( last_submit_index + 1 , Ordering :: Release ) ;
1663
1668
unsafe {
1664
1669
let raw = comb. raw . last_mut ( ) . unwrap ( ) ;
1665
1670
raw. begin (
You can’t perform that action at this time.
0 commit comments