Rob Clark
81124d845e
driconf: allowlist/denylist
...
I think this is the one user facing use of blacklist/whitelist. But we
like all of our users, so lets be more inclusive.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5938 >
2020-07-16 21:56:08 +00:00
Eric Anholt
b7418270c3
util: Share a single function pointer for the 4-byte rgba unpack function.
...
Everyone wants the same behavior, and this helps shrink the size of our
format description tables.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728 >
2020-07-07 18:19:23 +00:00
Eric Anholt
a8e7004dc5
util: Remove the stub pack/unpack functions for YUV formats.
...
If we can't pack/unpack them, the field is supposed to be NULL.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728 >
2020-07-07 18:19:23 +00:00
Eric Anholt
2da4badfe3
util: Use designated initializers to clean up the format tables' pack/unpack.
...
The generated .c had a bunch of NULLs and notes for what kind of function
was being skipped, when we can just skip them by filling in the fields
with names.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728 >
2020-07-07 18:19:23 +00:00
Eric Anholt
e7010eeff0
util: Merge util_format_read_4* functions.
...
Everyone wants the same thing: unpack 4-bytes-per-channel data based on the
base type of the format.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728 >
2020-07-07 18:19:23 +00:00
Eric Anholt
2f4d557a56
util: Merge util_format_write_4* functions.
...
Everyone wants the same thing: pack 4-bytes-per-channel data based on the
base type of the format.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728 >
2020-07-07 18:19:23 +00:00
Eric Anholt
32bf7229e5
util: Remove unused util_format_planar_is_supported().
...
Nothing calls it, and it should have been left in gallium, anyway.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728 >
2020-07-07 18:19:22 +00:00
Eric Anholt
18cb8f2322
util: Mark util_format_description() as a const function.
...
It will return the same table every time with no other side effects, so we
want it to be CSEed. Saves 3.5k on my aarch64 GL drivers, almost 9k on
turnip, but weirdly increases my x86 GL driver collection by ~3k.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728 >
2020-07-07 18:19:22 +00:00
Benjamin Cheng
a573c8cd47
drirc: Add picom to adaptive_sync exclusion list
...
The compton compositor is unmaintained, with a new fork named picom taking
its place. As with the other compositors (including compton), adaptive
sync should not be enabled.
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5740 >
2020-07-04 08:46:12 +00:00
Eric Anholt
b9e163fa67
util: Avoid strict aliasing bugs in xxhash.
...
XXH32 is doing access through u32 *, and with strict aliasing the compiler
gets to assume that those are independent of the u16 writes we did in
fd6_texture_key setup, and based on various tweaks to the code, would
result in bad hashes computed after inlining. The failure was:
../src/util/hash_table.c:326:_mesa_hash_table_search_pre_hashed: Assertion
`ht->key_hash_function == ((void *)0) || hash == ht->key_hash_function(key)'
failed.)
By setting these two flags, we always take the unaligned,
memcpy-the-32-bit-data path. I believe this should be same perf on x86
(which will happily unaligned load 32 bits in the end), while it will be
slower on arm (where you have to a special unaligned load operation iirc).
This should still be far faster than our old hash.
Fixes: edd62619a1 ("freedreno: replace fnv1a hash function with xxhash")
Acked-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5271 >
2020-07-03 23:27:06 +00:00
Samuel Pitoiset
ab9ecb607b
radv,vulkan: add a new x11 wsi drirc workaround for DOOM Eternal
...
DOOM Eternal happily creates a swapchain with 2 images for IMMEDIATE.
This fixes a 10% performance issue with RADV.
Cc: 20.1 <mesa-stable@lists.freedesktop.org >
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5704 >
2020-07-02 08:31:57 +00:00
Greg V
29e2a3b8f5
gallium,util: undef ALIGN on FreeBSD to prevent name clash
...
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 <mattst88@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3559 >
2020-07-01 16:47:05 +00:00
Marek Olšák
012b7aab26
driconf: add workarounds for SPECviewperf13
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5459 >
2020-06-23 09:25:24 +00:00
Marek Olšák
ca719c6e30
glsl,driconf: add allow_glsl_120_subset_in_110 for SPECviewperf13
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5459 >
2020-06-23 09:25:24 +00:00
Eric Engestrom
04e8eaf4e8
util: rename xmlpool.h to driconf.h
...
To make it clearer what it is and does.
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5440 >
2020-06-22 21:50:12 +00:00
Eric Engestrom
2ef983dca6
driconf: drop now unused translation facility
...
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5440 >
2020-06-22 21:50:12 +00:00
Eric Engestrom
b1f647a3b4
driconf: drop 9% swedish translation
...
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 <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5440 >
2020-06-22 21:50:12 +00:00
Eric Engestrom
0a19565592
driconf: drop 8% dutch translation
...
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 <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5440 >
2020-06-22 21:50:12 +00:00
Eric Engestrom
56d76859fa
driconf: drop 6% french translation
...
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 <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5440 >
2020-06-22 21:50:12 +00:00
Eric Engestrom
a029eafba3
driconf: drop 26% spanish translation
...
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 <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5440 >
2020-06-22 21:50:12 +00:00
Eric Engestrom
29ee6f6c6a
driconf: drop 15% german translation
...
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 <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5440 >
2020-06-22 21:50:12 +00:00
Eric Engestrom
ae7759eb21
driconf: drop 28% catalan translation
...
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 <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5440 >
2020-06-22 21:50:12 +00:00
Rhys Perry
c977567db6
radv: enable radv_no_dynamic_bounds for more Path of Exile executables
...
It looks like there's also a standalone version and a 32-bit version.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Cc: <mesa-stable@lists.freedesktop.org >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5574 >
2020-06-20 11:46:12 +01:00
Rhys Perry
19b2ac2bb9
radv: enable radv_no_dynamic_bounds for Path of Exile
...
To workaround game bugs. This also enables it for the D3D11 renderer but
that shouldn't be an issue.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Cc: <mesa-stable@lists.freedesktop.org >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
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 >
2020-06-19 23:53:47 +00:00
Rhys Perry
f4a643f65e
radv: add new drirc option radv_no_dynamic_bounds
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Cc: <mesa-stable@lists.freedesktop.org >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5569 >
2020-06-19 23:53:47 +00:00
Gurchetan Singh
9760a7ed91
virgl: apply bgra dest swizzle and add Portal 2
...
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 <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5481 >
2020-06-18 10:35:52 +00:00
Eric Engestrom
0e5ea7a363
util: introduce os_dupfd_cloexec() helper
...
Adapted from wayland's wl_os_dupfd_cloexec().
Suggested-by: Kristian H. Kristensen <hoegsberg@google.com >
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369 >
2020-06-18 02:09:56 +00:00
Eric Engestrom
b00e1d9ea7
util/os_file: replace broken windows-detection code with detect_os.h
...
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 <eric@engestrom.ch >
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369 >
2020-06-18 02:09:56 +00:00
Jan Beich
46c368907f
util: enable futex usage on BSDs after 7dc2f47882
...
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5460 >
2020-06-16 21:44:35 +00:00
Samuel Pitoiset
e7e9969efe
radv: enable radv_enable_mrt_output_nan_fixup for RAGE 2
...
To fix game artifacts. It's always sad to have to fix game bugs
inside drivers ...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5359 >
2020-06-12 14:43:58 +02:00
Samuel Pitoiset
6f21995f98
radv: add new drirc option radv_enable_mrt_output_nan_fixup
...
To replace NaN from FS with zeros to fix game bugs.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5359 >
2020-06-12 14:43:31 +02:00
Dave Airlie
8735e96c53
util/disk_cache: add fallback for disk_cache_get_function_identifier
...
Otherwise drivers need to have a ifdef on windows, easier to fix
here hopefully.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5049 >
2020-06-11 06:05:28 +10:00
Timothy Arceri
d6d78f9b7f
util: add BITSET_LAST_BIT() helper
...
This is the reverse of BITSET_FFS()
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4910 >
2020-06-03 10:34:22 +00:00
Dylan Baker
a8e2d79e02
meson: use gnu_symbol_visibility argument
...
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 <mattst88@gmail.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740 >
2020-06-01 18:59:18 +00:00
Bas Nieuwenhuizen
cf99267147
util/format: Add more multi-planar formats.
...
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 <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5195 >
2020-05-30 01:22:51 +00:00
Bas Nieuwenhuizen
273ead81f1
util/format: Add VK_FORMAT_D16_UNORM_S8_UINT.
...
Not participating in packing/unpacking/stencil-only/depth-only,
because it doesn't mix well in a single plane.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5195 >
2020-05-30 01:22:51 +00:00
Pierre-Eric Pelloux-Prayer
d9eaac02e5
radeonsi/drirc: enable zerovram option for 7 Days to Die
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2686
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5168 >
2020-05-27 09:28:46 +02:00
Alyssa Rosenzweig
0f1fde1faf
util/format: Use SATURATE
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5100 >
2020-05-26 22:31:31 +00:00
Alyssa Rosenzweig
35938c15e2
util: Add SATURATE macro
...
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 <alyssa.rosenzweig@collabora.com >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5100 >
2020-05-26 22:31:31 +00:00
Kristian H. Kristensen
8341f30f1e
src/util: Remove out-of-range comparison
...
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 <robdclark@chromium.org >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5174 >
2020-05-26 12:46:18 -07:00
Dmitriy Nester
46d5b07c5c
util: delete fnv1a hash function
...
xxhash is faster than fnv1a in almost all circumstances, so we're
switching to it globally.
Signed-off-by: Dmytro Nester <dmytro.nester@globallogic.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2405
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4020 >
2020-05-25 19:41:09 +00:00
Dmitriy Nester
387176829b
util/hash_table: replace fnv1a hash function with xxhash
...
xxhash is faster than fnv1a in almost all circumstances, so we're
switching to it globally.
Signed-off-by: Dmytro Nester <dmytro.nester@globallogic.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4020 >
2020-05-25 19:41:09 +00:00
Eric Engestrom
444138d6d9
tree-wide: fix deprecated GitLab URLs
...
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: mesa-stable@lists.freedesktop.org
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5111 >
2020-05-23 15:33:50 +00:00
Eric Engestrom
fa3549c92b
util/rand_xor: extend the urandom path to all non-Windows platforms
...
Any system that provides `/dev/urandom` should be allowed to try to use it.
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com >
Reviewed-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2316 >
2020-05-16 12:05:37 +00:00
Eric Engestrom
d76abe98cf
util/rand_xor: fallback Linux to time-based instead of fixed seed
...
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 <eric.engestrom@intel.com >
Reviewed-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2316 >
2020-05-16 12:05:37 +00:00
Eric Engestrom
e0ce684aae
util/rand_xor: drop unused header
...
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com >
Reviewed-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2316 >
2020-05-16 12:05:37 +00:00
Eric Engestrom
f50f26325f
util/rand_xor: make it clear that {,s_}rand_xorshift128plus take *exactly 2* uint64_t
...
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com >
Reviewed-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2316 >
2020-05-16 12:05:37 +00:00
Emmanuel Gil Peyrot
4c212a1168
util/rand_xor: use getrandom() when available
...
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 <linkmauve@linkmauve.fr >
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2026 >
2020-05-15 13:37:20 +02:00
Jason Ekstrand
492d664be0
util/ra: Add [de]serialization support
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5019 >
2020-05-13 23:36:44 +00:00
Jason Ekstrand
38e68db778
util/vma: Add a debug print helper
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5019 >
2020-05-13 23:36:44 +00:00