diff options
author | Ilia Mirkin <[email protected]> | 2014-08-28 23:05:49 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2014-09-01 18:38:02 -0400 |
commit | c4bb436f7660c951cd27e52660cf825da68793e5 (patch) | |
tree | c5cb3db1364b858652aa8ef38fe4ecb67aba8a13 /src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.h | |
parent | ef858ac77055eb3c6bebd01719cee681959123a0 (diff) |
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 <[email protected]>
Signed-off-by: Ilia Mirkin <[email protected]>
Cc: "10.2 10.3" <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.h')
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.h b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.h index 7f39c289554..d8ff5cd3d96 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.h +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.h @@ -20,6 +20,8 @@ * OTHER DEALINGS IN THE SOFTWARE. */ +#include <tr1/unordered_set> + #include "codegen/nv50_ir.h" #include "codegen/nv50_ir_build_util.h" @@ -69,7 +71,8 @@ private: bool insertTextureBarriers(Function *); inline bool insnDominatedBy(const Instruction *, const Instruction *) const; void findFirstUses(const Instruction *tex, const Instruction *def, - std::list<TexUse>&); + std::list<TexUse>&, + std::tr1::unordered_set<const Instruction *>&); void findOverwritingDefs(const Instruction *tex, Instruction *insn, const BasicBlock *term, std::list<TexUse>&); |