Skip to content

Commit

Permalink
WebGPU. Errors [generated]
Browse files Browse the repository at this point in the history
  • Loading branch information
turansky committed May 16, 2024
1 parent 91f1d44 commit 6ffc0cc
Show file tree
Hide file tree
Showing 12 changed files with 75 additions and 4 deletions.
5 changes: 2 additions & 3 deletions kotlin-web/src/jsMain/generated/web/gpu/GPUAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

package web.gpu

import js.array.ReadonlyArray
import js.promise.Promise
import seskar.js.JsAsync

Expand All @@ -18,8 +17,8 @@ sealed external class GPUAdapter {
fun requestDeviceAsync(descriptor: GPUDeviceDescriptor = definedExternally): Promise<GPUDevice>

@JsAsync
suspend fun requestAdapterInfo(unmaskHints: ReadonlyArray<String> = definedExternally): GPUAdapterInfo
suspend fun requestAdapterInfo(): GPUAdapterInfo

@JsName("requestAdapterInfo")
fun requestAdapterInfoAsync(unmaskHints: ReadonlyArray<String> = definedExternally): Promise<GPUAdapterInfo>
fun requestAdapterInfoAsync(): Promise<GPUAdapterInfo>
}
3 changes: 3 additions & 0 deletions kotlin-web/src/jsMain/generated/web/gpu/GPUErrorFilter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@ sealed external interface GPUErrorFilter {

@JsValue("validation")
val validation: GPUErrorFilter

@JsValue("internal")
val internal: GPUErrorFilter
}
}
9 changes: 9 additions & 0 deletions kotlin-web/src/jsMain/generated/web/gpu/GPUFeatureName.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ sealed external interface GPUFeatureName {
@JsValue("shader-f16")
val shaderF16: GPUFeatureName

@JsValue("rg11b10ufloat-renderable")
val rg11b10ufloatRenderable: GPUFeatureName

@JsValue("bgra8unorm-storage")
val bgra8unormStorage: GPUFeatureName

@JsValue("float32-filterable")
val float32Filterable: GPUFeatureName

@JsValue("mappable-primary-buffers")
val mappablePrimaryBuffers: GPUFeatureName

Expand Down
7 changes: 7 additions & 0 deletions kotlin-web/src/jsMain/generated/web/gpu/GPUInternalError.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Automatically generated - do not modify!

package web.gpu

external class GPUInternalError(
message: String,
) : GPUError
10 changes: 10 additions & 0 deletions kotlin-web/src/jsMain/generated/web/gpu/GPUPipelineError.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Automatically generated - do not modify!

package web.gpu

import web.errors.DOMException

external class GPUPipelineError(
message: String? = definedExternally,
options: GPUPipelineErrorInit? = definedExternally,
) : DOMException
10 changes: 10 additions & 0 deletions kotlin-web/src/jsMain/generated/web/gpu/GPUPipelineErrorInit.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Automatically generated - do not modify!

package web.gpu

import js.objects.JsPlainObject

@JsPlainObject
sealed external interface GPUPipelineErrorInit {
var reason: GPUPipelineErrorReason
}
17 changes: 17 additions & 0 deletions kotlin-web/src/jsMain/generated/web/gpu/GPUPipelineErrorReason.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Automatically generated - do not modify!

package web.gpu

import seskar.js.JsValue
import seskar.js.JsVirtual

@JsVirtual
sealed external interface GPUPipelineErrorReason {
companion object {
@JsValue("validation")
val validation: GPUPipelineErrorReason

@JsValue("internal")
val internal: GPUPipelineErrorReason
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
package web.gpu

import js.objects.JsPlainObject
import js.objects.ReadonlyRecord

@JsPlainObject
sealed external interface GPUProgrammableStage {
var module: GPUShaderModule
var entryPoint: String
var entryPoint: String?
var constants: ReadonlyRecord<String, Double>?
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,11 @@ sealed external interface GPUStorageTextureAccess {
companion object {
@JsValue("write-only")
val writeOnly: GPUStorageTextureAccess

@JsValue("read-only")
val readOnly: GPUStorageTextureAccess

@JsValue("read-write")
val readWrite: GPUStorageTextureAccess
}
}
2 changes: 2 additions & 0 deletions kotlin-web/src/jsMain/generated/web/gpu/GPUSupportedLimits.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ sealed external class GPUSupportedLimits {
var maxVertexAttributes: Int?
var maxVertexBufferArrayStride: Int?
var maxInterStageShaderComponents: Int?
var maxColorAttachments: Int?
var maxColorAttachmentBytesPerSample: Int?
var maxComputeWorkgroupStorageSize: Int?
var maxComputeInvocationsPerWorkgroup: Int?
var maxComputeWorkgroupSizeX: Int?
Expand Down
3 changes: 3 additions & 0 deletions kotlin-web/src/jsMain/generated/web/gpu/GPUTextureFormat.kt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ sealed external interface GPUTextureFormat {
@JsValue("rgb9e5ufloat")
val rgb9e5ufloat: GPUTextureFormat

@JsValue("rgb10a2uint")
val rgb10a2uint: GPUTextureFormat

@JsValue("rgb10a2unorm")
val rgb10a2unorm: GPUTextureFormat

Expand Down
3 changes: 3 additions & 0 deletions kotlin-web/src/jsMain/generated/web/gpu/GPUVertexFormat.kt
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,8 @@ sealed external interface GPUVertexFormat {

@JsValue("sint32x4")
val sint32x4: GPUVertexFormat

@JsValue("unorm10-10-10-2")
val unorm1010102: GPUVertexFormat
}
}

1 comment on commit 6ffc0cc

@turansky
Copy link
Collaborator Author

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?

Please sign in to comment.