Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge KhronosGroup/OpenCL-CTS master into nikhiljnv:master #9

Open
wants to merge 158 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
cd99c87
Reduce number of compilations in buffer suite (#1082)
ellnor01 Dec 18, 2020
3615c4e
Use memcmp for select verification. (#1084)
Jeremy-Kemp Dec 23, 2020
72998af
Making object queries tests exhaustive (#1008)
ellnor01 Jan 4, 2021
5f869e1
Move TEST_SKIPPED_ITSELF to test_status in testHarness (#1089)
chemis01 Jan 4, 2021
42d58be
Use clang-format-9 binary in Github Actions (#1088)
ellnor01 Jan 4, 2021
1cd9d08
Fix implicit int->float warning inside kernel (#1093)
jrprice Jan 4, 2021
85bae70
Fix Context Leak in api:clone_kernel (#1090)
chemis01 Jan 4, 2021
25d9ff5
Using helper functions for clCreateKernel (#1064)
ellnor01 Jan 7, 2021
904fb41
Restored the embedded reduction factor to bruteforce. (#1052)
Jeremy-Kemp Jan 7, 2021
18c54be
Validate CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED (#1086)
ellnor01 Jan 7, 2021
24e6a91
Use the right flags when creating images (#328) (#1015)
james-morrissey-arm Jan 7, 2021
f02cbad
Fix scope of clEventWrapper declarations (#1099)
jrprice Jan 10, 2021
2597027
Use highest OpenCL C version (#1081)
gwawiork Jan 11, 2021
901f5fc
Fix samplerlessReads read_write (#329) (#1016)
james-morrissey-arm Jan 11, 2021
ffa75c3
Test cl_ext_cxx_for_opencl (#1095)
AnastasiaStulova Jan 12, 2021
e5f8924
Apply clang-format on math_brute_force (#1104)
mantognini Jan 14, 2021
0b6fbd1
Use glFinish to replace glFlush (#1102)
AlexXAmd Jan 14, 2021
03a0989
Use std::vector for format lists in images suite (#1105)
jrprice Jan 14, 2021
0d74b3f
Test api fix - sampler properties is 0 in compatibility mode (#1106)
gwawiork Jan 15, 2021
af6d55d
Use delete[] to deallocate after new[] (#1107)
jrprice Jan 19, 2021
be93630
Remove dead code in math_brute_force (#1117)
mantognini Jan 20, 2021
0130c24
Fix malloc-size calculation in test imagedim (#1100)
nikhiljnv Jan 21, 2021
bf883dc
Fix compilation issues for conforming_version.cpp (#1113)
ellnor01 Jan 22, 2021
f337e0b
Fix command-line function range for bruteforce (#1127)
nikhiljnv Jan 29, 2021
31fafb0
Install generate_spirv_offline.py script (#1109)
StuartDBrady Jan 29, 2021
c587b45
Minor fixes for CL_ARGB channel order. (#1128)
JohnKesapidesARM Jan 29, 2021
5930853
Minor fixes for clCopyImage. (#1130)
JohnKesapidesARM Jan 29, 2021
bfca863
Handle NULL hostptr in conformance image tests (#1087)
nikhiljnv Jan 29, 2021
eb2287c
Remove unnecessary scope (#1126)
mantognini Jan 29, 2021
545e4d0
Make functions local to translation unit (#1125)
mantognini Jan 29, 2021
4abea6f
Fix literal integer types for atomics tests (#1059)
zsrkmyn Feb 1, 2021
ca673af
First steps in tidying image/kernel_read_write tests (#1121)
ellnor01 Feb 2, 2021
2164558
Change arg type to unsigned int from signed int (#1078)
gwawiork Feb 2, 2021
fad6a00
Fix test_vector_swizzle possible overwrite of padding of 3-element ve…
stevec611 Feb 3, 2021
b67f6bb
Fix command line interface for math_brute_force (#1145)
mantognini Feb 5, 2021
3719a01
api: Fix testing of local memory size requirement (#1112)
pierremoreau Feb 5, 2021
f6b5013
Implement Negative Test for Platform Layer Functions (#1076)
chemis01 Feb 5, 2021
8ad1088
Reduce difference between files in math_brute_force (#1138)
mantognini Feb 10, 2021
87a1525
NFC: clang-format test_basic_parameter_types.cpp (#1151)
svenvh Feb 11, 2021
5d7be40
Remove undesired conversions from size_t to int (#1153)
mantognini Feb 11, 2021
b398f8c
Fix typo in error handling (#1152)
mantognini Feb 11, 2021
901f4db
Fix compilation error in rtz mode detection (#1163)
doe300 Feb 17, 2021
5d2a4bc
Reduce difference between files (#1155)
mantognini Feb 17, 2021
c67aa05
Fix Minor memory leaks in test_buffer/compiler. (#1160)
JohnKesapidesARM Feb 17, 2021
7181bcd
Rename files for consistency (#1166)
mantognini Feb 17, 2021
70b2492
Regroup vtbl definitions to one translation unit (#1167)
mantognini Feb 18, 2021
fc67d7b
Move media_sharing tests to test_conformance/extensions/ (#1164)
kpet Feb 18, 2021
8b5d3c2
Fix buffer tests memory leaks (#1165)
SebastianLuzynski Feb 18, 2021
84d70e2
Fix incorrect use of kernel parameter (#1168)
mantognini Feb 18, 2021
66eb912
ci: move code format check out of the main job/script (#1154)
kpet Feb 23, 2021
9a481c6
Split math_brute_force files (#1169)
mantognini Mar 2, 2021
e2fb655
Use C++ headers instead of C headers (#1179)
mantognini Mar 5, 2021
3307ebe
fix out of boundary when strcpy (#1173)
ijkmn Mar 5, 2021
afe745f
Fix typo in array size computation (#1178)
mantognini Mar 9, 2021
17632c9
Remove undesired conversions from size_t to int (#1180)
mantognini Mar 9, 2021
6f2cd12
Deduplicate logging of pixel differences (#1175)
StuartDBrady Mar 9, 2021
a483255
Fold functions for nextafter (#1176)
mantognini Mar 9, 2021
a53917a
Move code around to reduce differences (#1185)
mantognini Mar 9, 2021
68ee30f
Fix possible size_t overflow in 32-bit builds. (#1131)
JohnKesapidesARM Mar 9, 2021
ee600e8
Reduce differences by using common names (#1187)
mantognini Mar 11, 2021
da2a1bd
Remove trivially dead code (#1190)
mantognini Mar 17, 2021
111bb2b
Fix discrepancy in logging messages (#1189)
mantognini Mar 17, 2021
6b36f64
Add tests to proposed new builtin async_copy functions with a bug fix…
zakaria6868 Mar 18, 2021
dbd3e78
Do not dereference null pointer for no matching tests (#1191)
svenvh Mar 18, 2021
ef19796
Improve log consistency (#1196)
mantognini Mar 24, 2021
8488d4b
Use the same kernel name for all tests (#1194)
mantognini Mar 24, 2021
5281b4c
Improve consistency of clEnqueueWriteBuffer operations (#1195)
mantognini Mar 24, 2021
baa226a
Remove compiler options that are specific to Apple (#1114)
jrprice Apr 6, 2021
c5e4ca6
Remove unnecessary APPLE specific code (#1188)
mantognini Apr 6, 2021
71bef85
New subgroups - full changes set (#1074)
gwawiork Apr 6, 2021
8e59817
Fix conversion fail when build with -O2 fail (#1193)
ijkmn Apr 7, 2021
b7e7a3e
Remove unsupported code (#1211)
mantognini Apr 13, 2021
7286e06
Make variables and functions local to translation unit (#1216)
mantognini Apr 15, 2021
6683fa9
Use lambda to reduce amount of code (#1219)
mantognini Apr 20, 2021
7542ae2
Fold code into loop (#1218)
mantognini Apr 20, 2021
b8d1ea9
Fold constant global variable (#1217)
mantognini Apr 21, 2021
edc36b5
Remove NULL Platform Check for Negative clGetPlatformInfo (#1222) (#1…
chemis01 Apr 27, 2021
cba7a8a
Remove dead CMake code (#1230)
mantognini Apr 28, 2021
01497c4
Reduce scope of variables (#1228)
mantognini Apr 28, 2021
5daca10
Remove dead variables and functions (#1238)
mantognini May 7, 2021
3dab3df
Report inputs for worst errors (#1231)
mantognini May 7, 2021
3dd6d41
Avoid manual memory management, fixes #975 (#1240)
mantognini May 11, 2021
59a1204
Fix for test_conversions failure with Clang build on Linux #1057 (#1062)
sravikumar3393 May 11, 2021
06f7661
basic/async: Check for extension only once per test (#1242)
pierremoreau May 12, 2021
d7f8749
testHarness: Print error string when clFinish fails (#1243)
pierremoreau May 12, 2021
ad8ab3f
Remove OpenCL C++ tests (#1241)
kpet May 13, 2021
a43d96d
Redesign clGetKernelArgInfo (#522) (#1056)
chemis01 May 13, 2021
71e2681
Add Test for CL_KERNEL_ATTRIBUTES (#832) (#1055)
chemis01 May 13, 2021
db939bb
Fix test_buffer - undefined behavior in case of CL_MEM_USE_HOST_PTR (…
gwawiork May 13, 2021
02c2a42
Remove unnecessary code from unary_u_*.cpp (#1237)
mantognini May 13, 2021
e7c5694
Fix image pixel reference calculation for CL_{INTENSITY,LUMINANCE} fo…
kpet May 14, 2021
6572837
buffers: Switch from enqueueing to enqueuing (#1246)
pierremoreau May 14, 2021
17a0d09
Cleanup usage of static, extern and typedef (#1256)
mantognini May 18, 2021
6c80459
gles: Fix compile warnings. (#1070)
lakshmih May 18, 2021
de49d59
Allocations fixes (#1245)
pierremoreau May 18, 2021
01aa550
Update warning options (#1252)
mantognini May 21, 2021
ce1687a
Add missing cstdint include (#1259)
jrprice May 21, 2021
ba9312e
Fix ODR violations in math_brute_force (#1255)
mantognini May 21, 2021
a08cacc
Fix clang-format-9 install (#1261)
ouakheli May 24, 2021
ed839eb
Avoid manual memory management (#1260)
mantognini May 24, 2021
0876ea1
Ignore padding bits in clCopyImage/clFillImage testing (#1184)
StuartDBrady May 24, 2021
bd3135d
Extend list of known extensions (#1262)
gwawiork May 27, 2021
3159985
Address data race in ThreadPool (#1265)
mantognini May 27, 2021
76ace61
Fix leaks in callSingleTestFunction (#1224)
mantognini Jun 9, 2021
277d029
Run spirv-val for SPIR-V offline compilation (#1108)
StuartDBrady Jun 11, 2021
80a4a83
Minor fixes for CL_UNORM_SHORT_565, CL_UNORM_SHORT_555 (#1129)
JohnKesapidesARM Jun 11, 2021
69f0054
Fix copy and move semantics of wrapper classes (#1268)
mantognini Jun 17, 2021
236cd73
Use macOS 10 in CI (#1282)
kpet Jul 2, 2021
4a03bb7
Fix double-release of memory objects (#1277)
jrprice Jul 5, 2021
433974f
Fix check for image support in test_basic sizeof (#1269)
BKoscielak Jul 13, 2021
b500da5
add basic test for cl_khr_pci_bus_info (#1227)
bashbaug Jul 21, 2021
1263711
Fix double release of object in test_api and test_gl (#1287)
gwawiork Jul 21, 2021
79f692d
subgroups: Fix setting cl_halfs and progress check. (#1278)
lakshmih Jul 21, 2021
cc0b46e
Add tests for entrypoint cl_khr_suggested_local_work_size (#1264)
kalchr01 Aug 9, 2021
4759e5c
remove testing for scalar vloada_half (#1293)
bashbaug Aug 11, 2021
1aa9309
Temporarily disable the test_kernel_attributes test case (#1297)
fzou1 Aug 11, 2021
6da9c6b
Fix double free in c11_atomics tests for SVM allocations (#1286)
gwawiork Aug 11, 2021
43e1397
Fix kernel source for cl_khr_suggested_local_work_size (#1300)
kpet Aug 18, 2021
6c3c7e5
Remove unused definitions in CMakeLists.txt (#1302)
kpet Aug 19, 2021
070f8c0
add tests for cl_khr_integer_dot_product (#1276)
bashbaug Aug 25, 2021
39fdb46
define NOMINMAX in the CMakefile to fix std::min and std::max on MSVC…
bashbaug Aug 28, 2021
7cfd3a6
Report failures in simple_{read,write}_image_pitch tests (#1309)
kpet Aug 29, 2021
e27a97f
Add cl_khr_integer_dot_product to known extensions in test compiler. …
gwawiork Aug 31, 2021
995c7db
suppress MSVC strdup warning (#1314)
bashbaug Aug 31, 2021
0601c6f
Add missing include for gRandomSeed (#1307)
jrprice Aug 31, 2021
34e4732
Limit workgroup size for atomics tests (#1197)
zsrkmyn Sep 6, 2021
1f26e1d
Fix memory model issue in `atomic_flag`. (#1283)
Jeremy-Kemp Sep 7, 2021
02bf24d
remove min max macros (#1310)
bashbaug Sep 13, 2021
ddca0f8
gles: Fix double frees. (#1323)
lakshmih Sep 28, 2021
4fb5dee
api: Enable cl_khr_fp16 when using half types in kernel (#1327)
lakshmih Sep 28, 2021
2b770c4
Update cl_khr_integer_dot_product tests for v2 (#1317)
kpet Sep 29, 2021
903f1bf
Report unsupported extended subgroup tests as skipped rather than pas…
kpet Sep 30, 2021
92844be
Extended subgroups - use 128bit masks (#1215)
gwawiork Oct 1, 2021
7147d07
Remove space character from extension name (#1336)
gwawiork Oct 4, 2021
410f46f
Add testing of sub_group_broadcast for (u)char and (u)short types (#1…
StuartDBrady Nov 3, 2021
e9cd9a4
Remove excessive logging in subgroup tests (#1343)
StuartDBrady Nov 8, 2021
1116a71
Improve error handling in subgroup tests (#1352)
StuartDBrady Nov 16, 2021
1c6dbc2
Clean up logging in cl_khr_subgroup_ballot tests (#1351)
StuartDBrady Nov 16, 2021
3cd906a
Fix missing cl_khr_semaphore extensions in compiler tests (#1357)
marcat03 Nov 16, 2021
c25709f
Fix stack-use-after-scope crash in conversions (#1358)
jrprice Nov 23, 2021
3eb0f50
Use maximum subgroup size in sub_group_ballot tests (#1344)
StuartDBrady Nov 25, 2021
6dff4fd
Fix conversion data loss in test_api min_max_constant_args (#1355)
BKoscielak Nov 25, 2021
6f50623
Subgroups tests - sub_group_non_uniform_scan_exclusive function fixes…
gwawiork Nov 25, 2021
7625011
Remove unused inclusion of <cstdio> (#1362)
StuartDBrady Nov 26, 2021
f8ec235
Tidy up code to determine bit mask for ballot scans (#1363)
StuartDBrady Dec 2, 2021
e106be1
Test api min max - fix printing cl_ulong data type (#1212)
gwawiork Dec 4, 2021
8ffecf2
Fix build, glext should not be used with GLEW (#1337)
gwawiork Dec 8, 2021
73d71b6
Add cl_khr_command_buffer to list of extensions (#1365)
EwanC Dec 8, 2021
1161d78
Refactor logging of subgroup test start/pass messages (#1361)
StuartDBrady Dec 14, 2021
c2faced
Remove dead threading code (#1339)
lakshmih Jan 5, 2022
b71c204
test_subgroups - Set safe input values for half type and mul, add ope…
gwawiork Jan 5, 2022
f91daf3
Remove invalid negative_get_platform_info testcase (#1374)
jlewis-austin Jan 6, 2022
51c6d97
Fix test_api get_command_queue_info (#1324)
jlewis-austin Jan 6, 2022
06415f8
Fix memory leaks (#1378)
lakshmih Jan 11, 2022
6568860
Refactor divergence mask handling in subgroup tests (#1379)
StuartDBrady Jan 19, 2022
60471a5
Improve testing of sub_group_ballot (#1382)
StuartDBrady Jan 28, 2022
6b14d40
Improve testing of kernel arg info in pipe_info test (#1326)
StuartDBrady Feb 10, 2022
2d93b12
Sync submission_details with conformance doc v26 (#1389)
jlewis-austin Feb 22, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 12 additions & 11 deletions .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,16 @@ jobs:
name: Build ${{ matrix.os }} ${{ matrix.name }}
runs-on: ${{ matrix.os }}
env:
JOB_CHECK_FORMAT: ${{ matrix.format }}
JOB_ARCHITECTURE: ${{ matrix.arch }}
JOB_ENABLE_GL: ${{ matrix.gl }}
strategy:
matrix:
mainmatrix: [true]
os: [ubuntu-20.04, macos-11.0]
os: [ubuntu-20.04, macos-latest]
include:
- os: ubuntu-20.04
mainmatrix: true
gl: 1
- os: ubuntu-20.04
mainmatrix: false
name: Format
format: 1
- os: ubuntu-20.04
mainmatrix: false
name: Arm
Expand All @@ -30,11 +25,17 @@ jobs:
name: AArch64
arch: aarch64
steps:
- name: Setup
run: if [[ "${{matrix.format}}" == "1" ]]; then sudo apt install -y clang-format; fi
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build
run: ./presubmit.sh

formatcheck:
name: Check code format
runs-on: ubuntu-20.04
steps:
- name: Install packages
run: sudo apt install -y clang-format clang-format-9
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Check code format
run: ./check-format.sh
112 changes: 9 additions & 103 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

if(CMAKE_BUILD_TYPE STREQUAL "release")
set (BUILD_FLAVOR "release")
else(CMAKE_BUILD_TYPE STREQUAL "release")
set (BUILD_FLAVOR "debug")
endif(CMAKE_BUILD_TYPE STREQUAL "release")

add_definitions(-DCL_TARGET_OPENCL_VERSION=300)
add_definitions(-DCL_USE_DEPRECATED_OPENCL_2_2_APIS=1)
add_definitions(-DCL_USE_DEPRECATED_OPENCL_2_1_APIS=1)
Expand All @@ -29,14 +23,6 @@ if(USE_CL_EXPERIMENTAL)
add_definitions(-DCL_EXPERIMENTAL)
endif(USE_CL_EXPERIMENTAL)

# Support both VS2008 and VS2012.
set(BUILD_DIR "$ENV{ADRENO_DRIVER}/build")
if(MSVC90)
set(VS_BUILD_DIR "${BUILD_DIR}/vs2008")
else(MSVC110)
set(VS_BUILD_DIR "${BUILD_DIR}/vs2012")
endif(MSVC90)

#-----------------------------------------------------------
# Default Configurable Test Set
#-----------------------------------------------------------
Expand All @@ -62,58 +48,13 @@ set(CONFORMANCE_SUFFIX "" )
#build driver as a dependency of the conformance tests, or other such CMake customization
include(CMakeVendor.txt OPTIONAL)

#-----------------------------------------------------------
# Development options for OpenCL C++ tests
#-----------------------------------------------------------
# Use OpenCL C kernels instead of OpenCL C++ kernels
option(CLPP_DEVELOPMENT_USE_OPENCLC_KERNELS "Use OpenCL C kernels in OpenCL C++ tests" OFF)
if(CLPP_DEVELOPMENT_USE_OPENCLC_KERNELS)
set(CLPP_DEVELOPMENT_OPTIONS ${CLPP_DEVELOPMENT_OPTIONS} -DCLPP_DEVELOPMENT_USE_OPENCLC_KERNELS)
endif(CLPP_DEVELOPMENT_USE_OPENCLC_KERNELS)
# Only check if OpenCL C++ kernels compile to SPIR-V
option(CLPP_DEVELOPMENT_ONLY_SPIRV_COMPILATION "Only check if OpenCL C++ kernels compile to SPIR-V" OFF)
if(CLPP_DEVELOPMENT_ONLY_SPIRV_COMPILATION)
if(CLPP_DEVELOPMENT_USE_OPENCLC_KERNELS)
message(FATAL_ERROR "Can't use OpenCL C kernels and compile to SPIR-V.")
endif(CLPP_DEVELOPMENT_USE_OPENCLC_KERNELS)
set(CLPP_DEVELOPMENT_OPTIONS ${CLPP_DEVELOPMENT_OPTIONS} -DCLPP_DEVELOPMENT_ONLY_SPIRV_COMPILATION)
endif(CLPP_DEVELOPMENT_ONLY_SPIRV_COMPILATION)
#
if(CLPP_DEVELOPMENT_OPTIONS)
add_definitions(-DCLPP_DEVELOPMENT_OPTIONS)
add_definitions(${CLPP_DEVELOPMENT_OPTIONS})
endif(CLPP_DEVELOPMENT_OPTIONS)

# Offline OpenCL C/C++ compiler provided by Khronos is the only supported
# offline compiler.
#
# Path to offline OpenCL C/C++ compiler provided by Khronos.
# See https://github.com/KhronosGroup/SPIR/ (spirv-1.1 branch or newer SPIR-V-ready
# branch should be used).
if(KHRONOS_OFFLINE_COMPILER)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DKHRONOS_OFFLINE_COMPILER=${KHRONOS_OFFLINE_COMPILER}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DKHRONOS_OFFLINE_COMPILER=${KHRONOS_OFFLINE_COMPILER}")
# Additional OpenCL C/C++ compiler option.
if(KHRONOS_OFFLINE_COMPILER_OPTIONS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DKHRONOS_OFFLINE_COMPILER_OPTIONS=${KHRONOS_OFFLINE_COMPILER_OPTIONS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DKHRONOS_OFFLINE_COMPILER_OPTIONS=${KHRONOS_OFFLINE_COMPILER_OPTIONS}")
endif(KHRONOS_OFFLINE_COMPILER_OPTIONS)
else(KHRONOS_OFFLINE_COMPILER)
message(WARNING "KHRONOS_OFFLINE_COMPILER is not defined!")
message(WARNING "Running CL C++ tests will not be possible.")
endif(KHRONOS_OFFLINE_COMPILER)

# CL_LIBCLCXX_DIR - path to dir with OpenCL C++ STL (libclcxx)
# CL_INCLUDE_DIR - path to dir with OpenCL headers
# CL_LIBCLCXX_DIR - path to dir with OpenCL library
if(CL_INCLUDE_DIR AND CL_LIB_DIR AND CL_LIBCLCXX_DIR)
if(CL_INCLUDE_DIR AND CL_LIB_DIR)
link_directories(${CL_LIB_DIR})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCL_LIBCLCXX_DIR=${CL_LIBCLCXX_DIR}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCL_LIBCLCXX_DIR=${CL_LIBCLCXX_DIR}")
else(CL_INCLUDE_DIR AND CL_LIB_DIR AND CL_LIBCLCXX_DIR)
else(CL_INCLUDE_DIR AND CL_LIB_DIR)
message(STATUS "OpenCL hasn't been found!")
message(FATAL_ERROR "Either install OpenCL or pass -DCL_INCLUDE_DIR, -DCL_LIB_DIR and -DCL_LIBCLCXX_DIR")
endif(CL_INCLUDE_DIR AND CL_LIB_DIR AND CL_LIBCLCXX_DIR)
message(FATAL_ERROR "Either install OpenCL or pass -DCL_INCLUDE_DIR and -DCL_LIB_DIR")
endif(CL_INCLUDE_DIR AND CL_LIB_DIR)

# CLConform_GL_LIBRARIES_DIR - path to OpenGL libraries
if(GL_IS_SUPPORTED AND CLConform_GL_LIBRARIES_DIR)
Expand Down Expand Up @@ -151,10 +92,9 @@ if(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "(Apple)?Clang"
add_cxx_flag_if_supported(-Wno-format)
add_cxx_flag_if_supported(-Werror)
add_cxx_flag_if_supported(-Wno-error=cpp) # Allow #warning directive
add_cxx_flag_if_supported(-Wno-error=absolute-value) # Issue 783
add_cxx_flag_if_supported(-Wno-error=unknown-pragmas) # Issue #785
add_cxx_flag_if_supported(-Wno-error=asm-operand-widths) # Issue #784
add_cxx_flag_if_supported(-Wno-error=overflow) # Fixed by #699
add_cxx_flag_if_supported(-Wno-error=implicit-const-int-float-conversion) # Issue #1250

# -msse -mfpmath=sse to force gcc to use sse for float math,
# avoiding excess precision problems that cause tests like int2float
Expand All @@ -175,6 +115,10 @@ endif()
if(MSVC)
# Don't warn when using standard non-secure functions.
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
# Don't warn about using the portable "strdup" function.
add_compile_definitions(_CRT_NONSTDC_NO_DEPRECATE)
# Fix std::min and std::max handling with windows.harness.
add_compile_definitions(NOMINMAX)
endif()

if( WIN32 AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "Intel" )
Expand All @@ -197,10 +141,6 @@ if(LINK_PTHREAD)
list(APPEND CLConform_LIBRARIES pthread)
endif()

if(DEFINED USE_GLES3)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGLES3")
endif()

if(APPLE)
find_library(corefoundation CoreFoundation)
find_library(iokit IOKit)
Expand All @@ -214,39 +154,5 @@ include_directories(${CLConform_SOURCE_DIR}/test_common/harness
${CLConform_SOURCE_DIR}/test_common/gl
${CLConform_SOURCE_DIR}/test_common)

if(CMAKE_BUILD_TYPE STREQUAL "release")
set (BUILD_FLAVOR "release")
elseif (CMAKE_BUILD_TYPE STREQUAL "debug")
set (BUILD_FLAVOR "debug")
endif(CMAKE_BUILD_TYPE STREQUAL "release")


add_subdirectory(test_common)
add_subdirectory(test_conformance)
add_subdirectory(test_extensions)

# Support both VS2008 and VS2012.
set (DLL_FILES "${VS_BUILD_DIR}/Debug/*.dll")
set (DST_DIR "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug/")

if (WIN32)
set (COPY "echo")
add_custom_target(COPY_DLL${CONFORMANCE_SUFFIX} ALL
COMMAND ${COPY} "${DLL_FILES}" "${DST_DIR}"
COMMENT "Copying dll files.. ")
else (WIN32)
set (COPY cp)
add_custom_target(COPY_DLL${CONFORMANCE_SUFFIX})
endif(WIN32)

set_property(TARGET COPY_DLL${CONFORMANCE_SUFFIX} PROPERTY FOLDER "CONFORMANCE${CONFORMANCE_SUFFIX}")

if(WIN32)
add_custom_target( COPY_FILES${CONFORMANCE_SUFFIX} ALL
COMMAND ${COPY} ${DLL_FILES} ${DST_DIR}
COMMENT "Copying other files to output folder..." )
else(WIN32)
add_custom_target( COPY_FILES${CONFORMANCE_SUFFIX} )
endif(WIN32)

set_property(TARGET COPY_FILES${CONFORMANCE_SUFFIX} PROPERTY FOLDER "CONFORMANCE${CONFORMANCE_SUFFIX}")
6 changes: 2 additions & 4 deletions check-format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

# Arg used to specify non-'origin/master' comparison branch
ORIGIN_BRANCH=${1:-"origin/master"}
CLANG_BINARY=${2:-"`which clang-format-9`"}

# Run git-clang-format to check for violations
if [ "$TRAVIS" == "true" ]; then
EXTRA_OPTS="--binary `which clang-format-9`"
fi
CLANG_FORMAT_OUTPUT=$(git-clang-format --diff $ORIGIN_BRANCH --extensions c,cpp,h,hpp $EXTRA_OPTS)
CLANG_FORMAT_OUTPUT=$(git-clang-format --diff $ORIGIN_BRANCH --extensions c,cpp,h,hpp --binary $CLANG_BINARY)

# Check for no-ops
grep '^no modified files to format$' <<<"$CLANG_FORMAT_OUTPUT" && exit 0
Expand Down
11 changes: 1 addition & 10 deletions presubmit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ set -e

export TOP=$(pwd)

if [[ "${JOB_CHECK_FORMAT}" == "1" ]]; then
./check-format.sh
exit $?
fi

TOOLCHAIN_URL_arm="https://releases.linaro.org/components/toolchain/binaries/7.5-2019.12/arm-linux-gnueabihf/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf.tar.xz"
TOOLCHAIN_URL_aarch64="https://releases.linaro.org/components/toolchain/binaries/7.5-2019.12/aarch64-linux-gnu/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu.tar.xz"

Expand Down Expand Up @@ -60,17 +55,13 @@ cd build
cmake -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} -DOPENCL_ICD_LOADER_HEADERS_DIR=${TOP}/OpenCL-Headers/ ..
make

# Get libclcxx
cd ${TOP}
git clone https://github.com/KhronosGroup/libclcxx.git

# Build CTS
cd ${TOP}
ls -l
mkdir build
cd build
cmake -DCL_INCLUDE_DIR=${TOP}/OpenCL-Headers \
-DCL_LIB_DIR=${TOP}/OpenCL-ICD-Loader/build \
-DCL_LIBCLCXX_DIR=${TOP}/libclcxx \
-DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE} \
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=./bin \
-DOPENCL_LIBRARIES="-lOpenCL -lpthread" \
Expand Down
2 changes: 0 additions & 2 deletions test_common/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

set(HARNESS_SOURCES
harness/threadTesting.cpp
harness/typeWrappers.cpp
harness/mt19937.cpp
harness/conversions.cpp
Expand All @@ -22,4 +21,3 @@ set(HARNESS_SOURCES
)

add_library(harness STATIC ${HARNESS_SOURCES})

3 changes: 0 additions & 3 deletions test_common/gl/setup_win32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#define GL_GLEXT_PROTOTYPES

#include "setup.h"
#include "testBase.h"
#include "harness/errorHelpers.h"

#include <GL/gl.h>
#include <GL/glut.h>
#include <CL/cl_ext.h>

typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetGLContextInfoKHR_fn)(
Expand Down
20 changes: 11 additions & 9 deletions test_common/gl/setup_x11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#define GL_GLEXT_PROTOTYPES

#include "setup.h"
#include "testBase.h"
#include "harness/errorHelpers.h"

#include <GL/gl.h>
#include <GL/glut.h>
#include <GL/glext.h>
#include <GL/freeglut.h>
#include <GL/glx.h>
#include <CL/cl_ext.h>

Expand Down Expand Up @@ -90,10 +85,17 @@ class X11GLEnvironment : public GLEnvironment
}

for (int i=0; i<(int)num_of_devices; i++) {
if (!is_extension_available(devices[i], "cl_khr_gl_sharing ")) {
log_info("Device %d of %d does not support required extension cl_khr_gl_sharing.\n", i+1, num_of_devices);
} else {
log_info("Device %d of %d supports required extension cl_khr_gl_sharing.\n", i+1, num_of_devices);
if (!is_extension_available(devices[i], "cl_khr_gl_sharing"))
{
log_info("Device %d of %d does not support required extension "
"cl_khr_gl_sharing.\n",
i + 1, num_of_devices);
}
else
{
log_info("Device %d of %d supports required extension "
"cl_khr_gl_sharing.\n",
i + 1, num_of_devices);
found_valid_device = 1;
m_devices[m_device_count++] = devices[i];
}
Expand Down
6 changes: 2 additions & 4 deletions test_common/gles/helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{GLint __error = glGetError(); if(__error) {log_error( "GL ERROR: %s!\n", gluErrorString( err ));}}

#if defined(__linux__) || defined(GL_ES_VERSION_2_0)
// On linux we dont link to GLU library to avoid comaptibility issues with
// On linux we don't link to GLU library to avoid compatibility issues with
// libstdc++
// FIXME: Implement this
const GLubyte* gluErrorString (GLenum error)
Expand Down Expand Up @@ -271,8 +271,6 @@ void * ReadGLTexture( GLenum glTarget, GLuint glTexture,
// Read results from the GL texture
glBindTexture(get_base_gl_target(glTarget), glTexture);

GLint realWidth, realHeight;
GLint realInternalFormat;
GLenum readBackFormat = GL_RGBA;
GLenum readBackType = glType;
glFramebufferWrapper glFramebuffer;
Expand Down Expand Up @@ -301,7 +299,7 @@ void * ReadGLTexture( GLenum glTarget, GLuint glTexture,
GetGLFormatName(readBackFormat),
GetGLTypeName(readBackType));

DumpGLBuffer(readBackType, realWidth, realHeight, (void*)outBuffer);
DumpGLBuffer(readBackType, outWidth, outHeight, (void *)outBuffer);

#endif

Expand Down
5 changes: 2 additions & 3 deletions test_common/gles/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@

#if !defined (__APPLE__)
#include <CL/cl.h>
#include "gl_headers.h"
#include <CL/cl_gl.h>
#else
#include "gl_headers.h"
#include <CL/cl_half.h>
#endif
#include "gl_headers.h"

#include "harness/errorHelpers.h"
#include "harness/kernelHelpers.h"
Expand Down
Loading