iris: correctly set alignment to next power of two for struct size
authorRohan Garg <rohan.garg@intel.com>
Fri, 2 Dec 2022 15:39:33 +0000 (21:09 +0530)
committerMarge Bot <emma+marge@anholt.net>
Thu, 25 May 2023 21:24:44 +0000 (21:24 +0000)
commit14dec0c1479aa149edead1e95b7feb1669ccc4c1
treef144d994f063018fbcfbb62e0077e2e31fa8efc7
parentc54201c196b5337895f6fcd4e65c593635e8f140
iris: correctly set alignment to next power of two for struct size

We're currently aligning the offset to the size of the data structure
itself when the upload manager actually expects a POT. Ideally this
would be the next POT that's greater than the size of the structure.

Fixes: c24a574e6c78 ("iris: Don't allocate a BO per query object")

Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20153>
src/gallium/drivers/iris/iris_query.c