Module: Mesa
Branch: main
Commit: eeae9b93de181ff1afbd54dca651f60abb39227a
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=eeae9b93de181ff1afbd54dca651f60abb39227a

Author: Alyssa Rosenzweig <[email protected]>
Date:   Thu Feb  9 15:06:04 2023 -0500

agx: Fix AGX_MAX_CF_BINDINGS

Potentially could be larger with aliasing of component offsets, though that
would be silly.

Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21266>

---

 src/asahi/compiler/agx_compile.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/asahi/compiler/agx_compile.h b/src/asahi/compiler/agx_compile.h
index 7e00a28212a..06fb5b5d3bf 100644
--- a/src/asahi/compiler/agx_compile.h
+++ b/src/asahi/compiler/agx_compile.h
@@ -49,8 +49,10 @@ struct agx_varyings_vs {
    unsigned slots[VARYING_SLOT_MAX];
 };
 
-/* Conservative bound */
-#define AGX_MAX_CF_BINDINGS (VARYING_SLOT_MAX)
+/* Conservative bound, * 4 due to offsets (TODO: maybe worth eliminating
+ * coefficient register aliasing?)
+ */
+#define AGX_MAX_CF_BINDINGS (VARYING_SLOT_MAX * 4)
 
 struct agx_varyings_fs {
    /* Number of coefficient registers used */

Reply via email to