Cogs.Core
Statistics.h
1#pragma once
2
3#include <cstdint>
4
5namespace Cogs
6{
7
9 {
10 uint64_t vertices = 0; // Total count of vertices submitted.
11 uint64_t indices = 0; // Count of indexed vertices submitted.
12 uint32_t drawCallHistogram[32] = {}; // Histgram of draw call vertex sumbission size, first bucket is [0-2^1), second is [2^1-2^2) and so on.
13 };
14
16 {
17 size_t vertexBufferBytes = 0; // Estimated GPU memory consumption of pure vertex buffers.
18 size_t indexBufferBytes = 0; // Estimated GPU memory consumption of pure index buffers.
19 size_t constantBufferBytes = 0; // Estimated GPU memory consumption of pure constant buffers.
20 size_t unclassifiedBufferBytes = 0; // Estimated GPU memory consumption of remaining unclassified buffers.
21 size_t textureBytes = 0; // Estimate of GPU memory consumption of textures.
22 uint32_t vertexBufferCount = 0;
23 uint32_t indexBufferCount = 0;
24 uint32_t constantBufferCount = 0;
25 uint32_t unclassifiedBufferCount = 0;
26 uint32_t vertexArrayObjectCount = 0;
27 uint32_t inputLayoutCount = 0;
28 uint32_t textureCount = 0;
29 uint32_t effectCount = 0;
30 uint32_t rendertargetsCount = 0;
31 uint32_t framebufferCount = 0;
32 uint32_t samplerStateCount = 0;
33 uint32_t blendStateCount = 0;
34 uint32_t rasterizerStateCount = 0;
35 uint32_t depthStencilStateCount = 0;
36
37 size_t memoryConsumption() const { return vertexBufferBytes + indexBufferBytes + constantBufferBytes + unclassifiedBufferBytes + textureBytes; }
38 };
39
41 {
42 size_t bufferUploadSize = 0;
43 size_t textureUploadSize = 0;
44
45 uint32_t bufferUploads = 0;
46 uint32_t textureUploads = 0;
47 };
48
50 // uint32_t instance;
51 // uint32_t surface;
52
53 // uint32_t command_encoder;
54 // uint32_t render_bundle_encoder;
55 // uint32_t query_set;
56 uint32_t shader_module;
57
58 uint32_t buffer;
59
60 uint32_t texture;
61 uint32_t texture_view;
62 uint32_t sampler;
63
64 uint32_t render_pipeline;
65 uint32_t compute_pipeline;
66 uint32_t pipeline_layout;
67
68 uint32_t bind_group;
69 uint32_t bind_group_layout;
70
71 uint32_t descriptor_count;
72 };
73
74}
Contains all Cogs related functionality.
Definition: FieldSetter.h:23