aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/xmlconfig.c
Commit message (Collapse)AuthorAgeFilesLines
* util/xmlconfig: fix sha1 comparison codePierre-Eric Pelloux-Prayer2020-04-031-4/+5
| | | | | | | | Fixes: 8f48e7b1e99 ("util/xmlconfig: add new sha1 application attribute") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2730 Reviewed-by: Dave Airlie <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4426> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4426>
* util/xmlconfig: add new sha1 application attributePierre-Eric Pelloux-Prayer2020-03-241-1/+28
| | | | | | | | | | This is useful to enable workarounds for applications with a generic name. For instance all games made with the YoYo game engine have the same executable name "runner". Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4181>
* util/driconfig: print ATTENTION if MESA_DEBUG=silent is not setMarek Olšák2019-11-281-7/+22
| | | | | | unix-bytebenchmark refuses to run if the driver prints ATTENTION to stderr. Acked-by: Eric Engestrom <[email protected]>
* util/xmlconfig: include strndup.h for windowsDylan Baker2019-10-101-0/+1
| | | | | Reviewed-by: Eric Engestrom <[email protected]> Acked-by: Kristian H. Kristensen <[email protected]>
* util/xmlconfig: fix regexp compile failure checkLionel Landwerlin2019-09-161-1/+1
| | | | | | | | This is embarrasing... Signed-off-by: Lionel Landwerlin <[email protected]> Fixes: 04dc6074cf ("driconfig: add a new engine name/version parameter") Reviewed-by: Eric Engestrom <[email protected]>
* driconfig: add a new engine name/version parameterLionel Landwerlin2019-09-151-3/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Vulkan applications can register with the following structure : typedef struct VkApplicationInfo { VkStructureType sType; const void* pNext; const char* pApplicationName; uint32_t applicationVersion; const char* pEngineName; uint32_t engineVersion; uint32_t apiVersion; } VkApplicationInfo; This enables the Vulkan implementations to apply workarounds based off matching this description. Here we add a new parameter for matching the driconfig options with the following : <device driver="anv"> <application engine_name_match="MyOwnEngine.*" engine_versions="10:12,40:42"> <option name="blaaah" value="true" /> </application> </device> v2: switch engine name match to use regexps v3: Verify that the regexec returns REG_NOMATCH for match failure (Eric) v4: Add missing bit that went to the following commit (Eric) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: 19.2 <[email protected]>
* xmlconfig: add missing #includeEric Engestrom2019-06-271-0/+3
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* util: #define PATH_MAX when undefined (eg. Hurd)Eric Engestrom2019-03-051-0/+4
| | | | | | | Cc: Timo Aaltonen <[email protected]> Cc: James Clarke <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* util: Make xmlconfig.c build on Solaris without d_type in dirent (v2)Alan Coopersmith2018-10-051-0/+8
| | | | | | | | | v2: check for lstat() failing Fixes: 04bdbbcab3c "xmlconfig: read more config files from drirc.d/" Signed-off-by: Alan Coopersmith <[email protected]> Reviewed-by: Roland Mainz <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* xmlconfig: add kernel_driver device attributeQiang Yu2018-08-171-2/+8
| | | | | | | | | This attribute can be used by loader to apply different option to device use specific kernel driver. Signed-off-by: Qiang Yu <[email protected]> Acked-by: Michel Dänzer <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* xmlconfig: read more config files from drirc.d/Qiang Yu2018-08-171-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | Driver and application can put their drirc files in ${datadir}/drirc.d/ with name xxx.conf. Config files will be read and applied in file name alphabetic order. So there are three places for drirc listed in order: 1. /usr/share/drirc.d/ 2. /etc/drirc 3. ~/.drirc v4: fix meson build v3: 1. seperate driParseConfigFiles refine into another patch 2. fix entries[i] mem leak v2: drop /etc/drirc.d Signed-off-by: Qiang Yu <[email protected]> Acked-by: Michel Dänzer <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* xmlconfig: refine driParseConfigFiles to use parseOneConfigFileEmil Velikov2018-08-171-34/+29
| | | | | | | | | | Also prepare for the usage of following parseConfigDir patch. Signed-off-by: Qiang Yu <[email protected]> Acked-by: Michel Dänzer <[email protected]> Reviewed-by: Emil Velikov <[email protected]> [Emil: add #include <limits.h>] Signed-off-by: Emil Velikov <[email protected]>
* util: move process.[ch] to u_process.[ch]Dylan Baker2018-08-011-1/+1
| | | | | | | | | | | | | On windows process.h is a system provided header, and it's required in include/c11/threads_win32.h. This header interferes with searching for that header, and results in windows build warnings with scons, but errors in meson which doesn't allow implicit function declarations. Just rename process to u_process, which follows the style of utils anyway. Fixes: 2e1e6511f76370870b5cde10caa9ca3b6d0dc65f ("util: extract get_process_name from xmlconfig.c") Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* util: extract get_process_name from xmlconfig.cMarek Olšák2018-07-041-84/+2
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* util: manually extract the program name from program_invocation_nameTimothy Arceri2018-06-191-1/+10
| | | | | | | | | | | | | | | Glibc has the same code to get program_invocation_short_name. However for some reason the short name gets mangled for some wine apps. For example with Google Earth VR I get: program_invocation_name: "/home/tarceri/.local/share/Steam/steamapps/common/EarthVR/Earth.exe" program_invocation_short_name: "e" Acked-by: Eric Engestrom <[email protected]>
* xmlconfig: use the portable __VA_ARGS__Emil Velikov2017-08-261-6/+6
| | | | | | | | | | | Follow the example used through mesa and use "..." + "__VA_ARGS__". The former tends to be more common and portable. v2: use ##__VA_ARGS__ (Eric) Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* xmlconfig: move into src/utilNicolai Hähnle2017-07-311-0/+1113
v2: attempt to fix Android build (Emil) v3: add missing include path Reviewed-by: Marek Olšák <[email protected]> (v1)