mesa/src/amd
Michel Dänzer e3e704c7e7 amd/addrlib: Use enum instead of sparse chars to identify dimensions
The enum values can be used directly as indices into arrays, simplifying
the code.

This significantly cuts down the number of CPU cycles spent inside

* Addr::V2::Gfx9Lib::HwlComputeDccAddrFromCoord:

+------------------------------------------------------------------------+
|+         +++    +                                                x x xx|
|    |_____AM____|                                                 |_A__||
+------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x   5         14.89         15.44         15.14        15.156    0.24704251
+   5          8.26          9.96          9.37         9.282     0.6262747
Difference at 95.0% confidence
	-5.874 +/- 0.694294
	-38.7569% +/- 4.58098%
	(Student's t, pooled s = 0.476051)

* Addr::V2::CoordEq::solve:

+------------------------------------------------------------------------+
| +                                                                x     |
| + +   +   +                                       x           x  x    x|
||__MA____|                                              |______A__M____||
+------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x   5          8.11          9.59          9.21          9.02    0.55605755
+   5          4.28          5.05          4.48         4.564    0.32867917
Difference at 95.0% confidence
	-4.456 +/- 0.666135
	-49.4013% +/- 7.38509%
	(Student's t, pooled s = 0.456744)

(The measured numbers are the percentages of samples inside the
respective function and its calles for
`perf record --call-graph=fp kitty -e false`, measured on a Lenovo
Thinkpad E595 (Picasso))

v2:
* Add missed 'coords[dim] |= bit << ord;' (Pierre-Eric Pelloux-Prayer)
* Put 'ADDR_ASSERT(dim < DIM_S);' where the code previous had
  'ADDR_ASSERT_ALWAYS()' for the s/m dimensions.
* Use 1u for BitsValid (since it's 32-bit unsigned values).
* Use parens in 'BitsValid[dim] & (1u << ord)' for clarity.

Acked-by: Marek Olšák <marek.olsak@amd.com> # v1
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4523>
2020-04-16 11:10:52 +00:00
..
addrlib amd/addrlib: Use enum instead of sparse chars to identify dimensions 2020-04-16 11:10:52 +00:00
common ac,radv: add ac_gpu_info::has_double_rate_fp16 2020-04-09 13:30:54 +02:00
compiler aco: fix emitting stream output with tess eval shaders 2020-04-16 07:57:39 +00:00
llvm radv: enable lowering of GS intrinsics for the LLVM backend 2020-04-08 08:24:05 +02:00
registers ac/registers: adjust some definitions for thread trace on GFX8 2020-03-06 08:00:39 +00:00
vulkan radv: do not abort with unknown/unimplemented descriptor types 2020-04-16 08:14:56 +00:00
Android.addrlib.mk android: amd/addrlib: add gfx10 support 2019-07-10 09:03:55 +02:00
Android.common.mk Android.mk: Tweak MESA_ENABLE_LLVM checks 2020-03-19 21:20:08 +00:00
Android.compiler.mk android: aco: fix PIPE_FORMAT related building errors 2020-03-04 22:25:36 +01:00
Android.mk android: aco: add support for libmesa_aco 2019-09-28 15:56:34 +02:00
Makefile.sources aco: rename aco_lower_bool_phis() -> aco_lower_phis() 2020-04-10 07:19:27 +00:00
meson.build amd: Move all amd/common code that depends on LLVM to amd/llvm. 2019-10-08 00:44:08 +00:00