mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Turn on building test_gl in travis (#804)
* Turn on building test_gl in travis * Install packages only on native Linux * Build test_gl use variable * Travis - skip OSX system * Fix test_gl build errors * Fix test_gl build errors - cast to uintptr_t * Fix redefinition build issues in travis Xenial build env
This commit is contained in:
committed by
GitHub
parent
164b5ef5cf
commit
79d771ec47
@@ -74,7 +74,7 @@ static void InitSyncFns( void )
|
||||
glGetInteger64vFunc = (glGetInteger64vPtr)glutGetProcAddress( "glGetInteger64v" );
|
||||
glGetSyncivFunc = (glGetSyncivPtr)glutGetProcAddress( "glGetSynciv" );
|
||||
}
|
||||
|
||||
#ifndef GL_ARB_sync
|
||||
#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111
|
||||
|
||||
#define GL_OBJECT_TYPE 0x9112
|
||||
@@ -97,6 +97,7 @@ static void InitSyncFns( void )
|
||||
#define GL_TIMEOUT_EXPIRED 0x911B
|
||||
#define GL_CONDITION_SATISFIED 0x911C
|
||||
#define GL_WAIT_FAILED 0x911D
|
||||
#endif
|
||||
|
||||
#define USING_ARB_sync 1
|
||||
#endif
|
||||
@@ -285,7 +286,7 @@ public:
|
||||
virtual void * IRun( void )
|
||||
{
|
||||
cl_int error = run_cl_kernel( mKernel, mQueue, mStream0, mStream1, mRowIdx, mFenceEvent, mNumThreads );
|
||||
return (void *)error;
|
||||
return (void *)(uintptr_t)error;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
typedef struct image_kernel_data
|
||||
struct image_kernel_data
|
||||
{
|
||||
cl_int width;
|
||||
cl_int height;
|
||||
|
||||
@@ -17,6 +17,7 @@ TOOLCHAIN_PREFIX_aarch64=aarch64-linux-gnu
|
||||
|
||||
TOOLCHAIN_FILE=${TOP}/toolchain.cmake
|
||||
touch ${TOOLCHAIN_FILE}
|
||||
BUILD_OPENGL_TEST="OFF"
|
||||
|
||||
# Prepare toolchain if needed
|
||||
if [[ ${JOB_ARCHITECTURE} != "" ]]; then
|
||||
@@ -40,6 +41,11 @@ if [[ ${JOB_ARCHITECTURE} != "" ]]; then
|
||||
echo "SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)" >> ${TOOLCHAIN_FILE}
|
||||
fi
|
||||
|
||||
if [[ ( ${JOB_ARCHITECTURE} == "" && ${TRAVIS_OS_NAME} == "linux" ) ]]; then
|
||||
BUILD_OPENGL_TEST="ON"
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install libglu1-mesa-dev freeglut3-dev mesa-common-dev libglew-dev
|
||||
fi
|
||||
# Prepare headers
|
||||
git clone https://github.com/KhronosGroup/OpenCL-Headers.git
|
||||
cd OpenCL-Headers
|
||||
@@ -69,6 +75,7 @@ cmake -DCL_INCLUDE_DIR=${TOP}/OpenCL-Headers \
|
||||
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=./bin \
|
||||
-DOPENCL_LIBRARIES="-lOpenCL -lpthread" \
|
||||
-DUSE_CL_EXPERIMENTAL=ON \
|
||||
-DGL_IS_SUPPORTED=${BUILD_OPENGL_TEST} \
|
||||
..
|
||||
make -j2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user