mesa/src/panfrost
Alyssa Rosenzweig 311077c483 panfrost: Make pan_merge macro more robust
Consider the following innocuous-looking code:

   pan_merge(packed, vtx->attributes[i], ATTRIBUTE);

Under the current implementation, this code is completely broken. Why?
The current implemention is a macro which hardcodes the loop index i,
which shadows the i used to index attributes. Pull out a helper method
so we do the right thing without resulting to further preprocessor abuse
(__COUNTER__).

While making things more robust, assert the crucial pan_merge
invariant that the total size is a multiple of 4; if this fails, the
routine risks memory corruption.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14119>
2021-12-28 13:55:21 +00:00
..
bifrost pan/bi: Don't call useless NIR passes 2021-12-23 14:01:48 +00:00
ci glx: fix querying GLX_FBCONFIG_ID for Window 2021-12-16 01:21:36 +00:00
drm-shim panfrost: Handle AFBC_FEATURES in drm-shim 2021-11-22 13:12:20 +00:00
ds pps: allow drivers to report timestamps in their own time domain 2021-11-22 11:52:46 +00:00
include panfrost: Remove unused MIDGARD_NO_AFBC quirk 2021-10-22 19:33:38 -04:00
lib panfrost: Make pan_merge macro more robust 2021-12-28 13:55:21 +00:00
midgard pan/mdg: Fix definition of UBO unpack 2021-12-14 03:42:28 +00:00
perf panfrost: Fix GPU ID for t76x in get_perf_config 2021-07-12 09:07:48 +00:00
shared util: Add helgrind support for simple_mtx 2020-11-24 21:03:34 +00:00
util panfrost: Add panfrost_compile_inputs->no_idvs option 2021-12-20 18:21:41 +00:00
vulkan panvk: cast negative value to unint8_t 2021-12-23 17:08:24 +01:00
meson.build panfrost: drm-shim support 2021-08-17 22:06:17 +00:00