tint->dawn: Move src/dawn_node -> src/dawn/node

Bug: dawn:1275
Change-Id: I206287da7728788646929e696c756b43d53cf272
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/79063
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Ben Clayton 2022-02-04 12:51:25 +00:00
parent 1e657a6328
commit 902ad1f9b2
73 changed files with 189 additions and 189 deletions

2
.gitignore vendored
View File

@ -97,4 +97,4 @@ Desktop.ini
$RECYCLE.BIN/
### Dawn node tools binaries
src/dawn_node/tools/bin/
src/dawn/node/tools/bin/

View File

@ -237,7 +237,7 @@ if (DAWN_BUILD_NODE_BINDINGS)
message(FATAL_ERROR
"DAWN_BUILD_NODE_BINDINGS requires missing dependency '${DEP}'\n"
"Please follow the 'Fetch dependencies' instructions at:\n"
"./src/dawn_node/README.md"
"./src/dawn/node/README.md"
)
endif()
endforeach()
@ -245,5 +245,5 @@ if (DAWN_BUILD_NODE_BINDINGS)
message(FATAL_ERROR "DAWN_BUILD_NODE_BINDINGS requires building with DAWN_ENABLE_PIC")
endif()
add_subdirectory(src/dawn_node)
add_subdirectory(src/dawn/node)
endif()

View File

@ -13,8 +13,8 @@
// limitations under the License.
#include "dawn/dawn_proc.h"
#include "src/dawn_node/binding/Flags.h"
#include "src/dawn_node/binding/GPU.h"
#include "src/dawn/node/binding/Flags.h"
#include "src/dawn/node/binding/GPU.h"
namespace {
Napi::Value CreateGPU(const Napi::CallbackInfo& info) {

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/utils/Debug.h"
#include "src/dawn/node/utils/Debug.h"
// To reduce the build dependencies for compiling the dawn.node targets, we do
// not use cmake-js for building, but instead just depend on node_api_headers.

View File

@ -57,15 +57,15 @@ ninja dawn.node
- Run `npm install` from inside the CTS directory to install its dependencies
```sh
./src/dawn_node/tools/run-cts --cts=<path-to-webgpu-cts> --dawn-node=<path-to-dawn.node> [WebGPU CTS query]
./src/dawn/node/tools/run-cts --cts=<path-to-webgpu-cts> --dawn-node=<path-to-dawn.node> [WebGPU CTS query]
```
If this fails with the error message `TypeError: expander is not a function or its return value is not iterable`, try appending `--build=false` to the start of the `run-cts` command line flags.
To test against SwiftShader instead of the default Vulkan device, prefix `./src/dawn_node/tools/run-cts` with `VK_ICD_FILENAMES=<swiftshader-cmake-build>/Linux/vk_swiftshader_icd.json` and append `--flag=dawn-backend=vulkan` to the start of run-cts command line flags. For example:
To test against SwiftShader instead of the default Vulkan device, prefix `./src/dawn/node/tools/run-cts` with `VK_ICD_FILENAMES=<swiftshader-cmake-build>/Linux/vk_swiftshader_icd.json` and append `--flag=dawn-backend=vulkan` to the start of run-cts command line flags. For example:
```sh
VK_ICD_FILENAMES=<swiftshader-cmake-build>/Linux/vk_swiftshader_icd.json ./src/dawn_node/tools/run-cts --cts=<path-to-webgpu-cts> --dawn-node=<path-to-dawn.node> --flag=dawn-backend=vulkan [WebGPU CTS query]
VK_ICD_FILENAMES=<swiftshader-cmake-build>/Linux/vk_swiftshader_icd.json ./src/dawn/node/tools/run-cts --cts=<path-to-webgpu-cts> --dawn-node=<path-to-dawn.node> --flag=dawn-backend=vulkan [WebGPU CTS query]
```
The `--flag` parameter must be passed in multiple times, once for each flag begin set. Here are some common arguments:
@ -77,7 +77,7 @@ The `--flag` parameter must be passed in multiple times, once for each flag begi
For example, on Windows, to use the d3dcompiler_47.dll from a Chromium checkout, and to dump shader output, we could run the following using Git Bash:
```sh
./src/dawn_node/tools/run-cts --verbose --dawn-node=/c/src/dawn/build/Debug/dawn.node --cts=/c/src/gpuweb-cts --flag=dlldir="C:\src\chromium\src\out\Release" --flag=enable-dawn-features=dump_shaders 'webgpu:shader,execution,builtin,abs:integer_builtin_functions,abs_unsigned:storageClass="storage";storageMode="read_write";containerType="vector";isAtomic=false;baseType="u32";type="vec2%3Cu32%3E"'
./src/dawn/node/tools/run-cts --verbose --dawn-node=/c/src/dawn/build/Debug/dawn.node --cts=/c/src/gpuweb-cts --flag=dlldir="C:\src\chromium\src\out\Release" --flag=enable-dawn-features=dump_shaders 'webgpu:shader,execution,builtin,abs:integer_builtin_functions,abs_unsigned:storageClass="storage";storageMode="read_write";containerType="vector";isAtomic=false;baseType="u32";type="vec2%3Cu32%3E"'
```
Note that we pass `--verbose` above so that all test output, including the dumped shader, is written to stdout.
@ -122,14 +122,14 @@ Replacing:
## Known issues
- Many WebGPU CTS tests are currently known to fail
- Dawn uses special token values for some parameters / fields. These are currently passed straight through to dawn from the JavaScript. discussions: [1](https://dawn-review.googlesource.com/c/dawn/+/64907/5/src/dawn_node/binding/Converter.cpp#167), [2](https://dawn-review.googlesource.com/c/dawn/+/64907/5/src/dawn_node/binding/Converter.cpp#928), [3](https://dawn-review.googlesource.com/c/dawn/+/64909/4/src/dawn_node/binding/GPUTexture.cpp#42)
- Backend validation is currently always set to 'full' to aid in debugging. This can be extremely slow. [discussion](https://dawn-review.googlesource.com/c/dawn/+/64916/4/src/dawn_node/binding/GPU.cpp#25)
- Attempting to call `new T` in JavaScript, where `T` is an IDL interface type, should result in a TypeError "Illegal constructor". [discussion](https://dawn-review.googlesource.com/c/dawn/+/64902/9/src/dawn_node/interop/WebGPU.cpp.tmpl#293)
- `GPUDevice` currently maintains a list of "lost promises". This should return the same promise. [discussion](https://dawn-review.googlesource.com/c/dawn/+/64906/6/src/dawn_node/binding/GPUDevice.h#107)
- Dawn uses special token values for some parameters / fields. These are currently passed straight through to dawn from the JavaScript. discussions: [1](https://dawn-review.googlesource.com/c/dawn/+/64907/5/src/dawn/node/binding/Converter.cpp#167), [2](https://dawn-review.googlesource.com/c/dawn/+/64907/5/src/dawn/node/binding/Converter.cpp#928), [3](https://dawn-review.googlesource.com/c/dawn/+/64909/4/src/dawn/node/binding/GPUTexture.cpp#42)
- Backend validation is currently always set to 'full' to aid in debugging. This can be extremely slow. [discussion](https://dawn-review.googlesource.com/c/dawn/+/64916/4/src/dawn/node/binding/GPU.cpp#25)
- Attempting to call `new T` in JavaScript, where `T` is an IDL interface type, should result in a TypeError "Illegal constructor". [discussion](https://dawn-review.googlesource.com/c/dawn/+/64902/9/src/dawn/node/interop/WebGPU.cpp.tmpl#293)
- `GPUDevice` currently maintains a list of "lost promises". This should return the same promise. [discussion](https://dawn-review.googlesource.com/c/dawn/+/64906/6/src/dawn/node/binding/GPUDevice.h#107)
## Remaining work
- Investigate CTS failures that are not expected to fail.
- Generated includes live in `src/` for `dawn_node`, but outside for Dawn. [discussion](https://dawn-review.googlesource.com/c/dawn/+/64903/9/src/dawn_node/interop/CMakeLists.txt#56)
- Generated includes live in `src/` for `dawn/node`, but outside for Dawn. [discussion](https://dawn-review.googlesource.com/c/dawn/+/64903/9/src/dawn/node/interop/CMakeLists.txt#56)
- Hook up to presubmit bots (CQ / Kokoro)
- `binding::GPU` will require significant rework [once Dawn implements the device / adapter creation path properly](https://dawn-review.googlesource.com/c/dawn/+/64916/4/src/dawn_node/binding/GPU.cpp).
- `binding::GPU` will require significant rework [once Dawn implements the device / adapter creation path properly](https://dawn-review.googlesource.com/c/dawn/+/64916/4/src/dawn/node/binding/GPU.cpp).

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/binding/AsyncRunner.h"
#include "src/dawn/node/binding/AsyncRunner.h"
#include <cassert>
#include <limits>

View File

@ -12,15 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/binding/Converter.h"
#include "src/dawn/node/binding/Converter.h"
#include "src/dawn_node/binding/GPUBuffer.h"
#include "src/dawn_node/binding/GPUPipelineLayout.h"
#include "src/dawn_node/binding/GPUSampler.h"
#include "src/dawn_node/binding/GPUShaderModule.h"
#include "src/dawn_node/binding/GPUTexture.h"
#include "src/dawn_node/binding/GPUTextureView.h"
#include "src/dawn_node/utils/Debug.h"
#include "src/dawn/node/binding/GPUBuffer.h"
#include "src/dawn/node/binding/GPUPipelineLayout.h"
#include "src/dawn/node/binding/GPUSampler.h"
#include "src/dawn/node/binding/GPUShaderModule.h"
#include "src/dawn/node/binding/GPUTexture.h"
#include "src/dawn/node/binding/GPUTextureView.h"
#include "src/dawn/node/utils/Debug.h"
namespace wgpu::binding {

View File

@ -21,8 +21,8 @@
#include "dawn/webgpu_cpp.h"
#include "dawn_native/DawnNative.h"
#include "napi.h"
#include "src/dawn_node/binding/Errors.h"
#include "src/dawn_node/interop/WebGPU.h"
#include "src/dawn/node/binding/Errors.h"
#include "src/dawn/node/interop/WebGPU.h"
namespace wgpu::binding {

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/binding/Errors.h"
#include "src/dawn/node/binding/Errors.h"
namespace wgpu::binding {

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/binding/Flags.h"
#include "src/dawn/node/binding/Flags.h"
namespace wgpu::binding {
void Flags::Set(const std::string& key, const std::string& value) {

View File

@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/binding/GPU.h"
#include "src/dawn/node/binding/GPU.h"
#include "src/dawn_node/binding/GPUAdapter.h"
#include "src/dawn/node/binding/GPUAdapter.h"
#include <cstdlib>

View File

@ -18,8 +18,8 @@
#include "dawn/webgpu_cpp.h"
#include "dawn_native/DawnNative.h"
#include "napi.h"
#include "src/dawn_node/binding/Flags.h"
#include "src/dawn_node/interop/WebGPU.h"
#include "src/dawn/node/binding/Flags.h"
#include "src/dawn/node/interop/WebGPU.h"
namespace wgpu::binding {
// GPU is an implementation of interop::GPU that wraps a dawn::native::Instance.

View File

@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/binding/GPUAdapter.h"
#include "src/dawn/node/binding/GPUAdapter.h"
#include <unordered_set>
#include "src/dawn_node/binding/Flags.h"
#include "src/dawn_node/binding/GPUDevice.h"
#include "src/dawn_node/binding/GPUSupportedLimits.h"
#include "src/dawn/node/binding/Flags.h"
#include "src/dawn/node/binding/GPUDevice.h"
#include "src/dawn/node/binding/GPUSupportedLimits.h"
namespace {
// TODO(amaiorano): Move to utility header

View File

@ -18,7 +18,7 @@
#include "dawn/webgpu_cpp.h"
#include "dawn_native/DawnNative.h"
#include "napi.h"
#include "src/dawn_node/interop/WebGPU.h"
#include "src/dawn/node/interop/WebGPU.h"
namespace wgpu::binding {
class Flags;

View File

@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/binding/GPUBindGroup.h"
#include "src/dawn/node/binding/GPUBindGroup.h"
#include "src/dawn_node/utils/Debug.h"
#include "src/dawn/node/utils/Debug.h"
namespace wgpu::binding {

View File

@ -18,7 +18,7 @@
#include "dawn/webgpu_cpp.h"
#include "dawn_native/DawnNative.h"
#include "napi.h"
#include "src/dawn_node/interop/WebGPU.h"
#include "src/dawn/node/interop/WebGPU.h"
namespace wgpu::binding {
@ -28,7 +28,7 @@ namespace wgpu::binding {
GPUBindGroup(wgpu::BindGroup group);
// Implicit cast operator to Dawn GPU object
inline operator const wgpu::BindGroup &() const {
inline operator const wgpu::BindGroup&() const {
return group_;
}

View File

@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/binding/GPUBindGroupLayout.h"
#include "src/dawn/node/binding/GPUBindGroupLayout.h"
#include "src/dawn_node/utils/Debug.h"
#include "src/dawn/node/utils/Debug.h"
namespace wgpu::binding {

View File

@ -18,7 +18,7 @@
#include "dawn/webgpu_cpp.h"
#include "dawn_native/DawnNative.h"
#include "napi.h"
#include "src/dawn_node/interop/WebGPU.h"
#include "src/dawn/node/interop/WebGPU.h"
namespace wgpu::binding {
@ -29,7 +29,7 @@ namespace wgpu::binding {
GPUBindGroupLayout(wgpu::BindGroupLayout layout);
// Implicit cast operator to Dawn GPU object
inline operator const wgpu::BindGroupLayout &() const {
inline operator const wgpu::BindGroupLayout&() const {
return layout_;
}

View File

@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/binding/GPUBuffer.h"
#include "src/dawn/node/binding/GPUBuffer.h"
#include <memory>
#include "src/dawn_node/binding/Converter.h"
#include "src/dawn_node/binding/Errors.h"
#include "src/dawn_node/utils/Debug.h"
#include "src/dawn/node/binding/Converter.h"
#include "src/dawn/node/binding/Errors.h"
#include "src/dawn/node/utils/Debug.h"
namespace wgpu::binding {

View File

@ -18,8 +18,8 @@
#include "dawn/webgpu_cpp.h"
#include "dawn_native/DawnNative.h"
#include "napi.h"
#include "src/dawn_node/binding/AsyncRunner.h"
#include "src/dawn_node/interop/WebGPU.h"
#include "src/dawn/node/binding/AsyncRunner.h"
#include "src/dawn/node/interop/WebGPU.h"
namespace wgpu::binding {
@ -37,7 +37,7 @@ namespace wgpu::binding {
}
// Implicit cast operator to Dawn GPU object
inline operator const wgpu::Buffer &() const {
inline operator const wgpu::Buffer&() const {
return buffer_;
}

View File

@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/binding/GPUCommandBuffer.h"
#include "src/dawn/node/binding/GPUCommandBuffer.h"
#include "src/dawn_node/utils/Debug.h"
#include "src/dawn/node/utils/Debug.h"
namespace wgpu::binding {

View File

@ -18,7 +18,7 @@
#include "dawn/webgpu_cpp.h"
#include "dawn_native/DawnNative.h"
#include "napi.h"
#include "src/dawn_node/interop/WebGPU.h"
#include "src/dawn/node/interop/WebGPU.h"
namespace wgpu::binding {
@ -29,7 +29,7 @@ namespace wgpu::binding {
GPUCommandBuffer(wgpu::CommandBuffer cmd_buf);
// Implicit cast operator to Dawn GPU object
inline operator const wgpu::CommandBuffer &() const {
inline operator const wgpu::CommandBuffer&() const {
return cmd_buf_;
}

View File

@ -12,17 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/binding/GPUCommandEncoder.h"
#include "src/dawn/node/binding/GPUCommandEncoder.h"
#include "src/dawn_node/binding/Converter.h"
#include "src/dawn_node/binding/GPU.h"
#include "src/dawn_node/binding/GPUBuffer.h"
#include "src/dawn_node/binding/GPUCommandBuffer.h"
#include "src/dawn_node/binding/GPUComputePassEncoder.h"
#include "src/dawn_node/binding/GPUQuerySet.h"
#include "src/dawn_node/binding/GPURenderPassEncoder.h"
#include "src/dawn_node/binding/GPUTexture.h"
#include "src/dawn_node/utils/Debug.h"
#include "src/dawn/node/binding/Converter.h"
#include "src/dawn/node/binding/GPU.h"
#include "src/dawn/node/binding/GPUBuffer.h"
#include "src/dawn/node/binding/GPUCommandBuffer.h"
#include "src/dawn/node/binding/GPUComputePassEncoder.h"
#include "src/dawn/node/binding/GPUQuerySet.h"
#include "src/dawn/node/binding/GPURenderPassEncoder.h"
#include "src/dawn/node/binding/GPUTexture.h"
#include "src/dawn/node/utils/Debug.h"
namespace wgpu::binding {

View File

@ -18,7 +18,7 @@
#include "dawn/webgpu_cpp.h"
#include "dawn_native/DawnNative.h"
#include "napi.h"
#include "src/dawn_node/interop/WebGPU.h"
#include "src/dawn/node/interop/WebGPU.h"
namespace wgpu::binding {

View File

@ -12,14 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/binding/GPUComputePassEncoder.h"
#include "src/dawn/node/binding/GPUComputePassEncoder.h"
#include "src/dawn_node/binding/Converter.h"
#include "src/dawn_node/binding/GPUBindGroup.h"
#include "src/dawn_node/binding/GPUBuffer.h"
#include "src/dawn_node/binding/GPUComputePipeline.h"
#include "src/dawn_node/binding/GPUQuerySet.h"
#include "src/dawn_node/utils/Debug.h"
#include "src/dawn/node/binding/Converter.h"
#include "src/dawn/node/binding/GPUBindGroup.h"
#include "src/dawn/node/binding/GPUBuffer.h"
#include "src/dawn/node/binding/GPUComputePipeline.h"
#include "src/dawn/node/binding/GPUQuerySet.h"
#include "src/dawn/node/utils/Debug.h"
namespace wgpu::binding {

View File

@ -18,7 +18,7 @@
#include "dawn/webgpu_cpp.h"
#include "dawn_native/DawnNative.h"
#include "napi.h"
#include "src/dawn_node/interop/WebGPU.h"
#include "src/dawn/node/interop/WebGPU.h"
namespace wgpu::binding {
@ -29,7 +29,7 @@ namespace wgpu::binding {
GPUComputePassEncoder(wgpu::ComputePassEncoder enc);
// Implicit cast operator to Dawn GPU object
inline operator const wgpu::ComputePassEncoder &() const {
inline operator const wgpu::ComputePassEncoder&() const {
return enc_;
}

View File

@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/binding/GPUComputePipeline.h"
#include "src/dawn/node/binding/GPUComputePipeline.h"
#include "src/dawn_node/binding/GPUBindGroupLayout.h"
#include "src/dawn_node/binding/GPUBuffer.h"
#include "src/dawn_node/utils/Debug.h"
#include "src/dawn/node/binding/GPUBindGroupLayout.h"
#include "src/dawn/node/binding/GPUBuffer.h"
#include "src/dawn/node/utils/Debug.h"
namespace wgpu::binding {

View File

@ -18,7 +18,7 @@
#include "dawn/webgpu_cpp.h"
#include "dawn_native/DawnNative.h"
#include "napi.h"
#include "src/dawn_node/interop/WebGPU.h"
#include "src/dawn/node/interop/WebGPU.h"
namespace wgpu::binding {
@ -29,7 +29,7 @@ namespace wgpu::binding {
GPUComputePipeline(wgpu::ComputePipeline pipeline);
// Implicit cast operator to Dawn GPU object
inline operator const wgpu::ComputePipeline &() const {
inline operator const wgpu::ComputePipeline&() const {
return pipeline_;
}

View File

@ -12,28 +12,28 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/binding/GPUDevice.h"
#include "src/dawn/node/binding/GPUDevice.h"
#include <memory>
#include "src/dawn_node/binding/Converter.h"
#include "src/dawn_node/binding/Errors.h"
#include "src/dawn_node/binding/GPUBindGroup.h"
#include "src/dawn_node/binding/GPUBindGroupLayout.h"
#include "src/dawn_node/binding/GPUBuffer.h"
#include "src/dawn_node/binding/GPUCommandBuffer.h"
#include "src/dawn_node/binding/GPUCommandEncoder.h"
#include "src/dawn_node/binding/GPUComputePipeline.h"
#include "src/dawn_node/binding/GPUPipelineLayout.h"
#include "src/dawn_node/binding/GPUQuerySet.h"
#include "src/dawn_node/binding/GPUQueue.h"
#include "src/dawn_node/binding/GPURenderBundleEncoder.h"
#include "src/dawn_node/binding/GPURenderPipeline.h"
#include "src/dawn_node/binding/GPUSampler.h"
#include "src/dawn_node/binding/GPUShaderModule.h"
#include "src/dawn_node/binding/GPUSupportedLimits.h"
#include "src/dawn_node/binding/GPUTexture.h"
#include "src/dawn_node/utils/Debug.h"
#include "src/dawn/node/binding/Converter.h"
#include "src/dawn/node/binding/Errors.h"
#include "src/dawn/node/binding/GPUBindGroup.h"
#include "src/dawn/node/binding/GPUBindGroupLayout.h"
#include "src/dawn/node/binding/GPUBuffer.h"
#include "src/dawn/node/binding/GPUCommandBuffer.h"
#include "src/dawn/node/binding/GPUCommandEncoder.h"
#include "src/dawn/node/binding/GPUComputePipeline.h"
#include "src/dawn/node/binding/GPUPipelineLayout.h"
#include "src/dawn/node/binding/GPUQuerySet.h"
#include "src/dawn/node/binding/GPUQueue.h"
#include "src/dawn/node/binding/GPURenderBundleEncoder.h"
#include "src/dawn/node/binding/GPURenderPipeline.h"
#include "src/dawn/node/binding/GPUSampler.h"
#include "src/dawn/node/binding/GPUShaderModule.h"
#include "src/dawn/node/binding/GPUSupportedLimits.h"
#include "src/dawn/node/binding/GPUTexture.h"
#include "src/dawn/node/utils/Debug.h"
namespace wgpu::binding {

View File

@ -17,8 +17,8 @@
#include "dawn/webgpu_cpp.h"
#include "napi.h"
#include "src/dawn_node/binding/AsyncRunner.h"
#include "src/dawn_node/interop/WebGPU.h"
#include "src/dawn/node/binding/AsyncRunner.h"
#include "src/dawn/node/interop/WebGPU.h"
namespace wgpu::binding {
// GPUDevice is an implementation of interop::GPUDevice that wraps a wgpu::Device.

View File

@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/binding/GPUPipelineLayout.h"
#include "src/dawn/node/binding/GPUPipelineLayout.h"
#include "src/dawn_node/utils/Debug.h"
#include "src/dawn/node/utils/Debug.h"
namespace wgpu::binding {

View File

@ -18,7 +18,7 @@
#include "dawn/webgpu_cpp.h"
#include "dawn_native/DawnNative.h"
#include "napi.h"
#include "src/dawn_node/interop/WebGPU.h"
#include "src/dawn/node/interop/WebGPU.h"
namespace wgpu::binding {
@ -29,7 +29,7 @@ namespace wgpu::binding {
GPUPipelineLayout(wgpu::PipelineLayout layout);
// Implicit cast operator to Dawn GPU object
inline operator const wgpu::PipelineLayout &() const {
inline operator const wgpu::PipelineLayout&() const {
return layout_;
}

View File

@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/binding/GPUQuerySet.h"
#include "src/dawn/node/binding/GPUQuerySet.h"
#include "src/dawn_node/utils/Debug.h"
#include "src/dawn/node/utils/Debug.h"
namespace wgpu::binding {

View File

@ -18,7 +18,7 @@
#include "dawn/webgpu_cpp.h"
#include "dawn_native/DawnNative.h"
#include "napi.h"
#include "src/dawn_node/interop/WebGPU.h"
#include "src/dawn/node/interop/WebGPU.h"
namespace wgpu::binding {
@ -28,7 +28,7 @@ namespace wgpu::binding {
GPUQuerySet(wgpu::QuerySet query_set);
// Implicit cast operator to Dawn GPU object
inline operator const wgpu::QuerySet &() const {
inline operator const wgpu::QuerySet&() const {
return query_set_;
}

View File

@ -12,14 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/binding/GPUQueue.h"
#include "src/dawn/node/binding/GPUQueue.h"
#include <memory>
#include "src/dawn_node/binding/Converter.h"
#include "src/dawn_node/binding/GPUBuffer.h"
#include "src/dawn_node/binding/GPUCommandBuffer.h"
#include "src/dawn_node/utils/Debug.h"
#include "src/dawn/node/binding/Converter.h"
#include "src/dawn/node/binding/GPUBuffer.h"
#include "src/dawn/node/binding/GPUCommandBuffer.h"
#include "src/dawn/node/utils/Debug.h"
namespace wgpu::binding {

View File

@ -18,8 +18,8 @@
#include "dawn/webgpu_cpp.h"
#include "dawn_native/DawnNative.h"
#include "napi.h"
#include "src/dawn_node/binding/AsyncRunner.h"
#include "src/dawn_node/interop/WebGPU.h"
#include "src/dawn/node/binding/AsyncRunner.h"
#include "src/dawn/node/interop/WebGPU.h"
namespace wgpu::binding {

View File

@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/binding/GPURenderBundle.h"
#include "src/dawn/node/binding/GPURenderBundle.h"
#include "src/dawn_node/binding/Converter.h"
#include "src/dawn_node/binding/GPUBuffer.h"
#include "src/dawn_node/binding/GPURenderBundle.h"
#include "src/dawn_node/binding/GPURenderPipeline.h"
#include "src/dawn_node/utils/Debug.h"
#include "src/dawn/node/binding/Converter.h"
#include "src/dawn/node/binding/GPUBuffer.h"
#include "src/dawn/node/binding/GPURenderBundle.h"
#include "src/dawn/node/binding/GPURenderPipeline.h"
#include "src/dawn/node/utils/Debug.h"
namespace wgpu::binding {

View File

@ -18,7 +18,7 @@
#include "dawn/webgpu_cpp.h"
#include "dawn_native/DawnNative.h"
#include "napi.h"
#include "src/dawn_node/interop/WebGPU.h"
#include "src/dawn/node/interop/WebGPU.h"
namespace wgpu::binding {
@ -29,7 +29,7 @@ namespace wgpu::binding {
GPURenderBundle(wgpu::RenderBundle bundle);
// Implicit cast operator to Dawn GPU object
inline operator const wgpu::RenderBundle &() const {
inline operator const wgpu::RenderBundle&() const {
return bundle_;
}

View File

@ -12,14 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/binding/GPURenderBundleEncoder.h"
#include "src/dawn/node/binding/GPURenderBundleEncoder.h"
#include "src/dawn_node/binding/Converter.h"
#include "src/dawn_node/binding/GPUBindGroup.h"
#include "src/dawn_node/binding/GPUBuffer.h"
#include "src/dawn_node/binding/GPURenderBundle.h"
#include "src/dawn_node/binding/GPURenderPipeline.h"
#include "src/dawn_node/utils/Debug.h"
#include "src/dawn/node/binding/Converter.h"
#include "src/dawn/node/binding/GPUBindGroup.h"
#include "src/dawn/node/binding/GPUBuffer.h"
#include "src/dawn/node/binding/GPURenderBundle.h"
#include "src/dawn/node/binding/GPURenderPipeline.h"
#include "src/dawn/node/utils/Debug.h"
namespace wgpu::binding {

View File

@ -18,7 +18,7 @@
#include "dawn/webgpu_cpp.h"
#include "dawn_native/DawnNative.h"
#include "napi.h"
#include "src/dawn_node/interop/WebGPU.h"
#include "src/dawn/node/interop/WebGPU.h"
namespace wgpu::binding {

View File

@ -12,15 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/binding/GPURenderPassEncoder.h"
#include "src/dawn/node/binding/GPURenderPassEncoder.h"
#include "src/dawn_node/binding/Converter.h"
#include "src/dawn_node/binding/GPUBindGroup.h"
#include "src/dawn_node/binding/GPUBuffer.h"
#include "src/dawn_node/binding/GPUQuerySet.h"
#include "src/dawn_node/binding/GPURenderBundle.h"
#include "src/dawn_node/binding/GPURenderPipeline.h"
#include "src/dawn_node/utils/Debug.h"
#include "src/dawn/node/binding/Converter.h"
#include "src/dawn/node/binding/GPUBindGroup.h"
#include "src/dawn/node/binding/GPUBuffer.h"
#include "src/dawn/node/binding/GPUQuerySet.h"
#include "src/dawn/node/binding/GPURenderBundle.h"
#include "src/dawn/node/binding/GPURenderPipeline.h"
#include "src/dawn/node/utils/Debug.h"
namespace wgpu::binding {

View File

@ -18,7 +18,7 @@
#include "dawn/webgpu_cpp.h"
#include "dawn_native/DawnNative.h"
#include "napi.h"
#include "src/dawn_node/interop/WebGPU.h"
#include "src/dawn/node/interop/WebGPU.h"
namespace wgpu::binding {
@ -29,7 +29,7 @@ namespace wgpu::binding {
GPURenderPassEncoder(wgpu::RenderPassEncoder enc);
// Implicit cast operator to Dawn GPU object
inline operator const wgpu::RenderPassEncoder &() const {
inline operator const wgpu::RenderPassEncoder&() const {
return enc_;
}

View File

@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/binding/GPURenderPipeline.h"
#include "src/dawn/node/binding/GPURenderPipeline.h"
#include "src/dawn_node/binding/GPUBindGroupLayout.h"
#include "src/dawn_node/binding/GPUBuffer.h"
#include "src/dawn_node/utils/Debug.h"
#include "src/dawn/node/binding/GPUBindGroupLayout.h"
#include "src/dawn/node/binding/GPUBuffer.h"
#include "src/dawn/node/utils/Debug.h"
namespace wgpu::binding {

View File

@ -18,7 +18,7 @@
#include "dawn/webgpu_cpp.h"
#include "dawn_native/DawnNative.h"
#include "napi.h"
#include "src/dawn_node/interop/WebGPU.h"
#include "src/dawn/node/interop/WebGPU.h"
namespace wgpu::binding {
@ -29,7 +29,7 @@ namespace wgpu::binding {
GPURenderPipeline(wgpu::RenderPipeline pipeline);
// Implicit cast operator to Dawn GPU object
inline operator const wgpu::RenderPipeline &() const {
inline operator const wgpu::RenderPipeline&() const {
return pipeline_;
}

View File

@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/binding/GPUSampler.h"
#include "src/dawn/node/binding/GPUSampler.h"
#include "src/dawn_node/binding/Converter.h"
#include "src/dawn_node/utils/Debug.h"
#include "src/dawn/node/binding/Converter.h"
#include "src/dawn/node/utils/Debug.h"
namespace wgpu::binding {

View File

@ -18,7 +18,7 @@
#include "dawn/webgpu_cpp.h"
#include "dawn_native/DawnNative.h"
#include "napi.h"
#include "src/dawn_node/interop/WebGPU.h"
#include "src/dawn/node/interop/WebGPU.h"
namespace wgpu::binding {
// GPUSampler is an implementation of interop::GPUSampler that wraps a wgpu::Sampler.
@ -27,7 +27,7 @@ namespace wgpu::binding {
GPUSampler(wgpu::Sampler sampler);
// Implicit cast operator to Dawn GPU object
inline operator const wgpu::Sampler &() const {
inline operator const wgpu::Sampler&() const {
return sampler_;
}

View File

@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/binding/GPUShaderModule.h"
#include "src/dawn/node/binding/GPUShaderModule.h"
#include <memory>
#include "src/dawn_node/utils/Debug.h"
#include "src/dawn/node/utils/Debug.h"
namespace wgpu::binding {

View File

@ -18,8 +18,8 @@
#include "dawn/webgpu_cpp.h"
#include "dawn_native/DawnNative.h"
#include "napi.h"
#include "src/dawn_node/binding/AsyncRunner.h"
#include "src/dawn_node/interop/WebGPU.h"
#include "src/dawn/node/binding/AsyncRunner.h"
#include "src/dawn/node/interop/WebGPU.h"
namespace wgpu::binding {
@ -30,7 +30,7 @@ namespace wgpu::binding {
GPUShaderModule(wgpu::ShaderModule shader, std::shared_ptr<AsyncRunner> async);
// Implicit cast operator to Dawn GPU object
inline operator const wgpu::ShaderModule &() const {
inline operator const wgpu::ShaderModule&() const {
return shader_;
}

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/binding/GPUSupportedLimits.h"
#include "src/dawn/node/binding/GPUSupportedLimits.h"
namespace wgpu::binding {

View File

@ -18,7 +18,7 @@
#include "dawn/webgpu_cpp.h"
#include "dawn_native/DawnNative.h"
#include "napi.h"
#include "src/dawn_node/interop/WebGPU.h"
#include "src/dawn/node/interop/WebGPU.h"
namespace wgpu::binding {

View File

@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/binding/GPUTexture.h"
#include "src/dawn/node/binding/GPUTexture.h"
#include "src/dawn_node/binding/Converter.h"
#include "src/dawn_node/binding/Errors.h"
#include "src/dawn_node/binding/GPUTextureView.h"
#include "src/dawn_node/utils/Debug.h"
#include "src/dawn/node/binding/Converter.h"
#include "src/dawn/node/binding/Errors.h"
#include "src/dawn/node/binding/GPUTextureView.h"
#include "src/dawn/node/utils/Debug.h"
namespace wgpu::binding {

View File

@ -18,7 +18,7 @@
#include "dawn/webgpu_cpp.h"
#include "dawn_native/DawnNative.h"
#include "napi.h"
#include "src/dawn_node/interop/WebGPU.h"
#include "src/dawn/node/interop/WebGPU.h"
namespace wgpu::binding {
@ -28,7 +28,7 @@ namespace wgpu::binding {
GPUTexture(wgpu::Texture texture);
// Implicit cast operator to Dawn GPU object
inline operator const wgpu::Texture &() const {
inline operator const wgpu::Texture&() const {
return texture_;
}

View File

@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/binding/GPUTextureView.h"
#include "src/dawn/node/binding/GPUTextureView.h"
#include "src/dawn_node/utils/Debug.h"
#include "src/dawn/node/utils/Debug.h"
namespace wgpu::binding {

View File

@ -18,7 +18,7 @@
#include "dawn/webgpu_cpp.h"
#include "dawn_native/DawnNative.h"
#include "napi.h"
#include "src/dawn_node/interop/WebGPU.h"
#include "src/dawn/node/interop/WebGPU.h"
namespace wgpu::binding {
@ -29,7 +29,7 @@ namespace wgpu::binding {
GPUTextureView(wgpu::TextureView view);
// Implicit cast operator to Dawn GPU object
inline operator const wgpu::TextureView &() const {
inline operator const wgpu::TextureView&() const {
return view_;
}

View File

@ -13,7 +13,7 @@
# limitations under the License.
# Paths to generated files
set(INTEROP_GEN_DIR "${GEN_DIR}/src/dawn_node/interop")
set(INTEROP_GEN_DIR "${GEN_DIR}/src/dawn/node/interop")
set(INTEROP_WEBGPU_H "${INTEROP_GEN_DIR}/WebGPU.h")
set(INTEROP_WEBGPU_CPP "${INTEROP_GEN_DIR}/WebGPU.cpp")

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/dawn_node/interop/Core.h"
#include "src/dawn/node/interop/Core.h"
namespace wgpu::interop {

View File

@ -28,7 +28,7 @@
#include "napi.h"
#include "src/dawn_node/utils/Debug.h"
#include "src/dawn/node/utils/Debug.h"
#define ENABLE_INTEROP_LOGGING 0 // Enable for verbose interop logging
@ -124,10 +124,10 @@ namespace wgpu::interop {
inline operator napi_value() const {
return object;
}
inline operator const Napi::Value &() const {
inline operator const Napi::Value&() const {
return object;
}
inline operator const Napi::Object &() const {
inline operator const Napi::Object&() const {
return object;
}

View File

@ -16,13 +16,13 @@
{{- /*
--------------------------------------------------------------------------------
Template file for use with src/dawn_node/tools/cmd/idlgen/main.go to generate
Template file for use with src/dawn/node/tools/cmd/idlgen/main.go to generate
the WebGPU.cpp source file.
See:
* https://github.com/ben-clayton/webidlparser/blob/main/ast/ast.go for the AST
types used by this template
* src/dawn_node/tools/cmd/idlgen/main.go for additional structures and functions
* src/dawn/node/tools/cmd/idlgen/main.go for additional structures and functions
used by this template
* https://golang.org/pkg/text/template/ for documentation on the template syntax
--------------------------------------------------------------------------------
@ -30,11 +30,11 @@ See:
{{- Include "WebGPUCommon.tmpl" -}}
#include "src/dawn_node/interop/WebGPU.h"
#include "src/dawn/node/interop/WebGPU.h"
#include <unordered_map>
#include "src/dawn_node/utils/Debug.h"
#include "src/dawn/node/utils/Debug.h"
namespace wgpu {
namespace interop {

View File

@ -16,13 +16,13 @@
{{- /*
--------------------------------------------------------------------------------
Template file for use with src/dawn_node/tools/cmd/idlgen/main.go to generate
Template file for use with src/dawn/node/tools/cmd/idlgen/main.go to generate
the WebGPU.h header file.
See:
* https://github.com/ben-clayton/webidlparser/blob/main/ast/ast.go for the AST
types used by this template
* src/dawn_node/tools/cmd/idlgen/main.go for additional structures and functions
* src/dawn/node/tools/cmd/idlgen/main.go for additional structures and functions
used by this template
* https://golang.org/pkg/text/template/ for documentation on the template syntax
--------------------------------------------------------------------------------
@ -33,7 +33,7 @@ See:
#ifndef DAWN_NODE_GEN_INTEROP_WEBGPU_H_
#define DAWN_NODE_GEN_INTEROP_WEBGPU_H_
#include "src/dawn_node/interop/Core.h"
#include "src/dawn/node/interop/Core.h"
namespace wgpu {
namespace interop {

View File

@ -16,14 +16,14 @@
{{- /*
--------------------------------------------------------------------------------
Template file for use with src/dawn_node/tools/cmd/idlgen/main.go.
Template file for use with src/dawn/node/tools/cmd/idlgen/main.go.
This file provides common template definitions and is included by WebGPU.h.tmpl
and WebGPU.cpp.tmpl.
See:
* https://github.com/ben-clayton/webidlparser/blob/main/ast/ast.go for the AST
types used by this template
* src/dawn_node/tools/cmd/idlgen/main.go for additional structures and functions
* src/dawn/node/tools/cmd/idlgen/main.go for additional structures and functions
used by this template
* https://golang.org/pkg/text/template/ for documentation on the template syntax
--------------------------------------------------------------------------------

View File

@ -1,4 +1,4 @@
module dawn.googlesource.com/dawn/src/dawn_node/tools
module dawn.googlesource.com/dawn/src/dawn/node/tools
go 1.16