nvc0/ir: fix overwriting of value backing non-constant gather offset
authorIlia Mirkin <imirkin@alum.mit.edu>
Mon, 10 Oct 2016 16:06:59 +0000 (12:06 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Mon, 10 Oct 2016 18:28:32 +0000 (14:28 -0400)
commit5239bd59207752a3acae367fc3faa76ab17d01e4
tree02f070a2deb1849ff5ceeaa52a85719f89c1d98f
parent0a898ec28bf1bd1bd302c881af13a02b557acb07
nvc0/ir: fix overwriting of value backing non-constant gather offset

Normally the value is an immediate, which is moved to some temporary, so
there's no problem. In the case of a non-constant offset (as allowed by
ARB_gpu_shader5), we have to take care to copy it first before using it
to build up the bits.

This fixes a compilation error observed in F1 2015.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp