[Mesa-dev] [PATCH] glsl/standalone: add missing do_mat_op_to_vec() pass
Kenneth Graunke
kenneth at whitecape.org
Thu Jan 19 18:48:14 UTC 2017
On Thursday, January 19, 2017 1:16:18 PM PST Rob Clark wrote:
> 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) {
>
The standalone compiler can optionally link shaders. You don't want to
lower matrices prior to linking, as that could break varying matching...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170119/8850f851/attachment.sig>
More information about the mesa-dev
mailing list