[Mesa-dev] [PATCH 07/51] glsl: Add conversion ops to/from 16-bit floats
Matt Turner
mattst88 at gmail.com
Mon Nov 27 19:51:36 UTC 2017
On 11/24, Topi Pohjolainen wrote:
>Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
>---
> src/compiler/glsl/glsl_to_nir.cpp | 2 ++
> src/compiler/glsl/ir.cpp | 8 ++++++++
> src/compiler/glsl/ir_expression_operation.py | 5 +++++
> src/compiler/glsl/ir_validate.cpp | 8 ++++++++
> src/mesa/program/ir_to_mesa.cpp | 2 ++
> src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 3 +++
> 6 files changed, 28 insertions(+)
>
>diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp
>index 289f8be031..14c358465b 100644
>--- a/src/compiler/glsl/glsl_to_nir.cpp
>+++ b/src/compiler/glsl/glsl_to_nir.cpp
>@@ -1561,6 +1561,8 @@ nir_visitor::visit(ir_expression *ir)
> case ir_unop_d2b:
> case ir_unop_i2d:
> case ir_unop_u2d:
>+ case ir_unop_h2f:
>+ case ir_unop_f2h:
> case ir_unop_i642i:
> case ir_unop_i642u:
> case ir_unop_i642f:
>diff --git a/src/compiler/glsl/ir.cpp b/src/compiler/glsl/ir.cpp
>index 2c61dd9d64..a901ec5683 100644
>--- a/src/compiler/glsl/ir.cpp
>+++ b/src/compiler/glsl/ir.cpp
>@@ -281,6 +281,7 @@ ir_expression::ir_expression(int op, ir_rvalue *op0)
> case ir_unop_i2f:
> case ir_unop_u2f:
> case ir_unop_d2f:
>+ case ir_unop_h2f:
> case ir_unop_bitcast_i2f:
> case ir_unop_bitcast_u2f:
> case ir_unop_i642f:
>@@ -334,6 +335,13 @@ ir_expression::ir_expression(int op, ir_rvalue *op0)
> this->type = glsl_type::get_instance(GLSL_TYPE_UINT64,
> op0->type->vector_elements, 1);
> break;
>+
>+ case ir_unop_f2h:
>+ this->type = glsl_type::get_instance(GLSL_TYPE_FLOAT16,
>+ op0->type->vector_elements, 1);
Tabs on this line.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20171127/8027fa90/attachment.sig>
More information about the mesa-dev
mailing list