Mesa (main): freedreno/computerator: Fix @buf header

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Dec 20 20:09:56 UTC 2021


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

Author: Rob Clark <robdclark at chromium.org>
Date:   Thu Dec  2 16:10:39 2021 -0800

freedreno/computerator: Fix @buf header

Order is important in the grammar, the more specific match needs to go
first.

Fixes: ba1c989348d ("freedreno/computerator: pass iova of buffer to const register")
Signed-off-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14231>

---

 src/freedreno/ir3/ir3_parser.y | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/freedreno/ir3/ir3_parser.y b/src/freedreno/ir3/ir3_parser.y
index adb9c9e334b..a2469dfbfec 100644
--- a/src/freedreno/ir3/ir3_parser.y
+++ b/src/freedreno/ir3/ir3_parser.y
@@ -704,7 +704,7 @@ const_header:      T_A_CONST '(' T_CONSTANT ')' const_val ',' const_val ',' cons
 }
 
 buf_header_addr_reg:
-|                  '(' T_CONSTANT ')' {
+                   '(' T_CONSTANT ')' {
                        assert(($2 & 0x1) == 0);  /* half-reg not allowed */
                        unsigned reg = $2 >> 1;
 
@@ -712,6 +712,7 @@ buf_header_addr_reg:
                        /* reserve space in immediates for the actual value to be plugged in later: */
                        add_const($2, 0, 0, 0, 0);
 }
+|
 
 buf_header:        T_A_BUF const_val {
                        int idx = info->num_bufs++;



More information about the mesa-commit mailing list