nv50/ir: fix combineLd/St to update existing records as necessary
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 24 Jun 2017 22:35:29 +0000 (18:35 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Tue, 27 Jun 2017 00:24:19 +0000 (20:24 -0400)
commit4a79f2be337cef920fc8ea5048fabc106bac492e
tree77d4519c44c2681721b02dbd2920a622afe155e3
parent7d56ae5eb2e32e88c90261d6782890ce0c524e7d
nv50/ir: fix combineLd/St to update existing records as necessary

Previously the logic would decide that the record is kept, which
translates into keep = false in the caller, which meant that these
passes did not run.

While it's right that keep = false which means that a new record does
not need to be added, we do still have to perform the usual list
maintenance. It's easiest to do this pre-merge rather than post.

The lowering that clip/cull distance passes produce triggers this bug in
TCS (since reading outputs is done differently in other stages), but it
should be possible to achieve it with the right sequence of regular
reads/writes.

Fixes: KHR-GL45.cull_distance.functional
Fixes: generated_tests/spec/arb_tessellation_shader/execution/tes-input/tes-input-gl_ClipDistance.shader_test
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp