[Mesa-dev] [PATCH 13/29] nir/print: Adds support for printing double typed consts
Samuel Iglesias Gonsálvez
siglesias at igalia.com
Mon Mar 21 12:05:52 UTC 2016
From: Andres Gomez <agomez at igalia.com>
---
src/compiler/nir/nir_print.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c
index f7c404a..30a8233 100644
--- a/src/compiler/nir/nir_print.c
+++ b/src/compiler/nir/nir_print.c
@@ -278,6 +278,13 @@ print_constant(nir_constant *c, const struct glsl_type *type, print_state *state
}
break;
+ case GLSL_TYPE_DOUBLE:
+ for (i = 0; i < total_elems; i++) {
+ if (i > 0) fprintf(fp, ", ");
+ fprintf(fp, "%f", c->value.d[i]);
+ }
+ break;
+
case GLSL_TYPE_STRUCT:
for (i = 0; i < c->num_elements; i++) {
if (i > 0) fprintf(fp, ", ");
--
2.5.0
More information about the mesa-dev
mailing list