aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/opt_constant_propagation.cpp
diff options
context:
space:
mode:
authorKristian H. Kristensen <[email protected]>2020-02-04 15:50:25 -0800
committerMarge Bot <[email protected]>2020-03-09 16:31:08 +0000
commit505428f20b082f04787630e6d0e5f4dfbce5efb7 (patch)
treec455eb18f66484380806616ed58124f1ab8f7991 /src/compiler/glsl/opt_constant_propagation.cpp
parent83afebf359983b885b22320f4d66ca7c8007593e (diff)
glsl: Implement constant propagation for fp16
Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3929>
Diffstat (limited to 'src/compiler/glsl/opt_constant_propagation.cpp')
-rw-r--r--src/compiler/glsl/opt_constant_propagation.cpp3
1 files changed, 3 insertions, 0 deletions
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;