Witold Baryluk
65ef4a2e02
util: Use explicit relaxed reads for u_queue
...
These are no-op, but make clang thread sanitizer happy.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8230 >
2021-01-28 18:07:09 +00:00
Eric Anholt
b183b6ddd7
util/bitset: Avoid dereferencing the bitset for size == 0.
...
If we don't have any bits in our set, don't go reading the pointer. Fixes
invalid accesses caught by ASan in liveness and nir_to_tgsi when
impl->ssa_alloc == 0.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8530 >
2021-01-25 18:50:26 +00:00
Ben Niu
36a4aeb91f
util: When building 'ARM64EC', don't use x64 intrinsics which need to be emulated
...
ARM64EC is a new build target for Windows ARM64 devices for x64 support.
These binaries can be loaded in x64 processes, but don't need to be emulated. For
code that's heavily used, avoiding the emulation can be a huge perf win.
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8619 >
2021-01-22 17:56:08 +00:00
Jeremy Huddleston Sequoia
68a785e63f
Fall back on clock_gettime when timespec_get() is unavailable
...
Fixes: e3a8013de8 "util/u_queue: add util_queue_fence_wait_timeout"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1020
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4088
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com >
Signed-off-by: Yurii Kolesnykov <root@yurikoles.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8482 >
2021-01-16 00:14:46 +00:00
Jeremy Huddleston Sequoia
08ac7b52e7
util: Fix pointer to integer conversion error when using libunwind
...
../src/util/u_debug_stack.c:97:20: error: incompatible pointer to integer conversion assigning to 'unw_word_t' (aka 'unsigned long') from 'void *' [-Werror,-Wint-conversion]
pip.unwind_info = NULL;
^ ~~~~
1 error generated.
Fixes: 70c272004f "gallium/util: libunwind support"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4094
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8507 >
2021-01-15 20:00:20 +00:00
Eric Anholt
8e2e637480
util/format: Simplify the generated unpack code.
...
We were declaring the temps, then in the same order declaring
assignments to those temps. The code is more legible (and shorter)
with the assignments moved in place.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297 >
2021-01-15 18:58:50 +00:00
Eric Anholt
322fa3d9dc
util: Give a reasonable answer when unpacking z32unorm from floats.
...
We weren't clamping the float Z value, just multiplying it by a big
float and casting that to int. This makes util/format's z unpacking
match Mesa's.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297 >
2021-01-15 18:58:50 +00:00
Eric Anholt
b938b488f6
util: Fix rounding of unpack_unorm8 from small unorm formats.
...
The code was doing the bit-shift trick, but not accounting for the
rounding necessary which the Mesa unpack code was previously doing.
Using the helpers prevents a regression in
KHR-GL46.copy_image.smoke_test on iris as we consolidate the
pack/unpack code.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297 >
2021-01-15 18:58:50 +00:00
Eric Anholt
0565270380
util: Fix UBSan failure on _mesa_unorm_to_unorm.
...
It complains about shifting 1<<31 being undefined, so make it a 1u.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297 >
2021-01-15 18:58:50 +00:00
Eric Anholt
8d9826f014
util: Move most of src/mesa/main/format_utils.h to util/format/
...
This is a set of very nice, complete helpers for moving around bits in
various formats, and we want to retain its behavior when deduplicating
Mesa's format pack/unpack and gallium's.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297 >
2021-01-15 18:58:50 +00:00
Eric Anholt
e5e75b714d
util/format: Fix pack/unpack of A1R5G5B5_UINT.
...
Avoids regressing KHR-GL33.packed_pixels.pbo_rectangle.* when
transitioning from mesa/main pack/unpack codegen to util/format's.
Fixes: b28eb044cd ("gallium: Add equivalents of packed MESA_FORMAT_*UINT formats.")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6297 >
2021-01-15 18:58:50 +00:00
Mike Blumenkrantz
184bbef33d
util/set: split off create() into an init() function
...
this brings parity with the matching hash_table api
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8450 >
2021-01-14 13:51:35 +00:00
Mike Blumenkrantz
491e7decad
util/set: add the found param to search_or_add
...
this brings parity with the internal api
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8450 >
2021-01-14 13:51:35 +00:00
Mike Blumenkrantz
5f3f128088
util/set: optimize rehash for empty table and no-func clears
...
if the table is filled with deleted entries, we don't need to rzalloc+free an identical
block of memory for the table, we can just memset the existing one
the same applies to table clears without a function passed in that the table
doesn't need to be iterated and can just be memset
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8450 >
2021-01-14 13:51:35 +00:00
Mike Blumenkrantz
41042f7fa2
util/hash_table: optimize rehash for empty table and no-func clears
...
if the table is filled with deleted entries, we don't need to rzalloc+free an identical
block of memory for the table, we can just memset the existing one
the same applies to table clears without a function passed in that the table
doesn't need to be iterated and can just be memset
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8450 >
2021-01-14 13:51:35 +00:00
Nanley Chery
c62996796c
dri: Restrict glthread for CS:GO to radeonsi
...
Fixes a ~12% performance regression in iris.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8448 >
2021-01-13 00:29:40 +00:00
Pierre-Eric Pelloux-Prayer
6f2017205e
dri: enable glthread + radeonsi workaround for CS:GO
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4021
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8383 >
2021-01-11 10:28:06 +00:00
X512
0b910cc019
util/u_thread: Disable pthread_barrier_t on Haiku
...
* Causes a lockup on SMP systems
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8323 >
2021-01-09 20:51:39 -06:00
X512
97520d8d48
util/meson: Add libnetwork dependency for Haiku
...
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8323 >
2021-01-09 20:51:08 -06:00
X512
71f4a74368
util: implement GET_PROGRAM_NAME for Haiku
...
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8323 >
2021-01-09 20:51:03 -06:00
James Park
3fb4755d48
util: Disable memstream for Apple builds
...
Not all SDK versions support open_memstream. Maybe some other day.
Fixes: af8d488ea5 ("util,ac,aco,radv: Cross-platform memstream API")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8269 >
2021-01-08 09:37:14 +00:00
Marek Olšák
a0467b7fa1
util: replace UTIL_MAX_CPUS by util_cpu_caps.num_cpu_mask_bits
...
to reduce overhead when setting thread affinity.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8017 >
2021-01-05 03:47:16 +00:00
Marek Olšák
e4fa7c440d
util: add AMD CPU family enums and enable L3 cache pinning on Zen3
...
Based on: https://en.wikichip.org/wiki/amd/cpuid
The only reason it's nominated as a fix is because Zen3 might underperform
because the CPU detection ignored it.
Fixes: 15fa2c5e35 - gallium/u_cpu_detect: get the number of cores per L3 cache for AMD Zen
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8225 >
2021-01-05 02:43:55 +00:00
Adam Jackson
dd05cbf5e0
mesa: Implement GL_EXT_texture_sRGB_RG8 for softpipe and llvmpipe
...
sRGB_RG8 is not registered for big-GL yet, see this Khronos issue
for updates on that:
https://github.com/KhronosGroup/OpenGL-Registry/issues/450
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8060 >
2021-01-04 21:19:35 +00:00
Dave Airlie
77b70fa35d
util: add printf specifier shared helper code.
...
clover needs to walk valid specifiers in C++, vtn needs
to find string specifiers in C, let's do both.
This writes the format walker in C++, and wraps it with C.
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8254 >
2020-12-29 09:07:23 +10:00
Michael Tang
ecbb179c57
util: Implement os_read_file for Windows
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8043 >
2020-12-22 13:28:21 -08:00
Marcin Ślusarz
5f2166525f
util/list: use helper function in list_is_singular
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8110 >
2020-12-18 01:46:00 +00:00
Marcin Ślusarz
55a072cb16
util/list: add list_is_linked
...
v2: verify node is valid in list_is_linked (Timothy)
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8110 >
2020-12-18 01:46:00 +00:00
Pierre-Eric Pelloux-Prayer
1a4c4cd110
driconf: add workaround for Enter The Gungeon
...
Quoting a comment on the bug report:
I suspect the shader is incorrect.
When a (conditional) discard is executed then control flow
becomes non-uniform, meaning that subsequent implicit
derivatives required for the texture operation are not
computed correctly.
Using glsl_correct_derivatives_after_discard fixes it. Note
that for radeonsi this requires LLVM master to work properly.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1386
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8005 >
2020-12-16 10:52:54 +01:00
Eric Anholt
26198e875a
driconf: Fix memory leak in the unit test.
...
Needed for meson test with asan enabled.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7936 >
2020-12-15 19:39:29 +00:00
Eric Anholt
867e7f7cf4
util/vma: Fix leak of the heap in the unit test.
...
Needed for unit testing with asan enabled.
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7936 >
2020-12-15 19:39:29 +00:00
Eric Anholt
e640a9ca79
util: Fix memory leak in a hash table unit test.
...
Needed for unit testing with asan enabled.
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7936 >
2020-12-15 19:39:29 +00:00
James Park
2ffae5a439
xmlconfig: Disable WITH_XMLCONFIG on Windows
...
This change was stomped by recent refactor.
Fixes: 1618bd1bee ("xmlconfig: Add unit tests for recent bugs in the driconf rewrite.")
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7975 >
2020-12-14 17:28:04 +00:00
Rob Clark
790144e65a
util+treewide: container_of() cleanup
...
Replace mesa's slightly different container_of() with one more aligned
to the linux kernel's version which takes a type as the 2nd param. This
avoids warnings like:
freedreno_context.c:396:44: warning: variable 'batch' is uninitialized when used within its own initialization [-Wuninitialized]
At the same time, we can add additional build-time type-checking asserts
Signed-off-by: Rob Clark <robdclark@chromium.org >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7941 >
2020-12-10 16:48:36 +00:00
Rob Clark
6fe84c5dda
util: Allow STATIC_ASSERT() everywhere
...
Remove -Werror=vla from c_msvc_compat_args so we can use STATIC_ASSERT()
in core code. We have a CI job for this.
(And arguably we could probably just drop c_msvc_compat_args entirely.)
Signed-off-by: Rob Clark <robdclark@chromium.org >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7941 >
2020-12-10 16:48:36 +00:00
Rob Clark
5a082911cd
util: Promote __builtin_types_compatible_p compat
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7941 >
2020-12-10 16:48:36 +00:00
Juan A. Suarez Romero
b243ccb060
util: function to check for rgbX format
...
Function that checks if the format has its alpha component forced to 1.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7816 >
2020-12-09 12:25:31 +00:00
Ian Romanick
445b4d13bd
util: Add cnd_monotonic to Makefile.sources
...
Fixes: 33a7894828 ("util,radv: Cross-platform monotonic condition variable")
Acked-by: Tapani Pälli <tapani.palli@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7980 >
2020-12-08 11:23:44 -08:00
Pierre-Eric Pelloux-Prayer
34b08a298d
driconf: add allow_incorrect_primitive_id option
...
And enable it for SPECviewperf.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7078 >
2020-12-08 10:17:32 +01:00
Pierre-Eric Pelloux-Prayer
ba67843dbd
util/hash_table: add _mesa_hash_data_with_seed function
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7078 >
2020-12-08 10:10:47 +01:00
Marijn Suijten
77dafaece3
android: util: Add libcutils to Android.mk shared libs
...
Otherwise:
external/mesa3d/src/util/os_misc.c:59:12: fatal error: 'cutils/properties.h' file not found
# include <cutils/properties.h>
^~~~~~~~~~~~~~~~~~~~~
And:
ld.lld: error: undefined symbol: property_get
>>> referenced by os_misc.c:193 (external/mesa3d/src/util/os_misc.c:193)
>>> os_misc.o:(os_get_option) in archive out/target/product/discovery/obj/STATIC_LIBRARIES/libmesa_util_intermediates/libmesa_util.a
Fixes: eeecc21d93 ("util: Add property_get() fallback for android")
Acked-by: Rob Clark <robclark@freedesktop.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7861 >
2020-12-07 23:27:03 +01:00
Eric Anholt
b4ae9e07cd
xmlconfig: Warn if parsing the engine/app versions fails.
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7048 >
2020-12-04 21:32:17 +00:00
Eric Anholt
1618bd1bee
xmlconfig: Add unit tests for recent bugs in the driconf rewrite.
...
This covers:
7fb4ab9ec1 ("driconf: Restore the ability to override driconf with the environment.")
2b977adff8 ("xmlconfig: fix scandir_filter")
and touches a bit more of drirc logic while I'm here.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7048 >
2020-12-04 21:32:17 +00:00
Marijn Suijten
f173bf1be9
util: Do not insert uninitialized data if Android property is not set
...
This prevents funky segfaults in seemingly unrelated codepaths like:
pid: 20058, tid: 20086, name: Binder:20058_2 >>> /system/bin/surfaceflinger <<<
uid: 1000
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x184
Cause: null pointer dereference
[...]
#00 pc 000000000020b078 /vendor/lib64/dri/gallium_dri.so (ir3_shader_variant+56)
#01 pc 00000000001dc168 /vendor/lib64/dri/gallium_dri.so (fd5_draw_vbo+920)
#02 pc 00000000001a30f8 /vendor/lib64/dri/gallium_dri.so (fd_draw_vbo+1264)
#03 pc 000000000077e714 /vendor/lib64/dri/gallium_dri.so (util_primconvert_draw_vbo+596)
#04 pc 00000000001a2d60 /vendor/lib64/dri/gallium_dri.so (fd_draw_vbo+344)
#05 pc 00000000007671e4 /vendor/lib64/dri/gallium_dri.so (dd_context_draw_vbo+300)
#06 pc 00000000007b6c9c /vendor/lib64/dri/gallium_dri.so (u_vbuf_draw_vbo+2268)
#07 pc 000000000074d230 /vendor/lib64/dri/gallium_dri.so (cso_draw_arrays+96)
#08 pc 00000000007a4258 /vendor/lib64/dri/gallium_dri.so (util_draw_user_vertex_buffer+96)
#09 pc 00000000007b0968 /vendor/lib64/dri/gallium_dri.so (util_run_tests+480)
#10 pc 000000000019e24c /vendor/lib64/dri/gallium_dri.so (pipe_msm_create_screen+68)
#11 pc 00000000006ada8c /vendor/lib64/dri/gallium_dri.so (pipe_loader_create_screen+60)
#12 pc 000000000020e958 /vendor/lib64/dri/gallium_dri.so (dri2_init_screen+120)
#13 pc 00000000006ad088 /vendor/lib64/dri/gallium_dri.so (driCreateNewScreen2+544)
Fixes: eeecc21d93 ("util: Add property_get() fallback for android")
Reviewed-by: Rob Clark <robclark@freedesktop.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7928 >
2020-12-04 19:14:45 +00:00
Vinson Lee
da16425690
util: Add os_get_page_size support for macOS.
...
Fix build error on macOS.
src/util/os_misc.c:352:2: error: unexpected platform in os_sysinfo.c
error unexpected platform in os_sysinfo.c
^
Fixes: ("cdf3a6a83b50 util: Add os_get_page_size query")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7911 >
2020-12-03 19:47:58 -08:00
Rob Clark
a1440ec3da
util: Add helper to get FILE* options
...
Add a helper to get debug options that specify a file path, with
additional checking for suid to prevent unintended file access via
mesa's debug features.
Unlike other DEBUG_GET_ONCE_*, this returns a new file ptr each time
it is called (although it only does the lookup of the path once).
Signed-off-by: Rob Clark <robdclark@chromium.org >
Acked-by: Antonio Caggiano <antonio.caggiano@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7818 >
2020-12-03 21:19:57 +00:00
Jan Beich
18f6bd676d
util: unbreak on BSDs after MSVC changes
...
src/util/os_misc.c:352:2: error: unexpected platform in os_sysinfo.c
#error unexpected platform in os_sysinfo.c
^
Fixes: cdf3a6a83b ("util: Add os_get_page_size query")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7887 >
2020-12-03 00:50:20 +00:00
James Park
7a57acad87
util: Disable [[fallthrough]] for C17
...
[[fallthrough]] is not a C17 feature, and MSVC does not support it.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7862 >
2020-12-02 19:35:59 +00:00
Jesse Natalie
a5de2bc229
driconf: Avoid empty macro resulting in empty initializer braces
...
MSVC is unhappy with empty initializer braces while compiling C
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7680 >
2020-12-02 10:12:27 -08:00
Jesse Natalie
cdf3a6a83b
util: Add os_get_page_size query
...
No Apple/BSD implementation yet, I have no idea how to do that
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7680 >
2020-12-02 10:12:27 -08:00