From: Kristian H. Kristensen Date: Thu, 16 Jan 2020 22:58:57 +0000 (-0800) Subject: glsl: Add fp16 case for ir_triop_lrp optimization X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=83afebf359983b885b22320f4d66ca7c8007593e;p=mesa.git glsl: Add fp16 case for ir_triop_lrp optimization Reviewed-by: Ian Romanick Reviewed-by: Marek Olšák Reviewed-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/compiler/glsl/opt_algebraic.cpp b/src/compiler/glsl/opt_algebraic.cpp index 3147d25aea8..226f6245fca 100644 --- a/src/compiler/glsl/opt_algebraic.cpp +++ b/src/compiler/glsl/opt_algebraic.cpp @@ -983,6 +983,9 @@ ir_algebraic_visitor::handle_expression(ir_expression *ir) ir_constant *one; switch (ir->type->base_type) { + case GLSL_TYPE_FLOAT16: + one = new(mem_ctx) ir_constant(float16_t::one(), op2_components); + break; case GLSL_TYPE_FLOAT: one = new(mem_ctx) ir_constant(1.0f, op2_components); break;