[Mesa-dev] [PATCH 01/10] nir: error when directly including nir_builder_opcodes.h

Emil Velikov emil.l.velikov at gmail.com
Wed Oct 7 03:11:28 PDT 2015


The file is meant to be included via nir_builder.h.

Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 src/glsl/nir/nir_builder_opcodes_h.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/glsl/nir/nir_builder_opcodes_h.py b/src/glsl/nir/nir_builder_opcodes_h.py
index e27206e..d85d434 100644
--- a/src/glsl/nir/nir_builder_opcodes_h.py
+++ b/src/glsl/nir/nir_builder_opcodes_h.py
@@ -26,6 +26,10 @@ template = """\
 #ifndef _NIR_BUILDER_OPCODES_
 #define _NIR_BUILDER_OPCODES_
 
+#ifndef NIR_BUILDER_H
+#error "Must not be included directly. Include nir_builder.h instead"
+#endif /* NIR_BUILDER_H */
+
 % for name, opcode in sorted(opcodes.iteritems()):
 ALU${opcode.num_inputs}(${name});
 % endfor
-- 
2.5.0



More information about the mesa-dev mailing list