-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
91 changed files
with
1,322 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
import js.promise.Promise | ||
|
||
sealed external class GPU { | ||
fun requestAdapter(options: GPURequestAdapterOptions = definedExternally): Promise<GPUAdapter?> | ||
fun getPreferredCanvasFormat(): GPUTextureFormat | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
import js.array.ReadonlyArray | ||
import js.promise.Promise | ||
|
||
sealed external class GPUAdapter { | ||
val features: GPUSupportedFeatures | ||
val limits: GPUSupportedLimits | ||
val isFallbackAdapter: Boolean | ||
fun requestDevice(descriptor: GPUDeviceDescriptor = definedExternally): Promise<GPUDevice> | ||
fun requestAdapterInfo(unmaskHints: ReadonlyArray<String> = definedExternally): Promise<GPUAdapterInfo> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
sealed external class GPUAdapterInfo { | ||
val vendor: String | ||
val architecture: String | ||
val device: String | ||
val description: String | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
sealed external class GPUBindGroup : | ||
GPUObjectBase { | ||
override var label: String | ||
} |
11 changes: 11 additions & 0 deletions
11
kotlin-web/src/jsMain/generated/web/gpu/GPUBindGroupDescriptor.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
import js.array.ReadonlyArray | ||
|
||
sealed external interface GPUBindGroupDescriptor : | ||
GPUObjectDescriptorBase { | ||
var layout: GPUBindGroupLayout | ||
var entries: ReadonlyArray<GPUBindGroupEntry> | ||
} |
11 changes: 11 additions & 0 deletions
11
kotlin-web/src/jsMain/generated/web/gpu/GPUBindGroupEntry.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
import js.objects.JsPlainObject | ||
|
||
@JsPlainObject | ||
sealed external interface GPUBindGroupEntry { | ||
var binding: Number | ||
var resource: GPUBindingResource | ||
} |
8 changes: 8 additions & 0 deletions
8
kotlin-web/src/jsMain/generated/web/gpu/GPUBindGroupLayout.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
sealed external class GPUBindGroupLayout : | ||
GPUObjectBase { | ||
override var label: String | ||
} |
10 changes: 10 additions & 0 deletions
10
kotlin-web/src/jsMain/generated/web/gpu/GPUBindGroupLayoutDescriptor.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
import js.array.ReadonlyArray | ||
|
||
sealed external interface GPUBindGroupLayoutDescriptor : | ||
GPUObjectDescriptorBase { | ||
var entries: ReadonlyArray<GPUBindGroupLayoutEntry> | ||
} |
15 changes: 15 additions & 0 deletions
15
kotlin-web/src/jsMain/generated/web/gpu/GPUBindGroupLayoutEntry.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
import js.objects.JsPlainObject | ||
|
||
@JsPlainObject | ||
sealed external interface GPUBindGroupLayoutEntry { | ||
var binding: Number | ||
var visibility: GPUShaderStageFlags | ||
var buffer: GPUBufferBindingLayout? | ||
var sampler: GPUSamplerBindingLayout? | ||
var texture: GPUTextureBindingLayout? | ||
var storageTexture: GPUStorageTextureBindingLayout? | ||
} |
12 changes: 12 additions & 0 deletions
12
kotlin-web/src/jsMain/generated/web/gpu/GPUBindingResource.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
/** | ||
* Union of: | ||
* - `GPUSampler` | ||
* - `GPUTextureView` | ||
* - `GPUBufferBinding` | ||
*/ | ||
@JsExternalInheritorsOnly | ||
sealed external interface GPUBindingResource |
12 changes: 12 additions & 0 deletions
12
kotlin-web/src/jsMain/generated/web/gpu/GPUBlendComponent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
import js.objects.JsPlainObject | ||
|
||
@JsPlainObject | ||
sealed external interface GPUBlendComponent { | ||
var operation: GPUBlendOperation? | ||
var srcFactor: GPUBlendFactor? | ||
var dstFactor: GPUBlendFactor? | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
import js.objects.JsPlainObject | ||
|
||
@JsPlainObject | ||
sealed external interface GPUBlendState { | ||
var color: GPUBlendComponent | ||
var alpha: GPUBlendComponent | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
import js.buffer.ArrayBuffer | ||
import js.core.Void | ||
import js.promise.Promise | ||
|
||
sealed external class GPUBuffer : | ||
GPUObjectBase { | ||
override var label: String | ||
val size: Number | ||
val usage: GPUFlagsConstant | ||
val mapState: GPUBufferMapState | ||
fun mapAsync( | ||
mode: GPUMapModeFlags, | ||
offset: Number = definedExternally, | ||
size: Number = definedExternally, | ||
): Promise<Void> | ||
|
||
fun getMappedRange( | ||
offset: Number = definedExternally, | ||
size: Number = definedExternally, | ||
): ArrayBuffer | ||
|
||
fun unmap() | ||
fun destroy() | ||
} |
13 changes: 13 additions & 0 deletions
13
kotlin-web/src/jsMain/generated/web/gpu/GPUBufferBinding.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
import js.objects.JsPlainObject | ||
|
||
@JsPlainObject | ||
sealed external interface GPUBufferBinding : | ||
GPUBindingResource { | ||
var buffer: GPUBuffer | ||
var offset: Number? | ||
var size: Number? | ||
} |
12 changes: 12 additions & 0 deletions
12
kotlin-web/src/jsMain/generated/web/gpu/GPUBufferBindingLayout.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
import js.objects.JsPlainObject | ||
|
||
@JsPlainObject | ||
sealed external interface GPUBufferBindingLayout { | ||
var type: GPUBufferBindingType? | ||
var hasDynamicOffset: Boolean? | ||
var minBindingSize: Number? | ||
} |
10 changes: 10 additions & 0 deletions
10
kotlin-web/src/jsMain/generated/web/gpu/GPUBufferDescriptor.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
sealed external interface GPUBufferDescriptor : | ||
GPUObjectDescriptorBase { | ||
var size: Number | ||
var usage: GPUBufferUsageFlags | ||
var mappedAtCreation: Boolean? | ||
} |
18 changes: 18 additions & 0 deletions
18
kotlin-web/src/jsMain/generated/web/gpu/GPUCanvasConfiguration.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
import js.array.ReadonlyArray | ||
import js.objects.JsPlainObject | ||
|
||
@JsPlainObject | ||
sealed external interface GPUCanvasConfiguration { | ||
var device: GPUDevice | ||
var format: GPUTextureFormat | ||
var usage: GPUTextureUsageFlags? | ||
var viewFormats: ReadonlyArray<GPUTextureFormat>? | ||
var colorSpace: String /* "srgb" | "display-p3" */? | ||
var alphaMode: GPUCanvasAlphaMode? | ||
var width: Number | ||
var height: Number | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
sealed external interface GPUCanvasContext { | ||
fun configure(configuration: GPUCanvasConfiguration) | ||
fun unconfigure() | ||
fun getCurrentTexture(): GPUTexture | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
typealias GPUColor = GPUColorDict /* number[] */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
import js.objects.JsPlainObject | ||
|
||
@JsPlainObject | ||
sealed external interface GPUColorDict { | ||
var r: Double | ||
var g: Double | ||
var b: Double | ||
var a: Double | ||
} |
12 changes: 12 additions & 0 deletions
12
kotlin-web/src/jsMain/generated/web/gpu/GPUColorTargetState.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
import js.objects.JsPlainObject | ||
|
||
@JsPlainObject | ||
sealed external interface GPUColorTargetState { | ||
var format: GPUTextureFormat | ||
var blend: GPUBlendState? | ||
var writeMask: GPUColorWriteFlags? | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
sealed external class GPUCommandBuffer : | ||
GPUObjectBase { | ||
override var label: String | ||
} |
6 changes: 6 additions & 0 deletions
6
kotlin-web/src/jsMain/generated/web/gpu/GPUCommandBufferDescriptor.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
sealed external interface GPUCommandBufferDescriptor : | ||
GPUObjectDescriptorBase |
59 changes: 59 additions & 0 deletions
59
kotlin-web/src/jsMain/generated/web/gpu/GPUCommandEncoder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
sealed external class GPUCommandEncoder : | ||
GPUObjectBase { | ||
override var label: String | ||
fun beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder | ||
fun beginComputePass(descriptor: GPUComputePassDescriptor = definedExternally): GPUComputePassEncoder | ||
fun copyBufferToBuffer( | ||
source: GPUBuffer, | ||
sourceOffset: Number, | ||
destination: GPUBuffer, | ||
destinationOffset: Number, | ||
size: Number, | ||
) | ||
|
||
fun copyBufferToTexture( | ||
source: GPUImageCopyBuffer, | ||
destination: GPUImageCopyTexture, | ||
copySize: GPUExtent3D, | ||
) | ||
|
||
fun copyTextureToBuffer( | ||
source: GPUImageCopyTexture, | ||
destination: GPUImageCopyBuffer, | ||
copySize: GPUExtent3D, | ||
) | ||
|
||
fun copyTextureToTexture( | ||
source: GPUImageCopyTexture, | ||
destination: GPUImageCopyTexture, | ||
copySize: GPUExtent3D, | ||
) | ||
|
||
fun clearBuffer( | ||
destination: GPUBuffer, | ||
destinationOffset: Number = definedExternally, | ||
size: Number = definedExternally, | ||
) | ||
|
||
fun pushDebugGroup(groupLabel: String) | ||
fun popDebugGroup() | ||
fun insertDebugMarker(markerLabel: String) | ||
fun writeTimestamp( | ||
querySet: GPUQuerySet, | ||
queryIndex: Number, | ||
) | ||
|
||
fun resolveQuerySet( | ||
querySet: GPUQuerySet, | ||
firstQuery: Number, | ||
queryCount: Number, | ||
destination: GPUBuffer, | ||
destinationOffset: Number, | ||
) | ||
|
||
fun finish(descriptor: GPUCommandBufferDescriptor = definedExternally): GPUCommandBuffer | ||
} |
6 changes: 6 additions & 0 deletions
6
kotlin-web/src/jsMain/generated/web/gpu/GPUCommandEncoderDescriptor.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
sealed external interface GPUCommandEncoderDescriptor : | ||
GPUObjectDescriptorBase |
9 changes: 9 additions & 0 deletions
9
kotlin-web/src/jsMain/generated/web/gpu/GPUCompilationInfo.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
import js.array.ReadonlyArray | ||
|
||
sealed external interface GPUCompilationInfo { | ||
val messages: ReadonlyArray<GPUCompilationMessage> | ||
} |
12 changes: 12 additions & 0 deletions
12
kotlin-web/src/jsMain/generated/web/gpu/GPUCompilationMessage.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
import js.core.JsLong | ||
|
||
sealed external interface GPUCompilationMessage { | ||
val message: String | ||
val type: GPUCompilationMessageType | ||
val lineNum: JsLong | ||
val linePos: JsLong | ||
} |
8 changes: 8 additions & 0 deletions
8
kotlin-web/src/jsMain/generated/web/gpu/GPUComputePassDescriptor.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Automatically generated - do not modify! | ||
|
||
package web.gpu | ||
|
||
sealed external interface GPUComputePassDescriptor : | ||
GPUObjectDescriptorBase { | ||
var timestampWrites: GPUComputePassTimestampWrites? | ||
} |
Oops, something went wrong.
b4c2abe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Leonya Could you please release these changes?