diff --git a/.pick_status.json b/.pick_status.json index 835f599271c..2d4d95f0873 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1784,7 +1784,7 @@ "description": "nouveau/headers: Fix nv_push rust push_inline_data implementation", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "66954d997d801743156f5eeda7a23ba1d9b6c098", "notes": null diff --git a/src/nouveau/headers/nv_push_rs/lib.rs b/src/nouveau/headers/nv_push_rs/lib.rs index d3a5955279f..7dfaa445d07 100644 --- a/src/nouveau/headers/nv_push_rs/lib.rs +++ b/src/nouveau/headers/nv_push_rs/lib.rs @@ -206,7 +206,10 @@ impl Push { /// Push an array of dwords into the push buffer pub fn push_inline_data(&mut self, data: &[u32]) { - if self.last_inc != usize::MAX { + if let Some(last) = self.mem.get_mut(self.last_inc) { + let last = MthdHeader::from_bits_mut(last); + last.add_len(data.len().try_into().unwrap()); + } else { panic!("Inline data must only be placed after a method header"); } self.mem.extend_from_slice(data);