mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Move extensions directory
Change-Id: I47363e93839171c5b4eb85037f2b4ca5444e0544 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
144
opencl/extensions/public/cl_ext_private.h
Normal file
144
opencl/extensions/public/cl_ext_private.h
Normal file
@@ -0,0 +1,144 @@
|
||||
/*
|
||||
* Copyright (C) 2017-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "CL/cl.h"
|
||||
|
||||
/**********************************
|
||||
* Internal only queue properties *
|
||||
**********************************/
|
||||
// Intel evaluation now. Remove it after approval for public release
|
||||
#define CL_DEVICE_DRIVER_VERSION_INTEL 0x10010
|
||||
|
||||
#define CL_DEVICE_DRIVER_VERSION_INTEL_NEO1 0x454E4831 // Driver version is ENH1
|
||||
|
||||
/*********************************************
|
||||
* Internal only kernel exec info properties *
|
||||
*********************************************/
|
||||
|
||||
#define CL_KERNEL_EXEC_INFO_KERNEL_TYPE_INTEL 0x1000C
|
||||
#define CL_KERNEL_EXEC_INFO_DEFAULT_TYPE_INTEL 0x1000D
|
||||
#define CL_KERNEL_EXEC_INFO_CONCURRENT_TYPE_INTEL 0x1000E
|
||||
|
||||
/*********************************
|
||||
* cl_intel_debug_info extension *
|
||||
*********************************/
|
||||
#define cl_intel_debug_info 1
|
||||
|
||||
// New queries for clGetProgramInfo:
|
||||
#define CL_PROGRAM_DEBUG_INFO_INTEL 0x4100
|
||||
#define CL_PROGRAM_DEBUG_INFO_SIZES_INTEL 0x4101
|
||||
|
||||
// New queries for clGetKernelInfo:
|
||||
#define CL_KERNEL_BINARY_PROGRAM_INTEL 0x407D
|
||||
#define CL_KERNEL_BINARIES_INTEL 0x4102
|
||||
#define CL_KERNEL_BINARY_SIZES_INTEL 0x4103
|
||||
#define CL_KERNEL_BINARY_GPU_ADDRESS_INTEL 0x10010
|
||||
|
||||
/********************************************
|
||||
* event properties for performance counter *
|
||||
********************************************/
|
||||
/* performance counter */
|
||||
#define CL_PROFILING_COMMAND_PERFCOUNTERS_INTEL 0x407F
|
||||
|
||||
/**************************
|
||||
* Internal only cl types *
|
||||
**************************/
|
||||
|
||||
using cl_execution_info_kernel_type_intel = cl_uint;
|
||||
using cl_mem_alloc_flags_intel = cl_bitfield;
|
||||
using cl_mem_properties_intel = cl_bitfield;
|
||||
using cl_mem_flags_intel = cl_mem_flags;
|
||||
using cl_mem_info_intel = cl_uint;
|
||||
using cl_mem_advice_intel = cl_uint;
|
||||
using cl_unified_shared_memory_type_intel = cl_uint;
|
||||
using cl_unified_shared_memory_capabilities_intel = cl_bitfield;
|
||||
|
||||
/******************************
|
||||
* Internal only cl_mem_flags *
|
||||
******************************/
|
||||
|
||||
#define CL_MEM_FLAGS_INTEL 0x10001
|
||||
#define CL_MEM_LOCALLY_UNCACHED_RESOURCE (1 << 18)
|
||||
#define CL_MEM_LOCALLY_UNCACHED_SURFACE_STATE_RESOURCE (1 << 25)
|
||||
#define CL_MEM_48BIT_RESOURCE_INTEL (1 << 26)
|
||||
|
||||
// Used with clEnqueueVerifyMemory
|
||||
#define CL_MEM_COMPARE_EQUAL 0u
|
||||
#define CL_MEM_COMPARE_NOT_EQUAL 1u
|
||||
|
||||
#define CL_MEM_FORCE_LINEAR_STORAGE_INTEL (1 << 19)
|
||||
#define CL_MEM_FORCE_SHARED_PHYSICAL_MEMORY_INTEL (1 << 20)
|
||||
|
||||
#define CL_MEM_ALLOCATION_HANDLE_INTEL 0x10050
|
||||
|
||||
//Used with createBuffer
|
||||
#define CL_MEM_ALLOW_UNRESTRICTED_SIZE_INTEL (1 << 23)
|
||||
|
||||
/******************************
|
||||
* UNIFIED MEMORY *
|
||||
*******************************/
|
||||
|
||||
/* cl_device_info */
|
||||
#define CL_DEVICE_HOST_MEM_CAPABILITIES_INTEL 0x4190
|
||||
#define CL_DEVICE_DEVICE_MEM_CAPABILITIES_INTEL 0x4191
|
||||
#define CL_DEVICE_SINGLE_DEVICE_SHARED_MEM_CAPABILITIES_INTEL 0x4192
|
||||
#define CL_DEVICE_CROSS_DEVICE_SHARED_MEM_CAPABILITIES_INTEL 0x4193
|
||||
#define CL_DEVICE_SHARED_SYSTEM_MEM_CAPABILITIES_INTEL 0x4194
|
||||
|
||||
/* cl_unified_shared_memory_capabilities_intel - bitfield */
|
||||
#define CL_UNIFIED_SHARED_MEMORY_ACCESS_INTEL (1 << 0)
|
||||
#define CL_UNIFIED_SHARED_MEMORY_ATOMIC_ACCESS_INTEL (1 << 1)
|
||||
#define CL_UNIFIED_SHARED_MEMORY_CONCURRENT_ACCESS_INTEL (1 << 2)
|
||||
#define CL_UNIFIED_SHARED_MEMORY_CONCURRENT_ATOMIC_ACCESS_INTEL (1 << 3)
|
||||
|
||||
/* cl_mem_properties_intel */
|
||||
#define CL_MEM_ALLOC_FLAGS_INTEL 0x4195
|
||||
|
||||
/* cl_mem_alloc_flags_intel - bitfield */
|
||||
#define CL_MEM_ALLOC_DEFAULT_INTEL 0
|
||||
#define CL_MEM_ALLOC_WRITE_COMBINED_INTEL (1 << 0)
|
||||
|
||||
/* cl_mem_alloc_info_intel */
|
||||
#define CL_MEM_ALLOC_TYPE_INTEL 0x419A
|
||||
#define CL_MEM_ALLOC_BASE_PTR_INTEL 0x419B
|
||||
#define CL_MEM_ALLOC_SIZE_INTEL 0x419C
|
||||
#define CL_MEM_ALLOC_DEVICE_INTEL 0x419D
|
||||
|
||||
/* cl_unified_shared_memory_type_intel */
|
||||
#define CL_MEM_TYPE_UNKNOWN_INTEL 0x4196
|
||||
#define CL_MEM_TYPE_HOST_INTEL 0x4197
|
||||
#define CL_MEM_TYPE_DEVICE_INTEL 0x4198
|
||||
#define CL_MEM_TYPE_SHARED_INTEL 0x4199
|
||||
|
||||
/* cl_kernel_exec_info */
|
||||
#define CL_KERNEL_EXEC_INFO_INDIRECT_HOST_ACCESS_INTEL 0x4200
|
||||
#define CL_KERNEL_EXEC_INFO_INDIRECT_DEVICE_ACCESS_INTEL 0x4201
|
||||
#define CL_KERNEL_EXEC_INFO_INDIRECT_SHARED_ACCESS_INTEL 0x4202
|
||||
#define CL_KERNEL_EXEC_INFO_USM_PTRS_INTEL 0x4203
|
||||
|
||||
#define CL_KERNEL_EXEC_INFO_THREAD_ARBITRATION_POLICY_OLDEST_FIRST_INTEL 0x10022
|
||||
#define CL_KERNEL_EXEC_INFO_THREAD_ARBITRATION_POLICY_ROUND_ROBIN_INTEL 0x10023
|
||||
#define CL_KERNEL_EXEC_INFO_THREAD_ARBITRATION_POLICY_AFTER_DEPENDENCY_ROUND_ROBIN_INTEL 0x10024
|
||||
#define CL_KERNEL_EXEC_INFO_THREAD_ARBITRATION_POLICY_INTEL 0x10025
|
||||
|
||||
/* cl_command_type */
|
||||
#define CL_COMMAND_MEMSET_INTEL 0x4204
|
||||
#define CL_COMMAND_MEMFILL_INTEL 0x4204
|
||||
#define CL_COMMAND_MEMCPY_INTEL 0x4205
|
||||
#define CL_COMMAND_MIGRATEMEM_INTEL 0x4206
|
||||
#define CL_COMMAND_MEMADVISE_INTEL 0x4207
|
||||
|
||||
/******************************
|
||||
* SLICE COUNT SELECTING *
|
||||
*******************************/
|
||||
|
||||
/* cl_device_info */
|
||||
#define CL_DEVICE_SLICE_COUNT_INTEL 0x10020
|
||||
|
||||
/* cl_queue_properties */
|
||||
#define CL_QUEUE_SLICE_COUNT_INTEL 0x10021
|
||||
132
opencl/extensions/public/cl_gl_private_intel.h
Normal file
132
opencl/extensions/public/cl_gl_private_intel.h
Normal file
@@ -0,0 +1,132 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef OPENCL_SHARED_RESOURCE
|
||||
#define OPENCL_SHARED_RESOURCE
|
||||
|
||||
#include "GL/gl.h"
|
||||
#include "GmmLib.h"
|
||||
#include "third_party/opencl_headers/CL/cl_gl.h"
|
||||
|
||||
// Used for creating CL resources from GL resources
|
||||
typedef struct _tagCLGLResourceInfo {
|
||||
GLuint name;
|
||||
GLenum target;
|
||||
unsigned int globalShareHandle;
|
||||
GMM_RESOURCE_INFO *pGmmResInfo; /// Pointer to GMMResInfo from GL that will be copied in CL (GL)
|
||||
GLenum glFormat;
|
||||
GLint glInternalFormat;
|
||||
GLuint glHWFormat;
|
||||
GLboolean isEmulatedTarget;
|
||||
GLuint borderWidth;
|
||||
GLint textureBufferWidth;
|
||||
GLint textureBufferSize;
|
||||
GLint textureBufferOffset;
|
||||
GLboolean oglSynchronized;
|
||||
GMM_STATUS status;
|
||||
unsigned int globalShareHandleMCS;
|
||||
GMM_RESOURCE_INFO *pGmmResInfoMCS;
|
||||
GLint numberOfSamples; // Number of samples as specified by API
|
||||
GLvoid *pReleaseData;
|
||||
} CL_GL_RESOURCE_INFO, *PCL_GL_RESOURCE_INFO;
|
||||
|
||||
// Used for creating GL resources from CL resources
|
||||
typedef struct _tagGLCLResourceInfo {
|
||||
unsigned int globalShareHandle;
|
||||
unsigned int clChannelOrder;
|
||||
unsigned int clChannelDataType;
|
||||
size_t imageWidth;
|
||||
size_t imageHeight;
|
||||
size_t rowPitch;
|
||||
size_t slicePitch;
|
||||
unsigned int mipCount;
|
||||
bool isCreatedFromBuffer;
|
||||
unsigned int arraySize;
|
||||
unsigned int depth;
|
||||
} GL_CL_RESOURCE_INFO, *PGL_CL_RESOURCE_INFO;
|
||||
|
||||
typedef struct _tagCLGLBufferInfo {
|
||||
GLenum bufferName;
|
||||
unsigned int globalShareHandle;
|
||||
GMM_RESOURCE_INFO *pGmmResInfo; /// Pointer to GMMResInfo from GL that will be copied in CL (GL)
|
||||
GLvoid *pSysMem;
|
||||
GLint bufferSize;
|
||||
GLint bufferOffset;
|
||||
GLboolean oglSynchronized;
|
||||
GMM_STATUS status;
|
||||
GLvoid *pReleaseData;
|
||||
} CL_GL_BUFFER_INFO, *PCL_GL_BUFFER_INFO;
|
||||
|
||||
#ifdef _WIN32
|
||||
// Used for creating GL sync objects from CL events
|
||||
typedef struct _tagCLGLSyncInfo {
|
||||
|
||||
_tagCLGLSyncInfo()
|
||||
: eventName(NULL),
|
||||
event((HANDLE)0),
|
||||
submissionEventName(NULL),
|
||||
submissionEvent((HANDLE)0),
|
||||
clientSynchronizationObject((D3DKMT_HANDLE)0),
|
||||
serverSynchronizationObject((D3DKMT_HANDLE)0),
|
||||
submissionSynchronizationObject((D3DKMT_HANDLE)0),
|
||||
hContextToBlock((D3DKMT_HANDLE)0),
|
||||
waitCalled(false) {
|
||||
}
|
||||
|
||||
char *eventName;
|
||||
HANDLE event;
|
||||
char *submissionEventName;
|
||||
HANDLE submissionEvent;
|
||||
D3DKMT_HANDLE clientSynchronizationObject;
|
||||
D3DKMT_HANDLE serverSynchronizationObject;
|
||||
D3DKMT_HANDLE submissionSynchronizationObject;
|
||||
D3DKMT_HANDLE hContextToBlock;
|
||||
bool waitCalled;
|
||||
} CL_GL_SYNC_INFO, *PCL_GL_SYNC_INFO;
|
||||
|
||||
// Used for creating CL events from GL sync objects
|
||||
typedef struct _tagGLCLSyncInfo {
|
||||
__GLsync *syncName;
|
||||
GLvoid *pSync;
|
||||
} GL_CL_SYNC_INFO, *PGL_CL_SYNC_INFO;
|
||||
#endif
|
||||
|
||||
typedef int(__stdcall *pfn_clRetainEvent)(struct _cl_event *event);
|
||||
typedef int(__stdcall *pfn_clReleaseEvent)(struct _cl_event *event);
|
||||
typedef int(__stdcall *INTELpfn_clGetCLObjectInfoINTEL)(struct _cl_mem *pMemObj, void *pResourceInfo);
|
||||
typedef int(__stdcall *INTELpfn_clEnqueueMarkerWithSyncObjectINTEL)(
|
||||
struct _cl_command_queue *pCommandQueue,
|
||||
struct _cl_event **pOclEvent,
|
||||
struct _cl_context **pOclContext);
|
||||
|
||||
typedef struct _tagCLGLDispatch {
|
||||
pfn_clRetainEvent clRetainEvent;
|
||||
pfn_clReleaseEvent clReleaseEvent;
|
||||
INTELpfn_clGetCLObjectInfoINTEL clGetCLObjectInfoINTEL;
|
||||
INTELpfn_clEnqueueMarkerWithSyncObjectINTEL clEnqueueMarkerWithSyncObjectINTEL;
|
||||
} CL_GL_DISPATCH, *PCL_GL_DISPATCH;
|
||||
|
||||
#ifdef _WIN32
|
||||
typedef struct _tagCLGLContextInfo {
|
||||
D3DKMT_HANDLE DeviceHandle;
|
||||
D3DKMT_HANDLE ContextHandle;
|
||||
} CL_GL_CONTEXT_INFO, *PCL_GL_CONTEXT_INFO;
|
||||
|
||||
typedef struct _tagCLGLEvent {
|
||||
struct
|
||||
{
|
||||
void *dispatch1;
|
||||
void *dispatch2;
|
||||
} dispatch;
|
||||
void *pObj;
|
||||
void *CLCmdQ;
|
||||
struct _cl_context *CLCtx;
|
||||
unsigned int IsUserEvent;
|
||||
PCL_GL_SYNC_INFO pSyncInfo;
|
||||
} CL_GL_EVENT, *PCL_GL_EVENT;
|
||||
#endif //_WIN32
|
||||
#endif
|
||||
Reference in New Issue
Block a user