nir/lower_scratch: Ensure we don't lower vars with unsupported usage.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 26 Jul 2021 13:23:29 +0000 (15:23 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 13 Aug 2021 20:56:30 +0000 (20:56 +0000)
commitfa6cd6e00daace43b70800edf2499a7d7a779aa8
treea9bc93225ae1eac8b7de836862b2562043479aa1
parent04bd2a12451160609b6f163e1a86437948a48fcd
nir/lower_scratch: Ensure we don't lower vars with unsupported usage.

Need to avoid lowering temps when they are used by other instructions,
like the rt instructions (some of the shader call parameters get
converted to temp variables and we will lower them later with
the explicit io lowering pass as we need to guarantee they will
end up in scratch).

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12162>
src/compiler/nir/nir_lower_scratch.c