summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/hud
Commit message (Collapse)AuthorAgeFilesLines
* gallium/hud: protect against and initialization raceSteven Toth2016-11-144-8/+41
| | | | | | | | | | In the event that multiple threads attempt to install a graph concurrently, protect the shared list. Signed-off-by: Steven Toth <stoth@kernellabs.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (cherry picked from commit 381edca826ee27b1a49f19b0731c777bdf241b20)
* gallium/hud: close a previously opened handleSteven Toth2016-11-143-1/+6
| | | | | | | | | We're missing the closedir() to the matching opendir(). Signed-off-by: Steven Toth <stoth@kernellabs.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (cherry picked from commit 5a58323064b32442e2de23c95642bc421be696f8)
* gallium/hud: fix a problem where objects are free'd while in use.Steven Toth2016-11-144-55/+0
| | | | | | | | | | | | | | | Instead of trying to maintain a reference counted list of valid HUD objects, and freeing them accordingly, creating race conditions between unanticipated multiple threads, simply accept they're allocated once and never released until the process terminates. They're a shared resource between multiple threads, so accept they're always available for use. Signed-off-by: Steven Toth <stoth@kernellabs.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (cherry picked from commit 6ffed086795aaa84ab35668bb59d712cdde34da3)
* gallium/hud: Remove superfluous debugSteven Toth2016-10-064-52/+0
| | | | | | | No longer required. Signed-off-by: Steven Toth <stoth@kernellabs.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* gallium/hud: Add support for CPU frequency monitoringSteven Toth2016-09-303-0/+285
| | | | | | | | Detect all of the CPUs in the system. Expose metrics for min, max and current frequency in Hz. Signed-off-by: Steven Toth <stoth@kernellabs.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* 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 <brianp@vmware.com>
* gallium/hud: Add power sensor supportSteven Toth2016-09-293-5/+44
| | | | | | | | | | | | | 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 <stoth@kernellabs.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium/hud: Add support for block I/O, network I/O and lmsensor statsSteven Toth2016-09-285-0/+1255
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <stoth@kernellabs.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* 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 <marek.olsak@amd.com>
* gallium/hud: round max_value to print nicely rounded numbers next to graphsMarek Olšák2016-08-223-4/+80
| | | | | | This improves readability a lot. Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium/hud: generalize code for drawing numbers next to graphsMarek Olšák2016-08-221-5/+8
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium/hud: draw numbers with 3 decimal places if those aren't 0Marek Olšák2016-08-221-5/+12
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* gallium/hud: use sRGB for nicer AA linesMarek Olšák2016-08-221-0/+21
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* 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 <brianp@vmware.com>
* gallium/hud: don't enable blending for all objectsMarek Olšák2016-08-221-2/+7
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* 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 <robclark@freedesktop.org> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* hud: s/Elements/ARRAY_SIZE/Brian Paul2016-04-273-7/+7
| | | | Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* gallium: pause queries for all meta opsMarek Olšák2016-04-121-0/+1
| | | | | Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
* hud: add sampler view declaration in text fragment shaderBrian Paul2016-03-211-0/+1
| | | | | Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Charmaine Lee <charmainel@vmware.com>
* gallium/hud: fix new gcc6 warningsRob Clark2016-02-181-0/+2
| | | | | | | | | | | | src/gallium/auxiliary/hud/font.c:234:22: warning: ‘Fixed8x13_Character_159’ defined but not used [-Wunused-const-variable] static const GLubyte Fixed8x13_Character_159[] = { 9, 0, 0, 0, 0, 0, 0,170, 0, 0, 0,130, 0, 0, 0,130, 0, 0, 0,130, 0, 0, 0,170, 0, 0, 0, 0, 0}; ^~~~~~~~~~~~~~~~~~~~~~~ .... many more.. These are simply unused, just #if 0 them out for now, in case someone wants to use them in the future. Signed-off-by: Rob Clark <robdclark@gmail.com>
* gallium/hud: use new cso_save/restore_state() functionsBrian Paul2016-02-161-37/+19
| | | | Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* u_upload_mgr: allow specifying PIPE_USAGE_* for the upload bufferMarek Olšák2016-01-021-1/+1
| | | | Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
* u_upload_mgr: remove alignment parameter from u_upload_createMarek Olšák2016-01-021-1/+1
| | | | Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
* 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 <nicolai.haehnle@amd.com>
* 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 <marek.olsak@amd.com>
* gallium/hud: add support for batch queriesNicolai Hähnle2015-11-203-46/+261
| | | | | | | v2 + v3: be more defensive about allocations Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
* gallium/hud: remove unused field in query_infoNicolai Hähnle2015-11-201-1/+0
| | | | | Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
* hud: fix Windows build breakBrian Paul2015-11-191-0/+6
| | | | | | Protect signal-related code with PIPE_OS_UNIX test. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* 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 <marek.olsak@amd.com>
* gallium/hud: add cpu graph support for WindowsBrian Paul2015-11-121-0/+54
| | | | | | | | | | We support "cpu" but not "cpu#" because there's no good way of querying per-cpu usage. Also, the cpu usage is for the process, not the whole system. Original code cobbled together by Brian and then fixed/polished by Jose. Signed-off-by: Brian Paul <brianp@vmware.com>
* 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 <samuel.pitoiset@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* gallium/hud: fix printing % next to panesMarek Olšák2015-08-061-1/+1
| | | | | | Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* gallium/hud: replace assertions with clamping the unit indexMarek Olšák2015-08-061-19/+23
| | | | | | Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* gallium,hud: allow displaying cumulative values instead of averageMarek Olšák2015-08-063-8/+26
| | | | | | | | | The cumulative value is useful for queries like the number of shader compilations. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* gallium/hud: fix printing byte unitsMarek Olšák2015-08-061-1/+1
| | | | | | Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* gallium,hud: add support for Hz units in driver queriesMarek Olšák2015-08-061-0/+6
| | | | | | Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* cso: only allow saving and restoring fragment sampler statesMarek Olšák2015-07-221-2/+2
|
* cso: only allow saving and restoring fragment sampler viewsMarek Olšák2015-07-221-2/+2
| | | | Not needed for other shader stages.
* gallium/hud: display percentages with % suffixBrian Paul2015-07-071-0/+3
| | | | Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* gallium/hud: add PIPE_DRIVER_QUERY_TYPE_MICROSECONDS for HUDBrian Paul2015-07-071-5/+20
| | | | | | | | This allows drivers to report queries in units of microseconds and have the HUD display "us" (microseconds), "ms" (milliseconds) or "s" (seconds) on the graph. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* gallium/hud: replace byte units flag with pipe_driver_query_typeBrian Paul2015-07-073-16/+18
| | | | | | | Instead of using a boolean 'is bytes' value, use the pipe_driver_query_type enum type. This will let is add support for time values in the next patch. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* gallium/hud: prevent NULL pointer dereference with pipe_query functionsSamuel Pitoiset2015-06-281-6/+8
| | | | | | | | The HUD doesn't check if query_create() fails and it calls other pipe_query functions with NULL pointer instead of a valid query object. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* gallium: disable tessellation shaders for meta opsMarek Olšák2015-05-161-0/+6
| | | | | Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
* util: Move gallium's linked list to utilJason Ekstrand2015-05-081-1/+1
| | | | | | | | | The linked list in gallium is pretty much the kernel list and we would like to have a C-based linked list for all of mesa. Let's not duplicate and just steal the gallium one. Acked-by: Connor Abbott <cwabbott0@gmail.com> Reviewed-by: Rob Clark <robclark@freedesktop.org>
* gallium: replace pipe_driver_query_info::max_value by a unionSamuel Pitoiset2015-05-061-1/+2
| | | | | | | | This allows queries to return different numeric types. Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Martin Peres <martin.peres@free.fr>
* gallium: add new fields to pipe_driver_query_infoSamuel Pitoiset2015-05-061-1/+3
| | | | | | | | | | | | | | According to the spec of GL_AMD_performance_monitor, valid type values returned are UNSIGNED_INT, UNSIGNED_INT64_AMD, PERCENTAGE_AMD, FLOAT. This also introduces the new field group_id in order to categorize queries into groups. v2: add PIPE_DRIVER_QUERY_TYPE_BYTES v3: fix incorrect query type for radeon and svga drivers Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Martin Peres <martin.peres@free.fr>
* gallium/hud: add more options to customize HUD panesGediminas Jakutis2015-04-262-6/+161
| | | | | | | | | | | | | | | | Extends the syntax of GALLIUM_HUD environment variable to: - Add options to set the size and exact location of each pane. - Add an option to limit the maximum allowed value of the X axis on a pane, clamping the graph down to not go above this value. - Add an option to auto-adjust the value of the Y axis down to the highest value still visible on the graph. v2: - Make the patch simpler and smaller. - With dynamic auto-adjusting on, adjust the Y axis once per pane update instead of updating once every several seconds. - No longer mishandle pane height when having more than one graph per pane.
* gallium/hud: avoid overflowing hud graph name sizeIlia Mirkin2015-03-261-1/+2
| | | | | | | Spotted by Coverity. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* gallium/hud: also try R8_UNORM format for font textureBrian Paul2015-02-071-9/+15
| | | | | | | Convert the code to try formats from an array rather than a bunch of if/else cases. Reviewed-by: Marek Olšák <marek.olsak@amd.com>