Commit Graph

255 Commits

Author SHA1 Message Date
Ewan Crawford
92c9108be0
Add provisional command-buffer extension (#182)
* Add provisional command-buffer extension

Run `gen_headers.py` from https://github.com/KhronosGroup/OpenCL-Headers/pull/161 on XML file
containing https://github.com/KhronosGroup/OpenCL-Docs/pull/711 new spec extensions.

The only XML changes are for the `cl_khr_command_buffer` extension, which declarations gets
generated at the top of `cl_ext.h` by the script. So I have taken the generated
`cl_khr_command_buffer` code and applied it to the same location in master branch `cl_ext.h`.

* Remove INFO from command-buffer query enums

Updated to reflect
9295865867

* Reflect command-buffer property changes

1. Change type of `cl_command_buffer_properties_khr` to `cl_properties`
2. Add a new `cl_command_buffer_flags_khr` type.
3. Rename `CL_COMMAND_BUFFER_PROPERTIES_KHR` to
`CL_COMMAND_BUFFER_FLAGS_KHR`.
  3a. Change the expected type of this to `cl_command_buffer_flags_khr`.
4. Change type of `cl_ndrange_kernel_command_properties_khr` to
`cl_properties`
2021-11-16 17:29:32 -08:00
Feng Zou
71297456fc
Rename cl_intel_thread_local_exec to cl_intel_exec_by_local_thread (#183)
cl_intel_exec_by_local_thread is the correct extension name.
2021-11-15 21:18:30 -08:00
Kévin Petit
447efd3be3
Fix API suffix version macros for semaphore extensions command definitions (#181)
These extensions only require OpenCL 1.2

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2021-10-21 10:14:14 -07:00
Gustavo Alvarez
1fc6fc181c
If change the include path destination when run cmake configure with DCMAKE_INSTALL_INCLUDEDIR, the .cmake generated still point to hardcoded path include. this fix it (#178) 2021-10-18 23:14:52 +01:00
Ben Ashbaugh
03162a6f8b
add external memory, external semaphore, and semaphore provisional extensions (#180)
* add external memory, external semaphore, and semaphore extensions

* remove duplicated enums
2021-10-18 23:13:25 +01:00
y-novikov
1aa1139b58
Fix condition for warning 4201 pop (#179)
Matching the condition for push.
New clang compiler version complains that the warning can be popped
without being pushed first.
2021-10-06 14:35:29 -07:00
Ben Ashbaugh
835558e45c
update extension headers for cl_intel_device_attribute_query (#172) 2021-09-16 15:21:56 +01:00
Ben Ashbaugh
06fecd8fed
update extension headers for cl_intel_sharing_format_query (#171) 2021-09-16 15:21:37 +01:00
Kévin Petit
c810b6923c
Add support for cl_khr_integer_dot_product v2 (#174)
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2021-09-01 13:39:59 -07:00
Ben Ashbaugh
1bb9ec797d
update headers for cl_khr_integer_dot_product (#170) 2021-06-22 07:25:56 -07:00
Ben Ashbaugh
1d3dc4e756
add cl_khr_pci_bus_info and cl_khr_suggested_local_work_size (#166) 2021-04-26 07:01:46 -07:00
John Plate
101bdd16ec
Add missing 'stdint.h' include to 'CL/cl.h' (#164)
* Add missing 'stdint.h' include

* Moved stdint.h include to cl_platform.h

* Don't include stdint.h before Visual Studio 2010
2021-04-16 21:39:09 -07:00
Ben Ashbaugh
77d9ce7d4f
disable failing CI configs (#163)
* use the Ubuntu 18.04 environment instead of ubuntu-latest, for now

* disable Ninja configs for MacOS for now

* disable gcc-8 for now
2021-04-16 21:17:45 -07:00
John Plate
eea2ab6219
Fixes for usage of macro CL_API_ENTRY (#162) 2021-04-14 23:20:44 -07:00
Ben Ashbaugh
23710f1b99
cl_intel_command_queue_families extension (#155) 2021-02-21 00:15:52 -05:00
Milkey Mouse
ac0bf07a6c
Update default OpenCL version in README (#160)
Since commit 9fac4e9, OpenCL 3.0, not 2.0 has been the default version
if CL_TARGET_OPENCL_VERSION is not defined.
2021-02-20 23:26:35 -05:00
Kévin Petit
9d46d9580c
Replace uses of CL_EXT_{PRE,SUF}FIX* with CL_API_{PRE,SUF}FIX* (#158)
Contributes to #153

Signed-off-by: Kévin Petit <kevin.petit@arm.com>
2021-02-19 22:12:38 +00:00
Ben Ashbaugh
d1b936b72b
do not include cl_gl_ext.h from opencl.h (#159) 2021-02-16 21:50:34 -05:00
Ben Ashbaugh
95d1b3fb54
move cl_khr_gl_event to cl_gl.h (#156) 2021-02-16 15:32:41 -05:00
Ben Ashbaugh
f74fc79147
Add testing for cl_d3d10.h, cl_d3d11.h, and cl_dx9_media_sharing.h (#123)
* Add testing for cl_d3d10.h, cl_d3d11.h, and cl_dx9_media_sharing.h

* add a test for cl_dx9_media_sharing_intel.h
2021-02-16 15:19:03 -05:00
Kévin Petit
4a70f93bfc
Add definitions for cl_arm_import_memory_android_hardware_buffer v1.1.0 (#157)
Signed-off-by: Einar Hov <einar.hov@arm.com>
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Change-Id: I91b3738d389b1cada65869d6ac990ceca8381746
2021-02-15 12:43:08 -08:00
Kévin Petit
d0d6457792
Add support for user-supplied prefix/suffix in function declarations (#154)
This change adds the ability for a user of the headers to pass
prefixes or suffixes to be used in the function prototypes via
(respectively) CL_API_PREFIX_USER and CL_API_SUFFIX_USER.

This can be used to pass additional attributes (e.g. to use
weak symbols).

Signed-off-by: Kévin Petit <kpet@free.fr>
2021-02-15 20:35:49 +00:00
Brice Videau
18eaa39c9c
Move cl_icd_layer.h from OpenCL-ICD-Loader to OpenCL-Headers. (#148)
* Move cl_icd_layer.h from OpenCL-ICD-Loader to OpenCL-Headers.

* Added test for cl_icd_layer.h single inclusion.

* Added missing test_cl_icd_layer.h.c file.

* Changed include guard to non reserved identifier.

* Renamed cl_icd_layer.h to cl_layer.h.

* Fix tests and guard.
2021-02-11 15:16:32 -08:00
Kévin Petit
2378fb98e7
Add definitions for cl_arm_controlled_kernel_termination (#152)
* Add definitions for cl_arm_controlled_kernel_termination

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Change-Id: I8802d7ef06b619814f898b5215f3592886a744bf

* Break cl_command_termination_reason_arm enum into separate definitions

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
Change-Id: I109b45a222736a5d5346f44ea42e90271a1c79fe

* Add cl_device_controlled_termination_capabilities_arm

Change-Id: Ic5a0f40e96a0ac03eddca2a4eed26756ce5130ec
2021-02-11 08:30:08 -08:00
Kévin Petit
c271d3cd13
Add definitions for cl_arm_scheduling_controls v0.3.0 (#151)
Change-Id: I90bb9c47bf8aaa8f6499cd8eae33858dda50672f
Signed-off-by: Neil Hickey <neil.hickey@arm.com>
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2021-02-09 20:53:44 -08:00
Kévin Petit
6ddf40b51b
Remove unused CL_EXTENSION_WEAK_LINK definition (#150)
Signed-off-by: Kévin Petit <kevin.petit@arm.com>
2021-02-03 15:11:06 -08:00
Ben Ashbaugh
fb6807bfc9
move Intel extensions into common files (#129)
* move Intel extensions into common files

* switch from #warning to #pragma message

Using #warning will cause projects with warnings as errors enabled
to stop building.

* add back testing for cl_ext_intel.h
2021-01-29 00:00:42 +00:00
Kévin Petit
dc461719e5
Add definitions for cl_arm_scheduling_controls v0.2.0 (#147)
Signed-off-by: Oualid Khelifi <oualid.khelifi@arm.com>
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2021-01-12 10:06:17 -08:00
Jon Leech
7edca72746
Update apt package list in CI before running cmake (#143)
* Update apt before it's invoked by cmake
2020-12-19 22:25:02 +00:00
Ben Ashbaugh
c57ba81c46 re-enable format string warning in CI 2020-12-09 11:53:44 -05:00
Ben Ashbaugh
0885415c0f use PRId64 and PRIu64 when printing 64-bit values 2020-12-09 11:53:44 -05:00
Ben Ashbaugh
cc54363c8c fix test format string warnings 2020-12-09 11:53:44 -05:00
Ben Ashbaugh
8c8faa3bc1 fix origin argument names for rect functions 2020-12-09 11:52:47 -05:00
James Price
1f0eb1131b
Enable GitHub Actions for pull requests (#141) 2020-12-09 08:51:59 -08:00
Jeremy Kemp
3259391929
Added definitions for cl_img_generate_mipmap. (#135)
Accompanies KhronosGroup/OpenCL-Docs#489
2020-11-27 21:55:01 -08:00
Jeremy Kemp
c65949121e
Added missing define for cl_img_use_gralloc_ptr. (#134) 2020-11-27 21:47:01 -08:00
Jeremy Kemp
ee1eff645f
Use the alignment attribute under Integrity OS. (#131) 2020-11-27 21:44:14 -08:00
Nagy-Egri Máté Ferenc
006fc6797e
Comprehensive CMake Package Config support (#107)
* Add CMake Packaging + CI For Package

* Uniform formatting

* Explicit compiler detection

* Simplify exported target name

* Changed include dir to SYSTEM BEFORE

* Remove travis

* Initial Github Actions yaml

* Fix CWD

* Remove CWD from YAML

* MSVC warning flags

* Fix CWD for CTest invocations

* Relative CWD

* runner.workspace

* enable tests in build

* Move to C flags

* Enable testing in CI

* GCC warnings

* Don't meddle with compiler flags in CMake

* C2059: syntax error: 'bad suffix on number'

* C4001: nonstd ext 'single line comment' was used

* /wd4001

* /wd4001 again

* Remove Za builds of cl_icd_h.c

* Fix oeprator precedence

* Refrain from altering global state

* Add C_STANDARD to GCC build

* Add 32-bit and 64-bit matrix dims

* Change -march to -m

* Try adding host

* install gcc-multilib

* Add GCC 8 & 9 multilib

* Install GCC multilib conditionally

* Add note on Windows C versions incoming

* Add INCRMENTAL to silence notice on full link

* Experiment with disabling

* Initial MacOS config

* Add ninja to MacOS build

* Fix nproc

* nproc -> sysctl

* Xcode

* cmd -> bash

* which gcc-9

* Actual GCC invocation

* Check gcc if symlink

* follow link

* Obtain env

* Cleanup

* Re-enable Windows and Linux

* Check pkgconfig

* Syntax fix

* INSTALL_PREFIX to PREFIX_PATH

* Use CONFIG

* Added bare and SDK consumption

* Fix bare target

* Fix test for unsued variable

* Add missing semi-colons

* Rework SDK emulation

* Fix indentation

* Fix build path for SDK consumption

* Add Windows consumption test

* MacOS

* Fix indentation

* Enable MacOS

* CMAKE_INSTALL_PREFIX >> CMAKE_PREFIX_PATH

* Fix install

* Install Release on Windows

* Re-enable Linux and Windows

* Added C99 builds

* Removed pkgconfig.c duplication

* Fix out-of-sync target in readme

* Added policy to make readme sample work

* match up paths in readme samples

* Homogenize target names

* Remove all warnings from sample readme

Co-authored-by: sL1pKn07 <sl1pkn07@gmail.com>
2020-11-24 19:18:58 +01:00
Jeremy Kemp
b7cad4bbf9
Added definitions for cl_img_mem_properties. (#136)
Accompanies KhronosGroup/OpenCL-Docs#491
2020-11-20 13:40:27 -08:00
Ben Ashbaugh
9fac4e9866 switch the default version for the OpenCL headers to OpenCL 3.0 2020-10-14 16:36:27 +01:00
Ben Ashbaugh
b316a57d5b
re-enable anonymous unions by default (#125) 2020-10-07 09:56:12 -07:00
Nagy-Egri Máté Ferenc
d65bcc5123
Avoid anon structs when MSVC uses /Za (#116)
* Avoid anon structs when MSVC uses /Za

* Add popping warning for /Za builds

* reuse __CL_HAS_ANON_STRUCT__

* refine MSVC flags

* Fix preprocessor predicates

* Remove MSVC warning C4224

* Remove MSVC warning C4244

* Revamp warning flags based on compilers

* Guard system headers from warnings of extensions

* Remove commented code

* Remove redundant checks of _WIN32

* Rename param instead of comment
2020-09-30 08:32:57 +02:00
Ben Ashbaugh
9d17180a33
update APIs and enums for cl_intel_unified_shared_memory for rev Q (#108)
Specifically, adds the API for clMemBlockingFreeINTEL.
2020-09-27 14:49:57 -07:00
Ben Ashbaugh
069189f519
header changes for cl_intel_mem_force_host_memory (#114) 2020-09-22 20:29:57 +01:00
Kévin Petit
1b2a1850f4
Add definitions for cl_ext_cxx_for_opencl (#109)
Specification in https://github.com/KhronosGroup/OpenCL-Docs/pull/399

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-09-02 13:33:56 -07:00
Kévin Petit
e8ca48d46c
Add definitions for cl_arm_scheduling_controls (#110)
Specification in https://github.com/KhronosGroup/OpenCL-Docs/pull/423

Signed-off-by: Plamen Petkov <plamen.petkov@arm.com>
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2020-08-30 22:14:26 -07:00
Mikhail Lychkov
d8bb3220d4
Add cl_intel_create_buffer_with_properties and cl_intel_mem_channel_property extensions (#106)
* Add cl_intel_create_buffer_with_properties extension function

Spec:
https://github.com/KhronosGroup/OpenCL-Docs/blob/master/extensions/cl_intel_create_buffer_with_properties.asciidoc

This extension allows OpenCL 1.x and 2.x devices to support the
clCreateBufferWithProperties API that was added in OpenCL 3.0. This allows older
OpenCL implementations to support other optional extensions or features that use
the clCreateBufferWithProperties API to specify additional buffer properties,
without recreating the API that is already part of OpenCL 3.0.

Signed-off-by: Mikhail Lychkov <mikhail.lychkov@intel.com>

* Add CL_MEM_CHANNEL_INTEL property enum

It's done to align with:
https://github.com/KhronosGroup/OpenCL-Docs/blob/master/extensions/cl_intel_mem_channel_property.asciidoc

Signed-off-by: Mikhail Lychkov <mikhail.lychkov@intel.com>

Co-authored-by: Viktoria Maksimova <viktoria.maksimova@intel.com>
2020-08-11 07:50:35 -07:00
Ben Ashbaugh
879576679f add cl_api prefix for clSetContextDestructorCallback 2020-07-29 20:08:30 +01:00
Ben Ashbaugh
14ff4add11 update ICD dispatch table with clSetContextDestructorCallback 2020-07-29 20:08:30 +01:00
Ben Ashbaugh
dab00ce959 deprecate clSetProgramReleaseCallback 2020-07-29 20:08:30 +01:00