st/glsl_to_tgsi: only the first (inner-most) array reference can be a 2D index

Don't get distracted by record dereferences between array references.

Fixes dEQP-GLES31.functional.tessellation.user_defined_io.per_vertex_block.*

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Nicolai Hähnle 2017-09-07 18:43:42 +02:00
parent 5b1b088f2a
commit 03203b7448
1 changed files with 1 additions and 1 deletions

View File

@ -2532,7 +2532,7 @@ glsl_to_tgsi_visitor::visit(ir_dereference_array *ir)
ir->array->accept(this);
src = this->result;
if (ir->array->ir_type != ir_type_dereference_array) {
if (!src.has_index2) {
switch (this->prog->Target) {
case GL_TESS_CONTROL_PROGRAM_NV:
is_2D = (src.file == PROGRAM_INPUT || src.file == PROGRAM_OUTPUT) &&