Commit Graph

9 Commits

Author SHA1 Message Date
Juan A. Suarez Romero eddbbd8b68 v3d: use uint type in _gen_unpack_uint
Use a unsigned int type in the loop to avoid unintended sign extensions.

Fixes CID#1414500 (Unintended sign extension [SIGN_EXTENSION]).

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10060>
2021-04-07 09:39:42 +00:00
Eric Engestrom 0581a86753 v3d: fix empty-body instruction
Fixes: 8d43e2b2de ("meson: add -Werror=empty-body to disallow `if(x);`")
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2019-10-27 22:10:31 +00:00
Iago Toral Quiroga 5ffb8b1716 v3d: add header guards in v3d_packet_helpers.h
Reviewed-by: Eric Anholt <eric@anholt.net>
2019-08-08 08:36:52 +02:00
Dylan Baker 80825abb5d move u_math to src/util
Currently we have two sets of functions for bit counts, one in gallium
and one in core mesa. The ones in core mesa are header only in many
cases, since they reduce to "#define _mesa_bitcount popcount", but they
provide a fallback implementation. This is important because 32bit msvc
doesn't have popcountll, just popcount; so when nir (for example)
includes the core mesa header it doesn't (and shouldn't) link with core
mesa. To fix this we'll promote the version out of gallium util, then
replace the core mesa uses with the util version, since nir (and other
non-core mesa users) can and do link with mesautils.

Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2018-09-07 10:21:26 -07:00
Eric Anholt 89ac6fa403 v3d: Add pack header support for f187 values.
V3D only has one of these (the top 16 bits of a float32) left in its CLs,
but VC4 had many more.  This gets us proper pretty-printing of the values
instead of a large uint.
2018-07-30 14:29:01 -07:00
Eric Anholt ee9a6a13fb v3d, vc4: Disable valgrind checking of CLE inputs when NDEBUG is set.
For a meson -Db_ndebug=true release build on x86_64, reduces text size of
libv3d.a from 53.0k to 51.6k.  Inspired by 0d5329d626 ("anv: Disable
__gen_validate_value if NDEBUG is set.")
2018-06-21 15:46:40 -07:00
Eric Engestrom bb46111c01 broadcom: use NDEBUG to guard asserts
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2017-11-28 09:50:36 +00:00
Eric Anholt ee170c9d83 broadcom/genxml: Support unpacking fixed-point fractional values.
This was an oversight in the original XML support, because unpacking
wasn't used much.  The new XML-based CL dumper will want it, though.
2017-07-13 11:28:28 -07:00
Eric Anholt 7f80a9ff13 vc4: Introduce XML-based packet header generation like Intel's.
I really liked this idea, as it should help with management of packet
parsing tools like the CL dump.  The python script is forked off of theirs
because our packets are byte-based instead of dwords, and the changes to
do so while avoiding performance regressions due to unaligned accesses
were quite invasive.

v2: Fix Android.mk paths, drop shebang for python script, fix overlap
    detection.

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Rob Herring <robh@kernel.org>
2017-06-30 12:25:45 -07:00