Hash :
7483897c
Author :
Date :
2024-10-01T17:23:37
CL/Vulkan: Add numeric versioning for extensions With extended versioning support, the version number of extensions need to be reported as well. Using the numeric versioning mode for adding supported extensions. Also, fix the version number for cl_khr_icd and cl_khr_extended_versioning extensions. Bug: angleproject:372085147 Change-Id: I7bf3157227f9579c69c351a63a88b92be7f07d71 Signed-off-by: Gowtham Tammana <g.tammana@samsung.com> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5916159 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
//
// 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.
//
// CLExtensions.h: Defines the rx::CLExtensions struct.
#ifndef LIBANGLE_RENDERER_CLEXTENSIONS_H_
#define LIBANGLE_RENDERER_CLEXTENSIONS_H_
#include "libANGLE/renderer/cl_types.h"
namespace rx
{
struct CLExtensions
{
CLExtensions();
~CLExtensions();
CLExtensions(const CLExtensions &) = delete;
CLExtensions &operator=(const CLExtensions &) = delete;
CLExtensions(CLExtensions &&);
CLExtensions &operator=(CLExtensions &&);
void initializeExtensions(std::string &&extensionStr);
void initializeVersionedExtensions(const NameVersionVector &versionedExtList);
std::string versionStr;
cl_version version = 0u;
std::string extensions;
NameVersionVector extensionsWithVersion;
// These Khronos extension names must be returned by all devices that support OpenCL 1.1.
bool khrByteAddressableStore = false; // cl_khr_byte_addressable_store
bool khrGlobalInt32BaseAtomics = false; // cl_khr_global_int32_base_atomics
bool khrGlobalInt32ExtendedAtomics = false; // cl_khr_global_int32_extended_atomics
bool khrLocalInt32BaseAtomics = false; // cl_khr_local_int32_base_atomics
bool khrLocalInt32ExtendedAtomics = false; // cl_khr_local_int32_extended_atomics
// These Khronos extension names must be returned by all devices that support
// OpenCL 2.0, OpenCL 2.1, or OpenCL 2.2. For devices that support OpenCL 3.0, these
// extension names must be returned when and only when the optional feature is supported.
bool khr3D_ImageWrites = false; // cl_khr_3d_image_writes
bool khrDepthImages = false; // cl_khr_depth_images
bool khrImage2D_FromBuffer = false; // cl_khr_image2d_from_buffer
// Optional extensions
bool khrExtendedVersioning = false; // cl_khr_extended_versioning
bool khrFP64 = false; // cl_khr_fp64
bool khrICD = false; // cl_khr_icd
bool khrInt64BaseAtomics = false; // cl_khr_int64_base_atomics
bool khrInt64ExtendedAtomics = false; // cl_khr_int64_extended_atomics
};
} // namespace rx
#endif // LIBANGLE_RENDERER_CLEXTENSIONS_H_