Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deno: pull changes from deno repo #2455

Merged
merged 4 commits into from
Feb 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
317 changes: 178 additions & 139 deletions deno_webgpu/01_webgpu.js

Large diffs are not rendered by default.

70 changes: 35 additions & 35 deletions deno_webgpu/02_idl_types.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.

// @ts-check
/// <reference path="../web/internal.d.ts" />
Expand Down Expand Up @@ -56,13 +56,13 @@
// INTERFACE: GPUSupportedLimits
webidl.converters.GPUSupportedLimits = webidl.createInterfaceConverter(
"GPUSupportedLimits",
GPUSupportedLimits,
GPUSupportedLimits.prototype,
);

// INTERFACE: GPUSupportedFeatures
webidl.converters.GPUSupportedFeatures = webidl.createInterfaceConverter(
"GPUSupportedFeatures",
GPUSupportedFeatures,
GPUSupportedFeatures.prototype,
);

// ENUM: GPUPredefinedColorSpace
Expand All @@ -72,7 +72,7 @@
);

// INTERFACE: GPU
webidl.converters.GPU = webidl.createInterfaceConverter("GPU", GPU);
webidl.converters.GPU = webidl.createInterfaceConverter("GPU", GPU.prototype);

// ENUM: GPUPowerPreference
webidl.converters["GPUPowerPreference"] = webidl.createEnumConverter(
Expand Down Expand Up @@ -104,7 +104,7 @@
// INTERFACE: GPUAdapter
webidl.converters.GPUAdapter = webidl.createInterfaceConverter(
"GPUAdapter",
GPUAdapter,
GPUAdapter.prototype,
);

// ENUM: GPUFeatureName
Expand Down Expand Up @@ -178,13 +178,13 @@
// INTERFACE: GPUDevice
webidl.converters.GPUDevice = webidl.createInterfaceConverter(
"GPUDevice",
GPUDevice,
GPUDevice.prototype,
);

// INTERFACE: GPUBuffer
webidl.converters.GPUBuffer = webidl.createInterfaceConverter(
"GPUBuffer",
GPUBuffer,
GPUBuffer.prototype,
);

// TYPEDEF: GPUSize64
Expand Down Expand Up @@ -218,7 +218,7 @@
// INTERFACE: GPUBufferUsage
webidl.converters.GPUBufferUsage = webidl.createInterfaceConverter(
"GPUBufferUsage",
GPUBufferUsage,
GPUBufferUsage.prototype,
);

// TYPEDEF: GPUMapModeFlags
Expand All @@ -228,13 +228,13 @@
// INTERFACE: GPUMapMode
webidl.converters.GPUMapMode = webidl.createInterfaceConverter(
"GPUMapMode",
GPUMapMode,
GPUMapMode.prototype,
);

// INTERFACE: GPUTexture
webidl.converters.GPUTexture = webidl.createInterfaceConverter(
"GPUTexture",
GPUTexture,
GPUTexture.prototype,
);

// TYPEDEF: GPUIntegerCoordinate
Expand Down Expand Up @@ -444,13 +444,13 @@
// INTERFACE: GPUTextureUsage
webidl.converters.GPUTextureUsage = webidl.createInterfaceConverter(
"GPUTextureUsage",
GPUTextureUsage,
GPUTextureUsage.prototype,
);

// INTERFACE: GPUTextureView
webidl.converters.GPUTextureView = webidl.createInterfaceConverter(
"GPUTextureView",
GPUTextureView,
GPUTextureView.prototype,
);

// ENUM: GPUTextureViewDimension
Expand Down Expand Up @@ -517,7 +517,7 @@
// INTERFACE: GPUSampler
webidl.converters.GPUSampler = webidl.createInterfaceConverter(
"GPUSampler",
GPUSampler,
GPUSampler.prototype,
);

// ENUM: GPUAddressMode
Expand Down Expand Up @@ -613,7 +613,7 @@
// INTERFACE: GPUBindGroupLayout
webidl.converters.GPUBindGroupLayout = webidl.createInterfaceConverter(
"GPUBindGroupLayout",
GPUBindGroupLayout,
GPUBindGroupLayout.prototype,
);

// TYPEDEF: GPUIndex32
Expand Down Expand Up @@ -796,13 +796,13 @@
// INTERFACE: GPUShaderStage
webidl.converters.GPUShaderStage = webidl.createInterfaceConverter(
"GPUShaderStage",
GPUShaderStage,
GPUShaderStage.prototype,
);

// INTERFACE: GPUBindGroup
webidl.converters.GPUBindGroup = webidl.createInterfaceConverter(
"GPUBindGroup",
GPUBindGroup,
GPUBindGroup.prototype,
);

// DICTIONARY: GPUBufferBinding
Expand Down Expand Up @@ -871,7 +871,7 @@
// INTERFACE: GPUPipelineLayout
webidl.converters.GPUPipelineLayout = webidl.createInterfaceConverter(
"GPUPipelineLayout",
GPUPipelineLayout,
GPUPipelineLayout.prototype,
);

// DICTIONARY: GPUPipelineLayoutDescriptor
Expand All @@ -894,7 +894,7 @@
// INTERFACE: GPUShaderModule
webidl.converters.GPUShaderModule = webidl.createInterfaceConverter(
"GPUShaderModule",
GPUShaderModule,
GPUShaderModule.prototype,
);

// DICTIONARY: GPUShaderModuleDescriptor
Expand Down Expand Up @@ -926,13 +926,13 @@
// // INTERFACE: GPUCompilationMessage
// webidl.converters.GPUCompilationMessage = webidl.createInterfaceConverter(
// "GPUCompilationMessage",
// GPUCompilationMessage,
// GPUCompilationMessage.prototype,
// );

// // INTERFACE: GPUCompilationInfo
// webidl.converters.GPUCompilationInfo = webidl.createInterfaceConverter(
// "GPUCompilationInfo",
// GPUCompilationInfo,
// GPUCompilationInfo.prototype,
// );

// DICTIONARY: GPUPipelineDescriptorBase
Expand Down Expand Up @@ -981,7 +981,7 @@
// INTERFACE: GPUComputePipeline
webidl.converters.GPUComputePipeline = webidl.createInterfaceConverter(
"GPUComputePipeline",
GPUComputePipeline,
GPUComputePipeline.prototype,
);

// DICTIONARY: GPUComputePipelineDescriptor
Expand All @@ -1003,7 +1003,7 @@
// INTERFACE: GPURenderPipeline
webidl.converters.GPURenderPipeline = webidl.createInterfaceConverter(
"GPURenderPipeline",
GPURenderPipeline,
GPURenderPipeline.prototype,
);

// ENUM: GPUVertexStepMode
Expand Down Expand Up @@ -1476,13 +1476,13 @@
// INTERFACE: GPUColorWrite
webidl.converters.GPUColorWrite = webidl.createInterfaceConverter(
"GPUColorWrite",
GPUColorWrite,
GPUColorWrite.prototype,
);

// INTERFACE: GPUCommandBuffer
webidl.converters.GPUCommandBuffer = webidl.createInterfaceConverter(
"GPUCommandBuffer",
GPUCommandBuffer,
GPUCommandBuffer.prototype,
);
webidl.converters["sequence<GPUCommandBuffer>"] = webidl
.createSequenceConverter(webidl.converters["GPUCommandBuffer"]);
Expand All @@ -1499,7 +1499,7 @@
// INTERFACE: GPUCommandEncoder
webidl.converters.GPUCommandEncoder = webidl.createInterfaceConverter(
"GPUCommandEncoder",
GPUCommandEncoder,
GPUCommandEncoder.prototype,
);

// DICTIONARY: GPUCommandEncoderDescriptor
Expand Down Expand Up @@ -1654,7 +1654,7 @@
// INTERFACE: GPUComputePassEncoder
webidl.converters.GPUComputePassEncoder = webidl.createInterfaceConverter(
"GPUComputePassEncoder",
GPUComputePassEncoder,
GPUComputePassEncoder.prototype,
);

// DICTIONARY: GPUComputePassDescriptor
Expand All @@ -1669,7 +1669,7 @@
// INTERFACE: GPURenderPassEncoder
webidl.converters.GPURenderPassEncoder = webidl.createInterfaceConverter(
"GPURenderPassEncoder",
GPURenderPassEncoder,
GPURenderPassEncoder.prototype,
);

// ENUM: GPULoadOp
Expand Down Expand Up @@ -1787,7 +1787,7 @@
// INTERFACE: GPUQuerySet
webidl.converters.GPUQuerySet = webidl.createInterfaceConverter(
"GPUQuerySet",
GPUQuerySet,
GPUQuerySet.prototype,
);

// DICTIONARY: GPURenderPassDescriptor
Expand Down Expand Up @@ -1815,7 +1815,7 @@
// INTERFACE: GPURenderBundle
webidl.converters.GPURenderBundle = webidl.createInterfaceConverter(
"GPURenderBundle",
GPURenderBundle,
GPURenderBundle.prototype,
);
webidl.converters["sequence<GPURenderBundle>"] = webidl
.createSequenceConverter(webidl.converters["GPURenderBundle"]);
Expand All @@ -1832,7 +1832,7 @@
// INTERFACE: GPURenderBundleEncoder
webidl.converters.GPURenderBundleEncoder = webidl.createInterfaceConverter(
"GPURenderBundleEncoder",
GPURenderBundleEncoder,
GPURenderBundleEncoder.prototype,
);

// DICTIONARY: GPURenderPassLayout
Expand Down Expand Up @@ -1885,7 +1885,7 @@
// INTERFACE: GPUQueue
webidl.converters.GPUQueue = webidl.createInterfaceConverter(
"GPUQueue",
GPUQueue,
GPUQueue.prototype,
);

// ENUM: GPUQueryType
Expand Down Expand Up @@ -1945,7 +1945,7 @@
// // INTERFACE: GPUDeviceLostInfo
// webidl.converters.GPUDeviceLostInfo = webidl.createInterfaceConverter(
// "GPUDeviceLostInfo",
// GPUDeviceLostInfo,
// GPUDeviceLostInfo.prototype,
// );

// ENUM: GPUErrorFilter
Expand All @@ -1960,13 +1960,13 @@
// INTERFACE: GPUOutOfMemoryError
webidl.converters.GPUOutOfMemoryError = webidl.createInterfaceConverter(
"GPUOutOfMemoryError",
GPUOutOfMemoryError,
GPUOutOfMemoryError.prototype,
);

// INTERFACE: GPUValidationError
webidl.converters.GPUValidationError = webidl.createInterfaceConverter(
"GPUValidationError",
GPUValidationError,
GPUValidationError.prototype,
);

// TYPEDEF: GPUError
Expand All @@ -1975,7 +1975,7 @@
// // INTERFACE: GPUUncapturedErrorEvent
// webidl.converters.GPUUncapturedErrorEvent = webidl.createInterfaceConverter(
// "GPUUncapturedErrorEvent",
// GPUUncapturedErrorEvent,
// GPUUncapturedErrorEvent.prototype,
// );

// DICTIONARY: GPUUncapturedErrorEventInit
Expand Down
4 changes: 2 additions & 2 deletions deno_webgpu/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
# Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.

[package]
name = "deno_webgpu"
Expand All @@ -11,7 +11,7 @@ repository = "https://github.com/gfx-rs/wgpu"
description = "WebGPU implementation for Deno"

[dependencies]
deno_core = "0.114.0"
deno_core = "0.117.0"
serde = { version = "1.0", features = ["derive"] }
tokio = { version = "1.10", features = ["full"] }
wgpu-core = { path = "../wgpu-core", features = ["trace", "replay", "serde"] }
Expand Down
2 changes: 1 addition & 1 deletion deno_webgpu/LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright 2018-2021 the Deno authors
Copyright 2018-2022 the Deno authors

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
2 changes: 1 addition & 1 deletion deno_webgpu/src/binding.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.

use deno_core::error::AnyError;
use deno_core::ResourceId;
Expand Down
2 changes: 1 addition & 1 deletion deno_webgpu/src/buffer.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.

use deno_core::error::type_error;
use deno_core::error::AnyError;
Expand Down
2 changes: 1 addition & 1 deletion deno_webgpu/src/bundle.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.

use deno_core::error::AnyError;
use deno_core::ResourceId;
Expand Down
2 changes: 1 addition & 1 deletion deno_webgpu/src/command_encoder.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.

use deno_core::error::AnyError;
use deno_core::ResourceId;
Expand Down
2 changes: 1 addition & 1 deletion deno_webgpu/src/compute_pass.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.

use deno_core::error::AnyError;
use deno_core::ResourceId;
Expand Down
2 changes: 1 addition & 1 deletion deno_webgpu/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.

use deno_core::error::AnyError;
use deno_core::include_js_files;
Expand Down
2 changes: 1 addition & 1 deletion deno_webgpu/src/pipeline.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.

use deno_core::error::AnyError;
use deno_core::ResourceId;
Expand Down
2 changes: 1 addition & 1 deletion deno_webgpu/src/queue.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.

use std::num::NonZeroU32;

Expand Down
2 changes: 1 addition & 1 deletion deno_webgpu/src/render_pass.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.

use deno_core::error::type_error;
use deno_core::error::AnyError;
Expand Down
2 changes: 1 addition & 1 deletion deno_webgpu/src/sampler.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.

use deno_core::error::AnyError;
use deno_core::ResourceId;
Expand Down
2 changes: 1 addition & 1 deletion deno_webgpu/src/shader.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.

use deno_core::error::AnyError;
use deno_core::ResourceId;
Expand Down
2 changes: 1 addition & 1 deletion deno_webgpu/src/texture.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.

use deno_core::error::AnyError;
use deno_core::ResourceId;
Expand Down