[metal] allow access to command buffer (#8166)

This commit is contained in:
Lucas Abel 2025-08-29 18:32:34 +02:00 committed by GitHub
parent 5a24e2474d
commit e58223bedf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,6 +33,10 @@ impl Default for super::CommandState {
}
impl super::CommandEncoder {
pub fn raw_command_buffer(&self) -> Option<&metal::CommandBuffer> {
self.raw_cmd_buf.as_ref()
}
fn enter_blit(&mut self) -> &metal::BlitCommandEncoderRef {
if self.state.blit.is_none() {
debug_assert!(self.state.render.is_none() && self.state.compute.is_none());