summaryrefslogtreecommitdiff
path: root/targets
diff options
context:
space:
mode:
authorJarkko Poyry <jpoyry@google.com>2014-09-02 11:48:52 +0300
committerJarkko Poyry <jpoyry@google.com>2014-09-10 18:04:33 +0300
commit3c827367444ee418f129b2c238299f49d3264554 (patch)
tree62dd09feabba812bdff287366e9593b99007152c /targets
parent49238d46b847a2099e64118ff22aef9563c8b81f (diff)
downloadVK-GL-CTS-3c827367444ee418f129b2c238299f49d3264554.tar.gz
VK-GL-CTS-3c827367444ee418f129b2c238299f49d3264554.tar.bz2
VK-GL-CTS-3c827367444ee418f129b2c238299f49d3264554.zip
Import dEQP.
Import drawElements Quality Program from an internal repository. Bug: 17388917 Change-Id: Ic109fe4a57e31b2a816113d90fbdf51a43e7abeb
Diffstat (limited to 'targets')
-rw-r--r--targets/android/android.cmake50
-rw-r--r--targets/android/install.bat6
-rw-r--r--targets/android/launch.bat4
-rw-r--r--targets/default/default.cmake56
-rw-r--r--targets/dynamic_egl/dynamic_egl.cmake8
-rw-r--r--targets/dynamic_opencl/dynamic_opencl.cmake13
-rw-r--r--targets/gles3_dynamic/gles3_dynamic.cmake7
-rw-r--r--targets/gles3_wrapper/gles3_wrapper.cmake32
-rw-r--r--targets/ios/ios.cmake20
-rw-r--r--targets/no_modules/no_modules.cmake3
-rw-r--r--targets/null/null.cmake14
-rw-r--r--targets/osx/osx.cmake22
-rw-r--r--targets/raspi/raspi.cmake38
-rw-r--r--targets/system_opencl/system_opencl.cmake20
-rw-r--r--targets/win32_wgl/win32_wgl.cmake6
-rw-r--r--targets/x11_egl/x11_egl.cmake20
-rw-r--r--targets/x11_egl_glx/x11_egl_glx.cmake20
-rw-r--r--targets/x11_glx/x11_glx.cmake20
18 files changed, 359 insertions, 0 deletions
diff --git a/targets/android/android.cmake b/targets/android/android.cmake
new file mode 100644
index 000000000..10e52bed7
--- /dev/null
+++ b/targets/android/android.cmake
@@ -0,0 +1,50 @@
+# Android native ES2
+message("*** Using Android ES2")
+set(DEQP_TARGET_NAME "Android")
+set(DEQP_SUPPORT_GLES1 ON)
+set(DEQP_SUPPORT_GLES2 ON)
+
+if (DE_ANDROID_API GREATER 8)
+ set(DEQP_SUPPORT_EGL ON)
+ set(DEQP_SUPPORT_GLES3 ON) # \note GLES3 support requires eglGetProcAddress()
+else ()
+ set(DEQP_SUPPORT_EGL OFF)
+endif ()
+
+set(DEQP_SUPPORT_OPENCL OFF)
+
+# GLESv2 lib
+find_library(GLES2_LIBRARY GLESv2 PATHS /usr/lib)
+set(DEQP_GLES2_LIBRARIES ${GLES2_LIBRARY})
+
+# GLESv1 lib
+find_library(GLES1_LIBRARY GLESv1_CM PATHS /usr/lib)
+set(DEQP_GLES1_LIBRARIES ${GLES1_LIBRARY})
+
+# EGL lib
+if (DEQP_SUPPORT_EGL)
+ find_library(EGL_LIBRARY EGL PATHS /usr/lib)
+ set(DEQP_EGL_LIBRARIES ${EGL_LIBRARY})
+endif ()
+
+# OpenCL - dynamic loading
+if (DEQP_SUPPORT_OPENCL)
+ include_directories(framework/opencl/inc)
+
+ add_subdirectory(wrappers/opencl_dynamic)
+ set(DEQP_OPENCL_LIBRARIES OpenCL)
+endif ()
+
+# Platform libs
+find_library(LOG_LIBRARY NAMES log PATHS /usr/lib)
+set(DEQP_PLATFORM_LIBRARIES ${DEQP_PLATFORM_LIBRARIES} ${LOG_LIBRARY})
+
+if (DE_ANDROID_API GREATER 8)
+ # libandroid for NativeActivity APIs
+ find_library(ANDROID_LIBRARY NAMES android PATHS /usr/lib)
+ set(DEQP_PLATFORM_LIBRARIES ${DEQP_PLATFORM_LIBRARIES} ${ANDROID_LIBRARY})
+endif ()
+
+# Android uses customized execserver
+include_directories(execserver)
+set(DEQP_PLATFORM_LIBRARIES xscore ${DEQP_PLATFORM_LIBRARIES})
diff --git a/targets/android/install.bat b/targets/android/install.bat
new file mode 100644
index 000000000..a7be8600f
--- /dev/null
+++ b/targets/android/install.bat
@@ -0,0 +1,6 @@
+@echo off
+echo Removing old dEQP Ondevice Package...
+adb %* uninstall com.drawelements.deqp.execserver
+
+echo Installing dEQP Ondevice Package...
+adb %* install -r dEQP-ondevice.apk
diff --git a/targets/android/launch.bat b/targets/android/launch.bat
new file mode 100644
index 000000000..05e6d77fc
--- /dev/null
+++ b/targets/android/launch.bat
@@ -0,0 +1,4 @@
+@echo off
+adb %* forward tcp:50016 tcp:50016
+adb %* shell setprop log.tag.dEQP DEBUG
+adb %* shell am start -n com.drawelements.deqp.execserver/.ServiceStarter
diff --git a/targets/default/default.cmake b/targets/default/default.cmake
new file mode 100644
index 000000000..02a147512
--- /dev/null
+++ b/targets/default/default.cmake
@@ -0,0 +1,56 @@
+
+message("*** Default target")
+
+set(DEQP_TARGET_NAME "Default")
+
+# OpenGL (ES) tests do not require any libraries or headers
+set(DEQP_SUPPORT_GLES2 ON)
+set(DEQP_SUPPORT_GLES3 ON)
+set(DEQP_SUPPORT_OPENGL ON)
+
+# For static linking
+find_library(GLES2_LIBRARY NAMES libGLESv2 GLESv2)
+find_library(EGL_LIBRARY NAMES libEGL EGL)
+
+find_path(GLES2_INCLUDE_PATH GLES2/gl2.h)
+find_path(GLES3_INCLUDE_PATH GLES3/gl3.h)
+find_path(EGL_INCLUDE_PATH EGL/egl.h)
+
+if (GLES2_LIBRARY AND GLES2_INCLUDE_PATH)
+ set(DEQP_GLES2_LIBRARIES ${GLES2_LIBRARY})
+endif ()
+
+if (GLES2_LIBRARY AND GLES3_INCLUDE_PATH)
+ # Assume that GLESv2 provides ES3 symbols if GLES3/gl3.h was found
+ set(DEQP_GLES3_LIBRARIES ${GLES2_LIBRARY})
+endif ()
+
+if (EGL_LIBRARY AND EGL_INCLUDE_PATH)
+ set(DEQP_SUPPORT_EGL ON)
+ set(DEQP_EGL_LIBRARIES ${EGL_LIBRARY})
+ include_directories(${EGL_INCLUDE_PATH})
+endif ()
+
+# OpenCL support?
+find_library(OPENCL_LIBRARY NAMES libOpenCL OpenCL)
+find_path(OPENCL_INCLUDE_PATH CL/cl.h OpenCL/cl.h)
+
+message("OPENCL_LIBRARY = ${OPENCL_LIBRARY}")
+message("OPENCL_INCLUDE_PATH = ${OPENCL_INCLUDE_PATH}")
+
+if (OPENCL_LIBRARY AND OPENCL_INCLUDE_PATH)
+ set(DEQP_SUPPORT_OPENCL ON)
+ set(DEQP_OPENCL_LIBRARIES ${OPENCL_LIBRARY})
+ include_directories(${OPENCL_INCLUDE_PATH})
+endif ()
+
+# X11 / GLX?
+if (DE_OS_IS_UNIX)
+ find_package(X11)
+ if (X11_FOUND)
+ set(DEQP_USE_X11 ON)
+ endif ()
+
+ set(DEQP_PLATFORM_LIBRARIES ${X11_LIBRARIES})
+ include_directories(${X11_INCLUDE_DIR})
+endif ()
diff --git a/targets/dynamic_egl/dynamic_egl.cmake b/targets/dynamic_egl/dynamic_egl.cmake
new file mode 100644
index 000000000..e5f5f2058
--- /dev/null
+++ b/targets/dynamic_egl/dynamic_egl.cmake
@@ -0,0 +1,8 @@
+
+message("*** Using dynamic EGL target")
+set(DEQP_TARGET_NAME "EGL (run-time linking)")
+set(DEQP_RUNTIME_LINK ON)
+set(DEQP_SUPPORT_GLES2 ON)
+set(DEQP_SUPPORT_GLES3 ON)
+set(DEQP_SUPPORT_OPENGL ON)
+set(DEQP_SUPPORT_EGL ON)
diff --git a/targets/dynamic_opencl/dynamic_opencl.cmake b/targets/dynamic_opencl/dynamic_opencl.cmake
new file mode 100644
index 000000000..4a5724623
--- /dev/null
+++ b/targets/dynamic_opencl/dynamic_opencl.cmake
@@ -0,0 +1,13 @@
+# Dynamic OpenCL
+
+set(DEQP_TARGET_NAME "OpenCL (run-time linking)")
+
+set(DEQP_SUPPORT_OPENGL ON)
+set(DEQP_SUPPORT_OPENCL ON)
+
+# Headers
+include_directories(framework/opencl/inc)
+
+# Library
+add_subdirectory(wrappers/opencl_dynamic)
+set(DEQP_OPENCL_LIBRARIES OpenCL)
diff --git a/targets/gles3_dynamic/gles3_dynamic.cmake b/targets/gles3_dynamic/gles3_dynamic.cmake
new file mode 100644
index 000000000..8827447d9
--- /dev/null
+++ b/targets/gles3_dynamic/gles3_dynamic.cmake
@@ -0,0 +1,7 @@
+
+message("*** Using GLES3 dynamic loader")
+set(DEQP_TARGET_NAME "Dynamic library")
+set(DEQP_RUNTIME_LINK ON)
+set(DEQP_SUPPORT_GLES2 ON)
+set(DEQP_SUPPORT_GLES3 ON)
+set(DEQP_SUPPORT_EGL ON)
diff --git a/targets/gles3_wrapper/gles3_wrapper.cmake b/targets/gles3_wrapper/gles3_wrapper.cmake
new file mode 100644
index 000000000..7db7a7f6f
--- /dev/null
+++ b/targets/gles3_wrapper/gles3_wrapper.cmake
@@ -0,0 +1,32 @@
+
+message("*** Using GLES3 Wrapper")
+
+set(DEQP_TARGET_NAME "GLES3 Wrapper")
+set(DEQP_SUPPORT_GLES2 OFF)
+set(DEQP_SUPPORT_EGL OFF)
+set(DEQP_SUPPORT_GLES3 ON)
+
+add_definitions(-DKHRONOS_STATIC_LIB)
+add_definitions(-DDEQP_USE_GLES3_WRAPPER)
+include_directories(
+ wrappers/gles3/inc
+ wrappers/gles3 # Required by platform integration
+ )
+add_subdirectory(wrappers/gles3)
+set(DEQP_GLES3_LIBRARIES GLESv3)
+set(DEQP_PLATFORM_LIBRARIES GLESv3) # \note Always link to GLESv3 since platform integration requires it.
+
+if (DE_OS_IS_WIN32)
+ set(TCUTIL_PLATFORM_SRCS
+ win32/tcuWGL.cpp
+ win32/tcuWGL.hpp
+ win32/tcuWin32API.h
+ win32/tcuWin32Window.cpp
+ win32/tcuWin32Window.hpp
+ win32/tcuWin32GLES3Platform.cpp
+ win32/tcuWin32GLES3Platform.hpp
+ tcuMain.cpp
+ )
+else ()
+ message(FATAL_ERROR "GLES3 Wrapper is not supported on this OS")
+endif ()
diff --git a/targets/ios/ios.cmake b/targets/ios/ios.cmake
new file mode 100644
index 000000000..2797aa4e5
--- /dev/null
+++ b/targets/ios/ios.cmake
@@ -0,0 +1,20 @@
+# iOS Target
+
+set(DEQP_TARGET_NAME "iOS")
+set(DEQP_SUPPORT_GLES2 ON)
+set(DEQP_SUPPORT_GLES3 ON)
+set(DEQP_SUPPORT_EGL OFF)
+
+# Libraries
+find_library(GLES2_LIBRARY NAMES OpenGLES PATHS /System/Library/Frameworks)
+find_library(FOUNDATION_LIBRARY NAMES Foundation PATHS /System/Library/Frameworks)
+find_library(UIKIT_LIBRARY NAMES UIKit PATHS /System/Library/Frameworks)
+find_library(COREGRAPHICS_LIBRARY NAMES CoreGraphics PATHS /System/Library/Frameworks)
+find_library(QUARTZCORE_LIBRARY NAMES QuartzCore PATHS /System/Library/Frameworks)
+
+set(DEQP_GLES2_LIBRARIES ${GLES2_LIBRARY})
+set(DEQP_GLES3_LIBRARIES ${GLES2_LIBRARY})
+set(DEQP_PLATFORM_LIBRARIES ${FOUNDATION_LIBRARY} ${UIKIT_LIBRARY} ${COREGRAPHICS_LIBRARY} ${QUARTZCORE_LIBRARY})
+
+# Execserver is compiled in
+include_directories(execserver)
diff --git a/targets/no_modules/no_modules.cmake b/targets/no_modules/no_modules.cmake
new file mode 100644
index 000000000..aee7aa867
--- /dev/null
+++ b/targets/no_modules/no_modules.cmake
@@ -0,0 +1,3 @@
+
+message("*** No modules build")
+set(DEQP_TARGET_NAME "No-Modules")
diff --git a/targets/null/null.cmake b/targets/null/null.cmake
new file mode 100644
index 000000000..45ac19baf
--- /dev/null
+++ b/targets/null/null.cmake
@@ -0,0 +1,14 @@
+
+message("*** Using null context target")
+
+set(DEQP_TARGET_NAME "Null")
+set(DEQP_SUPPORT_GLES2 ON)
+set(DEQP_SUPPORT_GLES3 ON)
+set(DEQP_SUPPORT_OPENGL ON)
+
+set(TCUTIL_PLATFORM_SRCS
+ null/tcuNullPlatform.cpp
+ null/tcuNullPlatform.hpp
+ null/tcuNullRenderContext.cpp
+ null/tcuNullRenderContext.hpp
+ )
diff --git a/targets/osx/osx.cmake b/targets/osx/osx.cmake
new file mode 100644
index 000000000..afadd8978
--- /dev/null
+++ b/targets/osx/osx.cmake
@@ -0,0 +1,22 @@
+# OS X Target
+
+set(DEQP_TARGET_NAME "OS X")
+
+set(DEQP_SUPPORT_OPENGL ON)
+set(DEQP_SUPPORT_OPENCL ON)
+
+find_package(OpenGL REQUIRED)
+set(DEQP_PLATFORM_LIBRARIES ${OPENGL_LIBRARIES})
+include_directories(${OPENGL_INCLUDE_DIRS})
+
+find_path(OPENCL_INC NAMES CL/cl.h OpenCL/cl.h)
+if (NOT OPENCL_INC)
+ message(FATAL_ERROR "Can't find OpenCL headers")
+endif ()
+include_directories(${OPENCL_INC})
+
+find_library(OPENCL_LIB NAMES OpenCL libOpenCL)
+set(DEQP_OPENCL_LIBRARIES ${OPENCL_LIB})
+
+# Apple versions of cl headers do not respect CL_USE_DEPRECATED_OPENCL_1_X_APIs
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
diff --git a/targets/raspi/raspi.cmake b/targets/raspi/raspi.cmake
new file mode 100644
index 000000000..c088a5474
--- /dev/null
+++ b/targets/raspi/raspi.cmake
@@ -0,0 +1,38 @@
+# Raspberry Pi target
+message("*** Using Raspberry Pi")
+set(DEQP_TARGET_NAME "Raspberry Pi")
+set(DEQP_SUPPORT_GLES2 ON)
+set(DEQP_SUPPORT_VG ON)
+set(DEQP_SUPPORT_EGL ON)
+
+find_path(SYSTEM_INCLUDE bcm_host.h PATHS /usr/include /opt/vc/include)
+include_directories(
+ ${SYSTEM_INCLUDE}
+ ${SYSTEM_INCLUDE}/interface/vcos/pthreads
+ )
+
+# GLESv2 lib
+find_library(GLES2_LIBRARY GLESv2 PATHS /usr/lib /opt/vc/lib)
+set(DEQP_GLES2_LIBRARIES ${GLES2_LIBRARY})
+
+# OpenVG lib
+find_library(OPENVG_LIBRARY OpenVG PATHS /usr/lib /opt/vc/lib)
+set(DEQP_VG_LIBRARIES ${OPENVG_LIBRARY})
+
+# EGL lib
+find_library(EGL_LIBRARY EGL PATHS /usr/lib /opt/vc/lib)
+set(DEQP_EGL_LIBRARIES ${EGL_LIBRARY})
+
+# Platform libs
+find_library(BCM_HOST_LIBRARY NAMES bcm_host PATHS /usr/lib /opt/vc/lib)
+set(DEQP_PLATFORM_LIBRARIES ${DEQP_PLATFORM_LIBRARIES} ${BCM_HOST_LIBRARY} ${GLES2_LIBRARY} ${EGL_LIBRARY})
+
+get_filename_component(SYSLIB_PATH ${BCM_HOST_LIBRARY} PATH)
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath-link,${SYSLIB_PATH}")
+
+# Platform sources
+set(TCUTIL_PLATFORM_SRCS
+ raspi/tcuRaspiPlatform.cpp
+ raspi/tcuRaspiPlatform.hpp
+ tcuMain.cpp
+ )
diff --git a/targets/system_opencl/system_opencl.cmake b/targets/system_opencl/system_opencl.cmake
new file mode 100644
index 000000000..ee35e305a
--- /dev/null
+++ b/targets/system_opencl/system_opencl.cmake
@@ -0,0 +1,20 @@
+# System OpenCL
+
+set(DEQP_TARGET_NAME "System OpenCL")
+
+set(DEQP_SUPPORT_GLES2 OFF)
+set(DEQP_SUPPORT_GLES1 OFF)
+set(DEQP_SUPPORT_OPENVG OFF)
+set(DEQP_SUPPORT_EGL OFF)
+set(DEQP_SUPPORT_OPENCL ON)
+
+# Headers
+find_path(OPENCL_INC NAMES CL/cl.h OpenCL/cl.h)
+if (NOT OPENCL_INC)
+ message(FATAL_ERROR "Can't find OpenCL headers")
+endif ()
+include_directories(${OPENCL_INC})
+
+# Libraries
+find_library(OPENCL_LIB NAMES OpenCL libOpenCL)
+set(DEQP_OPENCL_LIBRARIES ${OPENCL_LIB})
diff --git a/targets/win32_wgl/win32_wgl.cmake b/targets/win32_wgl/win32_wgl.cmake
new file mode 100644
index 000000000..a34f8dd63
--- /dev/null
+++ b/targets/win32_wgl/win32_wgl.cmake
@@ -0,0 +1,6 @@
+
+message("*** Using WGL")
+set(DEQP_TARGET_NAME "WGL")
+set(DEQP_SUPPORT_GLES2 ON)
+set(DEQP_SUPPORT_GLES3 ON)
+set(DEQP_SUPPORT_OPENGL ON)
diff --git a/targets/x11_egl/x11_egl.cmake b/targets/x11_egl/x11_egl.cmake
new file mode 100644
index 000000000..5002342b6
--- /dev/null
+++ b/targets/x11_egl/x11_egl.cmake
@@ -0,0 +1,20 @@
+
+message("*** Using X11 EGL target")
+set(DEQP_TARGET_NAME "X11 EGL")
+set(DEQP_RUNTIME_LINK ON)
+set(DEQP_SUPPORT_GLES2 ON)
+set(DEQP_SUPPORT_GLES3 ON)
+set(DEQP_SUPPORT_OPENGL ON)
+set(DEQP_SUPPORT_EGL ON)
+set(DEQP_SUPPORT_GLX OFF)
+
+# Use X11 target
+set(DEQP_USE_X11 ON)
+
+find_package(X11)
+if (NOT X11_FOUND)
+ message(FATAL_ERROR "X11 development package not found")
+endif ()
+
+set(DEQP_PLATFORM_LIBRARIES ${X11_LIBRARIES})
+include_directories(${X11_INCLUDE_DIR})
diff --git a/targets/x11_egl_glx/x11_egl_glx.cmake b/targets/x11_egl_glx/x11_egl_glx.cmake
new file mode 100644
index 000000000..438b85f9f
--- /dev/null
+++ b/targets/x11_egl_glx/x11_egl_glx.cmake
@@ -0,0 +1,20 @@
+
+message("*** Using X11 EGL/GLX target")
+set(DEQP_TARGET_NAME "X11 EGL/GLX")
+set(DEQP_RUNTIME_LINK ON)
+set(DEQP_SUPPORT_GLES2 ON)
+set(DEQP_SUPPORT_GLES3 ON)
+set(DEQP_SUPPORT_OPENGL ON)
+set(DEQP_SUPPORT_EGL ON)
+set(DEQP_SUPPORT_GLX ON)
+
+# Use X11 target
+set(DEQP_USE_X11 ON)
+
+find_package(X11)
+if (NOT X11_FOUND)
+ message(FATAL_ERROR "X11 development package not found")
+endif ()
+
+set(DEQP_PLATFORM_LIBRARIES ${X11_LIBRARIES})
+include_directories(${X11_INCLUDE_DIR})
diff --git a/targets/x11_glx/x11_glx.cmake b/targets/x11_glx/x11_glx.cmake
new file mode 100644
index 000000000..0b6ecb723
--- /dev/null
+++ b/targets/x11_glx/x11_glx.cmake
@@ -0,0 +1,20 @@
+
+message("*** Using X11 GLX target")
+set(DEQP_TARGET_NAME "X11 GLX")
+set(DEQP_RUNTIME_LINK ON)
+set(DEQP_SUPPORT_GLES2 ON)
+set(DEQP_SUPPORT_GLES3 ON)
+set(DEQP_SUPPORT_OPENGL ON)
+set(DEQP_SUPPORT_EGL OFF)
+set(DEQP_SUPPORT_GLX ON)
+
+# Use X11 target
+set(DEQP_USE_X11 ON)
+
+find_package(X11)
+if (NOT X11_FOUND)
+ message(FATAL_ERROR "X11 development package not found")
+endif ()
+
+set(DEQP_PLATFORM_LIBRARIES ${X11_LIBRARIES})
+include_directories(${X11_INCLUDE_DIR})