[Mesa-dev] [PATCH 04/51] glsl: Print 16-bit constants
Matt Turner
mattst88 at gmail.com
Mon Nov 27 19:40:49 UTC 2017
On 11/24, Topi Pohjolainen wrote:
>---
> src/compiler/glsl/ir_print_visitor.cpp | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/src/compiler/glsl/ir_print_visitor.cpp b/src/compiler/glsl/ir_print_visitor.cpp
>index ea14cdeb6c..ab9a35d73f 100644
>--- a/src/compiler/glsl/ir_print_visitor.cpp
>+++ b/src/compiler/glsl/ir_print_visitor.cpp
>@@ -482,6 +482,7 @@ void ir_print_visitor::visit(ir_constant *ir)
> case GLSL_TYPE_UINT: fprintf(f, "%u", ir->value.u[i]); break;
> case GLSL_TYPE_INT: fprintf(f, "%d", ir->value.i[i]); break;
> case GLSL_TYPE_FLOAT:
>+ case GLSL_TYPE_FLOAT16:
Are fp16 values stored as 32-bit floats in ir->value.f[]? That seems
surprising.
> if (ir->value.f[i] == 0.0f)
> /* 0.0 == -0.0, so print with %f to get the proper sign. */
> fprintf(f, "%f", ir->value.f[i]);
>--
>2.11.0
>
>_______________________________________________
>mesa-dev mailing list
>mesa-dev at lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- 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/44c3acd3/attachment.sig>
More information about the mesa-dev
mailing list