radeonsi: fix a nasty bug in si_pm4.c

If you did:
  si_pm4_set_reg(pm4, reg, val0);
  si_pm4_cmd_add(pm4, val1);
  si_pm4 set_reg(pm4, reg + 4, val1);

it wrote val0 to reg, val1 to reg + 4, and val2 to reg + 8.

This fixes it by clearing last_opcode in si_pm4_cmd_add, so that
si_pm4_set_reg doesn't try to combine set_reg calls across si_pm4_cmd_add.

Fixes: da78d50bc87 - radeonsi: make si_pm4_cmd_begin/end static and simplify all usages

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7721>
(cherry picked from commit 0d4f1dcd155be753ff49cd763be916cf701cda25)
2 files changed