isl: round format alignment to nearest power of 2
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 19 Aug 2016 23:38:05 +0000 (00:38 +0100)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Thu, 1 Sep 2016 10:36:09 +0000 (11:36 +0100)
commit2dc6930a5a54c0f586ba09437123c380f3eae456
tree354f21d4de4642f9118212206f1000d9a6ad076f
parentfc6be400115c0caa4e5cbb810917d6b8a11596a4
isl: round format alignment to nearest power of 2

A few inline asserts in anv assume alignments are power of 2, but with
formats like R8G8B8 we have odd alignments.

v2: round up to power of 2 (Ilia)

v3: reuse util_next_power_of_two() from gallium/aux/util/u_math.h (Ilia)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/isl/isl.c
src/intel/isl/isl_priv.h