nvc0/ir: avoid infinite recursion when finding first uses of tex
authorIlia Mirkin <imirkin@alum.mit.edu>
Fri, 29 Aug 2014 03:05:49 +0000 (23:05 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Mon, 1 Sep 2014 22:38:02 +0000 (18:38 -0400)
commitc4bb436f7660c951cd27e52660cf825da68793e5
treec5cb3db1364b858652aa8ef38fe4ecb67aba8a13
parentef858ac77055eb3c6bebd01719cee681959123a0
nvc0/ir: avoid infinite recursion when finding first uses of tex

In certain circumstances, findFirstUses could end up doubling back on
instructions it had already processed, resulting in an infinite
recursion. Avoid this by keeping track of already-visited instructions.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83079
Tested-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.2 10.3" <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.h