This was linking every single Piglit test against libdrm_intel directly.
I was recently experimenting with a change that made i965 no longer use
libdrm_intel, and expected missing symbol errors...but all Piglit tests
surprisingly kept working. There's no reason for most tests to have
this linked in, so restrict it to only the tests that need it.
---
.../ext_image_dma_buf_import/CMakeLists.gles1.txt | 18 +-
.../ext_image_dma_buf_import/CMakeLists.gles2.txt | 16
tests/spec/ext_image_dma_buf_import/CMakeLists.txt | 26 +++
.../intel_external_sampler_only.c | 2 +-
.../intel_unsupported_format.c | 2 +-
.../ext_image_dma_buf_import/invalid_attributes.c | 2 +-
.../spec/ext_image_dma_buf_import/invalid_hints.c | 2 +-
.../ext_image_dma_buf_import/missing_attributes.c | 2 +-
.../ext_image_dma_buf_import/ownership_transfer.c | 2 +-
.../ext_image_dma_buf_import}/piglit_drm_dma_buf.c | 6 ++---
.../ext_image_dma_buf_import}/piglit_drm_dma_buf.h | 6 ++---
tests/spec/ext_image_dma_buf_import/refcount.c | 2 +-
.../spec/ext_image_dma_buf_import/sample_common.c | 2 +-
.../transcode-nv12-as-r8-gr88.c| 2 +-
tests/util/CMakeLists.txt | 29 --
tests/util/piglit-framework-gl.c | 17 -
.../util/piglit-framework-gl/piglit_gl_framework.c | 5
17 files changed, 52 insertions(+), 89 deletions(-)
rename tests/{util/piglit-framework-gl =>
spec/ext_image_dma_buf_import}/piglit_drm_dma_buf.c (98%)
rename tests/{util/piglit-framework-gl =>
spec/ext_image_dma_buf_import}/piglit_drm_dma_buf.h (91%)
diff --git a/tests/spec/ext_image_dma_buf_import/CMakeLists.gles1.txt
b/tests/spec/ext_image_dma_buf_import/CMakeLists.gles1.txt
index 39a2b292d..c02291a14 100644
--- a/tests/spec/ext_image_dma_buf_import/CMakeLists.gles1.txt
+++ b/tests/spec/ext_image_dma_buf_import/CMakeLists.gles1.txt
@@ -11,18 +11,12 @@ link_libraries(
# These tests rely on drm and are hence compiled only on linux/drm platforms
if(PIGLIT_BUILD_DMA_BUF_TESTS)
- add_definitions(-DHAVE_LIBDRM)
-
- include_directories(
- ${LIBDRM_INCLUDE_DIRS}
- )
-
- piglit_add_executable(ext_image_dma_buf_import-invalid_hints
invalid_hints.c image_common.c)
- piglit_add_executable(ext_image_dma_buf_import-invalid_attributes
invalid_attributes.c image_common.c)
- piglit_add_executable(ext_image_dma_buf_import-missing_attributes
missing_attributes.c image_common.c)
- piglit_add_executable(ext_image_dma_buf_import-ownership_transfer
ownership_transfer.c image_common.c)
- piglit_add_executable(ext_image_dma_buf_import-intel_unsupported_format
intel_unsupported_format.c image_common.c)
-
piglit_add_executable(ext_image_dma_buf_import-intel_external_sampler_only
intel_external_sampler_only.c image_common.c)
+ piglit_add_executable(ext_image_dma_buf_import-invalid_hints
invalid_hints.c image_common.c piglit_drm_dma_buf.c)
+ piglit_add_executable(ext_image_dma_buf_import-invalid_attributes
invalid_attributes.c image_common.c piglit_drm_dma_buf.c)
+ piglit_add_executable(ext_image_dma_buf_import-missing_attributes
missing_attributes.c image_common.c piglit_drm_dma_buf.c)
+ piglit_add_executable(ext_image_dma_buf_import-ownership_transfer
ownership_transfer.c image_common.c piglit_drm_dma_buf.c)
+ piglit_add_executable(ext_image_dma_buf_import-intel_unsupported_format
intel_unsupported_format.c image_common.c piglit_drm_dma_buf.c)
+
piglit_add_executable(ext_image_dma_buf_import-intel_external_sampler_only
intel_external_sampler_only.c image_common.c piglit_drm_dma_buf.c)
endif()
# vim: ft=cmake:
diff --git a/tests/spec/ext_image_dma_buf_import/CMakeLists.gles2.txt
b/tests/spec/ext_image_dma_buf_import/CMakeLists.gles2.txt
index 93f43fad9..2bd90e1a5 100644
--- a/tests/spec/ext_image_dma_buf_import/CMakeLists.gles2.txt
+++ b/tests/spec/ext_image_dma_buf_import/CMakeLists.gles2.txt
@@ -10,17 +10,11 @@ link_libraries(
)
if(PIGLIT_BUILD_DMA_BUF_TESTS)
- add_definitions(-DHAVE_LIBDRM)
-
- include_directories(
- ${LIBDRM_INCLUDE_DIRS}
- )
-
- piglit_add_executable(ext_image_dma_buf_import-refcount refcount.c
sample_common.c image_common.c)
- piglit_add_executable(ext_image_dma_buf_import-sample_yuv sample_yuv.c
sample_common.c image_common.c)
- piglit_add_executable(ext_image_dma_buf_import-sample_rgb sample_rgb.c
sample_common.c image_common.c)
-
piglit_add_executable(ext_image_dma_buf_import-intel_external_sampler_with_dma_only
intel_external_sampler_with_dma_only.c image_common.c)
-
piglit_add_executable(ext_image_dma_buf_import-transcode-nv12-as-r8-gr88
transcode-nv12-as-r8-gr88.c image_common.c)
+ piglit_add_executable(ext_image_dma_buf_import-refcount refcount.c
sample_common.c