[Mesa-dev] [PATCH 09/51] glsl: Allow 16-bit neg() and dot()
Matt Turner
mattst88 at gmail.com
Mon Nov 27 19:55:54 UTC 2017
On 11/24, Topi Pohjolainen wrote:
>Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
>---
> src/compiler/glsl/ir_validate.cpp | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
>diff --git a/src/compiler/glsl/ir_validate.cpp b/src/compiler/glsl/ir_validate.cpp
>index a20f52e527..735e862141 100644
>--- a/src/compiler/glsl/ir_validate.cpp
>+++ b/src/compiler/glsl/ir_validate.cpp
>@@ -263,7 +263,8 @@ ir_validate::visit_leave(ir_expression *ir)
> assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT ||
> ir->operands[0]->type->is_float() ||
> ir->operands[0]->type->is_double() ||
>- ir->operands[0]->type->base_type == GLSL_TYPE_INT64);
>+ ir->operands[0]->type->base_type == GLSL_TYPE_INT64 ||
>+ ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT16);
> assert(ir->type == ir->operands[0]->type);
> break;
>
>@@ -742,9 +743,11 @@ ir_validate::visit_leave(ir_expression *ir)
>
> case ir_binop_dot:
> assert(ir->type == glsl_type::float_type ||
>- ir->type == glsl_type::double_type);
>+ ir->type == glsl_type::double_type ||
>+ ir->type->base_type == GLSL_TYPE_FLOAT16);
> assert(ir->operands[0]->type->is_float() ||
>- ir->operands[0]->type->is_double());
>+ ir->operands[0]->type->is_double() ||
>+ ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT16);
I think we should have an is_half_float() function since already have
is_float/is_double.
-------------- 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/ec79afb5/attachment.sig>
More information about the mesa-dev
mailing list