Commit Graph

5 Commits

Author SHA1 Message Date
Jason Ekstrand 642283a2c1 panfrost,asahi: Use util_sign_extend for unpacking
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17214>
2022-07-06 11:23:18 +00:00
Alyssa Rosenzweig 62173fa532 panfrost: Strip % in GenXML names
A new Valhall enum will represent percentages, so allow that.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14935>
2022-02-08 20:27:09 +00:00
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
Alyssa Rosenzweig 6eb0770be8 panfrost: Add "hex" type to GenXML
Although known fields wouldn't be given the type "hex", it is useful as
the default type for unknown fields while reverse-engineering, and as
such is used in the Valhall XML.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14063>
2021-12-06 20:46:09 +00:00
Boris Brezillon 8276a8eb55 panfrost: Move genxml related files to a subdir
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12208>
2021-09-30 10:30:19 +00:00
Renamed from src/panfrost/lib/gen_pack.py (Browse further)