     public func mtkView(_ view: MTKView, drawableSizeWillChange size: CGSize) {}
     
     public func draw(in view: MTKView) {
-        if context.hasUpdate {
-            try? runtime?.encode(commandBuffer:context.makeCommandBuffer(), context:context).commit()
-            if let commandBuffer = renderer.encode(commandBuffer:context.makeCommandBuffer(), view:view, texture: try? context.pop().texture) {
-                commandBuffer.addCompletedHandler({ (_) in
-                    self.processNext()
-                })
-                commandBuffer.commit()
-            }
-            context.flush()
+        if let texture = self.texture {
+            renderer.encode(commandBuffer:commandQueue.makeCommandBuffer(), view:view, texture: texture)?.commit()
         }
     }
 }

            if let metalTexture = metalTexture, status == kCVReturnSuccess {
                DispatchQueue.main.async {
                    self.context.set(sourceImage: metalTexture)
                }
            } else {
                print("VSVS: failed to create texture")

    
    var reader:AVAssetReader?
    var output:AVAssetReaderTrackOutput?
    var texture:MTLTexture?
    lazy var commandQueue:MTLCommandQueue = self.context.device.makeCommandQueue()

    lazy var renderer:VSRenderer = VSRenderer(device:self.context.device, pixelFormat:self.context.pixelFormat)
    fileprivate lazy var textureCache:CVMetalTextureCache = {
