glsl_to_tgsi: try harder to lower unsupported ir_binop_vector_extract
authorMarek Olšák <marek.olsak@amd.com>
Fri, 13 Apr 2018 19:18:26 +0000 (15:18 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 18 Apr 2018 19:34:52 +0000 (15:34 -0400)
This fixes some piglits.

Cc: 18.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/state_tracker/st_glsl_to_tgsi.cpp

index 01a58d7d2c6758df8ed46413ba73a436322a610d..b321112cf8878e4b3d0eaba4712d2e273547911f 100644 (file)
@@ -7124,6 +7124,11 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
          } while (progress);
       }
 
+      /* Do this again to lower ir_binop_vector_extract introduced
+       * by optimization passes.
+       */
+      do_vec_index_to_cond_assign(ir);
+
       validate_ir_tree(ir);
    }