blob: 45b64b996cd224dcaf8e3aebddd5d2cca259a2e6 [file] [log] [blame]
// Copyright 2016 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "lib/escher/impl/vk/pipeline_layout.h"
namespace escher {
namespace impl {
PipelineLayout::PipelineLayout(vk::Device device, vk::PipelineLayout layout)
: device_(device), layout_(layout) {
FXL_DCHECK(layout);
}
PipelineLayout::~PipelineLayout() {
// Not specifying a device allows unit-testing without calling Vulkan APIs.
if (device_) {
device_.destroyPipelineLayout(layout_);
}
}
} // namespace impl
} // namespace escher