freedreno/ir3: fix issue with emit_tex()
authorRob Clark <robdclark@gmail.com>
Thu, 11 Aug 2016 17:27:37 +0000 (13:27 -0400)
committerRob Clark <robdclark@gmail.com>
Sat, 13 Aug 2016 13:33:47 +0000 (09:33 -0400)
commit78ba262d004989c43b0a9e76c84b71bb16d4b333
treed6b5604447b3f26931ab38a10224e8cda9f24018
parenta32c87f74be1beed546d6d8853933d1b48f42f18
freedreno/ir3: fix issue with emit_tex()

For various tex fetch instructions, coord's get fixed up in different
ways.  But modifying the array returned from get_src() has side-effects
if the same SSA src is used again.. the later instruction will see the
previous fixups.

Fix this, and const'ify things to prevent this sort of mistake in the
future.

Noticed by Varad when adding support for txf_ms.

Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c