P4 to Git Change 1204938 by lmoriche@lmoriche_opencl_dev on 2015/10/28 13:41:08
SWDEV-1 - Khronos GIT import (10/23/2015) Affected files ... ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl.h#22 integrate ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl.hpp#4 integrate ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl2.hpp#1 branch ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl_dx9_media_sharing.h#4 integrate ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl_ext.h#20 integrate ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl_platform.h#6 integrate ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/icd/Makefile#10 integrate ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/icd/OpenCL.rc#17 integrate ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/icd/icd.c#8 integrate ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/icd/icd.h#8 integrate ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/icd/icd_dispatch.c#29 integrate ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/icd/icd_dispatch.h#24 integrate ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/icd/icd_linux.c#9 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/icd/icd_windows.c#7 edit ... //depot/stg/opencl/drivers/opencl/tests/ocltst/complibtestdefs#11 edit ... //depot/stg/opencl/drivers/opencl/tests/ocltst/env/build/Makefile.ocltst#28 edit ... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/regression/OCLBug3774.cpp#2 edit ... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/runtime/OCLMemObjs.cpp#2 edit ... //depot/stg/opencl/drivers/opencl/tests/ocltst/testdefs#27 edit ... //depot/stg/opencl/drivers/opencl/tools/clinfo/build/Makefile.clinfo#5 edit
This commit is contained in:
@@ -1355,26 +1355,26 @@ extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED void * CL_API_CALL
|
||||
clGetExtensionFunctionAddress(const char * /* func_name */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
|
||||
|
||||
/* Deprecated OpenCL 2.0 APIs */
|
||||
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_2_0_DEPRECATED cl_command_queue CL_API_CALL
|
||||
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_command_queue CL_API_CALL
|
||||
clCreateCommandQueue(cl_context /* context */,
|
||||
cl_device_id /* device */,
|
||||
cl_command_queue_properties /* properties */,
|
||||
cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED;
|
||||
cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED;
|
||||
|
||||
|
||||
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_2_0_DEPRECATED cl_sampler CL_API_CALL
|
||||
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_sampler CL_API_CALL
|
||||
clCreateSampler(cl_context /* context */,
|
||||
cl_bool /* normalized_coords */,
|
||||
cl_addressing_mode /* addressing_mode */,
|
||||
cl_filter_mode /* filter_mode */,
|
||||
cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED;
|
||||
cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED;
|
||||
|
||||
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_2_0_DEPRECATED cl_int CL_API_CALL
|
||||
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_int CL_API_CALL
|
||||
clEnqueueTask(cl_command_queue /* command_queue */,
|
||||
cl_kernel /* kernel */,
|
||||
cl_uint /* num_events_in_wait_list */,
|
||||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED;
|
||||
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
File diff soppresso perché troppo grande
Carica Diff
File diff soppresso perché troppo grande
Carica Diff
@@ -33,7 +33,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/******************************************************************************
|
||||
/******************************************************************************/
|
||||
/* cl_khr_dx9_media_sharing */
|
||||
#define cl_khr_dx9_media_sharing 1
|
||||
|
||||
|
||||
@@ -45,6 +45,14 @@ extern "C" {
|
||||
#define CL_CALLBACK
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Deprecation flags refer to the last version of the header in which the
|
||||
* feature was not deprecated.
|
||||
*
|
||||
* E.g. VERSION_1_1_DEPRECATED means the feature is present in 1.1 without
|
||||
* deprecation but is deprecated in versions later than 1.1.
|
||||
*/
|
||||
|
||||
#ifdef __APPLE__
|
||||
#define CL_EXTENSION_WEAK_LINK __attribute__((weak_import))
|
||||
#define CL_API_SUFFIX__VERSION_1_0 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
|
||||
@@ -95,12 +103,12 @@ extern "C" {
|
||||
#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
|
||||
#endif
|
||||
|
||||
#ifdef CL_USE_DEPRECATED_OPENCL_2_0_APIS
|
||||
#define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED
|
||||
#ifdef CL_USE_DEPRECATED_OPENCL_1_2_APIS
|
||||
#define CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_1_2_DEPRECATED
|
||||
#else
|
||||
#define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED __attribute__((deprecated))
|
||||
#define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED
|
||||
#define CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED __attribute__((deprecated))
|
||||
#define CL_EXT_PREFIX__VERSION_1_2_DEPRECATED
|
||||
#endif
|
||||
#elif _WIN32
|
||||
#ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
|
||||
@@ -119,12 +127,12 @@ extern "C" {
|
||||
#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED __declspec(deprecated)
|
||||
#endif
|
||||
|
||||
#ifdef CL_USE_DEPRECATED_OPENCL_2_0_APIS
|
||||
#define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED
|
||||
#ifdef CL_USE_DEPRECATED_OPENCL_1_2_APIS
|
||||
#define CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_1_2_DEPRECATED
|
||||
#else
|
||||
#define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED __declspec(deprecated)
|
||||
#define CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_1_2_DEPRECATED __declspec(deprecated)
|
||||
#endif
|
||||
#else
|
||||
#define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
|
||||
@@ -133,8 +141,8 @@ extern "C" {
|
||||
#define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
|
||||
|
||||
#define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED
|
||||
#define CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED
|
||||
#define CL_EXT_PREFIX__VERSION_1_2_DEPRECATED
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
#ifdef RC_INVOKED
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 2,0,4,0
|
||||
PRODUCTVERSION 2,0,4,0
|
||||
FILEVERSION 2,0,6,0
|
||||
PRODUCTVERSION 2,0,6,0
|
||||
FILETYPE VFT_DLL
|
||||
|
||||
BEGIN
|
||||
@@ -55,7 +55,7 @@ BEGIN
|
||||
VALUE "FileDescription" ,"OpenCL Client DLL"
|
||||
VALUE "ProductName" ,"Khronos OpenCL ICD"
|
||||
VALUE "LegalCopyright" ,"Copyright \251 The Khronos Group Inc 2014"
|
||||
VALUE "FileVersion" ,"2.0.4.0"
|
||||
VALUE "FileVersion" ,"2.0.6.0"
|
||||
|
||||
VALUE "CompanyName" ,"Khronos Group"
|
||||
VALUE "InternalName" ,"OpenCL"
|
||||
|
||||
@@ -43,18 +43,13 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
KHRicdState khrIcdState = {0, NULL};
|
||||
KHRicdVendor *khrIcdVendors = NULL;
|
||||
|
||||
// entrypoint to initialize the ICD and add all vendors
|
||||
void khrIcdInitialize(void)
|
||||
{
|
||||
// make sure we don't double-initialize
|
||||
if (khrIcdState.initialized)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// khrIcdOsVendorsEnumerate is atomic
|
||||
khrIcdState.initialized = khrIcdOsVendorsEnumerate();
|
||||
// enumerate vendors present on the system
|
||||
khrIcdOsVendorsEnumerateOnce();
|
||||
}
|
||||
|
||||
void khrIcdVendorAdd(const char *libraryName)
|
||||
@@ -184,7 +179,7 @@ void khrIcdVendorAdd(const char *libraryName)
|
||||
// add this vendor to the list of vendors at the tail
|
||||
{
|
||||
KHRicdVendor **prevNextPointer = NULL;
|
||||
for (prevNextPointer = &khrIcdState.vendors; *prevNextPointer; prevNextPointer = &( (*prevNextPointer)->next) );
|
||||
for (prevNextPointer = &khrIcdVendors; *prevNextPointer; prevNextPointer = &( (*prevNextPointer)->next) );
|
||||
*prevNextPointer = vendor;
|
||||
}
|
||||
|
||||
@@ -198,6 +193,10 @@ Done:
|
||||
{
|
||||
khrIcdOsLibraryUnload(library);
|
||||
}
|
||||
if (platforms)
|
||||
{
|
||||
free(platforms);
|
||||
}
|
||||
}
|
||||
|
||||
void khrIcdContextPropertiesGetPlatform(const cl_context_properties *properties, cl_platform_id *outPlatform)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* http://www.khronos.org/conformance/;
|
||||
*
|
||||
* 5. The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Materials.
|
||||
* all copies or substantial portions of the Materials.
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
@@ -34,13 +34,25 @@
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN
|
||||
* THE MATERIALS.
|
||||
*
|
||||
*
|
||||
* OpenCL is a trademark of Apple Inc. used under license by Khronos.
|
||||
*/
|
||||
|
||||
#ifndef _ICD_H_
|
||||
#define _ICD_H_
|
||||
|
||||
#ifndef CL_USE_DEPRECATED_OPENCL_1_0_APIS
|
||||
#define CL_USE_DEPRECATED_OPENCL_1_0_APIS
|
||||
#endif
|
||||
|
||||
#ifndef CL_USE_DEPRECATED_OPENCL_1_1_APIS
|
||||
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS
|
||||
#endif
|
||||
|
||||
#ifndef CL_USE_DEPRECATED_OPENCL_1_2_APIS
|
||||
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
|
||||
#endif
|
||||
|
||||
#include <CL/cl.h>
|
||||
#include <CL/cl_ext.h>
|
||||
|
||||
@@ -127,7 +139,6 @@ typedef CL_API_ENTRY void *(CL_API_CALL *pfn_clGetExtensionFunctionAddress)(
|
||||
const char *function_name) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
typedef struct KHRicdVendorRec KHRicdVendor;
|
||||
typedef struct KHRicdStateRec KHRicdState;
|
||||
|
||||
/*
|
||||
* KHRicdVendor
|
||||
@@ -152,26 +163,8 @@ struct KHRicdVendorRec
|
||||
KHRicdVendor *next;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* KHRicdState
|
||||
*
|
||||
* The global state of all vendors
|
||||
*
|
||||
* TODO: write access to this structure needs to be protected via a mutex
|
||||
*/
|
||||
|
||||
struct KHRicdStateRec
|
||||
{
|
||||
// has this structure been initialized
|
||||
cl_bool initialized;
|
||||
|
||||
// the list of vendors which have been loaded
|
||||
KHRicdVendor *vendors;
|
||||
};
|
||||
|
||||
// the global state
|
||||
extern KHRicdState khrIcdState;
|
||||
extern KHRicdVendor * khrIcdVendors;
|
||||
|
||||
/*
|
||||
* khrIcd interface
|
||||
@@ -187,7 +180,7 @@ void khrIcdInitialize(void);
|
||||
// go through the list of vendors (in /etc/OpenCL.conf or through
|
||||
// the registry) and call khrIcdVendorAdd for each vendor encountered
|
||||
// n.b, this call is OS-specific
|
||||
cl_bool khrIcdOsVendorsEnumerate(void);
|
||||
void khrIcdOsVendorsEnumerateOnce(void);
|
||||
|
||||
// add a vendor's implementation to the list of libraries
|
||||
void khrIcdVendorAdd(const char *libraryName);
|
||||
|
||||
@@ -73,12 +73,12 @@ clGetPlatformIDs(cl_uint num_entries,
|
||||
platforms[i] = NULL;
|
||||
}
|
||||
// return error if we have no platforms
|
||||
if (!khrIcdState.vendors)
|
||||
if (!khrIcdVendors)
|
||||
{
|
||||
return CL_PLATFORM_NOT_FOUND_KHR;
|
||||
}
|
||||
// otherwise enumerate all platforms
|
||||
for (vendor = khrIcdState.vendors; vendor; vendor = vendor->next)
|
||||
for (vendor = khrIcdVendors; vendor; vendor = vendor->next)
|
||||
{
|
||||
if (num_entries && platforms)
|
||||
{
|
||||
@@ -1631,7 +1631,7 @@ clGetExtensionFunctionAddress(const char *function_name) CL_EXT_SUFFIX__VERSION_
|
||||
CL_COMMON_EXTENSION_ENTRYPOINT_ADD(clCreateProgramWithILKHR);
|
||||
|
||||
// fall back to vendor extension detection
|
||||
for (vendor = khrIcdState.vendors; vendor; vendor = vendor->next)
|
||||
for (vendor = khrIcdVendors; vendor; vendor = vendor->next)
|
||||
{
|
||||
size_t vendor_suffix_length = strlen(vendor->suffix);
|
||||
if (vendor_suffix_length <= function_name_length && vendor_suffix_length > 0)
|
||||
|
||||
@@ -49,6 +49,10 @@
|
||||
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS
|
||||
#endif
|
||||
|
||||
#ifndef CL_USE_DEPRECATED_OPENCL_1_2_APIS
|
||||
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
|
||||
#endif
|
||||
|
||||
// cl.h
|
||||
#include <CL/cl.h>
|
||||
|
||||
|
||||
@@ -47,15 +47,16 @@
|
||||
#include <dirent.h>
|
||||
#include <pthread.h>
|
||||
|
||||
static pthread_once_t initialized = PTHREAD_ONCE_INIT;
|
||||
|
||||
/*
|
||||
*
|
||||
* Vendor enumeration functions
|
||||
*
|
||||
*/
|
||||
static pthread_once_t InitOnce = PTHREAD_ONCE_INIT;
|
||||
|
||||
// go through the list of vendors in the two configuration files
|
||||
void khrIcdOsVendorsEnumerateCallBack(void)
|
||||
void khrIcdOsVendorsEnumerate(void)
|
||||
{
|
||||
DIR *dir = NULL;
|
||||
struct dirent *dirEntry = NULL;
|
||||
@@ -164,6 +165,12 @@ Cleanup:
|
||||
}
|
||||
}
|
||||
|
||||
// go through the list of vendors only once
|
||||
void khrIcdOsVendorsEnumerateOnce(void)
|
||||
{
|
||||
pthread_once(&initialized, khrIcdOsVendorsEnumerate);
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
* Dynamic library loading functions
|
||||
@@ -188,8 +195,3 @@ void khrIcdOsLibraryUnload(void *library)
|
||||
dlclose(library);
|
||||
}
|
||||
|
||||
cl_bool khrIcdOsVendorsEnumerate(void)
|
||||
{
|
||||
pthread_once(&InitOnce, khrIcdOsVendorsEnumerateCallBack);
|
||||
return CL_TRUE;
|
||||
}
|
||||
|
||||
@@ -42,21 +42,18 @@
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
#include <winreg.h>
|
||||
#include <WinBase.h>
|
||||
|
||||
static INIT_ONCE initialized = INIT_ONCE_STATIC_INIT;
|
||||
|
||||
/*
|
||||
*
|
||||
* Vendor enumeration functions
|
||||
*
|
||||
*/
|
||||
static INIT_ONCE InitOnce = INIT_ONCE_STATIC_INIT;
|
||||
|
||||
// go through the list of vendors in the registry and call khrIcdVendorAdd
|
||||
// for each vendor encountered
|
||||
BOOL CALLBACK khrIcdOsVendorsEnumerateCallBack(
|
||||
_Inout_ PINIT_ONCE InitOnce,
|
||||
_Inout_opt_ PVOID Parameter,
|
||||
_Out_opt_ PVOID *Context)
|
||||
BOOL CALLBACK khrIcdOsVendorsEnumerate(PINIT_ONCE InitOnce, PVOID Parameter, PVOID *lpContext)
|
||||
{
|
||||
LONG result;
|
||||
const char* platformsName = "SOFTWARE\\Khronos\\OpenCL\\Vendors";
|
||||
@@ -125,9 +122,16 @@ BOOL CALLBACK khrIcdOsVendorsEnumerateCallBack(
|
||||
{
|
||||
KHR_ICD_TRACE("Failed to close platforms key %s, ignoring\n", platformsName);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// go through the list of vendors only once
|
||||
void khrIcdOsVendorsEnumerateOnce()
|
||||
{
|
||||
InitOnceExecuteOnce(&initialized, khrIcdOsVendorsEnumerate, NULL, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
* Dynamic library loading functions
|
||||
@@ -156,8 +160,3 @@ void khrIcdOsLibraryUnload(void *library)
|
||||
FreeLibrary( (HMODULE)library);
|
||||
}
|
||||
|
||||
cl_bool khrIcdOsVendorsEnumerate(void)
|
||||
{
|
||||
InitOnceExecuteOnce(&InitOnce, khrIcdOsVendorsEnumerateCallBack, NULL, NULL);
|
||||
return CL_TRUE;
|
||||
}
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user