fn try_enqueue_buffer_upload(
        device_context: &RafxDeviceContext,
        upload: &mut RafxTransferUpload,
        pending_buffer: PendingBufferUpload,
        in_flight_uploads: &mut Vec<InFlightUpload>,
    ) -> RafxResult<Option<PendingBufferUpload>> {
        let result = buffer_upload::enqueue_load_buffer(
            device_context,
            upload,
            pending_buffer.resource_type,
            // self.transfer_queue.queue_family_index(),
            // self.graphics_queue.queue_family_index(),
            &pending_buffer.data,
            None,
            0,
        );

        match result {
            Ok(buffer) => {
                // We created a buffer, so this should always be Some
                let buffer = buffer.unwrap();
                in_flight_uploads.push(InFlightUpload::Buffer(InFlightBufferUpload {
                    buffer,
                    upload_op: pending_buffer.upload_op,
                }));
                Ok(None)
            }
            Err(RafxUploadError::Other(e)) => Err(e),
            Err(RafxUploadError::BufferFull) => Ok(Some(pending_buffer)),
        }
    }
// Ok(None) = upload enqueue
// Ok(Some) = upload not enqueued because there was not enough room
// Err = Vulkan error
Ok(None) = upload enqueue
Ok(Some) = upload not enqueued because there was not enough room
Err = Vulkan error
Ok ( None ) = upload enqueue Ok ( Some ) = upload not enqueued because there was not enough room Err = Vulkan error
fn try_enqueue_buffer_upload(
        device_context: &RafxDeviceContext,
        upload: &mut RafxTransferUpload,
        pending_buffer: PendingBufferUpload,
        in_flight_uploads: &mut Vec<InFlightUpload>,
    ) -> RafxResult<Option<PendingBufferUpload>> {
        let result = buffer_upload::enqueue_load_buffer(
            device_context,
            upload,
            pending_buffer.resource_type,
            // self.transfer_queue.queue_family_index(),
            // self.graphics_queue.queue_family_index(),
            &pending_buffer.data,
            None,
            0,
        );
        match result {
            Ok(buffer) => {
                // We created a buffer, so this should always be Some
                let buffer = buffer.unwrap();
                in_flight_uploads.push(InFlightUpload::Buffer(InFlightBufferUpload {
                    buffer,
                    upload_op: pending_buffer.upload_op,
                }));
                Ok(None)
            }
            Err(RafxUploadError::Other(e)) => Err(e),
            Err(RafxUploadError::BufferFull) => Ok(Some(pending_buffer)),
        }
    }
fn try_enqueue_buffer_upload ( device_context : & RafxDeviceContext , upload : & mut RafxTransferUpload , pending_buffer : PendingBufferUpload , in_flight_uploads : & mut Vec < InFlightUpload > , ) -> RafxResult < Option < PendingBufferUpload > > { let result = buffer_upload :: enqueue_load_buffer ( device_context , upload , pending_buffer . resource_type , // self.transfer_queue.queue_family_index(), // self.graphics_queue.queue_family_index(), & pending_buffer . data , None , 0 , ) ; match result { Ok ( buffer ) => { // We created a buffer, so this should always be Some let buffer = buffer . unwrap ( ) ; in_flight_uploads . push ( InFlightUpload :: Buffer ( InFlightBufferUpload { buffer , upload_op : pending_buffer . upload_op , } ) ) ; Ok ( None ) } Err ( RafxUploadError :: Other ( e ) ) => Err ( e ) , Err ( RafxUploadError :: BufferFull ) => Ok ( Some ( pending_buffer ) ) , } }
Ok(None) = upload enqueue
Ok(Some) = upload not enqueued because there was not enough room
Err = Vulkan error
Ok ( None ) = upload enqueue Ok ( Some ) = upload not enqueued because there was not enough room Err = Vulkan error
device_context
&RafxDeviceContext
upload
&mut RafxTransferUpload
pending_buffer
PendingBufferUpload
in_flight_uploads
&mut Vec<InFlightUpload>
device_context
&RafxDeviceContext
upload
&mut RafxTransferUpload
pending_buffer
PendingBufferUpload
in_flight_uploads
&mut Vec<InFlightUpload>