$darkmode
#include "gpu_profiler.h"#include "adaptive_sampler.h"#include "glad/glad.h"#include "profiler.h"#include "utils.h"#include <stddef.h>Functions | |
| void | gpu_profiler_init (GPUProfiler *profiler) |
| Initializes the GPU profiler. More... | |
| void | gpu_profiler_cleanup (GPUProfiler *profiler) |
| Cleans up GPU resources. More... | |
| void | gpu_profiler_set_enabled (GPUProfiler *profiler, bool enabled) |
| Enables or disables the profiler. More... | |
| void | gpu_profiler_begin_frame (GPUProfiler *profiler, uint64_t frame_index) |
| Marks the beginning of a frame. Swaps buffers and processes previous results. More... | |
| void | gpu_profiler_start_stage (GPUProfiler *profiler, const char *name, uint32_t color) |
| Starts a new profiling stage. More... | |
| void | gpu_profiler_end_stage (GPUProfiler *profiler) |
| Ends the current profiling stage. More... | |
| void | gpu_profiler_reset_samplers (GPUProfiler *profiler, double current_time) |
| Resets all samplers for a new capture window. More... | |
Variables | |
| static const float | SAMPLER_WINDOW_DURATION = GPU_PROFILER_WINDOW_DURATION_S |
| static const size_t | SAMPLER_TARGET_SAMPLES = 120 |
| static const float | SAMPLER_INITIAL_GUESS_FPS = 60.0F |
| static const double | NS_TO_MS = 1.0 / 1000000.0 |
| void gpu_profiler_begin_frame | ( | GPUProfiler * | profiler, |
| uint64_t | frame_index | ||
| ) |
Marks the beginning of a frame. Swaps buffers and processes previous results.
| profiler | Pointer to the profiler. |
| frame_index | The current frame index. |
| void gpu_profiler_cleanup | ( | GPUProfiler * | profiler | ) |
Cleans up GPU resources.
| profiler | Pointer to the profiler. |
| void gpu_profiler_end_stage | ( | GPUProfiler * | profiler | ) |
Ends the current profiling stage.
| profiler | Pointer to the profiler. |
| void gpu_profiler_init | ( | GPUProfiler * | profiler | ) |
Initializes the GPU profiler.
| profiler | Pointer to the profiler. |
| void gpu_profiler_reset_samplers | ( | GPUProfiler * | profiler, |
| double | current_time | ||
| ) |
Resets all samplers for a new capture window.
| void gpu_profiler_set_enabled | ( | GPUProfiler * | profiler, |
| bool | enabled | ||
| ) |
Enables or disables the profiler.
| profiler | Pointer to the profiler. |
| enabled | Whether to enable profiling. |
| void gpu_profiler_start_stage | ( | GPUProfiler * | profiler, |
| const char * | name, | ||
| uint32_t | color | ||
| ) |
Starts a new profiling stage.
| profiler | Pointer to the profiler. |
| name | Name of the stage (must be persistent or copied). |
| color | Hex color for visualization (e.g., 0xFF0000). |
|
static |
|
static |
|
static |
|
static |