freedreno/a6xx: fix OUT_REG() vs growable cmdstream
authorRob Clark <robdclark@chromium.org>
Sat, 14 Dec 2019 17:09:08 +0000 (09:09 -0800)
committerRob Clark <robdclark@chromium.org>
Sat, 14 Dec 2019 17:12:39 +0000 (09:12 -0800)
commit1bf3837395b07793baa48fd71689701d4ea55e38
treed82cd4b7bd5bb6688aee9fd3232bda3c893714d6
parentce52b49348111d6e6277d1899d39440228ceaed8
freedreno/a6xx: fix OUT_REG() vs growable cmdstream

BEGIN_RING() could decide we can't fit the next packet in the current
cmdstream segment, and grow a new segment.  So we need to grab ring->cur
*after* BEGIN_RING(), otherwise we are writing cmdstream past the end of
the previous segment.

Fixes: bdd98b892f3 ("freedreno: New struct packing macros")
Signed-off-by: Rob Clark <robdclark@chromium.org>
src/gallium/drivers/freedreno/a6xx/fd6_pack.h