#include "pipe/p_state.h"
#include "util/list.h"
#include "hud/font.h"
+#include "cso_cache/cso_context.h"
enum hud_counter {
HUD_COUNTER_OFFLOADED,
};
struct hud_context {
+ int refcount;
+ bool simple;
+
+ /* Context where queries are executed. */
+ struct pipe_context *record_pipe;
+
+ /* Context where the HUD is drawn: */
struct pipe_context *pipe;
struct cso_context *cso;
void *fs_color, *fs_text;
struct pipe_rasterizer_state rasterizer, rasterizer_aa_lines;
void *vs;
- struct pipe_vertex_element velems[2];
+ struct cso_velems_state velems;
/* font */
struct util_font font;
struct hud_pane {
struct list_head head;
struct hud_context *hud;
- unsigned x1, y1, x2, y2;
+ unsigned x1, y1, x2, y2, y_simple;
unsigned inner_x1;
unsigned inner_y1;
unsigned inner_x2;
int hud_get_num_cpus(void);
void hud_fps_graph_install(struct hud_pane *pane);
+void hud_frametime_graph_install(struct hud_pane *pane);
void hud_cpu_graph_install(struct hud_pane *pane, unsigned cpu_index);
void hud_thread_busy_install(struct hud_pane *pane, const char *name, bool main);
void hud_thread_counter_install(struct hud_pane *pane, const char *name,
enum hud_counter counter);
void hud_pipe_query_install(struct hud_batch_query_context **pbq,
struct hud_pane *pane,
- const char *name, unsigned query_type,
+ const char *name,
+ enum pipe_query_type query_type,
unsigned result_index,
uint64_t max_value,
enum pipe_driver_query_type type,
void hud_batch_query_cleanup(struct hud_batch_query_context **pbq,
struct pipe_context *pipe);
-#if HAVE_GALLIUM_EXTRA_HUD
+#ifdef HAVE_GALLIUM_EXTRA_HUD
int hud_get_num_nics(bool displayhelp);
#define NIC_DIRECTION_RX 1
#define NIC_DIRECTION_TX 2
void hud_cpufreq_graph_install(struct hud_pane *pane, int cpu_index, unsigned int mode);
#endif
-#if HAVE_LIBSENSORS
+#ifdef HAVE_LIBSENSORS
int hud_get_num_sensors(bool displayhelp);
#define SENSORS_TEMP_CURRENT 1
#define SENSORS_TEMP_CRITICAL 2