Mesa (master): i965: Add a weak no-op nir_print_instr() symbol
Matt Turner
mattst88 at kemper.freedesktop.org
Mon May 15 20:06:30 UTC 2017
Module: Mesa
Branch: master
Commit: aae2626be8a1e6ba976a0dc51141e73c4e4b3473
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=aae2626be8a1e6ba976a0dc51141e73c4e4b3473
Author: Matt Turner <mattst88 at gmail.com>
Date: Mon May 1 11:43:07 2017 -0700
i965: Add a weak no-op nir_print_instr() symbol
intel_asm_annotation.c is part of libintel_compiler.la, which contains
code for disassembling and validating shaders that we want to call in
aubinator_error_decode.
dump_assembly() calls nir_print_instr() to print annotations, and
although dump_assembly() is not called by aubinator_error_decode (nor is
any function in intel_asm_annotation.c) it causes undefined references
to nir_print_instr().
To work around, provide a no-op weak symbol to resolve against.
---
src/intel/compiler/intel_asm_annotation.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/intel/compiler/intel_asm_annotation.c b/src/intel/compiler/intel_asm_annotation.c
index 1f3b78476e..b07a545a12 100644
--- a/src/intel/compiler/intel_asm_annotation.c
+++ b/src/intel/compiler/intel_asm_annotation.c
@@ -27,6 +27,8 @@
#include "intel_asm_annotation.h"
#include "compiler/nir/nir.h"
+__attribute__((weak)) void nir_print_instr(const nir_instr *instr, FILE *fp) {}
+
void
dump_assembly(void *assembly, int num_annotations, struct annotation *annotation,
const struct gen_device_info *devinfo)
More information about the mesa-commit
mailing list