[Mesa-dev] [PATCH] i965: Stop including brw_cfg.h in brw_disasm_info.h

Jason Ekstrand jason at jlekstrand.net
Sat Nov 18 01:31:11 UTC 2017


The brw_disasm_info header is included by certain tools in order to get
shader assembly from binaries so it's a semi-external header.  Including
brw_cfg.h also pulls in brw_shader.h so you end up getting quite a bit
of our back-end compiler internals.  Instead, make the couple of forward
declarations we need and make the header more stand-alone.  This fixes
the meson build.

Cc: Matt Turner <mattst88 at gmail.com>
Fixes: 4f82b17287194ca7d10816f6cfe4712a3e0a03fc
---
 src/intel/compiler/brw_disasm_info.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/intel/compiler/brw_disasm_info.h b/src/intel/compiler/brw_disasm_info.h
index 638b379..b8826e6 100644
--- a/src/intel/compiler/brw_disasm_info.h
+++ b/src/intel/compiler/brw_disasm_info.h
@@ -24,12 +24,16 @@
 #ifndef _INTEL_ASM_ANNOTATION_H
 #define _INTEL_ASM_ANNOTATION_H
 
-#include "brw_cfg.h"
+#include "compiler/glsl/list.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+struct cfg_t;
+struct backend_instruction;
+struct gen_device_info;
+
 struct inst_group {
    struct exec_node link;
 
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list