[Mesa-dev] [PATCH 11/12] anv: error out if anv_genX.h is included by !anv_private.h

Emil Velikov emil.l.velikov at gmail.com
Tue Oct 11 17:26:25 UTC 2016


From: Emil Velikov <emil.velikov at collabora.com>

Update the comment to reflect the correct filename and add a guard to
catch incorrect inclusion of the header.

Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 src/intel/vulkan/anv_genX.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_genX.h b/src/intel/vulkan/anv_genX.h
index e0cdf7e..821356e 100644
--- a/src/intel/vulkan/anv_genX.h
+++ b/src/intel/vulkan/anv_genX.h
@@ -27,11 +27,15 @@
 
 /*
  * Gen-specific function declarations.  This header must *not* be included
- * directly.  Instead, it is included multiple times by gen8_private.h.
+ * directly.  Instead, it is included multiple times by anv_private.h.
  * 
  * In this header file, the usual genx() macro is available.
  */
 
+#ifndef ANV_PRIVATE_H
+#error This file is included by means other than anv_private.h
+#endif
+
 VkResult genX(init_device_state)(struct anv_device *device);
 
 void genX(cmd_buffer_emit_state_base_address)(struct anv_cmd_buffer *cmd_buffer);
-- 
2.10.0



More information about the mesa-dev mailing list