glsl: Add fp16 case for ir_triop_lrp optimization
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3929>
This commit is contained in:

committed by
Marge Bot

parent
668ab9f19d
commit
83afebf359
@@ -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;
|
||||
|
Reference in New Issue
Block a user