From 505428f20b082f04787630e6d0e5f4dfbce5efb7 Mon Sep 17 00:00:00 2001 From: "Kristian H. Kristensen" Date: Tue, 4 Feb 2020 15:50:25 -0800 Subject: [PATCH] glsl: Implement constant propagation for fp16 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Ian Romanick Reviewed-by: Marek Olšák Reviewed-by: Alyssa Rosenzweig Part-of: --- src/compiler/glsl/opt_constant_propagation.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/glsl/opt_constant_propagation.cpp b/src/compiler/glsl/opt_constant_propagation.cpp index cc57c48c83a..674208348b8 100644 --- a/src/compiler/glsl/opt_constant_propagation.cpp +++ b/src/compiler/glsl/opt_constant_propagation.cpp @@ -208,6 +208,9 @@ ir_constant_propagation_visitor::constant_propagation(ir_rvalue **rvalue) { case GLSL_TYPE_FLOAT: data.f[i] = found->constant->value.f[rhs_channel]; break; + case GLSL_TYPE_FLOAT16: + data.f16[i] = found->constant->value.f16[rhs_channel]; + break; case GLSL_TYPE_DOUBLE: data.d[i] = found->constant->value.d[rhs_channel]; break; -- 2.30.2