[Mesa-dev] [PATCH] glsl/standalone: add missing do_mat_op_to_vec() pass

Rob Clark robdclark at gmail.com
Thu Jan 19 18:16:18 UTC 2017


glsl_to_nir expects matrix ops to be lowered away to vector by the time
it runs, but standalone wasn't bothering to call this pass.

Signed-off-by: Rob Clark <robdclark at gmail.com>
---
 src/compiler/glsl/standalone.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/compiler/glsl/standalone.cpp b/src/compiler/glsl/standalone.cpp
index 9a8d75d..20fe231 100644
--- a/src/compiler/glsl/standalone.cpp
+++ b/src/compiler/glsl/standalone.cpp
@@ -381,6 +381,7 @@ compile_shader(struct gl_context *ctx, struct gl_shader *shader)
       new(shader) _mesa_glsl_parse_state(ctx, shader->Stage, shader);
 
    _mesa_glsl_compile_shader(ctx, shader, options->dump_ast, options->dump_hir);
+   do_mat_op_to_vec(shader->ir);
 
    /* Print out the resulting IR */
    if (!state->error && options->dump_lir) {
-- 
2.9.3



More information about the mesa-dev mailing list