freedreno/a5xx: Skip SSBO emit when none are enabled.

There was a weird NUM_UNIT=0 in a crash dump I was looking at, but this
doesn't fix the crash.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24358>
This commit is contained in:
Emma Anholt 2023-07-27 17:24:12 -07:00 committed by Marge Bot
parent e9a6832a1b
commit 371c18b331

View file

@ -419,6 +419,9 @@ emit_ssbos(struct fd_context *ctx, struct fd_ringbuffer *ring,
{
unsigned count = util_last_bit(so->enabled_mask);
if (count == 0)
return;
OUT_PKT7(ring, CP_LOAD_STATE4, 3 + 2 * count);
OUT_RING(ring, CP_LOAD_STATE4_0_DST_OFF(0) |
CP_LOAD_STATE4_0_STATE_SRC(SS4_DIRECT) |