2018-07-18 09:40:26 +00:00
|
|
|
// Copyright 2017 The Dawn Authors
|
2017-07-14 18:04:52 +00:00
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
|
2018-07-24 11:53:51 +00:00
|
|
|
#include "dawn_native/opengl/ComputePipelineGL.h"
|
2017-07-14 18:04:52 +00:00
|
|
|
|
2018-08-27 21:12:56 +00:00
|
|
|
#include "dawn_native/opengl/DeviceGL.h"
|
|
|
|
|
2018-07-24 14:45:45 +00:00
|
|
|
namespace dawn_native { namespace opengl {
|
2017-07-14 18:04:52 +00:00
|
|
|
|
2018-08-27 21:12:56 +00:00
|
|
|
ComputePipeline::ComputePipeline(Device* device, const ComputePipelineDescriptor* descriptor)
|
|
|
|
: ComputePipelineBase(device, descriptor) {
|
|
|
|
PerStage<const ShaderModule*> modules(nullptr);
|
2019-09-05 09:41:17 +00:00
|
|
|
modules[SingleShaderStage::Compute] = ToBackend(descriptor->computeStage.module);
|
2018-08-27 21:12:56 +00:00
|
|
|
|
2019-06-13 10:22:32 +00:00
|
|
|
PipelineGL::Initialize(device->gl, ToBackend(descriptor->layout), modules);
|
2017-07-14 18:04:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void ComputePipeline::ApplyNow() {
|
2019-06-13 10:22:32 +00:00
|
|
|
PipelineGL::ApplyNow(ToBackend(GetDevice())->gl);
|
2017-07-14 18:04:52 +00:00
|
|
|
}
|
|
|
|
|
2018-07-24 14:45:45 +00:00
|
|
|
}} // namespace dawn_native::opengl
|