Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

cl_va_api_media_sharing_intel.h 7.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. /**********************************************************************************
  2. * Copyright (c) 2008-2019 The Khronos Group Inc.
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and/or associated documentation files (the
  6. * "Materials"), to deal in the Materials without restriction, including
  7. * without limitation the rights to use, copy, modify, merge, publish,
  8. * distribute, sublicense, and/or sell copies of the Materials, and to
  9. * permit persons to whom the Materials are furnished to do so, subject to
  10. * the following conditions:
  11. *
  12. * The above copyright notice and this permission notice shall be included
  13. * in all copies or substantial portions of the Materials.
  14. *
  15. * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
  16. * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
  17. * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
  18. * https://www.khronos.org/registry/
  19. *
  20. * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  21. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  22. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  23. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  24. * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  25. * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  26. * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
  27. **********************************************************************************/
  28. /*****************************************************************************\
  29. Copyright (c) 2013-2019 Intel Corporation All Rights Reserved.
  30. THESE MATERIALS ARE PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  31. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  32. LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  33. A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS
  34. CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  35. EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  36. PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  37. PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
  38. OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING
  39. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THESE
  40. MATERIALS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  41. File Name: cl_va_api_media_sharing_intel.h
  42. Abstract:
  43. Notes:
  44. \*****************************************************************************/
  45. #ifndef __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H
  46. #define __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H
  47. #include <CL/cl.h>
  48. #include <CL/cl_platform.h>
  49. #include <va/va.h>
  50. #ifdef __cplusplus
  51. extern "C" {
  52. #endif
  53. /******************************************
  54. * cl_intel_va_api_media_sharing extension *
  55. *******************************************/
  56. #define cl_intel_va_api_media_sharing 1
  57. /* error codes */
  58. #define CL_INVALID_VA_API_MEDIA_ADAPTER_INTEL -1098
  59. #define CL_INVALID_VA_API_MEDIA_SURFACE_INTEL -1099
  60. #define CL_VA_API_MEDIA_SURFACE_ALREADY_ACQUIRED_INTEL -1100
  61. #define CL_VA_API_MEDIA_SURFACE_NOT_ACQUIRED_INTEL -1101
  62. /* cl_va_api_device_source_intel */
  63. #define CL_VA_API_DISPLAY_INTEL 0x4094
  64. /* cl_va_api_device_set_intel */
  65. #define CL_PREFERRED_DEVICES_FOR_VA_API_INTEL 0x4095
  66. #define CL_ALL_DEVICES_FOR_VA_API_INTEL 0x4096
  67. /* cl_context_info */
  68. #define CL_CONTEXT_VA_API_DISPLAY_INTEL 0x4097
  69. /* cl_mem_info */
  70. #define CL_MEM_VA_API_MEDIA_SURFACE_INTEL 0x4098
  71. /* cl_image_info */
  72. #define CL_IMAGE_VA_API_PLANE_INTEL 0x4099
  73. /* cl_command_type */
  74. #define CL_COMMAND_ACQUIRE_VA_API_MEDIA_SURFACES_INTEL 0x409A
  75. #define CL_COMMAND_RELEASE_VA_API_MEDIA_SURFACES_INTEL 0x409B
  76. typedef cl_uint cl_va_api_device_source_intel;
  77. typedef cl_uint cl_va_api_device_set_intel;
  78. extern CL_API_ENTRY cl_int CL_API_CALL
  79. clGetDeviceIDsFromVA_APIMediaAdapterINTEL(
  80. cl_platform_id platform,
  81. cl_va_api_device_source_intel media_adapter_type,
  82. void* media_adapter,
  83. cl_va_api_device_set_intel media_adapter_set,
  84. cl_uint num_entries,
  85. cl_device_id* devices,
  86. cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_2;
  87. typedef CL_API_ENTRY cl_int (CL_API_CALL * clGetDeviceIDsFromVA_APIMediaAdapterINTEL_fn)(
  88. cl_platform_id platform,
  89. cl_va_api_device_source_intel media_adapter_type,
  90. void* media_adapter,
  91. cl_va_api_device_set_intel media_adapter_set,
  92. cl_uint num_entries,
  93. cl_device_id* devices,
  94. cl_uint* num_devices) CL_EXT_SUFFIX__VERSION_1_2;
  95. extern CL_API_ENTRY cl_mem CL_API_CALL
  96. clCreateFromVA_APIMediaSurfaceINTEL(
  97. cl_context context,
  98. cl_mem_flags flags,
  99. VASurfaceID* surface,
  100. cl_uint plane,
  101. cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
  102. typedef CL_API_ENTRY cl_mem (CL_API_CALL * clCreateFromVA_APIMediaSurfaceINTEL_fn)(
  103. cl_context context,
  104. cl_mem_flags flags,
  105. VASurfaceID* surface,
  106. cl_uint plane,
  107. cl_int* errcode_ret) CL_EXT_SUFFIX__VERSION_1_2;
  108. extern CL_API_ENTRY cl_int CL_API_CALL
  109. clEnqueueAcquireVA_APIMediaSurfacesINTEL(
  110. cl_command_queue command_queue,
  111. cl_uint num_objects,
  112. const cl_mem* mem_objects,
  113. cl_uint num_events_in_wait_list,
  114. const cl_event* event_wait_list,
  115. cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
  116. typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireVA_APIMediaSurfacesINTEL_fn)(
  117. cl_command_queue command_queue,
  118. cl_uint num_objects,
  119. const cl_mem* mem_objects,
  120. cl_uint num_events_in_wait_list,
  121. const cl_event* event_wait_list,
  122. cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
  123. extern CL_API_ENTRY cl_int CL_API_CALL
  124. clEnqueueReleaseVA_APIMediaSurfacesINTEL(
  125. cl_command_queue command_queue,
  126. cl_uint num_objects,
  127. const cl_mem* mem_objects,
  128. cl_uint num_events_in_wait_list,
  129. const cl_event* event_wait_list,
  130. cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
  131. typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseVA_APIMediaSurfacesINTEL_fn)(
  132. cl_command_queue command_queue,
  133. cl_uint num_objects,
  134. const cl_mem* mem_objects,
  135. cl_uint num_events_in_wait_list,
  136. const cl_event* event_wait_list,
  137. cl_event* event) CL_EXT_SUFFIX__VERSION_1_2;
  138. #ifdef __cplusplus
  139. }
  140. #endif
  141. #endif /* __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H */