blob: f999cc5910bc43bf02c3b06e02042c0d255ea531 [file] [log] [blame]
// Copyright 2021 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.
#ifndef SRC_GRAPHICS_BIN_VULKAN_LOADER_GPU_DEVICE_H_
#define SRC_GRAPHICS_BIN_VULKAN_LOADER_GPU_DEVICE_H_
#include <lib/sys/inspect/cpp/component.h>
#include <cstdint>
#include <vector>
class LoaderApp;
class GpuDevice {
public:
virtual ~GpuDevice() = default;
uint64_t icd_count() { return icds_.size(); }
protected:
struct IcdData {
inspect::Node node;
inspect::ValueList values;
};
explicit GpuDevice(LoaderApp* app) : app_(app) {}
LoaderApp* app() { return app_; }
inspect::Node& node() { return node_; }
std::vector<IcdData>& icds() { return icds_; }
private:
LoaderApp* app_;
inspect::Node node_;
std::vector<IcdData> icds_;
};
#endif // SRC_GRAPHICS_BIN_VULKAN_LOADER_GPU_DEVICE_H_