• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2021 The Dawn Authors
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #include "src/dawn_node/binding/GPUComputePipeline.h"
16 
17 #include "src/dawn_node/binding/GPUBindGroupLayout.h"
18 #include "src/dawn_node/binding/GPUBuffer.h"
19 #include "src/dawn_node/utils/Debug.h"
20 
21 namespace wgpu { namespace binding {
22 
23     ////////////////////////////////////////////////////////////////////////////////
24     // wgpu::bindings::GPUComputePipeline
25     ////////////////////////////////////////////////////////////////////////////////
GPUComputePipeline(wgpu::ComputePipeline pipeline)26     GPUComputePipeline::GPUComputePipeline(wgpu::ComputePipeline pipeline)
27         : pipeline_(std::move(pipeline)) {
28     }
29 
getBindGroupLayout(Napi::Env env,uint32_t index)30     interop::Interface<interop::GPUBindGroupLayout> GPUComputePipeline::getBindGroupLayout(
31         Napi::Env env,
32         uint32_t index) {
33         return interop::GPUBindGroupLayout::Create<GPUBindGroupLayout>(
34             env, pipeline_.GetBindGroupLayout(index));
35     }
36 
getLabel(Napi::Env)37     std::optional<std::string> GPUComputePipeline::getLabel(Napi::Env) {
38         UNIMPLEMENTED();
39     }
40 
setLabel(Napi::Env,std::optional<std::string> value)41     void GPUComputePipeline::setLabel(Napi::Env, std::optional<std::string> value) {
42         UNIMPLEMENTED();
43     }
44 
45 }}  // namespace wgpu::binding
46