Commit 16a919b1 by John Plate Committed by Commit Bot

Add stubs for CL platform layer back ends

Bug: angleproject:5904 Change-Id: If23c7f76013a17c3c67c13194566438035beb3d1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2853582 Commit-Queue: John Plate <jplate@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com>
parent be7049d7
......@@ -692,6 +692,10 @@ config("angle_backend_config") {
configs += [ "src/libANGLE/renderer/vulkan:angle_vulkan_backend_config" ]
}
if (angle_enable_cl_passthrough) {
configs += [ "src/libANGLE/renderer/cl:angle_cl_backend_config" ]
}
if (angle_is_winuwp) {
configs += [ "src/libANGLE/renderer/d3d:angle_enable_winuwp_config" ]
}
......@@ -846,6 +850,10 @@ angle_source_set("libANGLE_base") {
public_deps += [ "src/libANGLE/renderer/metal:angle_metal_backend" ]
}
if (angle_enable_cl_passthrough) {
public_deps += [ "src/libANGLE/renderer/cl:angle_cl_backend" ]
}
# Enable extra Chromium style warnings for libANGLE.
if (is_clang && angle_has_build && !use_xcode_clang) {
suppressed_configs -= [ "//build/config/clang:find_bad_constructs" ]
......
......@@ -135,6 +135,13 @@ declare_args() {
# http://anglebug.com/2634
angle_enable_metal = is_mac
# Enables the OpenCL pass-through back end
angle_enable_cl_passthrough = angle_enable_cl
}
if (!angle_enable_cl) {
angle_enable_cl_passthrough = false
}
declare_args() {
......
//
// Copyright 2021 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// CLContextImpl.h: Defines the abstract rx::CLContextImpl class.
#ifndef LIBANGLE_RENDERER_CLCONTEXTIMPL_H_
#define LIBANGLE_RENDERER_CLCONTEXTIMPL_H_
#include "common/angleutils.h"
namespace rx
{
class CLContextImpl : angle::NonCopyable
{
public:
CLContextImpl() {}
virtual ~CLContextImpl() {}
};
} // namespace rx
#endif // LIBANGLE_RENDERER_CLCONTEXTIMPL_H_
//
// Copyright 2021 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// CLDeviceImpl.h: Defines the abstract rx::CLDeviceImpl class.
#ifndef LIBANGLE_RENDERER_CLDEVICEIMPL_H_
#define LIBANGLE_RENDERER_CLDEVICEIMPL_H_
#include "common/angleutils.h"
namespace rx
{
class CLDeviceImpl : angle::NonCopyable
{
public:
CLDeviceImpl() {}
virtual ~CLDeviceImpl() {}
};
} // namespace rx
#endif // LIBANGLE_RENDERER_CLDEVICEIMPL_H_
//
// Copyright 2021 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// CLPlatformImpl.h: Defines the abstract rx::CLPlatformImpl class.
#ifndef LIBANGLE_RENDERER_CLPLATFORMIMPL_H_
#define LIBANGLE_RENDERER_CLPLATFORMIMPL_H_
#include "common/angleutils.h"
namespace rx
{
class CLPlatformImpl : angle::NonCopyable
{
public:
CLPlatformImpl() {}
virtual ~CLPlatformImpl() {}
};
} // namespace rx
#endif // LIBANGLE_RENDERER_CLPLATFORMIMPL_H_
# Copyright 2021 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# This file houses the build configuration for the OpenCL pass-through back-end.
import("../../../../gni/angle.gni")
assert(angle_enable_cl_passthrough)
_cl_backend_sources = [
"CLContextCL.cpp",
"CLContextCL.h",
"CLDeviceCL.cpp",
"CLDeviceCL.h",
"CLPlatformCL.cpp",
"CLPlatformCL.h",
]
config("angle_cl_backend_config") {
defines = [ "ANGLE_ENABLE_CL_PASSTHROUGH" ]
}
angle_source_set("angle_cl_backend") {
sources = _cl_backend_sources
public_deps = [ "$angle_root:libANGLE_headers" ]
}
//
// Copyright 2021 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// CLContextCL.cpp:
// Implements the class methods for CLContextCL.
//
#include "libANGLE/renderer/cl/CLContextCL.h"
namespace rx
{
CLContextCL::CLContextCL() {}
CLContextCL::~CLContextCL() {}
} // namespace rx
//
// Copyright 2021 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// CLContextCL.h:
// Defines the class interface for CLContextCL, implementing CLContextImpl.
//
#ifndef LIBANGLE_RENDERER_CL_CLCONTEXTCL_H_
#define LIBANGLE_RENDERER_CL_CLCONTEXTCL_H_
#include "libANGLE/renderer/CLContextImpl.h"
namespace rx
{
class CLContextCL : public CLContextImpl
{
public:
CLContextCL();
~CLContextCL() override;
};
} // namespace rx
#endif // LIBANGLE_RENDERER_CL_CLCONTEXTCL_H_
//
// Copyright 2021 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// CLDeviceCL.cpp:
// Implements the class methods for CLDeviceCL.
//
#include "libANGLE/renderer/cl/CLDeviceCL.h"
namespace rx
{
CLDeviceCL::CLDeviceCL() {}
CLDeviceCL::~CLDeviceCL() {}
} // namespace rx
//
// Copyright 2021 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// CLDeviceCL.h:
// Defines the class interface for CLDeviceCL, implementing CLDeviceImpl.
//
#ifndef LIBANGLE_RENDERER_CL_CLDEVICECL_H_
#define LIBANGLE_RENDERER_CL_CLDEVICECL_H_
#include "libANGLE/renderer/CLDeviceImpl.h"
namespace rx
{
class CLDeviceCL : public CLDeviceImpl
{
public:
CLDeviceCL();
~CLDeviceCL() override;
};
} // namespace rx
#endif // LIBANGLE_RENDERER_CL_CLDEVICECL_H_
//
// Copyright 2021 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// CLPlatformCL.cpp:
// Implements the class methods for CLPlatformCL.
//
#include "libANGLE/renderer/cl/CLPlatformCL.h"
namespace rx
{
CLPlatformCL::CLPlatformCL() {}
CLPlatformCL::~CLPlatformCL() {}
} // namespace rx
//
// Copyright 2021 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// CLPlatformCL.h:
// Defines the class interface for CLPlatformCL, implementing CLPlatformImpl.
//
#ifndef LIBANGLE_RENDERER_CL_CLPLATFORMCL_H_
#define LIBANGLE_RENDERER_CL_CLPLATFORMCL_H_
#include "libANGLE/renderer/CLPlatformImpl.h"
namespace rx
{
class CLPlatformCL : public CLPlatformImpl
{
public:
CLPlatformCL();
~CLPlatformCL() override;
};
} // namespace rx
#endif // LIBANGLE_RENDERER_CL_CLPLATFORMCL_H_
......@@ -103,6 +103,17 @@ _vulkan_backend_sources = [
"vk_wrapper.h",
]
if (angle_enable_cl) {
_vulkan_backend_sources += [
"CLContextVk.cpp",
"CLContextVk.h",
"CLDeviceVk.cpp",
"CLDeviceVk.h",
"CLPlatformVk.cpp",
"CLPlatformVk.h",
]
}
if (is_linux) {
_vulkan_backend_sources += [
"display/DisplayVkSimple.cpp",
......
//
// Copyright 2021 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// CLContextVk.cpp:
// Implements the class methods for CLContextVk.
//
#include "libANGLE/renderer/vulkan/CLContextVk.h"
namespace rx
{
CLContextVk::CLContextVk() {}
CLContextVk::~CLContextVk() = default;
} // namespace rx
//
// Copyright 2021 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// CLContextVk.h:
// Defines the class interface for CLContextVk, implementing CLContextImpl.
//
#ifndef LIBANGLE_RENDERER_VULKAN_CLCONTEXTVK_H_
#define LIBANGLE_RENDERER_VULKAN_CLCONTEXTVK_H_
#include "libANGLE/renderer/CLContextImpl.h"
namespace rx
{
class CLContextVk : public CLContextImpl
{
public:
CLContextVk();
~CLContextVk() override;
};
} // namespace rx
#endif // LIBANGLE_RENDERER_VULKAN_CLCONTEXTVK_H_
//
// Copyright 2021 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// CLDeviceVk.cpp:
// Implements the class methods for CLDeviceVk.
//
#include "libANGLE/renderer/vulkan/CLDeviceVk.h"
namespace rx
{
CLDeviceVk::CLDeviceVk() {}
CLDeviceVk::~CLDeviceVk() = default;
} // namespace rx
//
// Copyright 2021 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// CLDeviceVk.h:
// Defines the class interface for CLDeviceVk, implementing CLDeviceImpl.
//
#ifndef LIBANGLE_RENDERER_VULKAN_CLDEVICEVK_H_
#define LIBANGLE_RENDERER_VULKAN_CLDEVICEVK_H_
#include "libANGLE/renderer/CLDeviceImpl.h"
namespace rx
{
class CLDeviceVk : public CLDeviceImpl
{
public:
CLDeviceVk();
~CLDeviceVk() override;
};
} // namespace rx
#endif // LIBANGLE_RENDERER_VULKAN_CLDEVICEVK_H_
//
// Copyright 2021 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// CLPlatformVk.cpp:
// Implements the class methods for CLPlatformVk.
//
#include "libANGLE/renderer/vulkan/CLPlatformVk.h"
namespace rx
{
CLPlatformVk::CLPlatformVk() {}
CLPlatformVk::~CLPlatformVk() = default;
} // namespace rx
//
// Copyright 2021 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// CLPlatformVk.h:
// Defines the class interface for CLPlatformVk, implementing CLPlatformImpl.
//
#ifndef LIBANGLE_RENDERER_VULKAN_CLPLATFORMVK_H_
#define LIBANGLE_RENDERER_VULKAN_CLPLATFORMVK_H_
#include "libANGLE/renderer/CLPlatformImpl.h"
namespace rx
{
class CLPlatformVk : public CLPlatformImpl
{
public:
CLPlatformVk();
~CLPlatformVk() override;
};
} // namespace rx
#endif // LIBANGLE_RENDERER_VULKAN_CLPLATFORMVK_H_
......@@ -460,6 +460,9 @@ libangle_cl_headers = [
"src/libANGLE/CLProgram.h",
"src/libANGLE/CLSampler.h",
"src/libANGLE/CLtypes.h",
"src/libANGLE/renderer/CLContextImpl.h",
"src/libANGLE/renderer/CLDeviceImpl.h",
"src/libANGLE/renderer/CLPlatformImpl.h",
"src/libANGLE/validationCL.h",
"src/libANGLE/validationCL_autogen.h",
]
......
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