[Mesa-dev] [PATCH] glsl/lower_output_reads: set invariant and precise flags on temporaries

Ilia Mirkin imirkin at alum.mit.edu
Sun Jan 20 00:49:35 UTC 2019


While you're at it, also copy precision. I think that's the only other
relevant bit. With that,

Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

On Sat, Jan 19, 2019 at 6:58 PM Karol Herbst <kherbst at redhat.com> wrote:
>
> fixes a couple of deqp tests (on nvc0 and potential other drivers):
> dEQP-GLES3.functional.shaders.invariance.highp.common_subexpression_1
> dEQP-GLES3.functional.shaders.invariance.highp.common_subexpression_2
> dEQP-GLES3.functional.shaders.invariance.highp.common_subexpression_3
> dEQP-GLES3.functional.shaders.invariance.mediump.common_subexpression_1
> dEQP-GLES3.functional.shaders.invariance.mediump.common_subexpression_2
> dEQP-GLES3.functional.shaders.invariance.mediump.common_subexpression_3
> dEQP-GLES3.functional.shaders.invariance.lowp.common_subexpression_1
> dEQP-GLES3.functional.shaders.invariance.lowp.common_subexpression_2
> dEQP-GLES3.functional.shaders.invariance.lowp.common_subexpression_3
>
> Signed-off-by: Karol Herbst <kherbst at redhat.com>
> ---
>  src/compiler/glsl/lower_output_reads.cpp | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/src/compiler/glsl/lower_output_reads.cpp b/src/compiler/glsl/lower_output_reads.cpp
> index bd3accb3dda..6d4132854f5 100644
> --- a/src/compiler/glsl/lower_output_reads.cpp
> +++ b/src/compiler/glsl/lower_output_reads.cpp
> @@ -101,6 +101,9 @@ output_read_remover::visit(ir_dereference_variable *ir)
>        void *var_ctx = ralloc_parent(ir->var);
>        temp = new(var_ctx) ir_variable(ir->var->type, ir->var->name,
>                                        ir_var_temporary);
> +      /* save invariant and precise flags */
> +      temp->data.invariant = ir->var->data.invariant;
> +      temp->data.precise = ir->var->data.precise;
>        _mesa_hash_table_insert(replacements, ir->var, temp);
>        ir->var->insert_after(temp);
>     }
> --
> 2.20.1
>


More information about the mesa-dev mailing list