Commit 84a62266 by Chris Forbes Committed by Commit Bot

Expand CL plumbing support to cover all versions

The OpenCL CTS assumes that libOpenCL has symbols for all versions as it usually expects to link against the Khronos loader. Since we're not using that, we have to expose all the symbols it wants, whether we intend to implement all versions or not. All the 2.x stuff will likely remain stubs forever as it is made optional again in 3.0. In the generator scripts, work around a small issue where one function takes an array-typed parameter, which confused just_the_name and produced invalid code. Bug: angleproject:5819 Change-Id: I6c3591dc9229c5276f14ff66ee3ee6362e8bf622 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2807531 Commit-Queue: Chris Forbes <chrisforbes@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarJohn Plate <jplate@google.com>
parent 68f06888
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"scripts/gl_angle_ext.xml": "scripts/gl_angle_ext.xml":
"08f74b35d908b7c02b45fdf45572c434", "08f74b35d908b7c02b45fdf45572c434",
"scripts/registry_xml.py": "scripts/registry_xml.py":
"2d623a8b4a8a49213e8d0c0a0c8c4dd8", "4a1ac9fd24f4d3779ccaf03c11be3054",
"scripts/wgl.xml": "scripts/wgl.xml":
"c36001431919e1c435f1215a85f7e1db", "c36001431919e1c435f1215a85f7e1db",
"src/libEGL/egl_loader_autogen.cpp": "src/libEGL/egl_loader_autogen.cpp":
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
"src/libEGL/egl_loader_autogen.h": "src/libEGL/egl_loader_autogen.h":
"9cbf4d491497058a32642865eb032276", "9cbf4d491497058a32642865eb032276",
"src/libOpenCL/cl_loader_autogen.cpp": "src/libOpenCL/cl_loader_autogen.cpp":
"7cf7c0dbc49dab7af837881ef66686be", "e14107689ee438fb750a89ac6635a39e",
"src/tests/restricted_traces/trace_egl_loader_autogen.cpp": "src/tests/restricted_traces/trace_egl_loader_autogen.cpp":
"ab1ce9e72e1e248b13302349f2228a89", "ab1ce9e72e1e248b13302349f2228a89",
"src/tests/restricted_traces/trace_egl_loader_autogen.h": "src/tests/restricted_traces/trace_egl_loader_autogen.h":
......
...@@ -10,13 +10,13 @@ ...@@ -10,13 +10,13 @@
"scripts/entry_point_packed_gl_enums.json": "scripts/entry_point_packed_gl_enums.json":
"4f7b43863a5e61991bba4010db463679", "4f7b43863a5e61991bba4010db463679",
"scripts/generate_entry_points.py": "scripts/generate_entry_points.py":
"142d88c6897c428055ed7f0cbcc24717", "5b0afb91add7f1cffd526d5df07aa7e7",
"scripts/gl.xml": "scripts/gl.xml":
"2a73a58a7e26d8676a2c0af6d528cae6", "2a73a58a7e26d8676a2c0af6d528cae6",
"scripts/gl_angle_ext.xml": "scripts/gl_angle_ext.xml":
"08f74b35d908b7c02b45fdf45572c434", "08f74b35d908b7c02b45fdf45572c434",
"scripts/registry_xml.py": "scripts/registry_xml.py":
"2d623a8b4a8a49213e8d0c0a0c8c4dd8", "4a1ac9fd24f4d3779ccaf03c11be3054",
"scripts/wgl.xml": "scripts/wgl.xml":
"c36001431919e1c435f1215a85f7e1db", "c36001431919e1c435f1215a85f7e1db",
"src/common/entry_points_enum_autogen.cpp": "src/common/entry_points_enum_autogen.cpp":
...@@ -166,9 +166,9 @@ ...@@ -166,9 +166,9 @@
"src/libGLESv2/libGLESv2_with_capture_autogen.def": "src/libGLESv2/libGLESv2_with_capture_autogen.def":
"301a20588e14724b390409c71d5ccfcd", "301a20588e14724b390409c71d5ccfcd",
"src/libOpenCL/entry_points_cl_autogen.cpp": "src/libOpenCL/entry_points_cl_autogen.cpp":
"228858e9707c6c1c4abe2fe618dfb2ab", "36dc767bd0a475f2ca58549516cf59b1",
"src/libOpenCL/entry_points_cl_autogen.h": "src/libOpenCL/entry_points_cl_autogen.h":
"ca2c45e4f2ae7688efac5100d5b468ad", "ef47b0f6110f4a7ef59322c6aad763ab",
"src/libOpenCL/libOpenCL_autogen.cpp": "src/libOpenCL/libOpenCL_autogen.cpp":
"5505f26e1214b5c65fd3abfb46139ef0" "84da77a2f0a740f3a547e24fb1f40208"
} }
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"scripts/gl_angle_ext.xml": "scripts/gl_angle_ext.xml":
"08f74b35d908b7c02b45fdf45572c434", "08f74b35d908b7c02b45fdf45572c434",
"scripts/registry_xml.py": "scripts/registry_xml.py":
"2d623a8b4a8a49213e8d0c0a0c8c4dd8", "4a1ac9fd24f4d3779ccaf03c11be3054",
"src/libANGLE/capture/gl_enum_utils_autogen.cpp": "src/libANGLE/capture/gl_enum_utils_autogen.cpp":
"9517df43e12c9d27cdf40a0db05bc85b", "9517df43e12c9d27cdf40a0db05bc85b",
"src/libANGLE/capture/gl_enum_utils_autogen.h": "src/libANGLE/capture/gl_enum_utils_autogen.h":
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"scripts/gl_angle_ext.xml": "scripts/gl_angle_ext.xml":
"08f74b35d908b7c02b45fdf45572c434", "08f74b35d908b7c02b45fdf45572c434",
"scripts/registry_xml.py": "scripts/registry_xml.py":
"2d623a8b4a8a49213e8d0c0a0c8c4dd8", "4a1ac9fd24f4d3779ccaf03c11be3054",
"scripts/wgl.xml": "scripts/wgl.xml":
"c36001431919e1c435f1215a85f7e1db", "c36001431919e1c435f1215a85f7e1db",
"src/libGL/proc_table_wgl_autogen.cpp": "src/libGL/proc_table_wgl_autogen.cpp":
......
...@@ -1225,6 +1225,9 @@ def just_the_name(param): ...@@ -1225,6 +1225,9 @@ def just_the_name(param):
def get_name(param_string): def get_name(param_string):
return param_string[type_name_sep_index(param_string) + 1:].strip() return param_string[type_name_sep_index(param_string) + 1:].strip()
if param.find("[]") != -1:
param = param.replace("[]", "")
left_paren = param.find("(") left_paren = param.find("(")
if left_paren == -1: if left_paren == -1:
return get_name(param) return get_name(param)
......
...@@ -222,7 +222,7 @@ DESKTOP_GL_VERSIONS = [(1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (2, 0), ( ...@@ -222,7 +222,7 @@ DESKTOP_GL_VERSIONS = [(1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (2, 0), (
GLES_VERSIONS = [(2, 0), (3, 0), (3, 1), (3, 2), (1, 0)] GLES_VERSIONS = [(2, 0), (3, 0), (3, 1), (3, 2), (1, 0)]
EGL_VERSIONS = [(1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (1, 5)] EGL_VERSIONS = [(1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (1, 5)]
WGL_VERSIONS = [(1, 0)] WGL_VERSIONS = [(1, 0)]
CL_VERSIONS = [(1, 0)] CL_VERSIONS = [(1, 0), (1, 1), (1, 2), (2, 0), (2, 1), (2, 2), (3, 0)]
# API types # API types
......
...@@ -31,7 +31,13 @@ angle_source_set("cl_includes") { ...@@ -31,7 +31,13 @@ angle_source_set("cl_includes") {
angle_shared_library("OpenCL") { angle_shared_library("OpenCL") {
defines = [ defines = [
"CL_TARGET_OPENCL_VERSION=100", "CL_TARGET_OPENCL_VERSION=300",
"CL_USE_DEPRECATED_OPENCL_2_2_APIS",
"CL_USE_DEPRECATED_OPENCL_2_1_APIS",
"CL_USE_DEPRECATED_OPENCL_2_0_APIS",
"CL_USE_DEPRECATED_OPENCL_1_2_APIS",
"CL_USE_DEPRECATED_OPENCL_1_1_APIS",
"CL_USE_DEPRECATED_OPENCL_1_0_APIS",
"LIBCL_IMPLEMENTATION", "LIBCL_IMPLEMENTATION",
] ]
sources = [ sources = [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment