OSDN Git Service

nir/algebraic: Only replace an instruction once
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 15 Jan 2015 03:08:32 +0000 (19:08 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 15 Jan 2015 15:20:24 +0000 (07:20 -0800)
commit0d05d1226e0f51f703e0dcbf736375ee4f252473
tree22c439a2367735b9096c595d570a1d30f9c77385
parentc56adc68e2e75276785fd933b47621c87f9fd3ee
nir/algebraic: Only replace an instruction once

Without the break, it was possible that an instruction would match multiple
expressions.  If this happened, you could end up trying to replace it
multiple times and get a segfault.  This makes it so that, after a
successful replacement, it moves on to the next instruction.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/glsl/nir/nir_algebraic.py