nvk: Rework spill helpers and DRAW_COUNT spilling
authorFaith Ekstrand <faith.ekstrand@collabora.com>
Mon, 27 Mar 2023 21:22:12 +0000 (16:22 -0500)
committerMarge Bot <emma+marge@anholt.net>
Fri, 4 Aug 2023 21:32:05 +0000 (21:32 +0000)
commit3d8ffa3dd45a2c62ac383540d133d896cba7bd63
tree5b81068d8eb64e4f9f5336f0a08fcb1f5e26744a
parent6b7d13529a627ffc5b975bf95d8981276abec5ab
nvk: Rework spill helpers and DRAW_COUNT spilling

The new helpers, now moved to nvk_mme.h, take an nvk_mme_scratch value
to ensure no overlap.  They also ensure that we use exactly the same
register for the unspilled value as the spilled value.  This makes
spilling safe for loop-carried values and the like.  The old
nvk_mme_fill() helper just loads a spilled value to a new, possibly
different register.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
src/nouveau/vulkan/nvk_cmd_draw.c
src/nouveau/vulkan/nvk_mme.h