|
| 1 | +module Web.GPU.GPUQueue |
| 2 | + ( copyExternalImageToTexture |
| 3 | + , onSubmittedWorkDone |
| 4 | + , submit |
| 5 | + , writeBuffer |
| 6 | + , writeBufferWithOffset |
| 7 | + , writeBufferWithOffsetAndSize |
| 8 | + , writeBufferWithSize |
| 9 | + , writeTexture |
| 10 | + ) |
| 11 | + where |
| 12 | + |
| 13 | +import Prelude |
| 14 | + |
| 15 | +import Effect (Effect) |
| 16 | +import Web.GPU.GPUImageCopyExternalImage (GPUImageCopyExternalImage) |
| 17 | +import Web.GPU.GPUImageCopyTexture (GPUImageCopyTexture) |
| 18 | +import Web.GPU.GPUImageCopyTextureTagged (GPUImageCopyTextureTagged) |
| 19 | +import Web.GPU.GPUImageDataLayout (GPUImageDataLayout) |
| 20 | +import Web.GPU.Internal.Types (BufferSource, GPUBuffer, GPUCommandBuffer, GPUExtent3D, GPUQueue, GPUSize64) |
| 21 | +import Web.Promise (Promise) |
| 22 | + |
| 23 | +foreign import submitImpl :: GPUQueue -> Array GPUCommandBuffer -> Effect Unit |
| 24 | +submit ∷ GPUQueue → Array GPUCommandBuffer → Effect Unit |
| 25 | +submit = submitImpl |
| 26 | +foreign import onSubmittedWorkDoneImpl :: GPUQueue -> Effect (Promise Unit) |
| 27 | +onSubmittedWorkDone :: GPUQueue -> Effect (Promise Unit) |
| 28 | +onSubmittedWorkDone = onSubmittedWorkDoneImpl |
| 29 | +foreign import writeBufferImpl :: GPUQueue -> GPUBuffer -> GPUSize64 -> BufferSource -> Effect Unit |
| 30 | +writeBuffer :: GPUQueue -> GPUBuffer -> Int -> BufferSource -> Effect Unit |
| 31 | +writeBuffer = writeBufferImpl |
| 32 | +foreign import writeBufferWithOffsetImpl :: GPUQueue -> GPUBuffer -> GPUSize64 -> BufferSource -> GPUSize64 -> Effect Unit |
| 33 | +writeBufferWithOffset :: GPUQueue -> GPUBuffer -> Int -> BufferSource -> Int -> Effect Unit |
| 34 | +writeBufferWithOffset = writeBufferWithOffsetImpl |
| 35 | +foreign import writeBufferWithSizeImpl :: GPUQueue -> GPUBuffer -> GPUSize64 -> BufferSource -> GPUSize64 -> Effect Unit |
| 36 | +writeBufferWithSize :: GPUQueue -> GPUBuffer -> Int -> BufferSource -> Int -> Effect Unit |
| 37 | +writeBufferWithSize = writeBufferWithSizeImpl |
| 38 | +foreign import writeBufferWithOffsetAndSizeImpl :: GPUQueue -> GPUBuffer -> GPUSize64 -> BufferSource -> GPUSize64 -> GPUSize64 -> Effect Unit |
| 39 | +writeBufferWithOffsetAndSize :: GPUQueue -> GPUBuffer -> Int -> BufferSource -> Int -> Int -> Effect Unit |
| 40 | +writeBufferWithOffsetAndSize = writeBufferWithOffsetAndSizeImpl |
| 41 | +foreign import writeTextureImpl :: GPUQueue -> GPUImageCopyTexture -> BufferSource -> GPUImageDataLayout -> GPUExtent3D -> Effect Unit |
| 42 | +writeTexture :: GPUQueue -> GPUImageCopyTexture -> BufferSource -> GPUImageDataLayout -> GPUExtent3D -> Effect Unit |
| 43 | +writeTexture = writeTextureImpl |
| 44 | +foreign import copyExternalImageToTextureImpl :: GPUQueue -> GPUImageCopyExternalImage -> GPUImageCopyTextureTagged -> GPUExtent3D -> Effect Unit |
| 45 | +copyExternalImageToTexture :: GPUQueue -> GPUImageCopyExternalImage -> GPUImageCopyTextureTagged -> GPUExtent3D -> Effect Unit |
| 46 | +copyExternalImageToTexture = copyExternalImageToTextureImpl |
0 commit comments