PixelBullet  0.0.1
A C++ game engine
Loading...
Searching...
No Matches
gpu_diagnostics.h
1#pragma once
2
3#include "pixelbullet/graphics/graphics_config.h"
4
5#include <cstddef>
6#include <cstdint>
7#include <optional>
8#include <string>
9#include <string_view>
10#include <vector>
11
12namespace pixelbullet
13{
14enum class GraphicsDeviceType : uint8_t
15{
16 Other,
17 Integrated,
18 Discrete,
19 Virtual,
20 Cpu
21};
22
24{
25 std::string name;
26 GraphicsDeviceType type = GraphicsDeviceType::Other;
27 uint32_t api_version = 0;
28 uint32_t vendor_id = 0;
29 uint32_t device_id = 0;
30};
31
33{
34 bool is_compatible = false;
35 uint32_t score = 0;
36 std::vector<std::string> rejection_reasons;
37};
38
40{
41 GraphicsDeviceProperties properties;
43 bool matches_preference = false;
44 bool selected = false;
45};
46
48{
49 std::vector<GraphicsDeviceDiagnosticsEntry> entries;
50 std::optional<std::size_t> selected_index;
51 bool matched_preference = false;
52};
53
54[[nodiscard]] std::string FormatGraphicsApiVersion(uint32_t version);
55[[nodiscard]] std::string_view DescribeGraphicsDeviceType(GraphicsDeviceType device_type) noexcept;
56[[nodiscard]] GraphicsDeviceDiagnosticsReport EnumerateUtilityGpuDiagnostics(const GraphicsDeviceDiagnosticsRequest& request);
57} // namespace pixelbullet
Definition gpu_diagnostics.h:40
Definition gpu_diagnostics.h:48
Definition graphics_config.h:25
Definition gpu_diagnostics.h:24