File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -337,7 +337,7 @@ type GPUBindGroupLayoutDescriptor =
337337foreign import createBindGroupLayoutImpl :: GPUDevice -> { | GPUBindGroupLayoutDescriptor } -> Effect GPUBindGroupLayout
338338
339339createBindGroupLayout
340- :: GPUDevice
340+ :: GPUDevice
341341 -> { | GPUBindGroupLayoutDescriptor }
342342 -> Effect GPUBindGroupLayout
343343createBindGroupLayout = createBindGroupLayoutImpl
@@ -529,7 +529,7 @@ type GPUPipelineLayoutDescriptor =
529529 { bindGroupLayouts :: Array GPUBindGroupLayout
530530 }
531531
532- foreign import createPipelineLayoutImpl :: GPUDevice -> GPUPipelineLayoutDescriptor -> Effect GPUPipelineLayout
532+ foreign import createPipelineLayoutImpl :: GPUDevice -> GPUPipelineLayoutDescriptor -> Effect GPUPipelineLayout
533533
534534createPipelineLayout
535535 :: GPUDevice
@@ -543,9 +543,9 @@ type GPUBindGroupDescriptor =
543543 , entries :: Array GPUBindGroupEntry
544544 }
545545
546- foreign import createBindGroupImpl :: GPUDevice -> GPUBindGroupDescriptor -> Effect GPUBindGroup
546+ foreign import createBindGroupImpl :: GPUDevice -> GPUBindGroupDescriptor -> Effect GPUBindGroup
547547
548- createBindGroup :: GPUDevice -> GPUBindGroupDescriptor -> Effect GPUBindGroup
548+ createBindGroup :: GPUDevice -> GPUBindGroupDescriptor -> Effect GPUBindGroup
549549createBindGroup = createBindGroupImpl
550550
551551-- createShaderModule
Original file line number Diff line number Diff line change 1- export const expiredImpl = ( texture ) => ( ) => texture . expired ;
1+ export const expiredImpl = ( texture ) => ( ) => texture . expired ;
Original file line number Diff line number Diff line change 11module Web.GPU.GPUExternalTexture where
22
3-
4-
53import Effect (Effect )
64import Web.GPU.Internal.Types (GPUExternalTexture )
75
Original file line number Diff line number Diff line change 1- export const unsafeGetBindGroupLayoutImpl = ( pipeline ) => ( index ) => ( ) => pipeline . getBindGroupLayout ( index ) ;
1+ export const unsafeGetBindGroupLayoutImpl = ( pipeline ) => ( index ) => ( ) =>
2+ pipeline . getBindGroupLayout ( index ) ;
Original file line number Diff line number Diff line change @@ -11,5 +11,6 @@ class GPUPipelineBase a where
1111
1212instance GPUPipelineBase GPUComputePipeline where
1313 getBindGroupLayout = unsafeGetBindGroupLayoutImpl
14+
1415instance GPUPipelineBase GPURenderPipeline where
1516 getBindGroupLayout = unsafeGetBindGroupLayoutImpl
Original file line number Diff line number Diff line change 1- export const compilationInfoImpl = ( shaderModule ) => ( ) => shaderModule . compilationInfo ( ) ;
1+ export const compilationInfoImpl = ( shaderModule ) => ( ) =>
2+ shaderModule . compilationInfo ( ) ;
Original file line number Diff line number Diff line change 1- export const createViewImpl = ( texture ) => ( descriptor ) => ( ) => texture . createView ( descriptor ) ;
1+ export const createViewImpl = ( texture ) => ( ) => texture . createView ( ) ;
2+ export const createViewWithDescriptorImpl = ( texture ) => ( descriptor ) => ( ) =>
3+ texture . createView ( descriptor ) ;
24export const destroyImpl = ( texture ) => ( ) => texture . destroy ( ) ;
35export const widthImpl = ( texture ) => ( ) => texture . width ;
46export const heightImpl = ( texture ) => ( ) => texture . height ;
5- export const depthOrArrayLayersImpl = ( texture ) => ( ) => texture . depthOrArrayLayers ;
7+ export const depthOrArrayLayersImpl = ( texture ) => ( ) =>
8+ texture . depthOrArrayLayers ;
69export const mipLevelCountImpl = ( texture ) => ( ) => texture . mipLevelCount ;
710export const sampleCountImpl = ( texture ) => ( ) => texture . sampleCount ;
811export const dimensionImpl = ( texture ) => ( ) => texture . dimension ;
912export const formatImpl = ( texture ) => ( ) => texture . format ;
10- export const usageImpl = ( texture ) => ( ) => texture . usage ;
13+ export const usageImpl = ( texture ) => ( ) => texture . usage ;
Original file line number Diff line number Diff line change 11module Web.GPU.GPUTexture
22 ( TextureViewDescriptor
3+ , createViewWithDescriptor
34 , createView
45 , destroy
56 , width
@@ -57,19 +58,26 @@ instance ConvertOption TextureViewDescriptor "baseMipLevel" GPUIntegerCoordinate
5758instance ConvertOption TextureViewDescriptor " baseArrayLayer" GPUIntegerCoordinate (Undefinable GPUIntegerCoordinate ) where
5859 convertOption _ _ = defined
5960
60- foreign import createViewImpl :: GPUTexture -> { | GPUTextureViewDescriptor } -> Effect GPUTextureView
61+ foreign import createViewWithDescriptorImpl :: GPUTexture -> { | GPUTextureViewDescriptor } -> Effect GPUTextureView
6162
62- createView
63+ createViewWithDescriptor
6364 :: forall provided
6465 . ConvertOptionsWithDefaults TextureViewDescriptor { | GPUTextureViewDescriptorOptional } { | provided } { | GPUTextureViewDescriptor }
6566 => GPUTexture
6667 -> { | provided }
6768 -> Effect GPUTextureView
68- createView gpuDevice provided = createViewImpl gpuDevice all
69+ createViewWithDescriptor gpuDevice provided = createViewWithDescriptorImpl gpuDevice all
6970 where
7071 all :: { | GPUTextureViewDescriptor }
7172 all = convertOptionsWithDefaults TextureViewDescriptor defaultGPUTextureViewDescriptorOptions provided
7273
74+ foreign import createViewImpl :: GPUTexture -> Effect GPUTextureView
75+
76+ createView
77+ :: GPUTexture
78+ -> Effect GPUTextureView
79+ createView = createViewImpl
80+
7381foreign import destroyImpl :: GPUTexture -> Effect Unit
7482
7583destroy :: GPUTexture -> Effect Unit
Original file line number Diff line number Diff line change @@ -18,5 +18,6 @@ all = GPUTextureAspect "all"
1818
1919stencilOnly :: GPUTextureAspect
2020stencilOnly = GPUTextureAspect " stencil-only"
21+
2122depthOnly :: GPUTextureAspect
2223depthOnly = GPUTextureAspect " depth-only"
You can’t perform that action at this time.
0 commit comments