[Mesa-dev] [PATCH v3 07/10] st/glsl_to_tgsi: don't optimize mul+add to mad if expression is precise

Nicolai Hähnle nhaehnle at gmail.com
Tue Jun 20 10:23:09 UTC 2017


With Roland's suggestion, patches 6 & 7:

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>


On 16.06.2017 21:08, Karol Herbst wrote:
> Signed-off-by: Karol Herbst <karolherbst at gmail.com>
> ---
>   src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> index 6cc5a39510..6ac267be94 100644
> --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> @@ -1557,7 +1557,7 @@ glsl_to_tgsi_visitor::visit(ir_expression *ir)
>   
>      /* Quick peephole: Emit MAD(a, b, c) instead of ADD(MUL(a, b), c)
>       */
> -   if (ir->operation == ir_binop_add) {
> +   if (!this->precise && ir->operation == ir_binop_add) {
>         if (try_emit_mad(ir, 1))
>            return;
>         if (try_emit_mad(ir, 0))
> 


-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the mesa-dev mailing list