[Piglit] [PATCH 3/8] ext_image_dma_buf_import: Cleanup up #includes
Chad Versace
chad.versace at linux.intel.com
Sat Oct 12 04:09:17 CEST 2013
A following commit will move piglit's EGL utilities from
libpiglitutil_gl to libpiglitutil. As a consequence, the dma_buf tests
will need to include piglit-util-gl-common.h in addition to
piglit-util-egl.h, otherwise the build will break.
While we're touching the #includes in the dma_buf tests, we might as
well also clean up the #includes by removing redundancy.
Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
tests/spec/ext_image_dma_buf_import/image_common.c | 1 -
tests/spec/ext_image_dma_buf_import/image_common.h | 6 ++++--
tests/spec/ext_image_dma_buf_import/intel_external_sampler_only.c | 5 -----
.../ext_image_dma_buf_import/intel_external_sampler_with_dma_only.c | 1 -
tests/spec/ext_image_dma_buf_import/intel_unsupported_format.c | 3 ---
tests/spec/ext_image_dma_buf_import/invalid_attributes.c | 3 ---
tests/spec/ext_image_dma_buf_import/invalid_hints.c | 3 ---
tests/spec/ext_image_dma_buf_import/missing_attributes.c | 3 ---
tests/spec/ext_image_dma_buf_import/ownership_transfer.c | 4 +---
tests/spec/ext_image_dma_buf_import/sample_common.c | 4 ++--
tests/spec/ext_image_dma_buf_import/sample_common.h | 3 ++-
tests/spec/ext_image_dma_buf_import/sample_rgb.c | 3 ---
12 files changed, 9 insertions(+), 30 deletions(-)
diff --git a/tests/spec/ext_image_dma_buf_import/image_common.c b/tests/spec/ext_image_dma_buf_import/image_common.c
index d4480d8..af01c3d 100644
--- a/tests/spec/ext_image_dma_buf_import/image_common.c
+++ b/tests/spec/ext_image_dma_buf_import/image_common.c
@@ -21,7 +21,6 @@
* IN THE SOFTWARE.
*/
-#include "piglit-util-egl.h"
#include "image_common.h"
static void
diff --git a/tests/spec/ext_image_dma_buf_import/image_common.h b/tests/spec/ext_image_dma_buf_import/image_common.h
index a9a1715..3ace6bc 100644
--- a/tests/spec/ext_image_dma_buf_import/image_common.h
+++ b/tests/spec/ext_image_dma_buf_import/image_common.h
@@ -31,9 +31,11 @@
* checks the availability of the real extension and takes care of the linking.
*/
+#include <unistd.h>
+#include <drm_fourcc.h>
+
#include "piglit-util-egl.h"
-#define EGL_EGLEXT_PROTOTYPES 1
-#include <EGL/eglext.h>
+#include "piglit-util-gl-common.h"
/* We define here the enums for EGL_EXT_image_dma_buf_import because, as of
* today (2013-09-10), the eglext.h on many systems lack them. The first Mesa
diff --git a/tests/spec/ext_image_dma_buf_import/intel_external_sampler_only.c b/tests/spec/ext_image_dma_buf_import/intel_external_sampler_only.c
index 318cd18..ee23b7f 100644
--- a/tests/spec/ext_image_dma_buf_import/intel_external_sampler_only.c
+++ b/tests/spec/ext_image_dma_buf_import/intel_external_sampler_only.c
@@ -21,12 +21,7 @@
* IN THE SOFTWARE.
*/
-#define GL_GLEXT_PROTOTYPES 1
-#include "piglit-util-egl.h"
-#include <unistd.h>
-#include <drm_fourcc.h>
#include "image_common.h"
-#include <GLES/glext.h>
/**
* @file intel_external_sampler_only.c
diff --git a/tests/spec/ext_image_dma_buf_import/intel_external_sampler_with_dma_only.c b/tests/spec/ext_image_dma_buf_import/intel_external_sampler_with_dma_only.c
index bf0ea4d..414a082 100644
--- a/tests/spec/ext_image_dma_buf_import/intel_external_sampler_with_dma_only.c
+++ b/tests/spec/ext_image_dma_buf_import/intel_external_sampler_with_dma_only.c
@@ -22,7 +22,6 @@
*/
#include "image_common.h"
-#include <unistd.h>
/**
* @file intel_external_sampler_with_dma_only.c
diff --git a/tests/spec/ext_image_dma_buf_import/intel_unsupported_format.c b/tests/spec/ext_image_dma_buf_import/intel_unsupported_format.c
index ec29aa0..67fda9b 100644
--- a/tests/spec/ext_image_dma_buf_import/intel_unsupported_format.c
+++ b/tests/spec/ext_image_dma_buf_import/intel_unsupported_format.c
@@ -21,9 +21,6 @@
* IN THE SOFTWARE.
*/
-#include "piglit-util-egl.h"
-#include <unistd.h>
-#include <drm_fourcc.h>
#include "image_common.h"
/**
diff --git a/tests/spec/ext_image_dma_buf_import/invalid_attributes.c b/tests/spec/ext_image_dma_buf_import/invalid_attributes.c
index 26e23b4..e484056 100644
--- a/tests/spec/ext_image_dma_buf_import/invalid_attributes.c
+++ b/tests/spec/ext_image_dma_buf_import/invalid_attributes.c
@@ -21,9 +21,6 @@
* IN THE SOFTWARE.
*/
-#include "piglit-util-egl.h"
-#include <unistd.h>
-#include <drm_fourcc.h>
#include "image_common.h"
/**
diff --git a/tests/spec/ext_image_dma_buf_import/invalid_hints.c b/tests/spec/ext_image_dma_buf_import/invalid_hints.c
index 9984303..462e6c7 100644
--- a/tests/spec/ext_image_dma_buf_import/invalid_hints.c
+++ b/tests/spec/ext_image_dma_buf_import/invalid_hints.c
@@ -21,9 +21,6 @@
* IN THE SOFTWARE.
*/
-#include "piglit-util-egl.h"
-#include <unistd.h>
-#include <drm_fourcc.h>
#include "image_common.h"
/**
diff --git a/tests/spec/ext_image_dma_buf_import/missing_attributes.c b/tests/spec/ext_image_dma_buf_import/missing_attributes.c
index 888d61f..5b4f670 100644
--- a/tests/spec/ext_image_dma_buf_import/missing_attributes.c
+++ b/tests/spec/ext_image_dma_buf_import/missing_attributes.c
@@ -21,9 +21,6 @@
* IN THE SOFTWARE.
*/
-#include "piglit-util-egl.h"
-#include <unistd.h>
-#include <drm_fourcc.h>
#include "image_common.h"
/**
diff --git a/tests/spec/ext_image_dma_buf_import/ownership_transfer.c b/tests/spec/ext_image_dma_buf_import/ownership_transfer.c
index a8e0b2d..fcd1951 100644
--- a/tests/spec/ext_image_dma_buf_import/ownership_transfer.c
+++ b/tests/spec/ext_image_dma_buf_import/ownership_transfer.c
@@ -21,10 +21,8 @@
* IN THE SOFTWARE.
*/
-#include "piglit-util-egl.h"
-#include <drm_fourcc.h>
-#include <unistd.h>
#include <errno.h>
+
#include "image_common.h"
/**
diff --git a/tests/spec/ext_image_dma_buf_import/sample_common.c b/tests/spec/ext_image_dma_buf_import/sample_common.c
index 44dec39..102a830 100644
--- a/tests/spec/ext_image_dma_buf_import/sample_common.c
+++ b/tests/spec/ext_image_dma_buf_import/sample_common.c
@@ -21,10 +21,10 @@
* IN THE SOFTWARE.
*/
-#include "sample_common.h"
-#include "image_common.h"
#include <unistd.h>
+#include "sample_common.h"
+
static const char fs_src[] =
"#extension GL_OES_EGL_image_external : require\n"
"precision mediump float;\n"
diff --git a/tests/spec/ext_image_dma_buf_import/sample_common.h b/tests/spec/ext_image_dma_buf_import/sample_common.h
index 243d42b..648a2f9 100644
--- a/tests/spec/ext_image_dma_buf_import/sample_common.h
+++ b/tests/spec/ext_image_dma_buf_import/sample_common.h
@@ -23,7 +23,8 @@
#ifndef SAMPLE_COMMON_H
#define SAMPLE_COMMON_H
-#include <stdbool.h>
+#include "piglit-util-egl.h"
+#include "piglit-util-gl-common.h"
/**
* Create a dma buffer with format 'fourcc' setting the given pixels as its
diff --git a/tests/spec/ext_image_dma_buf_import/sample_rgb.c b/tests/spec/ext_image_dma_buf_import/sample_rgb.c
index f398d7c..df04192 100644
--- a/tests/spec/ext_image_dma_buf_import/sample_rgb.c
+++ b/tests/spec/ext_image_dma_buf_import/sample_rgb.c
@@ -21,9 +21,6 @@
* IN THE SOFTWARE.
*/
-#include "piglit-util-egl.h"
-#include <unistd.h>
-#include <drm_fourcc.h>
#include "sample_common.h"
#include "image_common.h"
--
1.8.3.1
More information about the Piglit
mailing list