| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
#ifndef OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H_ |
| 18 |
#define OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H_ |
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
#include <va/va.h> |
| 25 |
|
| 26 |
#include <CL/cl.h> |
| 27 |
|
| 28 |
|
| 29 |
#if defined(CL_NO_PROTOTYPES) && !defined(CL_NO_EXTENSION_PROTOTYPES) |
| 30 |
#define CL_NO_EXTENSION_PROTOTYPES |
| 31 |
#endif |
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
#if defined(CL_NO_EXTENSION_PROTOTYPES) && \ |
| 37 |
!defined(CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES) |
| 38 |
#define CL_NO_ICD_DISPATCH_EXTENSION_PROTOTYPES |
| 39 |
#endif |
| 40 |
#if defined(CL_NO_EXTENSION_PROTOTYPES) && \ |
| 41 |
!defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) |
| 42 |
#define CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES |
| 43 |
#endif |
| 44 |
|
| 45 |
#ifdef __cplusplus |
| 46 |
extern "C" { |
| 47 |
#endif |
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
#define cl_intel_sharing_format_query_va_api 1 |
| 53 |
#define CL_INTEL_SHARING_FORMAT_QUERY_VA_API_EXTENSION_NAME \ |
| 54 |
"cl_intel_sharing_format_query_va_api" |
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
typedef cl_int (CL_API_CALL * |
| 59 |
clGetSupportedVA_APIMediaSurfaceFormatsINTEL_fn)( |
| 60 |
cl_context context, |
| 61 |
cl_mem_flags flags, |
| 62 |
cl_mem_object_type image_type, |
| 63 |
cl_uint plane, |
| 64 |
cl_uint num_entries, |
| 65 |
VAImageFormat* va_api_formats, |
| 66 |
cl_uint* num_surface_formats) ; |
| 67 |
|
| 68 |
#if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) |
| 69 |
|
| 70 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 71 |
clGetSupportedVA_APIMediaSurfaceFormatsINTEL( |
| 72 |
cl_context context, |
| 73 |
cl_mem_flags flags, |
| 74 |
cl_mem_object_type image_type, |
| 75 |
cl_uint plane, |
| 76 |
cl_uint num_entries, |
| 77 |
VAImageFormat* va_api_formats, |
| 78 |
cl_uint* num_surface_formats) ; |
| 79 |
|
| 80 |
#endif |
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
#define cl_intel_va_api_media_sharing 1 |
| 86 |
#define CL_INTEL_VA_API_MEDIA_SHARING_EXTENSION_NAME \ |
| 87 |
"cl_intel_va_api_media_sharing" |
| 88 |
|
| 89 |
typedef cl_uint cl_va_api_device_source_intel; |
| 90 |
typedef cl_uint cl_va_api_device_set_intel; |
| 91 |
|
| 92 |
|
| 93 |
#define CL_INVALID_VA_API_MEDIA_ADAPTER_INTEL -1098 |
| 94 |
#define CL_INVALID_VA_API_MEDIA_SURFACE_INTEL -1099 |
| 95 |
#define CL_VA_API_MEDIA_SURFACE_ALREADY_ACQUIRED_INTEL -1100 |
| 96 |
#define CL_VA_API_MEDIA_SURFACE_NOT_ACQUIRED_INTEL -1101 |
| 97 |
|
| 98 |
|
| 99 |
#define CL_VA_API_DISPLAY_INTEL 0x4094 |
| 100 |
|
| 101 |
|
| 102 |
#define CL_PREFERRED_DEVICES_FOR_VA_API_INTEL 0x4095 |
| 103 |
#define CL_ALL_DEVICES_FOR_VA_API_INTEL 0x4096 |
| 104 |
|
| 105 |
|
| 106 |
#define CL_CONTEXT_VA_API_DISPLAY_INTEL 0x4097 |
| 107 |
|
| 108 |
|
| 109 |
#define CL_MEM_VA_API_MEDIA_SURFACE_INTEL 0x4098 |
| 110 |
|
| 111 |
|
| 112 |
#define CL_IMAGE_VA_API_PLANE_INTEL 0x4099 |
| 113 |
|
| 114 |
|
| 115 |
#define CL_COMMAND_ACQUIRE_VA_API_MEDIA_SURFACES_INTEL 0x409A |
| 116 |
#define CL_COMMAND_RELEASE_VA_API_MEDIA_SURFACES_INTEL 0x409B |
| 117 |
|
| 118 |
|
| 119 |
typedef cl_int (CL_API_CALL * |
| 120 |
clGetDeviceIDsFromVA_APIMediaAdapterINTEL_fn)( |
| 121 |
cl_platform_id platform, |
| 122 |
cl_va_api_device_source_intel media_adapter_type, |
| 123 |
void* media_adapter, |
| 124 |
cl_va_api_device_set_intel media_adapter_set, |
| 125 |
cl_uint num_entries, |
| 126 |
cl_device_id* devices, |
| 127 |
cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_2; |
| 128 |
|
| 129 |
typedef cl_mem (CL_API_CALL * |
| 130 |
clCreateFromVA_APIMediaSurfaceINTEL_fn)( |
| 131 |
cl_context context, |
| 132 |
cl_mem_flags flags, |
| 133 |
VASurfaceID* surface, |
| 134 |
cl_uint plane, |
| 135 |
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2; |
| 136 |
|
| 137 |
typedef cl_int (CL_API_CALL * |
| 138 |
clEnqueueAcquireVA_APIMediaSurfacesINTEL_fn)( |
| 139 |
cl_command_queue command_queue, |
| 140 |
cl_uint num_objects, |
| 141 |
const cl_mem* mem_objects, |
| 142 |
cl_uint num_events_in_wait_list, |
| 143 |
const cl_event* event_wait_list, |
| 144 |
cl_event* event) CL_API_SUFFIX__VERSION_1_2; |
| 145 |
|
| 146 |
typedef cl_int (CL_API_CALL * |
| 147 |
clEnqueueReleaseVA_APIMediaSurfacesINTEL_fn)( |
| 148 |
cl_command_queue command_queue, |
| 149 |
cl_uint num_objects, |
| 150 |
const cl_mem* mem_objects, |
| 151 |
cl_uint num_events_in_wait_list, |
| 152 |
const cl_event* event_wait_list, |
| 153 |
cl_event* event) CL_API_SUFFIX__VERSION_1_2; |
| 154 |
|
| 155 |
#if !defined(CL_NO_NON_ICD_DISPATCH_EXTENSION_PROTOTYPES) |
| 156 |
|
| 157 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 158 |
clGetDeviceIDsFromVA_APIMediaAdapterINTEL( |
| 159 |
cl_platform_id platform, |
| 160 |
cl_va_api_device_source_intel media_adapter_type, |
| 161 |
void* media_adapter, |
| 162 |
cl_va_api_device_set_intel media_adapter_set, |
| 163 |
cl_uint num_entries, |
| 164 |
cl_device_id* devices, |
| 165 |
cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_2; |
| 166 |
|
| 167 |
extern CL_API_ENTRY cl_mem CL_API_CALL |
| 168 |
clCreateFromVA_APIMediaSurfaceINTEL( |
| 169 |
cl_context context, |
| 170 |
cl_mem_flags flags, |
| 171 |
VASurfaceID* surface, |
| 172 |
cl_uint plane, |
| 173 |
cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2; |
| 174 |
|
| 175 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 176 |
clEnqueueAcquireVA_APIMediaSurfacesINTEL( |
| 177 |
cl_command_queue command_queue, |
| 178 |
cl_uint num_objects, |
| 179 |
const cl_mem* mem_objects, |
| 180 |
cl_uint num_events_in_wait_list, |
| 181 |
const cl_event* event_wait_list, |
| 182 |
cl_event* event) CL_API_SUFFIX__VERSION_1_2; |
| 183 |
|
| 184 |
extern CL_API_ENTRY cl_int CL_API_CALL |
| 185 |
clEnqueueReleaseVA_APIMediaSurfacesINTEL( |
| 186 |
cl_command_queue command_queue, |
| 187 |
cl_uint num_objects, |
| 188 |
const cl_mem* mem_objects, |
| 189 |
cl_uint num_events_in_wait_list, |
| 190 |
const cl_event* event_wait_list, |
| 191 |
cl_event* event) CL_API_SUFFIX__VERSION_1_2; |
| 192 |
|
| 193 |
#endif |
| 194 |
|
| 195 |
#ifdef __cplusplus |
| 196 |
} |
| 197 |
#endif |
| 198 |
|
| 199 |
#endif |