2017-03-20 16:04:42 +00:00
|
|
|
MESA_UTIL_FILES := \
|
2018-01-18 23:29:14 +03:00
|
|
|
anon_file.h \
|
|
|
|
|
anon_file.c \
|
2017-12-29 13:30:32 -08:00
|
|
|
bigmath.h \
|
2016-06-09 06:35:34 +02:00
|
|
|
bitscan.c \
|
|
|
|
|
bitscan.h \
|
2015-02-11 15:05:06 -08:00
|
|
|
bitset.h \
|
2019-09-18 14:32:00 -05:00
|
|
|
blob.c \
|
|
|
|
|
blob.h \
|
2017-02-14 07:29:56 -08:00
|
|
|
build_id.c \
|
|
|
|
|
build_id.h \
|
2020-12-07 19:39:57 -08:00
|
|
|
cnd_monotonic.h \
|
2020-09-13 14:26:21 +02:00
|
|
|
compiler.h \
|
2016-11-18 19:20:54 +01:00
|
|
|
crc32.c \
|
|
|
|
|
crc32.h \
|
2019-02-27 11:12:59 -08:00
|
|
|
dag.c \
|
|
|
|
|
dag.h \
|
2015-10-05 14:13:29 -07:00
|
|
|
debug.c \
|
|
|
|
|
debug.h \
|
2016-11-13 16:38:01 +01:00
|
|
|
disk_cache.c \
|
|
|
|
|
disk_cache.h \
|
2020-09-13 14:26:21 +02:00
|
|
|
disk_cache_os.c \
|
|
|
|
|
disk_cache_os.h \
|
2018-09-06 16:01:34 +02:00
|
|
|
double.c \
|
|
|
|
|
double.h \
|
2020-08-31 18:29:10 +02:00
|
|
|
enum_operators.h \
|
2018-09-23 12:57:51 -04:00
|
|
|
fast_idiv_by_const.c \
|
|
|
|
|
fast_idiv_by_const.h \
|
2019-06-27 15:05:31 -07:00
|
|
|
format/u_format.c \
|
|
|
|
|
format/u_format.h \
|
|
|
|
|
format/u_format_bptc.c \
|
|
|
|
|
format/u_format_bptc.h \
|
|
|
|
|
format/u_format_etc.c \
|
|
|
|
|
format/u_format_etc.h \
|
|
|
|
|
format/u_format_latc.c \
|
|
|
|
|
format/u_format_latc.h \
|
|
|
|
|
format/u_format_other.c \
|
|
|
|
|
format/u_format_other.h \
|
|
|
|
|
format/u_format_rgtc.c \
|
|
|
|
|
format/u_format_rgtc.h \
|
|
|
|
|
format/u_format_s3tc.c \
|
|
|
|
|
format/u_format_s3tc.h \
|
|
|
|
|
format/u_format_tests.c \
|
|
|
|
|
format/u_format_tests.h \
|
|
|
|
|
format/u_format_yuv.c \
|
|
|
|
|
format/u_format_yuv.h \
|
|
|
|
|
format/u_format_zs.c \
|
|
|
|
|
format/u_format_zs.h \
|
2016-08-03 09:22:13 -07:00
|
|
|
format_r11g11b10f.h \
|
2016-08-03 09:16:12 -07:00
|
|
|
format_rgb9e5.h \
|
2014-12-06 20:21:20 -08:00
|
|
|
format_srgb.h \
|
2017-10-22 17:38:26 +02:00
|
|
|
futex.h \
|
2015-10-10 13:26:03 -04:00
|
|
|
half_float.c \
|
|
|
|
|
half_float.h \
|
2017-03-20 16:04:42 +00:00
|
|
|
hash_table.c \
|
2014-12-06 20:21:20 -08:00
|
|
|
hash_table.h \
|
2020-09-08 20:41:14 +02:00
|
|
|
u_idalloc.c \
|
|
|
|
|
u_idalloc.h \
|
2015-04-27 17:41:27 -07:00
|
|
|
list.h \
|
2020-10-02 00:42:32 +02:00
|
|
|
log.c \
|
mesa: Promote Intel's simple logging façade for Android to util/
I'm bringing up freedreno Vulkan on an Android phone, and my pains are
exactly what Chad said when working on Intel's vulkan for Android in
aa716db0f64d ("intel: Add simple logging façade for Android (v2)"):
On Android, stdio goes to /dev/null. On Android, remote gdb is even
more painful than the usual remote gdb. On Android, nothing works like
you expect and debugging is hell. I need logging.
This patch introduces a small, simple logging API that can easily wrap
Android's API. On non-Android platforms, this logger does nothing
fancy. It follows the time-honored Unix tradition of spewing
everything to stderr with minimal fuss.
My goal here is not perfection. My goal is to make a minimal, clean API,
that people hate merely a little instead of a lot, and that's good
enough to let me bring up Android Vulkan. And it needs to be fast,
which means it must be small. No one wants to their game to miss frames
while aiming a flaming bow into the jaws of an angry robot t-rex, and
thus become t-rex breakfast, because some fool had too much fun desiging
a bloated, ideal logging API.
Compared to trusty fprintf, _mesa_log[ewi]() is actually usable on
Android. Compared to os_log_message(), this has different error levels
and supports format arguments.
The only code change in the move is wrapping flockfile/funlockfile in
!DETECT_OS_WINDOWS, since mingw32 doesn't have it. Windows likely wants
different logging code, anyway.
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6806>
2020-09-21 12:53:14 -07:00
|
|
|
log.h \
|
2014-12-06 20:21:20 -08:00
|
|
|
macros.h \
|
2020-10-22 02:06:59 +02:00
|
|
|
memstream.c \
|
|
|
|
|
memstream.h \
|
2015-09-04 16:43:22 -04:00
|
|
|
mesa-sha1.c \
|
|
|
|
|
mesa-sha1.h \
|
2017-10-22 17:38:44 +02:00
|
|
|
os_time.c \
|
|
|
|
|
os_time.h \
|
2019-01-28 15:44:12 +00:00
|
|
|
os_file.c \
|
|
|
|
|
os_file.h \
|
2019-12-11 15:01:11 -08:00
|
|
|
os_socket.c \
|
|
|
|
|
os_socket.h \
|
2018-10-29 11:21:07 -07:00
|
|
|
os_misc.c \
|
|
|
|
|
os_misc.h \
|
2018-07-10 15:00:13 -07:00
|
|
|
u_process.c \
|
|
|
|
|
u_process.h \
|
2017-01-13 16:51:31 +00:00
|
|
|
sha1/sha1.c \
|
|
|
|
|
sha1/sha1.h \
|
2014-09-16 15:33:29 +10:00
|
|
|
ralloc.c \
|
2014-12-06 20:21:20 -08:00
|
|
|
ralloc.h \
|
2017-03-22 10:47:05 +11:00
|
|
|
rand_xor.c \
|
|
|
|
|
rand_xor.h \
|
2018-04-05 08:21:49 -07:00
|
|
|
rb_tree.c \
|
|
|
|
|
rb_tree.h \
|
2014-09-22 12:24:21 -07:00
|
|
|
register_allocate.c \
|
|
|
|
|
register_allocate.h \
|
2014-08-20 14:40:22 +08:00
|
|
|
rgtc.c \
|
2014-12-06 20:21:20 -08:00
|
|
|
rgtc.h \
|
mesa: Replace _mesa_round_to_even() with _mesa_roundeven().
Eric's initial patch adding constant expression evaluation for
ir_unop_round_even used nearbyint. The open-coded _mesa_round_to_even
implementation came about without much explanation after a reviewer
asked whether nearbyint depended on the application not modifying the
rounding mode. Of course (as Eric commented) we rely on the application
not changing the rounding mode from its default (round-to-nearest) in
many other places, including the IROUND function used by
_mesa_round_to_even!
Worse, IROUND() is implemented using the trunc(x + 0.5) trick which
fails for x = nextafterf(0.5, 0.0).
Still worse, _mesa_round_to_even unexpectedly returns an int. I suspect
that could cause problems when rounding large integral values not
representable as an int in ir_constant_expression.cpp's
ir_unop_round_even evaluation. Its use of _mesa_round_to_even is clearly
broken for doubles (as noted during review).
The constant expression evaluation code for the packing built-in
functions also mistakenly assumed that _mesa_round_to_even returned a
float, as can be seen by the cast through a signed integer type to an
unsigned (since negative float -> unsigned conversions are undefined).
rint() and nearbyint() implement the round-half-to-even behavior we want
when the rounding mode is set to the default round-to-nearest. The only
difference between them is that nearbyint() raises the inexact
exception.
This patch implements _mesa_roundeven{f,}, a function similar to the
roundeven function added by a yet unimplemented technical specification
(ISO/IEC TS 18661-1:2014), with a small difference in behavior -- we
don't bother raising the inexact exception, which I don't think we care
about anyway.
At least recent Intel CPUs can quickly change a subset of the bits in
the x87 floating-point control register, but the exception mask bits are
not included. rint() does not need to change these bits, but nearbyint()
does (twice: save old, set new, and restore old) in order to raise the
inexact exception, which would incur some penalty.
Reviewed-by: Carl Worth <cworth@cworth.org>
2015-03-10 17:55:21 -07:00
|
|
|
rounding.h \
|
2015-01-15 08:06:05 -08:00
|
|
|
set.c \
|
|
|
|
|
set.h \
|
2014-11-14 12:14:40 -08:00
|
|
|
simple_list.h \
|
2017-10-16 18:06:49 +11:00
|
|
|
simple_mtx.h \
|
2016-08-27 19:52:31 +02:00
|
|
|
slab.c \
|
|
|
|
|
slab.h \
|
2019-02-12 09:51:31 +01:00
|
|
|
softfloat.c \
|
|
|
|
|
softfloat.h \
|
2019-10-05 14:07:50 -05:00
|
|
|
sparse_array.c \
|
|
|
|
|
sparse_array.h \
|
2017-05-15 21:36:52 +02:00
|
|
|
string_buffer.c \
|
|
|
|
|
string_buffer.h \
|
2015-09-28 14:23:34 +02:00
|
|
|
strndup.h \
|
2015-06-28 14:51:08 +02:00
|
|
|
strtod.c \
|
2014-12-06 20:21:20 -08:00
|
|
|
strtod.h \
|
|
|
|
|
texcompress_rgtc_tmp.h \
|
2019-07-29 12:54:04 +03:00
|
|
|
timespec.h \
|
2017-03-31 01:26:25 +03:00
|
|
|
u_atomic.c \
|
2016-09-05 09:52:10 +10:00
|
|
|
u_atomic.h \
|
2017-06-01 22:21:19 +02:00
|
|
|
u_dynarray.h \
|
2016-10-14 12:55:03 +10:00
|
|
|
u_endian.h \
|
2018-08-16 17:20:38 -07:00
|
|
|
u_math.c \
|
|
|
|
|
u_math.h \
|
2017-03-08 15:33:38 +11:00
|
|
|
u_queue.c \
|
|
|
|
|
u_queue.h \
|
2017-03-08 14:36:17 +11:00
|
|
|
u_string.h \
|
2017-03-08 15:18:34 +11:00
|
|
|
u_thread.h \
|
2016-10-14 12:55:03 +10:00
|
|
|
u_vector.c \
|
2018-01-06 17:28:01 -08:00
|
|
|
u_vector.h \
|
2018-10-01 11:55:27 -07:00
|
|
|
u_debug.c \
|
|
|
|
|
u_debug.h \
|
2020-02-10 13:08:28 +01:00
|
|
|
u_debug_memory.c \
|
2020-08-05 22:44:12 -07:00
|
|
|
u_debug_stack.c \
|
|
|
|
|
u_debug_stack.h \
|
|
|
|
|
u_debug_symbol.c \
|
|
|
|
|
u_debug_symbol.h \
|
2018-10-01 11:59:21 -07:00
|
|
|
u_cpu_detect.c \
|
|
|
|
|
u_cpu_detect.h \
|
2020-11-18 16:20:50 +10:00
|
|
|
u_printf.cpp \
|
|
|
|
|
u_printf.h \
|
2018-11-09 10:40:15 -08:00
|
|
|
os_memory_aligned.h \
|
|
|
|
|
os_memory_debug.h \
|
|
|
|
|
os_memory_stdc.h \
|
|
|
|
|
os_memory.h \
|
|
|
|
|
u_memory.h \
|
2020-04-01 08:44:08 +10:00
|
|
|
u_memset.h \
|
2019-11-28 21:49:02 +01:00
|
|
|
u_mm.h \
|
|
|
|
|
u_mm.c \
|
2018-01-06 17:28:01 -08:00
|
|
|
vma.c \
|
2020-01-18 00:47:19 -05:00
|
|
|
vma.h \
|
|
|
|
|
xxhash.h
|
|
|
|
|
|
2014-07-24 11:17:53 -07:00
|
|
|
|
|
|
|
|
MESA_UTIL_GENERATED_FILES = \
|
2019-06-27 15:05:31 -07:00
|
|
|
format_srgb.c \
|
2020-08-04 23:32:11 -04:00
|
|
|
format/u_format_table.c \
|
|
|
|
|
format/u_format_pack.h
|
2017-06-30 11:57:06 +02:00
|
|
|
|
|
|
|
|
XMLCONFIG_FILES := \
|
|
|
|
|
xmlconfig.c \
|
|
|
|
|
xmlconfig.h
|