summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/hud
Commit message (Collapse)AuthorAgeFilesLines
* gallium/hud: fix power sensor readings for amdgpu usersAndre Heider2018-10-301-0/+3
| | | | | | | | | | | | | | amdgpu doesn't use the INPUT but the AVERAGE subfeature: $ sensors -u amdgpu-pci-0100 Adapter: PCI adapter power1: power1_average: 17.233 power1_cap: 180.000 Signed-off-by: Andre Heider <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium: split depth_clip into depth_clip_near & depth_clip_farMarek Olšák2018-09-061-1/+2
| | | | for AMD_depth_clamp_separate.
* gallium: add storage_sample_count parameter into is_format_supportedMarek Olšák2018-07-312-2/+2
| | | | Tested-by: Dieter Nützel <[email protected]>
* gallium/hud: = should rename the last added data sourceMarek Olšák2018-06-181-1/+4
| | | | Tested-by: Dieter Nützel <[email protected]>
* gallium/hud: add frametime graph (v2)Matthias Groß2018-05-153-1/+38
| | | | | | | | | Thanks for your comment. This version has an additional boolean in the fps_info struct to distinguish between fps and frame time calculation. The struct is initialised in the respecting install functions for this purpose. Signed-off-by: Marek Olšák <[email protected]>
* gallium: remove aux_vertex_buffer_slot codeMarek Olšák2018-05-121-9/+5
| | | | | | The slot index is always 0, and is pretty unlikely to change in the future. Reviewed-by: Brian Paul <[email protected]>
* gallium/hud: add a simple HUD view that only draws textMarek Olšák2018-04-132-15/+60
| | | | | | | | | | | Add this prefix to the env var: "simple," For example: GALLIUM_HUD=simple,fps The X coordinates are the same, but the Y coordinates are different, because there is only text. '+' happens to behave the same as "\n". ',' happens to behave the same as "\n\n".
* gallium/aux/hud: Avoid possible buffer overflowGert Wollny2018-03-051-2/+6
| | | | | | | | | | Limit the length of acceptable cpu names for use in hud_get_num_cpufreq in order to avoid a buffer overflow later in add_object when this name is copied into cpufreq_info::name. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105274 Signed-off-by: Gert Wollny <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium/hud: update some query functionsGrazvydas Ignotas2018-02-084-4/+4
| | | | | | | | It seems these were missed when struct pipe_context * argument was added to hud_graph::query_new_value. Fixes: 3132afdf4c "gallium/hud: pass pipe_context explicitly to most functions" Reviewed-by: Marek Olšák <[email protected]>
* gallium/hud: Fix support for PIPE_DRIVER_QUERY_TYPE_FLOATBrian Paul2018-01-172-3/+29
| | | | | | | | | | | | | | | Evidently, nobody has used PIPE_DRIVER_QUERY_TYPE_FLOAT up to this point. Adding a driver query of this type which returns the query value in pipe_query_result::f resulted in garbage output in the HUD. The problem is the pipe_query_result::f field was being accessed as through the u64 field and being added to the query_info::results_cumulative field. This patch checks for PIPE_DRIVER_QUERY_TYPE_FLOAT in a few places and scales the float by 1000 before converting to uint64_t. Also, add some comments to explain the query_info::result_index field. Reviewed-by: Marek Olšák <[email protected]>
* gallium/hud: remove uint64_t casts in sensor query_sti_load() functionBrian Paul2018-01-171-5/+5
| | | | | | | The hud_graph_add_value() function takes a double value, so just pass the current/critical values as-is since they're doubles. Reviewed-by: Marek Olšák <[email protected]>
* gallium/hud: compute cpu load, percent with doublesBrian Paul2018-01-171-4/+5
| | | | | | | The hud_graph_add_value() function takes a double precision value, so compute it that way. Reviewed-by: Marek Olšák <[email protected]>
* gallium/hud: s/unsigned/enum pipe_query_type/Brian Paul2018-01-172-3/+5
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium/hud: use #ifdef to test for macro existenceEric Engestrom2017-12-016-11/+11
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: add HUD sharing within a context share groupMarek Olšák2017-11-253-12/+96
| | | | | | | This is needed for profiling multi-context applications like Chrome. One context can record queries and another context can draw the HUD. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: update the HUD interface for multiple contextsMarek Olšák2017-11-252-6/+8
| | | | | | | This is the boring subset of the following commit. All new parameters are optional. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: prevent a crash if the recording context is inactiveMarek Olšák2017-11-251-1/+4
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: separate code for record context init/releaseMarek Olšák2017-11-252-16/+37
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: separate code for draw context init/releaseMarek Olšák2017-11-251-70/+111
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: don't use hud->pipe in hud_parse_env_varMarek Olšák2017-11-251-6/+7
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: use cso_get_pipe_contextMarek Olšák2017-11-252-3/+4
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: pass pipe_context explicitly to most functionsMarek Olšák2017-11-255-64/+57
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: split hud_draw into 3 separate functionsMarek Olšák2017-11-252-75/+95
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* util: move os_time.[ch] to src/utilNicolai Hähnle2017-11-097-7/+7
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium/hud: always use two-dimensional constant referencesNicolai Hähnle2017-09-041-4/+4
| | | | | | Acked-by: Roland Scheidegger <[email protected]> Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* gallium/hud: use double values for all graphsChristoph Haag2017-07-143-8/+14
| | | | | | | | | | | | | | | The fps graph for example calculates the fps as double with small variations based on when query_new_value() is called, which causes many values to be truncated on the cast to uint64_t. The HUD internally stores the values as double, so just use double everywhere instead of fixing this with rounding. Using doubles also allows the hud to show small variations instead of being clamped to discrete values. v2: Don't print decimals in the dump file when not necessary Signed-off-by: Christoph Haag <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium/hud: add glthread countersMarek Olšák2017-06-263-0/+91
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* gallium/hud: add API-thread-busy for monitoring the thread loadMarek Olšák2017-06-263-4/+22
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* gallium/hud: add hud_pane::hud pointerMarek Olšák2017-06-262-3/+6
| | | | | | for later use Reviewed-by: Timothy Arceri <[email protected]>
* mesa/glthread: add glthread "perf" counters and pass them to gallium HUDMarek Olšák2017-06-263-0/+15
| | | | | | | | | | | for HUD integration in following commits. This valuable profiling data will allow us to see on the HUD how well glthread is able to utilize parallelism. This is better than benchmarking, because you can see exactly what's happening and you don't have to be CPU-bound. u_threaded_context has the same counters. Reviewed-by: Timothy Arceri <[email protected]>
* gallium/hud: move struct hud_context to hud_private.hMarek Olšák2017-06-262-46/+48
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* gallium/hud: rename API-thread-busy to main-thread-busyMarek Olšák2017-06-263-5/+5
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* gallium/hud: support GALLIUM_HUD_DUMP_DIR feature on WindowsBrian Paul2017-06-161-6/+30
| | | | | | | Use a dummy implementation of the access() function. Use \ path separator. Add a few comments. Reviewed-by: Neha Bhende <[email protected]>
* gallium: decrease the size of pipe_vertex_buffer - 24 -> 16 bytesMarek Olšák2017-05-101-7/+7
|
* gallium/hud: set the dump file streams to line bufferedEdmondo Tommasina2017-04-131-0/+2
| | | | | | | | Flush the HUD value streams to the dump files after every newline. v2: check that fopen succeeded (Julien) Reviewed-and-Tested-by: Julien Isorce <[email protected]>
* gallium/hud: check NULL return from u_upload_allocJulien Isorce2017-03-131-0/+5
| | | | | | | | | | | | | | | | | | | | Fixes the following segmentation fault: signal SIGSEGV: invalid address (fault address: 0x0) frame #0: 0x00007fffe718e117 radeonsi_dri.so hud_draw_background_quad hud_context.c:170 167 168 assert(hud->bg.num_vertices + 4 <= hud->bg.max_num_vertices); 169 -> 170 vertices[num++] = (float) x1; 171 vertices[num++] = (float) y1; 172 173 vertices[num++] = (float) x1; (lldb) bt * frame #0: 0x00007fffe718e117 radeonsi_dri.so`hud_draw_background_quad frame #1: 0x00007fffe718f458 radeonsi_dri.so`hud_draw frame #2: 0x00007fffe712967f radeonsi_dri.so`dri_flush Signed-off-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_mutex_unlock() with mtx_unlock()Timothy Arceri2017-03-074-13/+13
| | | | | | | | | | pipe_mutex_unlock() was made unnecessary with fd33a6bcd7f12. Replaced using: find ./src -type f -exec sed -i -- \ 's:pipe_mutex_unlock(\([^)]*\)):mtx_unlock(\&\1):g' {} \; Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_mutex_lock() with mtx_lock()Timothy Arceri2017-03-074-4/+4
| | | | | | | | | | replace pipe_mutex_lock() was made unnecessary with fd33a6bcd7f12. Replaced using: find ./src -type f -exec sed -i -- \ 's:pipe_mutex_lock(\([^)]*\)):mtx_lock(\&\1):g' {} \; Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: remove pipe_static_mutex()Timothy Arceri2017-03-074-4/+4
| | | | | | This was made unnecessary with fd33a6bcd7f12. Reviewed-by: Marek Olšák <[email protected]>
* gallium/hud: handle a thread switch for API-thread-busy monitoringMarek Olšák2017-02-221-4/+10
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: prevent an infinite loopMarek Olšák2017-02-221-2/+3
| | | | | | v2: use UINT64_MAX / 11 Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: create files after graphs are created to get final namesMarek Olšák2017-02-185-12/+23
| | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Edmondo Tommasina <[email protected]>
* gallium/hud: add monitoring of API thread busy statusMarek Olšák2017-02-143-0/+64
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: don't use user vertex buffersMarek Olšák2017-02-141-7/+19
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: call u_upload_alloc only onceMarek Olšák2017-02-141-8/+29
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: use the common uploaderMarek Olšák2017-02-141-9/+2
| | | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Tested-by: Edmondo Tommasina <[email protected]> Tested-by: Charmaine Lee <[email protected]>
* hud: fix compilation warnings in hud_nic_graph_install()Samuel Pitoiset2017-01-301-2/+2
| | | | | | | v2: use PRId64 instead of PRIx64 Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/hud: add missing break in hud_cpufreq_graph_install()Samuel Pitoiset2017-01-201-0/+1
| | | | | | | Fixes: e99b9395bef "gallium/hud: Add support for CPU frequency monitoring" Cc: [email protected] Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/hud: avoid buffer overrunThomas Hindoe Paaboel Andersen2017-01-161-2/+4
| | | | | | | | | | | | Renaming data sources was added in e8bb97ce30051b999a4a69c9b27884daeb8d71e6 It was possible to use a new name longer than the name array in hud_graph of 128. This patch truncates the name to fit the array. CC: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium/hud: disable queries during HUD draw callsMarek Olšák2017-01-163-1/+29
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>