Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
Loading...
Searching...
No Matches
gpu_profiler_ui.c File Reference
#include "gpu_profiler_ui.h"
#include "adaptive_sampler.h"
#include "app_metrics.h"
#include "gpu_profiler.h"
#include "gpu_profiler_ui_layout.h"
#include "ui.h"
#include "utils.h"
#include <cglm/types.h>
#include <math.h>
#include <stdint.h>
#include <string.h>
Include dependency graph for gpu_profiler_ui.c:

Functions

static void hex_to_vec3 (uint32_t color, vec3 out)
 
static void gpu_profiler_ui_update_visibility (GPUProfilerUI *profiler_ui, float alpha_step)
 
static void gpu_stage_move (GPUStage *dest, GPUStage *src)
 Safely moves contents of one stage to another, avoiding shallow copies of heap-allocated buffers in AdaptiveSamplers.
 
static void gpu_profiler_ui_compact_stages (GPUProfilerUI *profiler_ui)
 
static void gpu_profiler_ui_sync_stage (GPUProfilerUI *profiler_ui, const GPUStage *live_stage, bool *display_updated)
 
void gpu_profiler_ui_init (GPUProfilerUI *profiler_ui)
 Initializes the GPU timeline UI state.
 
void gpu_profiler_ui_update (GPUProfilerUI *profiler_ui, GPUProfiler *live_profiler, double delta_time, double current_time, bool should_log_metrics)
 Updates animations and synchronizes data with the live profiler.
 
void gpu_profiler_ui_draw (GPUProfilerUI *profiler_ui, UIContext *ctx, int screen_width, int screen_height)
 Renders the GPU timeline using the provided UI context.
 
void gpu_profiler_ui_toggle_visibility (GPUProfilerUI *profiler_ui)
 Toggles the timeline visibility (with animation).
 
void gpu_profiler_ui_toggle_position (GPUProfilerUI *profiler_ui)
 Toggles the timeline position (Top/Bottom).
 
void gpu_profiler_ui_cleanup (GPUProfilerUI *profiler_ui)
 Cleans up GPU resources used by the UI.
 

Function Documentation

◆ gpu_profiler_ui_cleanup()

void gpu_profiler_ui_cleanup ( GPUProfilerUI *  profiler_ui)

Cleans up GPU resources used by the UI.

Here is the call graph for this function:

◆ gpu_profiler_ui_compact_stages()

static void gpu_profiler_ui_compact_stages ( GPUProfilerUI *  profiler_ui)
static
Here is the call graph for this function:

◆ gpu_profiler_ui_draw()

void gpu_profiler_ui_draw ( GPUProfilerUI *  profiler_ui,
UIContext *  ctx,
int  screen_width,
int  screen_height 
)

Renders the GPU timeline using the provided UI context.

Here is the call graph for this function:

◆ gpu_profiler_ui_init()

void gpu_profiler_ui_init ( GPUProfilerUI *  profiler_ui)

Initializes the GPU timeline UI state.

Here is the call graph for this function:

◆ gpu_profiler_ui_sync_stage()

static void gpu_profiler_ui_sync_stage ( GPUProfilerUI *  profiler_ui,
const GPUStage *  live_stage,
bool *  display_updated 
)
static
Here is the call graph for this function:

◆ gpu_profiler_ui_toggle_position()

void gpu_profiler_ui_toggle_position ( GPUProfilerUI *  profiler_ui)

Toggles the timeline position (Top/Bottom).

◆ gpu_profiler_ui_toggle_visibility()

void gpu_profiler_ui_toggle_visibility ( GPUProfilerUI *  profiler_ui)

Toggles the timeline visibility (with animation).

◆ gpu_profiler_ui_update()

void gpu_profiler_ui_update ( GPUProfilerUI *  profiler_ui,
GPUProfiler *  live_profiler,
double  delta_time,
double  current_time,
bool  should_log_metrics 
)

Updates animations and synchronizes data with the live profiler.

Here is the call graph for this function:

◆ gpu_profiler_ui_update_visibility()

static void gpu_profiler_ui_update_visibility ( GPUProfilerUI *  profiler_ui,
float  alpha_step 
)
static

◆ gpu_stage_move()

static void gpu_stage_move ( GPUStage *  dest,
GPUStage *  src 
)
static

Safely moves contents of one stage to another, avoiding shallow copies of heap-allocated buffers in AdaptiveSamplers.

Here is the call graph for this function:

◆ hex_to_vec3()

static void hex_to_vec3 ( uint32_t  color,
vec3  out 
)
static