aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/hud/hud_context.c
Commit message (Collapse)AuthorAgeFilesLines
* 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/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-181-2/+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-141-0/+3
| | | | 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]>
* 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-161-0/+10
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: increase the vertex buffer size for background quadsMarek Olšák2017-01-161-1/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: increase the vertex buffer size for textMarek Olšák2017-01-051-1/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: add an option to sort items below graphsMarek Olšák2017-01-051-5/+32
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: add an option to reset the color counterMarek Olšák2017-01-051-3/+18
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: allow more data sources per paneMarek Olšák2017-01-051-13/+15
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: add an option to rename each data sourceMarek Olšák2017-01-051-2/+35
| | | | | | | | useful for radeonsi performance counters v2: allow specifying both : and = Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: add a path separator between dump directory and filenameEdmondo Tommasina2017-01-031-1/+2
| | | | | | | It's more user friendly and it avoids to write files in unexpected places. Signed-off-by: Marek Olšák <[email protected]>
* gallium/hud: fix the windows build by disabling file dumpingMarek Olšák2017-01-021-0/+2
|
* gallium/hud: move file initialization to a functionEdmondo Tommasina2017-01-011-0/+17
| | | | | | | The function will be used later to create the filedescriptor for other metrics. Signed-off-by: Marek Olšák <[email protected]>
* gallium/hud: dump hud_driver_query values to filesEdmondo Tommasina2017-01-011-0/+6
| | | | | | | | | | | | | | Dump values for every selected data source in GALLIUM_HUD. Every data source has its own file and the filename is equal to the data source identifier. Set GALLIUM_HUD_DUMP_DIR to dump values to files in this directory. No values are dumped if the environment variable is not set, the directory doesn't exist or the user doesn't have write access. Signed-off-by: Marek Olšák <[email protected]>
* gallium/hud: call fflush() after printing error messagesBrian Paul2016-11-031-1/+9
| | | | | | For Windows. Otherwise, we don't see the message until the program exits. Reviewed-by: Charmaine Lee <[email protected]>
* gallium/hud: Add support for CPU frequency monitoringSteven Toth2016-09-301-0/+13
| | | | | | | | Detect all of the CPUs in the system. Expose metrics for min, max and current frequency in Hz. Signed-off-by: Steven Toth <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* Revert "gallium/hud: automatically print % if max_value == 100"Marek Olšák2016-09-301-12/+6
| | | | | | | | This reverts commit dbfeb0ec12d6550e68de1bcd164e422e79bccf2d. With max_value being rounded to 100, it's often wrong. Reviewed-by: Brian Paul <[email protected]>
* gallium/hud: Add power sensor supportSteven Toth2016-09-291-0/+10
| | | | | | | | | | | | | Implement support for power based sensors, reporting units in milli-watts and watts. Also, minor cleanup - change the related if block to a switch. Tested with two different power sensors, including the nouveau 'power1' sensors on a GTX950 card. Signed-off-by: Steven Toth <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/hud: Add support for block I/O, network I/O and lmsensor statsSteven Toth2016-09-281-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | V8: Feedback based on peer review convert if block into a switch Constify some func args V7: Increase precision when measuring lmsensors volts Flatten patch series. V6: Feedback based on peer review Simplify sensor initialization (arg passing). Constify some func args V5: Feedback based on peer review Convert sprintf to snprintf Convert char * to const char * int arg converted to bool Func changes to take a filename vs a larger struct. Omit the space between '*' and the param name. V4: Merged with master as of 2016/9/27 6pm V3: Flatten the entire patchset ready for the ML V2: Additional seperate patches based on feedback a) configure.ac: Add a comment related to libsensors b) HUD: Disable Block/NIC I/O stats by default. Implement configuration option --enable-gallium-extra-hud=yes and enable both statistics when this option is enabled. c) Configure.ac: Minor cleanup to user visible configuration settings d) Configure.ac: HUD stats - build system improvements Move the -lsensors out of a deeper Makefile, bring it into the configure.ac. Also, rename a compiler directive to more closely follow the standard. V1: Initial release to the ML Three new features: 1. Disk/block I/O device read/write stats MB/ps. 2. Network Interface RX/TX transfer statistics as a percentage of the overall NIC speed. 3. lmsensor power, voltage and temperature sensors. The lmsensor changes makes a dependency on libsensors so support for the change is opt out by default. Signed-off-by: Steven Toth <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/hud: move signo declaration inside PIPE_OS_UNIX blockBrian Paul2016-08-261-1/+1
| | | | | | To silence unused var warning with MSVC, MinGW. Reviewed-by: Marek Olšák <[email protected]>
* gallium/hud: round max_value to print nicely rounded numbers next to graphsMarek Olšák2016-08-221-3/+77
| | | | | | This improves readability a lot. Reviewed-by: Brian Paul <[email protected]>
* gallium/hud: generalize code for drawing numbers next to graphsMarek Olšák2016-08-221-5/+8
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/hud: draw numbers with 3 decimal places if those aren't 0Marek Olšák2016-08-221-5/+12
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/hud: use sRGB for nicer AA linesMarek Olšák2016-08-221-0/+21
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium/hud: use AA lines for graphsMarek Olšák2016-08-221-1/+5
| | | | | | this looks a lot better (with the next patch) Reviewed-by: Brian Paul <[email protected]>
* gallium/hud: don't enable blending for all objectsMarek Olšák2016-08-221-2/+7
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium: refactor pipe_shader_state to support multiple IR'sRob Clark2016-05-111-5/+4
| | | | | | | | | | | | | | | | The goal is to allow the pipe driver to request something other than TGSI, but detect whether what is getting is TGSI vs what it requested. The pipe drivers will always have to support TGSI (and convert that into whatever it is that they prefer), but in some cases we should be able to skip the TGSI intermediate step (such as glsl->nir vs glsl->tgsi->nir). I think pipe_compute_state should get similar treatment. Currently, afaict, it has one user and one consumer, which has allowed it to be sloppy wrt. supporting alternative IR's. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* hud: s/Elements/ARRAY_SIZE/Brian Paul2016-04-271-5/+5
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* gallium: pause queries for all meta opsMarek Olšák2016-04-121-0/+1
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* hud: add sampler view declaration in text fragment shaderBrian Paul2016-03-211-0/+1
| | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* gallium/hud: use new cso_save/restore_state() functionsBrian Paul2016-02-161-37/+19
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* u_upload_mgr: allow specifying PIPE_USAGE_* for the upload bufferMarek Olšák2016-01-021-1/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* u_upload_mgr: remove alignment parameter from u_upload_createMarek Olšák2016-01-021-1/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* u_upload_mgr: pass alignment to u_upload_alloc manuallyMarek Olšák2016-01-021-1/+1
| | | | | | | | | | The fixed alignment of u_upload_mgr will go away. This is the first step. The motivation is that one u_upload_mgr can have multiple users, each allocating from the same buffer, but requiring a different alignment. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: add PIPE_DRIVER_QUERY_FLAG_DONT_LISTNicolai Hähnle2015-11-261-1/+9
| | | | | | | This allows the driver to give a hint to the HUD so that GALLIUM_HUD=help is less spammy. Reviewed-by: Marek Olšák <[email protected]>
* gallium/hud: add support for batch queriesNicolai Hähnle2015-11-201-7/+17
| | | | | | | v2 + v3: be more defensive about allocations Reviewed-by: Samuel Pitoiset <[email protected]> Tested-by: Samuel Pitoiset <[email protected]>
* hud: fix Windows build breakBrian Paul2015-11-191-0/+6
| | | | | | Protect signal-related code with PIPE_OS_UNIX test. Reviewed-by: Jose Fonseca <[email protected]>
* gallium/hud: control visibility at startup and runtime.Jimmy Berry2015-11-191-0/+29
| | | | | | | - env GALLIUM_HUD_VISIBLE: control default visibility - env GALLIUM_HUD_SIGNAL_TOGGLE: toggle visibility via signal Signed-off-by: Marek Olšák <[email protected]>
* gallium/hud: fix possible NULL pointer dereferenceMarek Olšák2015-10-171-0/+3
| | | | Trivial.
* gallium/hud: automatically print % if max_value == 100Marek Olšák2015-08-061-6/+11
| | | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* gallium/hud: fix printing % next to panesMarek Olšák2015-08-061-1/+1
| | | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* gallium/hud: replace assertions with clamping the unit indexMarek Olšák2015-08-061-19/+23
| | | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* gallium,hud: allow displaying cumulative values instead of averageMarek Olšák2015-08-061-3/+6
| | | | | | | | | The cumulative value is useful for queries like the number of shader compilations. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>