aboutsummaryrefslogtreecommitdiffstats
path: root/src/util
Commit message (Collapse)AuthorAgeFilesLines
* radv,vulkan: add a new x11 wsi drirc workaround for DOOM EternalSamuel Pitoiset2020-07-022-0/+11
| | | | | | | | | | DOOM Eternal happily creates a swapchain with 2 images for IMMEDIATE. This fixes a 10% performance issue with RADV. Cc: 20.1 <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5704>
* gallium,util: undef ALIGN on FreeBSD to prevent name clashGreg V2020-07-011-0/+4
| | | | | | | | Some rare headers like ipc/shm and pthread_np cause machine/param.h to be included which defines a macro called ALIGN. Signed-off-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3559>
* driconf: add workarounds for SPECviewperf13Marek Olšák2020-06-231-0/+11
| | | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5459>
* glsl,driconf: add allow_glsl_120_subset_in_110 for SPECviewperf13Marek Olšák2020-06-231-0/+5
| | | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5459>
* util: rename xmlpool.h to driconf.hEric Engestrom2020-06-222-4/+4
| | | | | | | To make it clearer what it is and does. Signed-off-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5440>
* driconf: drop now unused translation facilityEric Engestrom2020-06-2211-788/+400
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5440>
* driconf: drop 9% swedish translationEric Engestrom2020-06-224-287/+3
| | | | | | | | Only 7 of the 72 strings are translated, and there doesn't seem to be any effort to keep it updated. Signed-off-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5440>
* driconf: drop 8% dutch translationEric Engestrom2020-06-224-280/+3
| | | | | | | | Only 6 of the 72 strings are translated, and there doesn't seem to be any effort to keep it updated. Signed-off-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5440>
* driconf: drop 6% french translationEric Engestrom2020-06-224-275/+3
| | | | | | | | Only 4 of the 72 strings are translated, and there doesn't seem to be any effort to keep it updated. Signed-off-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5440>
* driconf: drop 26% spanish translationEric Engestrom2020-06-224-280/+3
| | | | | | | | Only 19 of the 72 strings are translated, and there doesn't seem to be any effort to keep it updated. Signed-off-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5440>
* driconf: drop 15% german translationEric Engestrom2020-06-224-282/+3
| | | | | | | | Only 11 of the 72 strings are translated, and there doesn't seem to be any effort to keep it updated. Signed-off-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5440>
* driconf: drop 28% catalan translationEric Engestrom2020-06-223-293/+2
| | | | | | | | Only 20 of the 72 strings are translated, and there doesn't seem to be any effort to keep it updated. Signed-off-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5440>
* radv: enable radv_no_dynamic_bounds for more Path of Exile executablesRhys Perry2020-06-201-1/+10
| | | | | | | | | It looks like there's also a standalone version and a 32-bit version. Signed-off-by: Rhys Perry <[email protected]> Cc: <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5574>
* radv: enable radv_no_dynamic_bounds for Path of ExileRhys Perry2020-06-191-0/+4
| | | | | | | | | | | | | To workaround game bugs. This also enables it for the D3D11 renderer but that shouldn't be an issue. Signed-off-by: Rhys Perry <[email protected]> Cc: <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3081 Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3084 Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3080 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5569>
* radv: add new drirc option radv_no_dynamic_boundsRhys Perry2020-06-191-0/+5
| | | | | | | Signed-off-by: Rhys Perry <[email protected]> Cc: <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5569>
* virgl: apply bgra dest swizzle and add Portal 2Gurchetan Singh2020-06-181-0/+7
| | | | | | | | | Apply the destination swizzle on GLES games based on HL2 engine. Also add Portal 2 since some people are experiencing issues with that. Reviewed-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5481>
* util: introduce os_dupfd_cloexec() helperEric Engestrom2020-06-182-0/+55
| | | | | | | | | | Adapted from wayland's wl_os_dupfd_cloexec(). Suggested-by: Kristian H. Kristensen <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369>
* util/os_file: replace broken windows-detection code with detect_os.hEric Engestrom2020-06-181-3/+3
| | | | | | | | | | The meson-windows-vs2019 job was going down the `!defined(WIN32)` path, leading to a broken build once that path contained non-windows code. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369>
* util: enable futex usage on BSDs after 7dc2f4788288Jan Beich2020-06-163-2/+7
| | | | | | Reviewed-by: Eric Engestrom <[email protected]> Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5460>
* radv: enable radv_enable_mrt_output_nan_fixup for RAGE 2Samuel Pitoiset2020-06-121-0/+4
| | | | | | | | | To fix game artifacts. It's always sad to have to fix game bugs inside drivers ... Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5359>
* radv: add new drirc option radv_enable_mrt_output_nan_fixupSamuel Pitoiset2020-06-121-0/+5
| | | | | | | | To replace NaN from FS with zeros to fix game bugs. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5359>
* util/disk_cache: add fallback for disk_cache_get_function_identifierDave Airlie2020-06-111-0/+6
| | | | | | | | Otherwise drivers need to have a ifdef on windows, easier to fix here hopefully. Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5049>
* util: add BITSET_LAST_BIT() helperTimothy Arceri2020-06-031-0/+14
| | | | | | | This is the reverse of BITSET_FFS() Reviewed-by: Kenneth Graunke <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4910>
* meson: use gnu_symbol_visibility argumentDylan Baker2020-06-012-3/+6
| | | | | | | | | | This uses a meson builtin to handle -fvisibility=hidden. This is nice because we don't need to track which languages are used, if C++ is suddenly added meson just does the right thing. Acked-by: Matt Turner <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>
* util/format: Add more multi-planar formats.Bas Nieuwenhuizen2020-05-304-0/+303
| | | | | | | | These don't have a fourcc code as far as I can tell, but we want them for internal Vulkan use. Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5195>
* util/format: Add VK_FORMAT_D16_UNORM_S8_UINT.Bas Nieuwenhuizen2020-05-303-0/+72
| | | | | | | | Not participating in packing/unpacking/stencil-only/depth-only, because it doesn't mix well in a single plane. Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5195>
* radeonsi/drirc: enable zerovram option for 7 Days to DiePierre-Eric Pelloux-Prayer2020-05-271-0/+7
| | | | | | Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2686 Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5168>
* util/format: Use SATURATEAlyssa Rosenzweig2020-05-261-3/+3
| | | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5100>
* util: Add SATURATE macroAlyssa Rosenzweig2020-05-262-0/+6
| | | | | | | | | | | Equivalent to clamp(x, 0.0, 1.0) or fsat in NIR. Useful for format packing, among other uses given the variety of substituions in-tree. v2: Drop brackets (Eric). Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5100>
* src/util: Remove out-of-range comparisonKristian H. Kristensen2020-05-261-1/+1
| | | | | | | | | | | | | | Silence the warning about this always-true comparison. src/util/softfloat.c:214:42: warning: comparison of constant 32768 with expression of type 'int16_t' (aka 'short') is always false [-Wtautological-constant-out-of-range-compare] } else if ((e > 0x1d) || (0x8000 <= m)) { ~~~~~~ ^ ~ Reviewed-by: Rob Clark <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5174>
* util: delete fnv1a hash functionDmitriy Nester2020-05-254-65/+1
| | | | | | | | | | xxhash is faster than fnv1a in almost all circumstances, so we're switching to it globally. Signed-off-by: Dmytro Nester <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2405 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4020>
* util/hash_table: replace fnv1a hash function with xxhashDmitriy Nester2020-05-251-7/+7
| | | | | | | | | xxhash is faster than fnv1a in almost all circumstances, so we're switching to it globally. Signed-off-by: Dmytro Nester <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4020>
* tree-wide: fix deprecated GitLab URLsEric Engestrom2020-05-231-4/+4
| | | | | | | | | | | | | They will stop working in the next GitLab release, so let's update them ASAP to make sure things are propagated to everyone by then. See: https://about.gitlab.com/releases/2020/05/06/gitlab-com-13-0-breaking-changes/#removal-of-deprecated-project-paths Cc: [email protected] Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5111>
* util/rand_xor: extend the urandom path to all non-Windows platformsEric Engestrom2020-05-161-2/+4
| | | | | | | | Any system that provides `/dev/urandom` should be allowed to try to use it. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emmanuel Gil Peyrot <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2316>
* util/rand_xor: fallback Linux to time-based instead of fixed seedEric Engestrom2020-05-161-22/+14
| | | | | | | | | When the caller asked for a randomised_seed, we should fall back to the time-based seed instead of the fixed seed. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emmanuel Gil Peyrot <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2316>
* util/rand_xor: drop unused headerEric Engestrom2020-05-161-1/+0
| | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emmanuel Gil Peyrot <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2316>
* util/rand_xor: make it clear that {,s_}rand_xorshift128plus take *exactly 2* ↵Eric Engestrom2020-05-162-4/+4
| | | | | | | | uint64_t Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emmanuel Gil Peyrot <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2316>
* util/rand_xor: use getrandom() when availableEmmanuel Gil Peyrot2020-05-151-1/+11
| | | | | | | | | | | | | | This function has been added in glibc 2.25, and the related syscall in Linux 3.17, in order to avoid requiring the /dev/urandom to exist, and doing the open()/read()/close() dance on it. We pass GRND_NONBLOCK so that it doesn’t block if not enough entropy has been gathered to initialise the /dev/urandom source, and fallback to the next source in any error case. Signed-off-by: Emmanuel Gil Peyrot <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2026>
* util/ra: Add [de]serialization supportJason Ekstrand2020-05-132-0/+69
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5019>
* util/vma: Add a debug print helperJason Ekstrand2020-05-132-0/+24
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5019>
* util/vma: Add an option to configure high/low preferenceJason Ekstrand2020-05-132-19/+54
| | | | | | | | | | | | The vma_heap allocator was originally designed to prefer high addresses in order to find bugs in ANV's high address handling. However, there are cases where you might want the allocator to prefer lower addresses for some reason. This provides a configure bit for exactly this purpose. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5019>
* util/list: Add list_foreach_entry_from_safeCaio Marcelo de Oliveira Filho2020-05-131-0/+7
| | | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5019>
* util/list: Add a list pair iteratorJason Ekstrand2020-05-131-0/+7
| | | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5019>
* drirc: Enable glthread for PCSX2JibbityJobbity2020-05-131-0/+3
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5023>
* gallium: change comments to remove 'state tracker'Marek Olšák2020-05-131-1/+1
| | | | | | | Acked-by: Eric Anholt <[email protected]> Acked-by: Alyssa Rosenzweig <[email protected]> Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4902>
* radv: add a LLVM version string workaround for SotTR and ACOSamuel Pitoiset2020-05-132-0/+14
| | | | | | | | | | | | | When the LLVM version is too old or missing, SotTR applies shader workarounds and that reduces performance by 2-5% with ACO. SotTR workarounds are applied with LLVM 8 and older, so reporting LLVM 9.0.1 should be fine. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Edmondo Tommasina <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4984>
* drirc: Enable glthread for rpcs3Ani2020-05-111-0/+3
| | | | | | | | Closes: #2939 Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4988>
* util: Make process_test path compatible with mingw native toolchainspal10002020-05-081-3/+6
| | | | | | | | | | | | | | v2: Make sure we require winepath when using mingw crosscompilers v3: Also take into account mingw clang toolchains Acked-by: Roland Scheidegger <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Fixes: f8f14130 ("util/u_process: add util_get_process_exec_path") Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2788 CC: "20.1" <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4731>
* Linux: Change minimum priority threads from SCHED_IDLE to nice 19 SCHED_BATCH.Con Kolivas2020-05-081-3/+18
| | | | | | | | | | | | | | SCHED_IDLE on linux can lead to extraordinarily long periods of no scheduling leading to starvation of minimum priority threads for such an extended period that it can eventually lead to GUI stalls. Switch to renicing the threads to the lowest priority and use the SCHED_BATCH scheduling policy which is a hint to the scheduler that this is latency insensitive thread instead. This change has been confirmed to address unexpected GUI related stalls in mesa applications across a range of different linux kernels. Signed-off-by: Con Kolivas <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4912>
* util/os_memory: never use os_memory_debug.hErik Faye-Lund2020-05-071-6/+0
| | | | | | | | | | | | | | | | This is currently broken hard, because this code is being used in more places that it used to be, and fixing that is prohibitively hard right now. This is far from ideal, as it leaves the same inconsistency in the EMBEDDED_DEVICE code-path. But that only used by VMWare, so it's probably better if they fix it, as they know their requirements better than we do. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2911 Fixes: 76f79db3f5d ("util: stop including files from mesa/main") Acked-by: Jose Fonseca <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4919>