[Mesa-dev] [PATCH 10/12] anv: use correct header guards
Emil Velikov
emil.l.velikov at gmail.com
Tue Oct 11 17:26:24 UTC 2016
From: Emil Velikov <emil.velikov at collabora.com>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
src/intel/vulkan/anv_genX.h | 4 ++++
src/intel/vulkan/anv_meta.h | 5 ++++-
src/intel/vulkan/anv_nir.h | 5 ++++-
src/intel/vulkan/anv_private.h | 5 ++++-
src/intel/vulkan/anv_wsi.h | 5 ++++-
src/intel/vulkan/genX_pipeline_util.h | 5 +++++
src/intel/vulkan/vk_format_info.h | 5 ++++-
7 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/src/intel/vulkan/anv_genX.h b/src/intel/vulkan/anv_genX.h
index 81ebbaa..e0cdf7e 100644
--- a/src/intel/vulkan/anv_genX.h
+++ b/src/intel/vulkan/anv_genX.h
@@ -22,6 +22,10 @@
*/
/*
+ * NOTE: The header can be included multiple times, from the same file.
+ */
+
+/*
* Gen-specific function declarations. This header must *not* be included
* directly. Instead, it is included multiple times by gen8_private.h.
*
diff --git a/src/intel/vulkan/anv_meta.h b/src/intel/vulkan/anv_meta.h
index 47c6d33..a7cb730 100644
--- a/src/intel/vulkan/anv_meta.h
+++ b/src/intel/vulkan/anv_meta.h
@@ -21,7 +21,8 @@
* IN THE SOFTWARE.
*/
-#pragma once
+#ifndef ANV_META_H
+#define ANV_META_H
#include "anv_private.h"
@@ -67,3 +68,5 @@ anv_meta_get_iview_layer(const struct anv_image *dest_image,
#ifdef __cplusplus
}
#endif
+
+#endif /* ANV_META_H */
diff --git a/src/intel/vulkan/anv_nir.h b/src/intel/vulkan/anv_nir.h
index 567de6c..4fff7f4 100644
--- a/src/intel/vulkan/anv_nir.h
+++ b/src/intel/vulkan/anv_nir.h
@@ -21,7 +21,8 @@
* IN THE SOFTWARE.
*/
-#pragma once
+#ifndef ANV_NIR_H
+#define ANV_NIR_H
#include "nir/nir.h"
#include "anv_private.h"
@@ -43,3 +44,5 @@ void anv_nir_apply_pipeline_layout(struct anv_pipeline *pipeline,
#ifdef __cplusplus
}
#endif
+
+#endif /* ANV_NIR_H */
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index fd886bf..e821714 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -21,7 +21,8 @@
* IN THE SOFTWARE.
*/
-#pragma once
+#ifndef ANV_PRIVATE_H
+#define ANV_PRIVATE_H
#include <stdlib.h>
#include <stdio.h>
@@ -2009,3 +2010,5 @@ ANV_DEFINE_STRUCT_CASTS(anv_common, VkImageMemoryBarrier)
#ifdef __cplusplus
}
#endif
+
+#endif /* ANV_PRIVATE_H */
diff --git a/src/intel/vulkan/anv_wsi.h b/src/intel/vulkan/anv_wsi.h
index 67cb690..02be86d 100644
--- a/src/intel/vulkan/anv_wsi.h
+++ b/src/intel/vulkan/anv_wsi.h
@@ -21,7 +21,8 @@
* IN THE SOFTWARE.
*/
-#pragma once
+#ifndef ANV_WSI_H
+#define ANV_WSI_H
#include "anv_private.h"
@@ -76,3 +77,5 @@ VkResult anv_x11_init_wsi(struct anv_physical_device *physical_device);
void anv_x11_finish_wsi(struct anv_physical_device *physical_device);
VkResult anv_wl_init_wsi(struct anv_physical_device *physical_device);
void anv_wl_finish_wsi(struct anv_physical_device *physical_device);
+
+#endif /* ANV_WSI_H */
diff --git a/src/intel/vulkan/genX_pipeline_util.h b/src/intel/vulkan/genX_pipeline_util.h
index 0ff92f1..6ed8230 100644
--- a/src/intel/vulkan/genX_pipeline_util.h
+++ b/src/intel/vulkan/genX_pipeline_util.h
@@ -21,6 +21,9 @@
* IN THE SOFTWARE.
*/
+#ifndef GENX_PIPELINE_UTIL_H
+#define GENX_PIPELINE_UTIL_H
+
#include "common/gen_l3_config.h"
#include "common/gen_sample_positions.h"
#include "vk_format_info.h"
@@ -969,3 +972,5 @@ emit_3dstate_streamout(struct anv_pipeline *pipeline,
so.RenderingDisable = rs_info->rasterizerDiscardEnable;
}
}
+
+#endif /* GENX_PIPELINE_UTIL_H */
diff --git a/src/intel/vulkan/vk_format_info.h b/src/intel/vulkan/vk_format_info.h
index effed55..5c5a1f3 100644
--- a/src/intel/vulkan/vk_format_info.h
+++ b/src/intel/vulkan/vk_format_info.h
@@ -21,7 +21,8 @@
* IN THE SOFTWARE.
*/
-#pragma once
+#ifndef VK_FORMAT_INFO_H
+#define VK_FORMAT_INFO_H
#include <stdbool.h>
#include <vulkan/vulkan.h>
@@ -63,3 +64,5 @@ vk_format_is_depth_or_stencil(VkFormat format)
const VkImageAspectFlags aspects = vk_format_aspects(format);
return aspects & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT);
}
+
+#endif /* VK_FORMAT_INFO_H */
--
2.10.0
More information about the mesa-dev
mailing list