Mesa (master): nir/print: always use the right FILE *
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Oct 4 15:24:36 UTC 2019
Module: Mesa
Branch: master
Commit: 1264acdf4b75826a826b6cf1028133c491a87772
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1264acdf4b75826a826b6cf1028133c491a87772
Author: Rhys Perry <pendingchaos02 at gmail.com>
Date: Thu Oct 3 19:09:24 2019 +0100
nir/print: always use the right FILE *
Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
---
src/compiler/nir/nir_print.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c
index 4e144c1c955..48844b7ed79 100644
--- a/src/compiler/nir/nir_print.c
+++ b/src/compiler/nir/nir_print.c
@@ -62,6 +62,8 @@ typedef struct {
static void
print_annotation(print_state *state, void *obj)
{
+ FILE *fp = state->fp;
+
if (!state->annotations)
return;
@@ -72,7 +74,7 @@ print_annotation(print_state *state, void *obj)
const char *note = entry->data;
_mesa_hash_table_remove(state->annotations, entry);
- fprintf(stderr, "%s\n\n", note);
+ fprintf(fp, "%s\n\n", note);
}
static void
@@ -465,7 +467,7 @@ print_var_decl(nir_variable *var, print_state *state)
const char *const reorder = (access & ACCESS_CAN_REORDER) ? "reorderable " : "";
fprintf(fp, "%s%s%s%s%s%s", coher, volat, restr, ronly, wonly, reorder);
-#define FORMAT_CASE(x) case x: fprintf(stderr, #x " "); break
+#define FORMAT_CASE(x) case x: fprintf(fp, #x " "); break
switch (var->data.image.format) {
FORMAT_CASE(GL_RGBA32F);
FORMAT_CASE(GL_RGBA32UI);
More information about the mesa-commit
mailing list