fn try_enqueue_image_upload(
        device_context: &RafxDeviceContext,
        upload: &mut RafxTransferUpload,
        pending_image: PendingImageUpload,
        in_flight_uploads: &mut Vec<InFlightUpload>,
    ) -> RafxResult<Option<PendingImageUpload>> {
        let result = image_upload::enqueue_load_image(
            device_context,
            upload,
            // self.transfer_queue.queue_family_index(),
            // self.graphics_queue.queue_family_index(),
            &pending_image.image_data,
            ImageUploadParams {
                resource_type: pending_image.resource_type,
                generate_mips: pending_image.generate_mips,
                ..Default::default()
            },
        );

        match result {
            Ok(texture) => {
                in_flight_uploads.push(InFlightUpload::Image(InFlightImageUpload {
                    texture,
                    upload_op: pending_image.upload_op,
                }));
                Ok(None)
            }
            Err(RafxUploadError::Other(e)) => Err(e),
            Err(RafxUploadError::BufferFull) => Ok(Some(pending_image)),
        }
    }
// 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_image_upload(
        device_context: &RafxDeviceContext,
        upload: &mut RafxTransferUpload,
        pending_image: PendingImageUpload,
        in_flight_uploads: &mut Vec<InFlightUpload>,
    ) -> RafxResult<Option<PendingImageUpload>> {
        let result = image_upload::enqueue_load_image(
            device_context,
            upload,
            // self.transfer_queue.queue_family_index(),
            // self.graphics_queue.queue_family_index(),
            &pending_image.image_data,
            ImageUploadParams {
                resource_type: pending_image.resource_type,
                generate_mips: pending_image.generate_mips,
                ..Default::default()
            },
        );
        match result {
            Ok(texture) => {
                in_flight_uploads.push(InFlightUpload::Image(InFlightImageUpload {
                    texture,
                    upload_op: pending_image.upload_op,
                }));
                Ok(None)
            }
            Err(RafxUploadError::Other(e)) => Err(e),
            Err(RafxUploadError::BufferFull) => Ok(Some(pending_image)),
        }
    }
fn try_enqueue_image_upload ( device_context : & RafxDeviceContext , upload : & mut RafxTransferUpload , pending_image : PendingImageUpload , in_flight_uploads : & mut Vec < InFlightUpload > , ) -> RafxResult < Option < PendingImageUpload > > { let result = image_upload :: enqueue_load_image ( device_context , upload , // self.transfer_queue.queue_family_index(), // self.graphics_queue.queue_family_index(), & pending_image . image_data , ImageUploadParams { resource_type : pending_image . resource_type , generate_mips : pending_image . generate_mips , .. Default :: default ( ) } , ) ; match result { Ok ( texture ) => { in_flight_uploads . push ( InFlightUpload :: Image ( InFlightImageUpload { texture , upload_op : pending_image . upload_op , } ) ) ; Ok ( None ) } Err ( RafxUploadError :: Other ( e ) ) => Err ( e ) , Err ( RafxUploadError :: BufferFull ) => Ok ( Some ( pending_image ) ) , } }
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_image
PendingImageUpload
in_flight_uploads
&mut Vec<InFlightUpload>
device_context
&RafxDeviceContext
upload
&mut RafxTransferUpload
pending_image
PendingImageUpload
in_flight_uploads
&mut Vec<InFlightUpload>