diff options
author | Kenneth Graunke <[email protected]> | 2016-05-20 16:29:44 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2016-05-20 16:33:24 -0700 |
commit | f7eb95a5269fab015df23dd7c5152418bbd10033 (patch) | |
tree | f2b172136ab349c8c1ea541a86231661034d13bc /src | |
parent | 0970c563d6e4a30ab0852ef664dc97a995997f88 (diff) |
nir: Fix crash in nir_lower_wpos_center().
Otherwise we rewrote the fadd to use itself, causing crashes in
validation. Instead, start after the last use like we should.
A brown paper bag fix. Fixes crashes in several Vulkan tests.
Signed-off-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/nir/nir_lower_wpos_center.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_lower_wpos_center.c b/src/compiler/nir/nir_lower_wpos_center.c index 0de750365d1..7b70af30146 100644 --- a/src/compiler/nir/nir_lower_wpos_center.c +++ b/src/compiler/nir/nir_lower_wpos_center.c @@ -54,7 +54,7 @@ add_half_to_fragcoord(nir_builder *b, nir_intrinsic_instr *intr) wpos = nir_fadd(b, wpos, nir_imm_vec4(b, 0.5f, 0.5f, 0.0f, 0.0f)); nir_ssa_def_rewrite_uses_after(&intr->dest.ssa, nir_src_for_ssa(wpos), - &intr->instr); + wpos->parent_instr); } static bool |