nir: fix lower_wpos_ytransform in load_frag_coord case
authorRob Clark <robdclark@chromium.org>
Fri, 26 Apr 2019 18:39:42 +0000 (11:39 -0700)
committerRob Clark <robdclark@chromium.org>
Thu, 2 May 2019 18:19:22 +0000 (11:19 -0700)
commita2c89a85f4f69b5eacc8052d6cc4f4efd07a1294
treeaba9d002484b8846cacd52d5fc0153096a8c4bd4
parent691d5a825a633fea81af9f83828d5d526ac6b22d
nir: fix lower_wpos_ytransform in load_frag_coord case

Apparently we never hit this path.  Or at least haven't for a rather
long time.  But in either case (load_deref or load_frag_coord), we can
just directly use the intrinsic's ssa dest.  So stop passing the
nir_variable (which would be NULL in the load_frag_coord case) around
and instead just use &intr->dest.ssa.

(This ofc means we need to setup the cursor to insert *after* the
instruction, which seems to be another bug of the original
implementation.)

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
src/compiler/nir/nir_lower_wpos_ytransform.c