glsl/lower_distance: only set max_array_access for 1D clip dist arrays
authorDave Airlie <airlied@redhat.com>
Sun, 11 Jun 2017 23:45:36 +0000 (00:45 +0100)
committerDave Airlie <airlied@redhat.com>
Mon, 12 Jun 2017 19:37:06 +0000 (20:37 +0100)
commit53587b7105aaf10ecf7e5dcb8ed63265af688738
treec36b3f578db28ce35654947e2aae1eee9900f29d
parent1c5d4c9d74fb773dbbdfc99d4f570160a182e0da
glsl/lower_distance: only set max_array_access for 1D clip dist arrays

The max_array_access field applies to the first dimension, which means
we only want to set it for the 1D clip dist arrays.

This fixes an ir_validate assert seen with
KHR-GL44.cull_distance.functional
on nouveau and radeon with debug builds.

Fixes: a08c4ebbe (glsl: rewrite clip/cull distance lowering pass)
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Tested-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/compiler/glsl/lower_distance.cpp