asahi: Strengthen agx_usc_uniform contract

Check the size explicitly, instead of just implicitly in the GenXML pack: it is
the responsibility of the caller to split up larger uploads. While this is
nominally more complicated, agx_usc_uniform is called in the draw hot path
whereas the actual splitting decision can usually be done at compile-time.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21118>
This commit is contained in:
Alyssa Rosenzweig
2023-02-03 20:54:41 -05:00
committed by Marge Bot
parent ea38709345
commit b0f1964771
+1
View File
@@ -68,6 +68,7 @@ agx_usc_uniform(struct agx_usc_builder *b, unsigned start_halfs,
unsigned size_halfs, uint64_t buffer)
{
assert((start_halfs + size_halfs) < (1 << 9) && "uniform file overflow");
assert(size_halfs <= 64 && "caller's responsibility to split");
if (start_halfs & BITFIELD_BIT(8)) {
agx_usc_pack(b, UNIFORM_HIGH, cfg) {