From 38170b055f85b0ad4c16eab9e0f74404eb66d9aa Mon Sep 17 00:00:00 2001 From: Zeqiang Li Date: Wed, 29 Dec 2021 09:58:28 +0800 Subject: [PATCH] remove redundant --- .../include/StandAlone/ResourceLimits.h | 57 - .../include/StandAlone/resource_limits_c.h | 54 - emscripten/include/pvrsdk/CL/cl.h | 1466 --- emscripten/include/pvrsdk/CL/cl2.hpp | 9569 ----------------- emscripten/include/pvrsdk/CL/cl_d3d10.h | 131 - emscripten/include/pvrsdk/CL/cl_d3d11.h | 131 - .../include/pvrsdk/CL/cl_dx9_media_sharing.h | 132 - emscripten/include/pvrsdk/CL/cl_egl.h | 136 - emscripten/include/pvrsdk/CL/cl_ext.h | 607 -- emscripten/include/pvrsdk/CL/cl_gl.h | 167 - emscripten/include/pvrsdk/CL/cl_gl_ext.h | 74 - emscripten/include/pvrsdk/CL/cl_platform.h | 1468 --- emscripten/include/pvrsdk/CL/opencl.h | 60 - emscripten/include/pvrsdk/DynamicEgl.h | 1190 -- emscripten/include/pvrsdk/DynamicGles.h | 5498 ---------- emscripten/include/pvrsdk/DynamicOCL.h | 1035 -- emscripten/include/pvrsdk/EGL/egl.h | 313 - emscripten/include/pvrsdk/EGL/eglext.h | 1241 --- emscripten/include/pvrsdk/EGL/eglplatform.h | 143 - emscripten/include/pvrsdk/GLES/egl.h | 29 - emscripten/include/pvrsdk/GLES/gl.h | 586 - emscripten/include/pvrsdk/GLES/glext.h | 951 -- emscripten/include/pvrsdk/GLES/glplatform.h | 38 - emscripten/include/pvrsdk/GLES2/gl2.h | 675 -- emscripten/include/pvrsdk/GLES2/gl2ext.h | 3445 ------ emscripten/include/pvrsdk/GLES2/gl2platform.h | 38 - emscripten/include/pvrsdk/GLES3/gl3.h | 1211 --- emscripten/include/pvrsdk/GLES3/gl31.h | 1528 --- emscripten/include/pvrsdk/GLES3/gl32.h | 1825 ---- emscripten/include/pvrsdk/GLES3/gl3platform.h | 38 - emscripten/include/pvrsdk/KHR/khrplatform.h | 289 - emscripten/include/pvrsdk/PVRScopeComms.h | 297 - emscripten/include/pvrsdk/PVRScopeStats.h | 282 - emscripten/include/pvrsdk/pvr_openlib.h | 413 - emscripten/include/pvrsdk/sdkver.h | 40 - emscripten/include/pvrsdk/vk_bindings.h | 515 - .../include/pvrsdk/vk_bindings_helper.h | 410 - emscripten/include/pvrsdk/vulkan/vk_icd.h | 170 - emscripten/include/pvrsdk/vulkan/vk_layer.h | 195 - .../include/pvrsdk/vulkan/vk_platform.h | 92 - emscripten/include/pvrsdk/vulkan/vulkan.h | 79 - .../include/pvrsdk/vulkan/vulkan_android.h | 126 - .../include/pvrsdk/vulkan/vulkan_core.h | 7470 ------------- emscripten/include/pvrsdk/vulkan/vulkan_ios.h | 58 - .../include/pvrsdk/vulkan/vulkan_macos.h | 58 - emscripten/include/pvrsdk/vulkan/vulkan_mir.h | 65 - emscripten/include/pvrsdk/vulkan/vulkan_vi.h | 58 - .../include/pvrsdk/vulkan/vulkan_wayland.h | 65 - .../include/pvrsdk/vulkan/vulkan_win32.h | 276 - emscripten/include/pvrsdk/vulkan/vulkan_xcb.h | 66 - .../include/pvrsdk/vulkan/vulkan_xlib.h | 66 - .../pvrsdk/vulkan/vulkan_xlib_xrandr.h | 54 - emscripten/include/spirv_cross/GLSL.std.450.h | 131 - emscripten/include/spirv_cross/spirv.hpp | 2203 ---- emscripten/include/spirv_cross/spirv_cfg.hpp | 163 - .../include/spirv_cross/spirv_common.hpp | 1807 ---- .../include/spirv_cross/spirv_cross.hpp | 1085 -- .../spirv_cross/spirv_cross_containers.hpp | 747 -- .../spirv_cross_error_handling.hpp | 94 - .../spirv_cross/spirv_cross_parsed_ir.hpp | 249 - emscripten/include/spirv_cross/spirv_glsl.hpp | 908 -- emscripten/include/spirv_cross/spirv_msl.hpp | 1092 -- .../include/spirv_cross/spirv_parser.hpp | 101 - emscripten/include/uv/uv.h | 1611 --- emscripten/include/uv/uv/aix.h | 32 - emscripten/include/uv/uv/android-ifaddrs.h | 54 - emscripten/include/uv/uv/bsd.h | 34 - emscripten/include/uv/uv/darwin.h | 61 - emscripten/include/uv/uv/errno.h | 443 - emscripten/include/uv/uv/linux.h | 34 - emscripten/include/uv/uv/os390.h | 33 - emscripten/include/uv/uv/posix.h | 31 - emscripten/include/uv/uv/pthread-barrier.h | 69 - emscripten/include/uv/uv/stdint-msvc2008.h | 247 - emscripten/include/uv/uv/sunos.h | 44 - emscripten/include/uv/uv/threadpool.h | 37 - emscripten/include/uv/uv/tree.h | 768 -- emscripten/include/uv/uv/unix.h | 464 - emscripten/include/uv/uv/version.h | 43 - emscripten/include/uv/uv/win.h | 676 -- emscripten/include/webgpu/webgpu.h | 1343 --- emscripten/include/webgpu/webgpu_cpp.h | 1487 --- 82 files changed, 61071 deletions(-) delete mode 100644 emscripten/include/StandAlone/ResourceLimits.h delete mode 100644 emscripten/include/StandAlone/resource_limits_c.h delete mode 100644 emscripten/include/pvrsdk/CL/cl.h delete mode 100644 emscripten/include/pvrsdk/CL/cl2.hpp delete mode 100644 emscripten/include/pvrsdk/CL/cl_d3d10.h delete mode 100644 emscripten/include/pvrsdk/CL/cl_d3d11.h delete mode 100644 emscripten/include/pvrsdk/CL/cl_dx9_media_sharing.h delete mode 100644 emscripten/include/pvrsdk/CL/cl_egl.h delete mode 100644 emscripten/include/pvrsdk/CL/cl_ext.h delete mode 100644 emscripten/include/pvrsdk/CL/cl_gl.h delete mode 100644 emscripten/include/pvrsdk/CL/cl_gl_ext.h delete mode 100644 emscripten/include/pvrsdk/CL/cl_platform.h delete mode 100644 emscripten/include/pvrsdk/CL/opencl.h delete mode 100644 emscripten/include/pvrsdk/DynamicEgl.h delete mode 100644 emscripten/include/pvrsdk/DynamicGles.h delete mode 100644 emscripten/include/pvrsdk/DynamicOCL.h delete mode 100644 emscripten/include/pvrsdk/EGL/egl.h delete mode 100644 emscripten/include/pvrsdk/EGL/eglext.h delete mode 100644 emscripten/include/pvrsdk/EGL/eglplatform.h delete mode 100644 emscripten/include/pvrsdk/GLES/egl.h delete mode 100644 emscripten/include/pvrsdk/GLES/gl.h delete mode 100644 emscripten/include/pvrsdk/GLES/glext.h delete mode 100644 emscripten/include/pvrsdk/GLES/glplatform.h delete mode 100644 emscripten/include/pvrsdk/GLES2/gl2.h delete mode 100644 emscripten/include/pvrsdk/GLES2/gl2ext.h delete mode 100644 emscripten/include/pvrsdk/GLES2/gl2platform.h delete mode 100644 emscripten/include/pvrsdk/GLES3/gl3.h delete mode 100644 emscripten/include/pvrsdk/GLES3/gl31.h delete mode 100644 emscripten/include/pvrsdk/GLES3/gl32.h delete mode 100644 emscripten/include/pvrsdk/GLES3/gl3platform.h delete mode 100644 emscripten/include/pvrsdk/KHR/khrplatform.h delete mode 100644 emscripten/include/pvrsdk/PVRScopeComms.h delete mode 100644 emscripten/include/pvrsdk/PVRScopeStats.h delete mode 100644 emscripten/include/pvrsdk/pvr_openlib.h delete mode 100644 emscripten/include/pvrsdk/sdkver.h delete mode 100644 emscripten/include/pvrsdk/vk_bindings.h delete mode 100644 emscripten/include/pvrsdk/vk_bindings_helper.h delete mode 100644 emscripten/include/pvrsdk/vulkan/vk_icd.h delete mode 100644 emscripten/include/pvrsdk/vulkan/vk_layer.h delete mode 100644 emscripten/include/pvrsdk/vulkan/vk_platform.h delete mode 100644 emscripten/include/pvrsdk/vulkan/vulkan.h delete mode 100644 emscripten/include/pvrsdk/vulkan/vulkan_android.h delete mode 100644 emscripten/include/pvrsdk/vulkan/vulkan_core.h delete mode 100644 emscripten/include/pvrsdk/vulkan/vulkan_ios.h delete mode 100644 emscripten/include/pvrsdk/vulkan/vulkan_macos.h delete mode 100644 emscripten/include/pvrsdk/vulkan/vulkan_mir.h delete mode 100644 emscripten/include/pvrsdk/vulkan/vulkan_vi.h delete mode 100644 emscripten/include/pvrsdk/vulkan/vulkan_wayland.h delete mode 100644 emscripten/include/pvrsdk/vulkan/vulkan_win32.h delete mode 100644 emscripten/include/pvrsdk/vulkan/vulkan_xcb.h delete mode 100644 emscripten/include/pvrsdk/vulkan/vulkan_xlib.h delete mode 100644 emscripten/include/pvrsdk/vulkan/vulkan_xlib_xrandr.h delete mode 100644 emscripten/include/spirv_cross/GLSL.std.450.h delete mode 100644 emscripten/include/spirv_cross/spirv.hpp delete mode 100644 emscripten/include/spirv_cross/spirv_cfg.hpp delete mode 100644 emscripten/include/spirv_cross/spirv_common.hpp delete mode 100644 emscripten/include/spirv_cross/spirv_cross.hpp delete mode 100644 emscripten/include/spirv_cross/spirv_cross_containers.hpp delete mode 100644 emscripten/include/spirv_cross/spirv_cross_error_handling.hpp delete mode 100644 emscripten/include/spirv_cross/spirv_cross_parsed_ir.hpp delete mode 100644 emscripten/include/spirv_cross/spirv_glsl.hpp delete mode 100644 emscripten/include/spirv_cross/spirv_msl.hpp delete mode 100644 emscripten/include/spirv_cross/spirv_parser.hpp delete mode 100644 emscripten/include/uv/uv.h delete mode 100644 emscripten/include/uv/uv/aix.h delete mode 100644 emscripten/include/uv/uv/android-ifaddrs.h delete mode 100644 emscripten/include/uv/uv/bsd.h delete mode 100644 emscripten/include/uv/uv/darwin.h delete mode 100644 emscripten/include/uv/uv/errno.h delete mode 100644 emscripten/include/uv/uv/linux.h delete mode 100644 emscripten/include/uv/uv/os390.h delete mode 100644 emscripten/include/uv/uv/posix.h delete mode 100644 emscripten/include/uv/uv/pthread-barrier.h delete mode 100644 emscripten/include/uv/uv/stdint-msvc2008.h delete mode 100644 emscripten/include/uv/uv/sunos.h delete mode 100644 emscripten/include/uv/uv/threadpool.h delete mode 100644 emscripten/include/uv/uv/tree.h delete mode 100644 emscripten/include/uv/uv/unix.h delete mode 100644 emscripten/include/uv/uv/version.h delete mode 100644 emscripten/include/uv/uv/win.h delete mode 100644 emscripten/include/webgpu/webgpu.h delete mode 100644 emscripten/include/webgpu/webgpu_cpp.h diff --git a/emscripten/include/StandAlone/ResourceLimits.h b/emscripten/include/StandAlone/ResourceLimits.h deleted file mode 100644 index 736248eb..00000000 --- a/emscripten/include/StandAlone/ResourceLimits.h +++ /dev/null @@ -1,57 +0,0 @@ -// -// Copyright (C) 2016 Google, Inc. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#ifndef _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_ -#define _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_ - -#include - -#include "../glslang/Include/ResourceLimits.h" - -namespace glslang { - -// These are the default resources for TBuiltInResources, used for both -// - parsing this string for the case where the user didn't supply one, -// - dumping out a template for user construction of a config file. -extern const TBuiltInResource DefaultTBuiltInResource; - -// Returns the DefaultTBuiltInResource as a human-readable string. -std::string GetDefaultTBuiltInResourceString(); - -// Decodes the resource limits from |config| to |resources|. -void DecodeResourceLimits(TBuiltInResource* resources, char* config); - -} // end namespace glslang - -#endif // _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_ diff --git a/emscripten/include/StandAlone/resource_limits_c.h b/emscripten/include/StandAlone/resource_limits_c.h deleted file mode 100644 index 108fd5e2..00000000 --- a/emscripten/include/StandAlone/resource_limits_c.h +++ /dev/null @@ -1,54 +0,0 @@ -/** -BSD 2-Clause License - -Copyright (c) 2020, Travis Fort -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -**/ - -#ifndef _STAND_ALONE_RESOURCE_LIMITS_C_INCLUDED_ -#define _STAND_ALONE_RESOURCE_LIMITS_C_INCLUDED_ - -#include "../glslang/Include/glslang_c_interface.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// These are the default resources for TBuiltInResources, used for both -// - parsing this string for the case where the user didn't supply one, -// - dumping out a template for user construction of a config file. -const glslang_resource_t* glslang_default_resource(void); - -// Returns the DefaultTBuiltInResource as a human-readable string. -// NOTE: User is responsible for freeing this string. -const char* glslang_default_resource_string(); - -// Decodes the resource limits from |config| to |resources|. -void glslang_decode_resource_limits(glslang_resource_t* resources, char* config); - -#ifdef __cplusplus -} -#endif - -#endif // _STAND_ALONE_RESOURCE_LIMITS_C_INCLUDED_ diff --git a/emscripten/include/pvrsdk/CL/cl.h b/emscripten/include/pvrsdk/CL/cl.h deleted file mode 100644 index 3127823a..00000000 --- a/emscripten/include/pvrsdk/CL/cl.h +++ /dev/null @@ -1,1466 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008-2015 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and/or associated documentation files (the - * "Materials"), to deal in the Materials without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Materials, and to - * permit persons to whom the Materials are furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS - * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS - * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT - * https://www.khronos.org/registry/ - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER 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. - ******************************************************************************/ - -#ifndef __OPENCL_CL_H -#define __OPENCL_CL_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/******************************************************************************/ - -typedef struct _cl_platform_id * cl_platform_id; -typedef struct _cl_device_id * cl_device_id; -typedef struct _cl_context * cl_context; -typedef struct _cl_command_queue * cl_command_queue; -typedef struct _cl_mem * cl_mem; -typedef struct _cl_program * cl_program; -typedef struct _cl_kernel * cl_kernel; -typedef struct _cl_event * cl_event; -typedef struct _cl_sampler * cl_sampler; - -typedef cl_uint cl_bool; /* WARNING! Unlike cl_ types in cl_platform.h, cl_bool is not guaranteed to be the same size as the bool in kernels. */ -typedef cl_ulong cl_bitfield; -typedef cl_bitfield cl_device_type; -typedef cl_uint cl_platform_info; -typedef cl_uint cl_device_info; -typedef cl_bitfield cl_device_fp_config; -typedef cl_uint cl_device_mem_cache_type; -typedef cl_uint cl_device_local_mem_type; -typedef cl_bitfield cl_device_exec_capabilities; -typedef cl_bitfield cl_device_svm_capabilities; -typedef cl_bitfield cl_command_queue_properties; -typedef intptr_t cl_device_partition_property; -typedef cl_bitfield cl_device_affinity_domain; - -typedef intptr_t cl_context_properties; -typedef cl_uint cl_context_info; -typedef cl_bitfield cl_queue_properties; -typedef cl_uint cl_command_queue_info; -typedef cl_uint cl_channel_order; -typedef cl_uint cl_channel_type; -typedef cl_bitfield cl_mem_flags; -typedef cl_bitfield cl_svm_mem_flags; -typedef cl_uint cl_mem_object_type; -typedef cl_uint cl_mem_info; -typedef cl_bitfield cl_mem_migration_flags; -typedef cl_uint cl_image_info; -typedef cl_uint cl_buffer_create_type; -typedef cl_uint cl_addressing_mode; -typedef cl_uint cl_filter_mode; -typedef cl_uint cl_sampler_info; -typedef cl_bitfield cl_map_flags; -typedef intptr_t cl_pipe_properties; -typedef cl_uint cl_pipe_info; -typedef cl_uint cl_program_info; -typedef cl_uint cl_program_build_info; -typedef cl_uint cl_program_binary_type; -typedef cl_int cl_build_status; -typedef cl_uint cl_kernel_info; -typedef cl_uint cl_kernel_arg_info; -typedef cl_uint cl_kernel_arg_address_qualifier; -typedef cl_uint cl_kernel_arg_access_qualifier; -typedef cl_bitfield cl_kernel_arg_type_qualifier; -typedef cl_uint cl_kernel_work_group_info; -typedef cl_uint cl_kernel_sub_group_info; -typedef cl_uint cl_event_info; -typedef cl_uint cl_command_type; -typedef cl_uint cl_profiling_info; -typedef cl_bitfield cl_sampler_properties; -typedef cl_uint cl_kernel_exec_info; - -typedef struct _cl_image_format { - cl_channel_order image_channel_order; - cl_channel_type image_channel_data_type; -} cl_image_format; - -typedef struct _cl_image_desc { - cl_mem_object_type image_type; - size_t image_width; - size_t image_height; - size_t image_depth; - size_t image_array_size; - size_t image_row_pitch; - size_t image_slice_pitch; - cl_uint num_mip_levels; - cl_uint num_samples; -#ifdef __GNUC__ - __extension__ /* Prevents warnings about anonymous union in -pedantic builds */ -#endif - union { - cl_mem buffer; - cl_mem mem_object; - }; -} cl_image_desc; - -typedef struct _cl_buffer_region { - size_t origin; - size_t size; -} cl_buffer_region; - - -/******************************************************************************/ - -/* Error Codes */ -#define CL_SUCCESS 0 -#define CL_DEVICE_NOT_FOUND -1 -#define CL_DEVICE_NOT_AVAILABLE -2 -#define CL_COMPILER_NOT_AVAILABLE -3 -#define CL_MEM_OBJECT_ALLOCATION_FAILURE -4 -#define CL_OUT_OF_RESOURCES -5 -#define CL_OUT_OF_HOST_MEMORY -6 -#define CL_PROFILING_INFO_NOT_AVAILABLE -7 -#define CL_MEM_COPY_OVERLAP -8 -#define CL_IMAGE_FORMAT_MISMATCH -9 -#define CL_IMAGE_FORMAT_NOT_SUPPORTED -10 -#define CL_BUILD_PROGRAM_FAILURE -11 -#define CL_MAP_FAILURE -12 -#define CL_MISALIGNED_SUB_BUFFER_OFFSET -13 -#define CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST -14 -#define CL_COMPILE_PROGRAM_FAILURE -15 -#define CL_LINKER_NOT_AVAILABLE -16 -#define CL_LINK_PROGRAM_FAILURE -17 -#define CL_DEVICE_PARTITION_FAILED -18 -#define CL_KERNEL_ARG_INFO_NOT_AVAILABLE -19 - -#define CL_INVALID_VALUE -30 -#define CL_INVALID_DEVICE_TYPE -31 -#define CL_INVALID_PLATFORM -32 -#define CL_INVALID_DEVICE -33 -#define CL_INVALID_CONTEXT -34 -#define CL_INVALID_QUEUE_PROPERTIES -35 -#define CL_INVALID_COMMAND_QUEUE -36 -#define CL_INVALID_HOST_PTR -37 -#define CL_INVALID_MEM_OBJECT -38 -#define CL_INVALID_IMAGE_FORMAT_DESCRIPTOR -39 -#define CL_INVALID_IMAGE_SIZE -40 -#define CL_INVALID_SAMPLER -41 -#define CL_INVALID_BINARY -42 -#define CL_INVALID_BUILD_OPTIONS -43 -#define CL_INVALID_PROGRAM -44 -#define CL_INVALID_PROGRAM_EXECUTABLE -45 -#define CL_INVALID_KERNEL_NAME -46 -#define CL_INVALID_KERNEL_DEFINITION -47 -#define CL_INVALID_KERNEL -48 -#define CL_INVALID_ARG_INDEX -49 -#define CL_INVALID_ARG_VALUE -50 -#define CL_INVALID_ARG_SIZE -51 -#define CL_INVALID_KERNEL_ARGS -52 -#define CL_INVALID_WORK_DIMENSION -53 -#define CL_INVALID_WORK_GROUP_SIZE -54 -#define CL_INVALID_WORK_ITEM_SIZE -55 -#define CL_INVALID_GLOBAL_OFFSET -56 -#define CL_INVALID_EVENT_WAIT_LIST -57 -#define CL_INVALID_EVENT -58 -#define CL_INVALID_OPERATION -59 -#define CL_INVALID_GL_OBJECT -60 -#define CL_INVALID_BUFFER_SIZE -61 -#define CL_INVALID_MIP_LEVEL -62 -#define CL_INVALID_GLOBAL_WORK_SIZE -63 -#define CL_INVALID_PROPERTY -64 -#define CL_INVALID_IMAGE_DESCRIPTOR -65 -#define CL_INVALID_COMPILER_OPTIONS -66 -#define CL_INVALID_LINKER_OPTIONS -67 -#define CL_INVALID_DEVICE_PARTITION_COUNT -68 -#define CL_INVALID_PIPE_SIZE -69 -#define CL_INVALID_DEVICE_QUEUE -70 -#define CL_INVALID_SPEC_ID -71 -#define CL_MAX_SIZE_RESTRICTION_EXCEEDED -72 - -/* OpenCL Version */ -#define CL_VERSION_1_0 1 -#define CL_VERSION_1_1 1 -#define CL_VERSION_1_2 1 -#define CL_VERSION_2_0 1 -#define CL_VERSION_2_1 1 -#define CL_VERSION_2_2 1 - -/* cl_bool */ -#define CL_FALSE 0 -#define CL_TRUE 1 -#define CL_BLOCKING CL_TRUE -#define CL_NON_BLOCKING CL_FALSE - -/* cl_platform_info */ -#define CL_PLATFORM_PROFILE 0x0900 -#define CL_PLATFORM_VERSION 0x0901 -#define CL_PLATFORM_NAME 0x0902 -#define CL_PLATFORM_VENDOR 0x0903 -#define CL_PLATFORM_EXTENSIONS 0x0904 -#define CL_PLATFORM_HOST_TIMER_RESOLUTION 0x0905 - -/* cl_device_type - bitfield */ -#define CL_DEVICE_TYPE_DEFAULT (1 << 0) -#define CL_DEVICE_TYPE_CPU (1 << 1) -#define CL_DEVICE_TYPE_GPU (1 << 2) -#define CL_DEVICE_TYPE_ACCELERATOR (1 << 3) -#define CL_DEVICE_TYPE_CUSTOM (1 << 4) -#define CL_DEVICE_TYPE_ALL 0xFFFFFFFF - -/* cl_device_info */ -#define CL_DEVICE_TYPE 0x1000 -#define CL_DEVICE_VENDOR_ID 0x1001 -#define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002 -#define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003 -#define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004 -#define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005 -#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR 0x1006 -#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT 0x1007 -#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT 0x1008 -#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG 0x1009 -#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT 0x100A -#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE 0x100B -#define CL_DEVICE_MAX_CLOCK_FREQUENCY 0x100C -#define CL_DEVICE_ADDRESS_BITS 0x100D -#define CL_DEVICE_MAX_READ_IMAGE_ARGS 0x100E -#define CL_DEVICE_MAX_WRITE_IMAGE_ARGS 0x100F -#define CL_DEVICE_MAX_MEM_ALLOC_SIZE 0x1010 -#define CL_DEVICE_IMAGE2D_MAX_WIDTH 0x1011 -#define CL_DEVICE_IMAGE2D_MAX_HEIGHT 0x1012 -#define CL_DEVICE_IMAGE3D_MAX_WIDTH 0x1013 -#define CL_DEVICE_IMAGE3D_MAX_HEIGHT 0x1014 -#define CL_DEVICE_IMAGE3D_MAX_DEPTH 0x1015 -#define CL_DEVICE_IMAGE_SUPPORT 0x1016 -#define CL_DEVICE_MAX_PARAMETER_SIZE 0x1017 -#define CL_DEVICE_MAX_SAMPLERS 0x1018 -#define CL_DEVICE_MEM_BASE_ADDR_ALIGN 0x1019 -#define CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE 0x101A -#define CL_DEVICE_SINGLE_FP_CONFIG 0x101B -#define CL_DEVICE_GLOBAL_MEM_CACHE_TYPE 0x101C -#define CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE 0x101D -#define CL_DEVICE_GLOBAL_MEM_CACHE_SIZE 0x101E -#define CL_DEVICE_GLOBAL_MEM_SIZE 0x101F -#define CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE 0x1020 -#define CL_DEVICE_MAX_CONSTANT_ARGS 0x1021 -#define CL_DEVICE_LOCAL_MEM_TYPE 0x1022 -#define CL_DEVICE_LOCAL_MEM_SIZE 0x1023 -#define CL_DEVICE_ERROR_CORRECTION_SUPPORT 0x1024 -#define CL_DEVICE_PROFILING_TIMER_RESOLUTION 0x1025 -#define CL_DEVICE_ENDIAN_LITTLE 0x1026 -#define CL_DEVICE_AVAILABLE 0x1027 -#define CL_DEVICE_COMPILER_AVAILABLE 0x1028 -#define CL_DEVICE_EXECUTION_CAPABILITIES 0x1029 -#define CL_DEVICE_QUEUE_PROPERTIES 0x102A /* deprecated */ -#define CL_DEVICE_QUEUE_ON_HOST_PROPERTIES 0x102A -#define CL_DEVICE_NAME 0x102B -#define CL_DEVICE_VENDOR 0x102C -#define CL_DRIVER_VERSION 0x102D -#define CL_DEVICE_PROFILE 0x102E -#define CL_DEVICE_VERSION 0x102F -#define CL_DEVICE_EXTENSIONS 0x1030 -#define CL_DEVICE_PLATFORM 0x1031 -#define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032 -#define CL_DEVICE_HALF_FP_CONFIG 0x1033 -#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034 -#define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035 /* deprecated */ -#define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036 -#define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT 0x1037 -#define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT 0x1038 -#define CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG 0x1039 -#define CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT 0x103A -#define CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE 0x103B -#define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF 0x103C -#define CL_DEVICE_OPENCL_C_VERSION 0x103D -#define CL_DEVICE_LINKER_AVAILABLE 0x103E -#define CL_DEVICE_BUILT_IN_KERNELS 0x103F -#define CL_DEVICE_IMAGE_MAX_BUFFER_SIZE 0x1040 -#define CL_DEVICE_IMAGE_MAX_ARRAY_SIZE 0x1041 -#define CL_DEVICE_PARENT_DEVICE 0x1042 -#define CL_DEVICE_PARTITION_MAX_SUB_DEVICES 0x1043 -#define CL_DEVICE_PARTITION_PROPERTIES 0x1044 -#define CL_DEVICE_PARTITION_AFFINITY_DOMAIN 0x1045 -#define CL_DEVICE_PARTITION_TYPE 0x1046 -#define CL_DEVICE_REFERENCE_COUNT 0x1047 -#define CL_DEVICE_PREFERRED_INTEROP_USER_SYNC 0x1048 -#define CL_DEVICE_PRINTF_BUFFER_SIZE 0x1049 -#define CL_DEVICE_IMAGE_PITCH_ALIGNMENT 0x104A -#define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT 0x104B -#define CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS 0x104C -#define CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE 0x104D -#define CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES 0x104E -#define CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE 0x104F -#define CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE 0x1050 -#define CL_DEVICE_MAX_ON_DEVICE_QUEUES 0x1051 -#define CL_DEVICE_MAX_ON_DEVICE_EVENTS 0x1052 -#define CL_DEVICE_SVM_CAPABILITIES 0x1053 -#define CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE 0x1054 -#define CL_DEVICE_MAX_PIPE_ARGS 0x1055 -#define CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS 0x1056 -#define CL_DEVICE_PIPE_MAX_PACKET_SIZE 0x1057 -#define CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT 0x1058 -#define CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT 0x1059 -#define CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT 0x105A -#define CL_DEVICE_IL_VERSION 0x105B -#define CL_DEVICE_MAX_NUM_SUB_GROUPS 0x105C -#define CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS 0x105D - -/* cl_device_fp_config - bitfield */ -#define CL_FP_DENORM (1 << 0) -#define CL_FP_INF_NAN (1 << 1) -#define CL_FP_ROUND_TO_NEAREST (1 << 2) -#define CL_FP_ROUND_TO_ZERO (1 << 3) -#define CL_FP_ROUND_TO_INF (1 << 4) -#define CL_FP_FMA (1 << 5) -#define CL_FP_SOFT_FLOAT (1 << 6) -#define CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT (1 << 7) - -/* cl_device_mem_cache_type */ -#define CL_NONE 0x0 -#define CL_READ_ONLY_CACHE 0x1 -#define CL_READ_WRITE_CACHE 0x2 - -/* cl_device_local_mem_type */ -#define CL_LOCAL 0x1 -#define CL_GLOBAL 0x2 - -/* cl_device_exec_capabilities - bitfield */ -#define CL_EXEC_KERNEL (1 << 0) -#define CL_EXEC_NATIVE_KERNEL (1 << 1) - -/* cl_command_queue_properties - bitfield */ -#define CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE (1 << 0) -#define CL_QUEUE_PROFILING_ENABLE (1 << 1) -#define CL_QUEUE_ON_DEVICE (1 << 2) -#define CL_QUEUE_ON_DEVICE_DEFAULT (1 << 3) - -/* cl_context_info */ -#define CL_CONTEXT_REFERENCE_COUNT 0x1080 -#define CL_CONTEXT_DEVICES 0x1081 -#define CL_CONTEXT_PROPERTIES 0x1082 -#define CL_CONTEXT_NUM_DEVICES 0x1083 - -/* cl_context_properties */ -#define CL_CONTEXT_PLATFORM 0x1084 -#define CL_CONTEXT_INTEROP_USER_SYNC 0x1085 - -/* cl_device_partition_property */ -#define CL_DEVICE_PARTITION_EQUALLY 0x1086 -#define CL_DEVICE_PARTITION_BY_COUNTS 0x1087 -#define CL_DEVICE_PARTITION_BY_COUNTS_LIST_END 0x0 -#define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN 0x1088 - -/* cl_device_affinity_domain */ -#define CL_DEVICE_AFFINITY_DOMAIN_NUMA (1 << 0) -#define CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE (1 << 1) -#define CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE (1 << 2) -#define CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE (1 << 3) -#define CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE (1 << 4) -#define CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE (1 << 5) - -/* cl_device_svm_capabilities */ -#define CL_DEVICE_SVM_COARSE_GRAIN_BUFFER (1 << 0) -#define CL_DEVICE_SVM_FINE_GRAIN_BUFFER (1 << 1) -#define CL_DEVICE_SVM_FINE_GRAIN_SYSTEM (1 << 2) -#define CL_DEVICE_SVM_ATOMICS (1 << 3) - -/* cl_command_queue_info */ -#define CL_QUEUE_CONTEXT 0x1090 -#define CL_QUEUE_DEVICE 0x1091 -#define CL_QUEUE_REFERENCE_COUNT 0x1092 -#define CL_QUEUE_PROPERTIES 0x1093 -#define CL_QUEUE_SIZE 0x1094 -#define CL_QUEUE_DEVICE_DEFAULT 0x1095 - -/* cl_mem_flags and cl_svm_mem_flags - bitfield */ -#define CL_MEM_READ_WRITE (1 << 0) -#define CL_MEM_WRITE_ONLY (1 << 1) -#define CL_MEM_READ_ONLY (1 << 2) -#define CL_MEM_USE_HOST_PTR (1 << 3) -#define CL_MEM_ALLOC_HOST_PTR (1 << 4) -#define CL_MEM_COPY_HOST_PTR (1 << 5) -/* reserved (1 << 6) */ -#define CL_MEM_HOST_WRITE_ONLY (1 << 7) -#define CL_MEM_HOST_READ_ONLY (1 << 8) -#define CL_MEM_HOST_NO_ACCESS (1 << 9) -#define CL_MEM_SVM_FINE_GRAIN_BUFFER (1 << 10) /* used by cl_svm_mem_flags only */ -#define CL_MEM_SVM_ATOMICS (1 << 11) /* used by cl_svm_mem_flags only */ -#define CL_MEM_KERNEL_READ_AND_WRITE (1 << 12) - -/* cl_mem_migration_flags - bitfield */ -#define CL_MIGRATE_MEM_OBJECT_HOST (1 << 0) -#define CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED (1 << 1) - -/* cl_channel_order */ -#define CL_R 0x10B0 -#define CL_A 0x10B1 -#define CL_RG 0x10B2 -#define CL_RA 0x10B3 -#define CL_RGB 0x10B4 -#define CL_RGBA 0x10B5 -#define CL_BGRA 0x10B6 -#define CL_ARGB 0x10B7 -#define CL_INTENSITY 0x10B8 -#define CL_LUMINANCE 0x10B9 -#define CL_Rx 0x10BA -#define CL_RGx 0x10BB -#define CL_RGBx 0x10BC -#define CL_DEPTH 0x10BD -#define CL_DEPTH_STENCIL 0x10BE -#define CL_sRGB 0x10BF -#define CL_sRGBx 0x10C0 -#define CL_sRGBA 0x10C1 -#define CL_sBGRA 0x10C2 -#define CL_ABGR 0x10C3 - -/* cl_channel_type */ -#define CL_SNORM_INT8 0x10D0 -#define CL_SNORM_INT16 0x10D1 -#define CL_UNORM_INT8 0x10D2 -#define CL_UNORM_INT16 0x10D3 -#define CL_UNORM_SHORT_565 0x10D4 -#define CL_UNORM_SHORT_555 0x10D5 -#define CL_UNORM_INT_101010 0x10D6 -#define CL_SIGNED_INT8 0x10D7 -#define CL_SIGNED_INT16 0x10D8 -#define CL_SIGNED_INT32 0x10D9 -#define CL_UNSIGNED_INT8 0x10DA -#define CL_UNSIGNED_INT16 0x10DB -#define CL_UNSIGNED_INT32 0x10DC -#define CL_HALF_FLOAT 0x10DD -#define CL_FLOAT 0x10DE -#define CL_UNORM_INT24 0x10DF -#define CL_UNORM_INT_101010_2 0x10E0 - -/* cl_mem_object_type */ -#define CL_MEM_OBJECT_BUFFER 0x10F0 -#define CL_MEM_OBJECT_IMAGE2D 0x10F1 -#define CL_MEM_OBJECT_IMAGE3D 0x10F2 -#define CL_MEM_OBJECT_IMAGE2D_ARRAY 0x10F3 -#define CL_MEM_OBJECT_IMAGE1D 0x10F4 -#define CL_MEM_OBJECT_IMAGE1D_ARRAY 0x10F5 -#define CL_MEM_OBJECT_IMAGE1D_BUFFER 0x10F6 -#define CL_MEM_OBJECT_PIPE 0x10F7 - -/* cl_mem_info */ -#define CL_MEM_TYPE 0x1100 -#define CL_MEM_FLAGS 0x1101 -#define CL_MEM_SIZE 0x1102 -#define CL_MEM_HOST_PTR 0x1103 -#define CL_MEM_MAP_COUNT 0x1104 -#define CL_MEM_REFERENCE_COUNT 0x1105 -#define CL_MEM_CONTEXT 0x1106 -#define CL_MEM_ASSOCIATED_MEMOBJECT 0x1107 -#define CL_MEM_OFFSET 0x1108 -#define CL_MEM_USES_SVM_POINTER 0x1109 - -/* cl_image_info */ -#define CL_IMAGE_FORMAT 0x1110 -#define CL_IMAGE_ELEMENT_SIZE 0x1111 -#define CL_IMAGE_ROW_PITCH 0x1112 -#define CL_IMAGE_SLICE_PITCH 0x1113 -#define CL_IMAGE_WIDTH 0x1114 -#define CL_IMAGE_HEIGHT 0x1115 -#define CL_IMAGE_DEPTH 0x1116 -#define CL_IMAGE_ARRAY_SIZE 0x1117 -#define CL_IMAGE_BUFFER 0x1118 -#define CL_IMAGE_NUM_MIP_LEVELS 0x1119 -#define CL_IMAGE_NUM_SAMPLES 0x111A - -/* cl_pipe_info */ -#define CL_PIPE_PACKET_SIZE 0x1120 -#define CL_PIPE_MAX_PACKETS 0x1121 - -/* cl_addressing_mode */ -#define CL_ADDRESS_NONE 0x1130 -#define CL_ADDRESS_CLAMP_TO_EDGE 0x1131 -#define CL_ADDRESS_CLAMP 0x1132 -#define CL_ADDRESS_REPEAT 0x1133 -#define CL_ADDRESS_MIRRORED_REPEAT 0x1134 - -/* cl_filter_mode */ -#define CL_FILTER_NEAREST 0x1140 -#define CL_FILTER_LINEAR 0x1141 - -/* cl_sampler_info */ -#define CL_SAMPLER_REFERENCE_COUNT 0x1150 -#define CL_SAMPLER_CONTEXT 0x1151 -#define CL_SAMPLER_NORMALIZED_COORDS 0x1152 -#define CL_SAMPLER_ADDRESSING_MODE 0x1153 -#define CL_SAMPLER_FILTER_MODE 0x1154 -#define CL_SAMPLER_MIP_FILTER_MODE 0x1155 -#define CL_SAMPLER_LOD_MIN 0x1156 -#define CL_SAMPLER_LOD_MAX 0x1157 - -/* cl_map_flags - bitfield */ -#define CL_MAP_READ (1 << 0) -#define CL_MAP_WRITE (1 << 1) -#define CL_MAP_WRITE_INVALIDATE_REGION (1 << 2) - -/* cl_program_info */ -#define CL_PROGRAM_REFERENCE_COUNT 0x1160 -#define CL_PROGRAM_CONTEXT 0x1161 -#define CL_PROGRAM_NUM_DEVICES 0x1162 -#define CL_PROGRAM_DEVICES 0x1163 -#define CL_PROGRAM_SOURCE 0x1164 -#define CL_PROGRAM_BINARY_SIZES 0x1165 -#define CL_PROGRAM_BINARIES 0x1166 -#define CL_PROGRAM_NUM_KERNELS 0x1167 -#define CL_PROGRAM_KERNEL_NAMES 0x1168 -#define CL_PROGRAM_IL 0x1169 -#define CL_PROGRAM_SCOPE_GLOBAL_CTORS_PRESENT 0x116A -#define CL_PROGRAM_SCOPE_GLOBAL_DTORS_PRESENT 0x116B - -/* cl_program_build_info */ -#define CL_PROGRAM_BUILD_STATUS 0x1181 -#define CL_PROGRAM_BUILD_OPTIONS 0x1182 -#define CL_PROGRAM_BUILD_LOG 0x1183 -#define CL_PROGRAM_BINARY_TYPE 0x1184 -#define CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE 0x1185 - -/* cl_program_binary_type */ -#define CL_PROGRAM_BINARY_TYPE_NONE 0x0 -#define CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT 0x1 -#define CL_PROGRAM_BINARY_TYPE_LIBRARY 0x2 -#define CL_PROGRAM_BINARY_TYPE_EXECUTABLE 0x4 - -/* cl_build_status */ -#define CL_BUILD_SUCCESS 0 -#define CL_BUILD_NONE -1 -#define CL_BUILD_ERROR -2 -#define CL_BUILD_IN_PROGRESS -3 - -/* cl_kernel_info */ -#define CL_KERNEL_FUNCTION_NAME 0x1190 -#define CL_KERNEL_NUM_ARGS 0x1191 -#define CL_KERNEL_REFERENCE_COUNT 0x1192 -#define CL_KERNEL_CONTEXT 0x1193 -#define CL_KERNEL_PROGRAM 0x1194 -#define CL_KERNEL_ATTRIBUTES 0x1195 -#define CL_KERNEL_MAX_NUM_SUB_GROUPS 0x11B9 -#define CL_KERNEL_COMPILE_NUM_SUB_GROUPS 0x11BA - -/* cl_kernel_arg_info */ -#define CL_KERNEL_ARG_ADDRESS_QUALIFIER 0x1196 -#define CL_KERNEL_ARG_ACCESS_QUALIFIER 0x1197 -#define CL_KERNEL_ARG_TYPE_NAME 0x1198 -#define CL_KERNEL_ARG_TYPE_QUALIFIER 0x1199 -#define CL_KERNEL_ARG_NAME 0x119A - -/* cl_kernel_arg_address_qualifier */ -#define CL_KERNEL_ARG_ADDRESS_GLOBAL 0x119B -#define CL_KERNEL_ARG_ADDRESS_LOCAL 0x119C -#define CL_KERNEL_ARG_ADDRESS_CONSTANT 0x119D -#define CL_KERNEL_ARG_ADDRESS_PRIVATE 0x119E - -/* cl_kernel_arg_access_qualifier */ -#define CL_KERNEL_ARG_ACCESS_READ_ONLY 0x11A0 -#define CL_KERNEL_ARG_ACCESS_WRITE_ONLY 0x11A1 -#define CL_KERNEL_ARG_ACCESS_READ_WRITE 0x11A2 -#define CL_KERNEL_ARG_ACCESS_NONE 0x11A3 - -/* cl_kernel_arg_type_qualifier */ -#define CL_KERNEL_ARG_TYPE_NONE 0 -#define CL_KERNEL_ARG_TYPE_CONST (1 << 0) -#define CL_KERNEL_ARG_TYPE_RESTRICT (1 << 1) -#define CL_KERNEL_ARG_TYPE_VOLATILE (1 << 2) -#define CL_KERNEL_ARG_TYPE_PIPE (1 << 3) - -/* cl_kernel_work_group_info */ -#define CL_KERNEL_WORK_GROUP_SIZE 0x11B0 -#define CL_KERNEL_COMPILE_WORK_GROUP_SIZE 0x11B1 -#define CL_KERNEL_LOCAL_MEM_SIZE 0x11B2 -#define CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x11B3 -#define CL_KERNEL_PRIVATE_MEM_SIZE 0x11B4 -#define CL_KERNEL_GLOBAL_WORK_SIZE 0x11B5 - -/* cl_kernel_sub_group_info */ -#define CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE 0x2033 -#define CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE 0x2034 -#define CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT 0x11B8 - -/* cl_kernel_exec_info */ -#define CL_KERNEL_EXEC_INFO_SVM_PTRS 0x11B6 -#define CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM 0x11B7 - -/* cl_event_info */ -#define CL_EVENT_COMMAND_QUEUE 0x11D0 -#define CL_EVENT_COMMAND_TYPE 0x11D1 -#define CL_EVENT_REFERENCE_COUNT 0x11D2 -#define CL_EVENT_COMMAND_EXECUTION_STATUS 0x11D3 -#define CL_EVENT_CONTEXT 0x11D4 - -/* cl_command_type */ -#define CL_COMMAND_NDRANGE_KERNEL 0x11F0 -#define CL_COMMAND_TASK 0x11F1 -#define CL_COMMAND_NATIVE_KERNEL 0x11F2 -#define CL_COMMAND_READ_BUFFER 0x11F3 -#define CL_COMMAND_WRITE_BUFFER 0x11F4 -#define CL_COMMAND_COPY_BUFFER 0x11F5 -#define CL_COMMAND_READ_IMAGE 0x11F6 -#define CL_COMMAND_WRITE_IMAGE 0x11F7 -#define CL_COMMAND_COPY_IMAGE 0x11F8 -#define CL_COMMAND_COPY_IMAGE_TO_BUFFER 0x11F9 -#define CL_COMMAND_COPY_BUFFER_TO_IMAGE 0x11FA -#define CL_COMMAND_MAP_BUFFER 0x11FB -#define CL_COMMAND_MAP_IMAGE 0x11FC -#define CL_COMMAND_UNMAP_MEM_OBJECT 0x11FD -#define CL_COMMAND_MARKER 0x11FE -#define CL_COMMAND_ACQUIRE_GL_OBJECTS 0x11FF -#define CL_COMMAND_RELEASE_GL_OBJECTS 0x1200 -#define CL_COMMAND_READ_BUFFER_RECT 0x1201 -#define CL_COMMAND_WRITE_BUFFER_RECT 0x1202 -#define CL_COMMAND_COPY_BUFFER_RECT 0x1203 -#define CL_COMMAND_USER 0x1204 -#define CL_COMMAND_BARRIER 0x1205 -#define CL_COMMAND_MIGRATE_MEM_OBJECTS 0x1206 -#define CL_COMMAND_FILL_BUFFER 0x1207 -#define CL_COMMAND_FILL_IMAGE 0x1208 -#define CL_COMMAND_SVM_FREE 0x1209 -#define CL_COMMAND_SVM_MEMCPY 0x120A -#define CL_COMMAND_SVM_MEMFILL 0x120B -#define CL_COMMAND_SVM_MAP 0x120C -#define CL_COMMAND_SVM_UNMAP 0x120D - -/* command execution status */ -#define CL_COMPLETE 0x0 -#define CL_RUNNING 0x1 -#define CL_SUBMITTED 0x2 -#define CL_QUEUED 0x3 - -/* cl_buffer_create_type */ -#define CL_BUFFER_CREATE_TYPE_REGION 0x1220 - -/* cl_profiling_info */ -#define CL_PROFILING_COMMAND_QUEUED 0x1280 -#define CL_PROFILING_COMMAND_SUBMIT 0x1281 -#define CL_PROFILING_COMMAND_START 0x1282 -#define CL_PROFILING_COMMAND_END 0x1283 -#define CL_PROFILING_COMMAND_COMPLETE 0x1284 - -#ifndef CL_NO_PROTOTYPES -/********************************************************************************************************/ - -/* Platform API */ -extern CL_API_ENTRY cl_int CL_API_CALL -clGetPlatformIDs(cl_uint /* num_entries */, - cl_platform_id * /* platforms */, - cl_uint * /* num_platforms */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetPlatformInfo(cl_platform_id /* platform */, - cl_platform_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -/* Device APIs */ -extern CL_API_ENTRY cl_int CL_API_CALL -clGetDeviceIDs(cl_platform_id /* platform */, - cl_device_type /* device_type */, - cl_uint /* num_entries */, - cl_device_id * /* devices */, - cl_uint * /* num_devices */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetDeviceInfo(cl_device_id /* device */, - cl_device_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clCreateSubDevices(cl_device_id /* in_device */, - const cl_device_partition_property * /* properties */, - cl_uint /* num_devices */, - cl_device_id * /* out_devices */, - cl_uint * /* num_devices_ret */) CL_API_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clRetainDevice(cl_device_id /* device */) CL_API_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clReleaseDevice(cl_device_id /* device */) CL_API_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clSetDefaultDeviceCommandQueue(cl_context /* context */, - cl_device_id /* device */, - cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_2_1; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetDeviceAndHostTimer(cl_device_id /* device */, - cl_ulong* /* device_timestamp */, - cl_ulong* /* host_timestamp */) CL_API_SUFFIX__VERSION_2_1; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetHostTimer(cl_device_id /* device */, - cl_ulong * /* host_timestamp */) CL_API_SUFFIX__VERSION_2_1; - - -/* Context APIs */ -extern CL_API_ENTRY cl_context CL_API_CALL -clCreateContext(const cl_context_properties * /* properties */, - cl_uint /* num_devices */, - const cl_device_id * /* devices */, - void (CL_CALLBACK * /* pfn_notify */)(const char *, const void *, size_t, void *), - void * /* user_data */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_context CL_API_CALL -clCreateContextFromType(const cl_context_properties * /* properties */, - cl_device_type /* device_type */, - void (CL_CALLBACK * /* pfn_notify*/ )(const char *, const void *, size_t, void *), - void * /* user_data */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clRetainContext(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clReleaseContext(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetContextInfo(cl_context /* context */, - cl_context_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -/* Command Queue APIs */ -extern CL_API_ENTRY cl_command_queue CL_API_CALL -clCreateCommandQueueWithProperties(cl_context /* context */, - cl_device_id /* device */, - const cl_queue_properties * /* properties */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_2_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clRetainCommandQueue(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clReleaseCommandQueue(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetCommandQueueInfo(cl_command_queue /* command_queue */, - cl_command_queue_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -/* Memory Object APIs */ -extern CL_API_ENTRY cl_mem CL_API_CALL -clCreateBuffer(cl_context /* context */, - cl_mem_flags /* flags */, - size_t /* size */, - void * /* host_ptr */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_mem CL_API_CALL -clCreateSubBuffer(cl_mem /* buffer */, - cl_mem_flags /* flags */, - cl_buffer_create_type /* buffer_create_type */, - const void * /* buffer_create_info */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1; - -extern CL_API_ENTRY cl_mem CL_API_CALL -clCreateImage(cl_context /* context */, - cl_mem_flags /* flags */, - const cl_image_format * /* image_format */, - const cl_image_desc * /* image_desc */, - void * /* host_ptr */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_mem CL_API_CALL -clCreatePipe(cl_context /* context */, - cl_mem_flags /* flags */, - cl_uint /* pipe_packet_size */, - cl_uint /* pipe_max_packets */, - const cl_pipe_properties * /* properties */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_2_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clRetainMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clReleaseMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetSupportedImageFormats(cl_context /* context */, - cl_mem_flags /* flags */, - cl_mem_object_type /* image_type */, - cl_uint /* num_entries */, - cl_image_format * /* image_formats */, - cl_uint * /* num_image_formats */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetMemObjectInfo(cl_mem /* memobj */, - cl_mem_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetImageInfo(cl_mem /* image */, - cl_image_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetPipeInfo(cl_mem /* pipe */, - cl_pipe_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_2_0; - - -extern CL_API_ENTRY cl_int CL_API_CALL -clSetMemObjectDestructorCallback(cl_mem /* memobj */, - void (CL_CALLBACK * /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/), - void * /*user_data */ ) CL_API_SUFFIX__VERSION_1_1; - -/* SVM Allocation APIs */ -extern CL_API_ENTRY void * CL_API_CALL -clSVMAlloc(cl_context /* context */, - cl_svm_mem_flags /* flags */, - size_t /* size */, - cl_uint /* alignment */) CL_API_SUFFIX__VERSION_2_0; - -extern CL_API_ENTRY void CL_API_CALL -clSVMFree(cl_context /* context */, - void * /* svm_pointer */) CL_API_SUFFIX__VERSION_2_0; - -/* Sampler APIs */ -extern CL_API_ENTRY cl_sampler CL_API_CALL -clCreateSamplerWithProperties(cl_context /* context */, - const cl_sampler_properties * /* normalized_coords */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_2_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clRetainSampler(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clReleaseSampler(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetSamplerInfo(cl_sampler /* sampler */, - cl_sampler_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -/* Program Object APIs */ -extern CL_API_ENTRY cl_program CL_API_CALL -clCreateProgramWithSource(cl_context /* context */, - cl_uint /* count */, - const char ** /* strings */, - const size_t * /* lengths */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_program CL_API_CALL -clCreateProgramWithBinary(cl_context /* context */, - cl_uint /* num_devices */, - const cl_device_id * /* device_list */, - const size_t * /* lengths */, - const unsigned char ** /* binaries */, - cl_int * /* binary_status */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_program CL_API_CALL -clCreateProgramWithBuiltInKernels(cl_context /* context */, - cl_uint /* num_devices */, - const cl_device_id * /* device_list */, - const char * /* kernel_names */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_program CL_API_CALL -clCreateProgramWithIL(cl_context /* context */, - const void* /* il */, - size_t /* length */, - cl_int* /* errcode_ret */) CL_API_SUFFIX__VERSION_2_1; - - -extern CL_API_ENTRY cl_int CL_API_CALL -clRetainProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clReleaseProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clBuildProgram(cl_program /* program */, - cl_uint /* num_devices */, - const cl_device_id * /* device_list */, - const char * /* options */, - void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */), - void * /* user_data */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clCompileProgram(cl_program /* program */, - cl_uint /* num_devices */, - const cl_device_id * /* device_list */, - const char * /* options */, - cl_uint /* num_input_headers */, - const cl_program * /* input_headers */, - const char ** /* header_include_names */, - void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */), - void * /* user_data */) CL_API_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_program CL_API_CALL -clLinkProgram(cl_context /* context */, - cl_uint /* num_devices */, - const cl_device_id * /* device_list */, - const char * /* options */, - cl_uint /* num_input_programs */, - const cl_program * /* input_programs */, - void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */), - void * /* user_data */, - cl_int * /* errcode_ret */ ) CL_API_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clSetProgramReleaseCallback(cl_program /* program */, - void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */), - void * /* user_data */) CL_API_SUFFIX__VERSION_2_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clSetProgramSpecializationConstant(cl_program /* program */, - cl_uint /* spec_id */, - size_t /* spec_size */, - const void* /* spec_value */) CL_API_SUFFIX__VERSION_2_2; - - -extern CL_API_ENTRY cl_int CL_API_CALL -clUnloadPlatformCompiler(cl_platform_id /* platform */) CL_API_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetProgramInfo(cl_program /* program */, - cl_program_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetProgramBuildInfo(cl_program /* program */, - cl_device_id /* device */, - cl_program_build_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -/* Kernel Object APIs */ -extern CL_API_ENTRY cl_kernel CL_API_CALL -clCreateKernel(cl_program /* program */, - const char * /* kernel_name */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clCreateKernelsInProgram(cl_program /* program */, - cl_uint /* num_kernels */, - cl_kernel * /* kernels */, - cl_uint * /* num_kernels_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_kernel CL_API_CALL -clCloneKernel(cl_kernel /* source_kernel */, - cl_int* /* errcode_ret */) CL_API_SUFFIX__VERSION_2_1; - -extern CL_API_ENTRY cl_int CL_API_CALL -clRetainKernel(cl_kernel /* kernel */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clReleaseKernel(cl_kernel /* kernel */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clSetKernelArg(cl_kernel /* kernel */, - cl_uint /* arg_index */, - size_t /* arg_size */, - const void * /* arg_value */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clSetKernelArgSVMPointer(cl_kernel /* kernel */, - cl_uint /* arg_index */, - const void * /* arg_value */) CL_API_SUFFIX__VERSION_2_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clSetKernelExecInfo(cl_kernel /* kernel */, - cl_kernel_exec_info /* param_name */, - size_t /* param_value_size */, - const void * /* param_value */) CL_API_SUFFIX__VERSION_2_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetKernelInfo(cl_kernel /* kernel */, - cl_kernel_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetKernelArgInfo(cl_kernel /* kernel */, - cl_uint /* arg_indx */, - cl_kernel_arg_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetKernelWorkGroupInfo(cl_kernel /* kernel */, - cl_device_id /* device */, - cl_kernel_work_group_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetKernelSubGroupInfo(cl_kernel /* kernel */, - cl_device_id /* device */, - cl_kernel_sub_group_info /* param_name */, - size_t /* input_value_size */, - const void* /*input_value */, - size_t /* param_value_size */, - void* /* param_value */, - size_t* /* param_value_size_ret */ ) CL_API_SUFFIX__VERSION_2_1; - - -/* Event Object APIs */ -extern CL_API_ENTRY cl_int CL_API_CALL -clWaitForEvents(cl_uint /* num_events */, - const cl_event * /* event_list */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetEventInfo(cl_event /* event */, - cl_event_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_event CL_API_CALL -clCreateUserEvent(cl_context /* context */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1; - -extern CL_API_ENTRY cl_int CL_API_CALL -clRetainEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clReleaseEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clSetUserEventStatus(cl_event /* event */, - cl_int /* execution_status */) CL_API_SUFFIX__VERSION_1_1; - -extern CL_API_ENTRY cl_int CL_API_CALL -clSetEventCallback( cl_event /* event */, - cl_int /* command_exec_callback_type */, - void (CL_CALLBACK * /* pfn_notify */)(cl_event, cl_int, void *), - void * /* user_data */) CL_API_SUFFIX__VERSION_1_1; - -/* Profiling APIs */ -extern CL_API_ENTRY cl_int CL_API_CALL -clGetEventProfilingInfo(cl_event /* event */, - cl_profiling_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -/* Flush and Finish APIs */ -extern CL_API_ENTRY cl_int CL_API_CALL -clFlush(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clFinish(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; - -/* Enqueued Commands APIs */ -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueReadBuffer(cl_command_queue /* command_queue */, - cl_mem /* buffer */, - cl_bool /* blocking_read */, - size_t /* offset */, - size_t /* size */, - void * /* ptr */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueReadBufferRect(cl_command_queue /* command_queue */, - cl_mem /* buffer */, - cl_bool /* blocking_read */, - const size_t * /* buffer_offset */, - const size_t * /* host_offset */, - const size_t * /* region */, - size_t /* buffer_row_pitch */, - size_t /* buffer_slice_pitch */, - size_t /* host_row_pitch */, - size_t /* host_slice_pitch */, - void * /* ptr */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueWriteBuffer(cl_command_queue /* command_queue */, - cl_mem /* buffer */, - cl_bool /* blocking_write */, - size_t /* offset */, - size_t /* size */, - const void * /* ptr */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueWriteBufferRect(cl_command_queue /* command_queue */, - cl_mem /* buffer */, - cl_bool /* blocking_write */, - const size_t * /* buffer_offset */, - const size_t * /* host_offset */, - const size_t * /* region */, - size_t /* buffer_row_pitch */, - size_t /* buffer_slice_pitch */, - size_t /* host_row_pitch */, - size_t /* host_slice_pitch */, - const void * /* ptr */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueFillBuffer(cl_command_queue /* command_queue */, - cl_mem /* buffer */, - const void * /* pattern */, - size_t /* pattern_size */, - size_t /* offset */, - size_t /* size */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueCopyBuffer(cl_command_queue /* command_queue */, - cl_mem /* src_buffer */, - cl_mem /* dst_buffer */, - size_t /* src_offset */, - size_t /* dst_offset */, - size_t /* size */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueCopyBufferRect(cl_command_queue /* command_queue */, - cl_mem /* src_buffer */, - cl_mem /* dst_buffer */, - const size_t * /* src_origin */, - const size_t * /* dst_origin */, - const size_t * /* region */, - size_t /* src_row_pitch */, - size_t /* src_slice_pitch */, - size_t /* dst_row_pitch */, - size_t /* dst_slice_pitch */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueReadImage(cl_command_queue /* command_queue */, - cl_mem /* image */, - cl_bool /* blocking_read */, - const size_t * /* origin[3] */, - const size_t * /* region[3] */, - size_t /* row_pitch */, - size_t /* slice_pitch */, - void * /* ptr */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueWriteImage(cl_command_queue /* command_queue */, - cl_mem /* image */, - cl_bool /* blocking_write */, - const size_t * /* origin[3] */, - const size_t * /* region[3] */, - size_t /* input_row_pitch */, - size_t /* input_slice_pitch */, - const void * /* ptr */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueFillImage(cl_command_queue /* command_queue */, - cl_mem /* image */, - const void * /* fill_color */, - const size_t * /* origin[3] */, - const size_t * /* region[3] */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueCopyImage(cl_command_queue /* command_queue */, - cl_mem /* src_image */, - cl_mem /* dst_image */, - const size_t * /* src_origin[3] */, - const size_t * /* dst_origin[3] */, - const size_t * /* region[3] */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueCopyImageToBuffer(cl_command_queue /* command_queue */, - cl_mem /* src_image */, - cl_mem /* dst_buffer */, - const size_t * /* src_origin[3] */, - const size_t * /* region[3] */, - size_t /* dst_offset */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueCopyBufferToImage(cl_command_queue /* command_queue */, - cl_mem /* src_buffer */, - cl_mem /* dst_image */, - size_t /* src_offset */, - const size_t * /* dst_origin[3] */, - const size_t * /* region[3] */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY void * CL_API_CALL -clEnqueueMapBuffer(cl_command_queue /* command_queue */, - cl_mem /* buffer */, - cl_bool /* blocking_map */, - cl_map_flags /* map_flags */, - size_t /* offset */, - size_t /* size */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY void * CL_API_CALL -clEnqueueMapImage(cl_command_queue /* command_queue */, - cl_mem /* image */, - cl_bool /* blocking_map */, - cl_map_flags /* map_flags */, - const size_t * /* origin[3] */, - const size_t * /* region[3] */, - size_t * /* image_row_pitch */, - size_t * /* image_slice_pitch */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueUnmapMemObject(cl_command_queue /* command_queue */, - cl_mem /* memobj */, - void * /* mapped_ptr */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueMigrateMemObjects(cl_command_queue /* command_queue */, - cl_uint /* num_mem_objects */, - const cl_mem * /* mem_objects */, - cl_mem_migration_flags /* flags */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueNDRangeKernel(cl_command_queue /* command_queue */, - cl_kernel /* kernel */, - cl_uint /* work_dim */, - const size_t * /* global_work_offset */, - const size_t * /* global_work_size */, - const size_t * /* local_work_size */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueNativeKernel(cl_command_queue /* command_queue */, - void (CL_CALLBACK * /*user_func*/)(void *), - void * /* args */, - size_t /* cb_args */, - cl_uint /* num_mem_objects */, - const cl_mem * /* mem_list */, - const void ** /* args_mem_loc */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueMarkerWithWaitList(cl_command_queue /* command_queue */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueBarrierWithWaitList(cl_command_queue /* command_queue */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueSVMFree(cl_command_queue /* command_queue */, - cl_uint /* num_svm_pointers */, - void *[] /* svm_pointers[] */, - void (CL_CALLBACK * /*pfn_free_func*/)(cl_command_queue /* queue */, - cl_uint /* num_svm_pointers */, - void *[] /* svm_pointers[] */, - void * /* user_data */), - void * /* user_data */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueSVMMemcpy(cl_command_queue /* command_queue */, - cl_bool /* blocking_copy */, - void * /* dst_ptr */, - const void * /* src_ptr */, - size_t /* size */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueSVMMemFill(cl_command_queue /* command_queue */, - void * /* svm_ptr */, - const void * /* pattern */, - size_t /* pattern_size */, - size_t /* size */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueSVMMap(cl_command_queue /* command_queue */, - cl_bool /* blocking_map */, - cl_map_flags /* flags */, - void * /* svm_ptr */, - size_t /* size */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueSVMUnmap(cl_command_queue /* command_queue */, - void * /* svm_ptr */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_2_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueSVMMigrateMem(cl_command_queue /* command_queue */, - cl_uint /* num_svm_pointers */, - const void ** /* svm_pointers */, - const size_t * /* sizes */, - cl_mem_migration_flags /* flags */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_2_1; - - -/* Extension function access - * - * Returns the extension function address for the given function name, - * or NULL if a valid function can not be found. The client must - * check to make sure the address is not NULL, before using or - * calling the returned function address. - */ -extern CL_API_ENTRY void * CL_API_CALL -clGetExtensionFunctionAddressForPlatform(cl_platform_id /* platform */, - const char * /* func_name */) CL_API_SUFFIX__VERSION_1_2; - - -/* Deprecated OpenCL 1.1 APIs */ -extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL -clCreateImage2D(cl_context /* context */, - cl_mem_flags /* flags */, - const cl_image_format * /* image_format */, - size_t /* image_width */, - size_t /* image_height */, - size_t /* image_row_pitch */, - void * /* host_ptr */, - cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; - -extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL -clCreateImage3D(cl_context /* context */, - cl_mem_flags /* flags */, - const cl_image_format * /* image_format */, - size_t /* image_width */, - size_t /* image_height */, - size_t /* image_depth */, - size_t /* image_row_pitch */, - size_t /* image_slice_pitch */, - void * /* host_ptr */, - cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; - -extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL -clEnqueueMarker(cl_command_queue /* command_queue */, - cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; - -extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL -clEnqueueWaitForEvents(cl_command_queue /* command_queue */, - cl_uint /* num_events */, - const cl_event * /* event_list */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; - -extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL -clEnqueueBarrier(cl_command_queue /* command_queue */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; - -extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL -clUnloadCompiler(void) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; - -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_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_1_2_DEPRECATED; - - -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_1_2_DEPRECATED; - -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_1_2_DEPRECATED; -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __OPENCL_CL_H */ - diff --git a/emscripten/include/pvrsdk/CL/cl2.hpp b/emscripten/include/pvrsdk/CL/cl2.hpp deleted file mode 100644 index 70bd5984..00000000 --- a/emscripten/include/pvrsdk/CL/cl2.hpp +++ /dev/null @@ -1,9569 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008-2016 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and/or associated documentation files (the - * "Materials"), to deal in the Materials without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Materials, and to - * permit persons to whom the Materials are furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS - * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS - * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT - * https://www.khronos.org/registry/ - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER 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. - ******************************************************************************/ - -/*! \file - * - * \brief C++ bindings for OpenCL 1.0 (rev 48), OpenCL 1.1 (rev 33), - * OpenCL 1.2 (rev 15) and OpenCL 2.0 (rev 29) - * \author Lee Howes and Bruce Merry - * - * Derived from the OpenCL 1.x C++ bindings written by - * Benedict R. Gaster, Laurent Morichetti and Lee Howes - * With additions and fixes from: - * Brian Cole, March 3rd 2010 and April 2012 - * Matt Gruenke, April 2012. - * Bruce Merry, February 2013. - * Tom Deakin and Simon McIntosh-Smith, July 2013 - * James Price, 2015- - * - * \version 2.0.10 - * \date 2016-07-20 - * - * Optional extension support - * - * cl_ext_device_fission - * #define CL_HPP_USE_CL_DEVICE_FISSION - * cl_khr_d3d10_sharing - * #define CL_HPP_USE_DX_INTEROP - * cl_khr_sub_groups - * #define CL_HPP_USE_CL_SUB_GROUPS_KHR - * - * Doxygen documentation for this header is available here: - * - * http://khronosgroup.github.io/OpenCL-CLHPP/ - * - * The latest version of this header can be found on the GitHub releases page: - * - * https://github.com/KhronosGroup/OpenCL-CLHPP/releases - * - * Bugs and patches can be submitted to the GitHub repository: - * - * https://github.com/KhronosGroup/OpenCL-CLHPP - */ - -/*! \mainpage - * \section intro Introduction - * For many large applications C++ is the language of choice and so it seems - * reasonable to define C++ bindings for OpenCL. - * - * The interface is contained with a single C++ header file \em cl2.hpp and all - * definitions are contained within the namespace \em cl. There is no additional - * requirement to include \em cl.h and to use either the C++ or original C - * bindings; it is enough to simply include \em cl2.hpp. - * - * The bindings themselves are lightweight and correspond closely to the - * underlying C API. Using the C++ bindings introduces no additional execution - * overhead. - * - * There are numerous compatibility, portability and memory management - * fixes in the new header as well as additional OpenCL 2.0 features. - * As a result the header is not directly backward compatible and for this - * reason we release it as cl2.hpp rather than a new version of cl.hpp. - * - * - * \section compatibility Compatibility - * Due to the evolution of the underlying OpenCL API the 2.0 C++ bindings - * include an updated approach to defining supported feature versions - * and the range of valid underlying OpenCL runtime versions supported. - * - * The combination of preprocessor macros CL_HPP_TARGET_OPENCL_VERSION and - * CL_HPP_MINIMUM_OPENCL_VERSION control this range. These are three digit - * decimal values representing OpenCL runime versions. The default for - * the target is 200, representing OpenCL 2.0 and the minimum is also - * defined as 200. These settings would use 2.0 API calls only. - * If backward compatibility with a 1.2 runtime is required, the minimum - * version may be set to 120. - * - * Note that this is a compile-time setting, and so affects linking against - * a particular SDK version rather than the versioning of the loaded runtime. - * - * The earlier versions of the header included basic vector and string - * classes based loosely on STL versions. These were difficult to - * maintain and very rarely used. For the 2.0 header we now assume - * the presence of the standard library unless requested otherwise. - * We use std::array, std::vector, std::shared_ptr and std::string - * throughout to safely manage memory and reduce the chance of a - * recurrance of earlier memory management bugs. - * - * These classes are used through typedefs in the cl namespace: - * cl::array, cl::vector, cl::pointer and cl::string. - * In addition cl::allocate_pointer forwards to std::allocate_shared - * by default. - * In all cases these standard library classes can be replaced with - * custom interface-compatible versions using the CL_HPP_NO_STD_ARRAY, - * CL_HPP_NO_STD_VECTOR, CL_HPP_NO_STD_UNIQUE_PTR and - * CL_HPP_NO_STD_STRING macros. - * - * The OpenCL 1.x versions of the C++ bindings included a size_t wrapper - * class to interface with kernel enqueue. This caused unpleasant interactions - * with the standard size_t declaration and led to namespacing bugs. - * In the 2.0 version we have replaced this with a std::array-based interface. - * However, the old behaviour can be regained for backward compatibility - * using the CL_HPP_ENABLE_SIZE_T_COMPATIBILITY macro. - * - * Finally, the program construction interface used a clumsy vector-of-pairs - * design in the earlier versions. We have replaced that with a cleaner - * vector-of-vectors and vector-of-strings design. However, for backward - * compatibility old behaviour can be regained with the - * CL_HPP_ENABLE_PROGRAM_CONSTRUCTION_FROM_ARRAY_COMPATIBILITY macro. - * - * In OpenCL 2.0 OpenCL C is not entirely backward compatibility with - * earlier versions. As a result a flag must be passed to the OpenCL C - * compiled to request OpenCL 2.0 compilation of kernels with 1.2 as - * the default in the absence of the flag. - * In some cases the C++ bindings automatically compile code for ease. - * For those cases the compilation defaults to OpenCL C 2.0. - * If this is not wanted, the CL_HPP_CL_1_2_DEFAULT_BUILD macro may - * be specified to assume 1.2 compilation. - * If more fine-grained decisions on a per-kernel bases are required - * then explicit build operations that take the flag should be used. - * - * - * \section parameterization Parameters - * This header may be parameterized by a set of preprocessor macros. - * - * - CL_HPP_TARGET_OPENCL_VERSION - * - * Defines the target OpenCL runtime version to build the header - * against. Defaults to 200, representing OpenCL 2.0. - * - * - CL_HPP_NO_STD_STRING - * - * Do not use the standard library string class. cl::string is not - * defined and may be defined by the user before cl2.hpp is - * included. - * - * - CL_HPP_NO_STD_VECTOR - * - * Do not use the standard library vector class. cl::vector is not - * defined and may be defined by the user before cl2.hpp is - * included. - * - * - CL_HPP_NO_STD_ARRAY - * - * Do not use the standard library array class. cl::array is not - * defined and may be defined by the user before cl2.hpp is - * included. - * - * - CL_HPP_NO_STD_UNIQUE_PTR - * - * Do not use the standard library unique_ptr class. cl::pointer and - * the cl::allocate_pointer functions are not defined and may be - * defined by the user before cl2.hpp is included. - * - * - CL_HPP_ENABLE_DEVICE_FISSION - * - * Enables device fission for OpenCL 1.2 platforms. - * - * - CL_HPP_ENABLE_EXCEPTIONS - * - * Enable exceptions for use in the C++ bindings header. This is the - * preferred error handling mechanism but is not required. - * - * - CL_HPP_ENABLE_SIZE_T_COMPATIBILITY - * - * Backward compatibility option to support cl.hpp-style size_t - * class. Replaces the updated std::array derived version and - * removal of size_t from the namespace. Note that in this case the - * new size_t class is placed in the cl::compatibility namespace and - * thus requires an additional using declaration for direct backward - * compatibility. - * - * - CL_HPP_ENABLE_PROGRAM_CONSTRUCTION_FROM_ARRAY_COMPATIBILITY - * - * Enable older vector of pairs interface for construction of - * programs. - * - * - CL_HPP_CL_1_2_DEFAULT_BUILD - * - * Default to OpenCL C 1.2 compilation rather than OpenCL C 2.0 - * applies to use of cl::Program construction and other program - * build variants. - * - * - * \section example Example - * - * The following example shows a general use case for the C++ - * bindings, including support for the optional exception feature and - * also the supplied vector and string classes, see following sections for - * decriptions of these features. - * - * \code - #define CL_HPP_ENABLE_EXCEPTIONS - #define CL_HPP_TARGET_OPENCL_VERSION 200 - - #include - #include - #include - #include - #include - - const int numElements = 32; - - int main(void) - { - // Filter for a 2.0 platform and set it as the default - std::vector platforms; - cl::Platform::get(&platforms); - cl::Platform plat; - for (auto &p : platforms) { - std::string platver = p.getInfo(); - if (platver.find("OpenCL 2.") != std::string::npos) { - plat = p; - } - } - if (plat() == 0) { - std::cout << "No OpenCL 2.0 platform found."; - return -1; - } - - cl::Platform newP = cl::Platform::setDefault(plat); - if (newP != plat) { - std::cout << "Error setting default platform."; - return -1; - } - - // Use C++11 raw string literals for kernel source code - std::string kernel1{R"CLC( - global int globalA; - kernel void updateGlobal() - { - globalA = 75; - } - )CLC"}; - std::string kernel2{R"CLC( - typedef struct { global int *bar; } Foo; - kernel void vectorAdd(global const Foo* aNum, global const int *inputA, global const int *inputB, - global int *output, int val, write_only pipe int outPipe, queue_t childQueue) - { - output[get_global_id(0)] = inputA[get_global_id(0)] + inputB[get_global_id(0)] + val + *(aNum->bar); - write_pipe(outPipe, &val); - queue_t default_queue = get_default_queue(); - ndrange_t ndrange = ndrange_1D(get_global_size(0)/2, get_global_size(0)/2); - - // Have a child kernel write into third quarter of output - enqueue_kernel(default_queue, CLK_ENQUEUE_FLAGS_WAIT_KERNEL, ndrange, - ^{ - output[get_global_size(0)*2 + get_global_id(0)] = - inputA[get_global_size(0)*2 + get_global_id(0)] + inputB[get_global_size(0)*2 + get_global_id(0)] + globalA; - }); - - // Have a child kernel write into last quarter of output - enqueue_kernel(childQueue, CLK_ENQUEUE_FLAGS_WAIT_KERNEL, ndrange, - ^{ - output[get_global_size(0)*3 + get_global_id(0)] = - inputA[get_global_size(0)*3 + get_global_id(0)] + inputB[get_global_size(0)*3 + get_global_id(0)] + globalA + 2; - }); - } - )CLC"}; - - // New simpler string interface style - std::vector programStrings {kernel1, kernel2}; - - cl::Program vectorAddProgram(programStrings); - try { - vectorAddProgram.build("-cl-std=CL2.0"); - } - catch (...) { - // Print build info for all devices - cl_int buildErr = CL_SUCCESS; - auto buildInfo = vectorAddProgram.getBuildInfo(&buildErr); - for (auto &pair : buildInfo) { - std::cerr << pair.second << std::endl << std::endl; - } - - return 1; - } - - typedef struct { int *bar; } Foo; - - // Get and run kernel that initializes the program-scope global - // A test for kernels that take no arguments - auto program2Kernel = - cl::KernelFunctor<>(vectorAddProgram, "updateGlobal"); - program2Kernel( - cl::EnqueueArgs( - cl::NDRange(1))); - - ////////////////// - // SVM allocations - - auto anSVMInt = cl::allocate_svm>(); - *anSVMInt = 5; - cl::SVMAllocator>> svmAllocReadOnly; - auto fooPointer = cl::allocate_pointer(svmAllocReadOnly); - fooPointer->bar = anSVMInt.get(); - cl::SVMAllocator> svmAlloc; - std::vector>> inputA(numElements, 1, svmAlloc); - cl::coarse_svm_vector inputB(numElements, 2, svmAlloc); - - // - ////////////// - - // Traditional cl_mem allocations - std::vector output(numElements, 0xdeadbeef); - cl::Buffer outputBuffer(begin(output), end(output), false); - cl::Pipe aPipe(sizeof(cl_int), numElements / 2); - - // Default command queue, also passed in as a parameter - cl::DeviceCommandQueue defaultDeviceQueue = cl::DeviceCommandQueue::makeDefault( - cl::Context::getDefault(), cl::Device::getDefault()); - - auto vectorAddKernel = - cl::KernelFunctor< - decltype(fooPointer)&, - int*, - cl::coarse_svm_vector&, - cl::Buffer, - int, - cl::Pipe&, - cl::DeviceCommandQueue - >(vectorAddProgram, "vectorAdd"); - - // Ensure that the additional SVM pointer is available to the kernel - // This one was not passed as a parameter - vectorAddKernel.setSVMPointers(anSVMInt); - - // Hand control of coarse allocations to runtime - cl::enqueueUnmapSVM(anSVMInt); - cl::enqueueUnmapSVM(fooPointer); - cl::unmapSVM(inputB); - cl::unmapSVM(output2); - - cl_int error; - vectorAddKernel( - cl::EnqueueArgs( - cl::NDRange(numElements/2), - cl::NDRange(numElements/2)), - fooPointer, - inputA.data(), - inputB, - outputBuffer, - 3, - aPipe, - defaultDeviceQueue, - error - ); - - cl::copy(outputBuffer, begin(output), end(output)); - // Grab the SVM output vector using a map - cl::mapSVM(output2); - - cl::Device d = cl::Device::getDefault(); - - std::cout << "Output:\n"; - for (int i = 1; i < numElements; ++i) { - std::cout << "\t" << output[i] << "\n"; - } - std::cout << "\n\n"; - - return 0; - } - * - * \endcode - * - */ -#ifndef CL_HPP_ -#define CL_HPP_ - -/* Handle deprecated preprocessor definitions. In each case, we only check for - * the old name if the new name is not defined, so that user code can define - * both and hence work with either version of the bindings. - */ -#if !defined(CL_HPP_USE_DX_INTEROP) && defined(USE_DX_INTEROP) -# pragma message("cl2.hpp: USE_DX_INTEROP is deprecated. Define CL_HPP_USE_DX_INTEROP instead") -# define CL_HPP_USE_DX_INTEROP -#endif -#if !defined(CL_HPP_USE_CL_DEVICE_FISSION) && defined(USE_CL_DEVICE_FISSION) -# pragma message("cl2.hpp: USE_CL_DEVICE_FISSION is deprecated. Define CL_HPP_USE_CL_DEVICE_FISSION instead") -# define CL_HPP_USE_CL_DEVICE_FISSION -#endif -#if !defined(CL_HPP_ENABLE_EXCEPTIONS) && defined(__CL_ENABLE_EXCEPTIONS) -# pragma message("cl2.hpp: __CL_ENABLE_EXCEPTIONS is deprecated. Define CL_HPP_ENABLE_EXCEPTIONS instead") -# define CL_HPP_ENABLE_EXCEPTIONS -#endif -#if !defined(CL_HPP_NO_STD_VECTOR) && defined(__NO_STD_VECTOR) -# pragma message("cl2.hpp: __NO_STD_VECTOR is deprecated. Define CL_HPP_NO_STD_VECTOR instead") -# define CL_HPP_NO_STD_VECTOR -#endif -#if !defined(CL_HPP_NO_STD_STRING) && defined(__NO_STD_STRING) -# pragma message("cl2.hpp: __NO_STD_STRING is deprecated. Define CL_HPP_NO_STD_STRING instead") -# define CL_HPP_NO_STD_STRING -#endif -#if defined(VECTOR_CLASS) -# pragma message("cl2.hpp: VECTOR_CLASS is deprecated. Alias cl::vector instead") -#endif -#if defined(STRING_CLASS) -# pragma message("cl2.hpp: STRING_CLASS is deprecated. Alias cl::string instead.") -#endif -#if !defined(CL_HPP_USER_OVERRIDE_ERROR_STRINGS) && defined(__CL_USER_OVERRIDE_ERROR_STRINGS) -# pragma message("cl2.hpp: __CL_USER_OVERRIDE_ERROR_STRINGS is deprecated. Define CL_HPP_USER_OVERRIDE_ERROR_STRINGS instead") -# define CL_HPP_USER_OVERRIDE_ERROR_STRINGS -#endif - -/* Warn about features that are no longer supported - */ -#if defined(__USE_DEV_VECTOR) -# pragma message("cl2.hpp: __USE_DEV_VECTOR is no longer supported. Expect compilation errors") -#endif -#if defined(__USE_DEV_STRING) -# pragma message("cl2.hpp: __USE_DEV_STRING is no longer supported. Expect compilation errors") -#endif - -/* Detect which version to target */ -#if !defined(CL_HPP_TARGET_OPENCL_VERSION) -# pragma message("cl2.hpp: CL_HPP_TARGET_OPENCL_VERSION is not defined. It will default to 200 (OpenCL 2.0)") -# define CL_HPP_TARGET_OPENCL_VERSION 200 -#endif -#if CL_HPP_TARGET_OPENCL_VERSION != 100 && CL_HPP_TARGET_OPENCL_VERSION != 110 && CL_HPP_TARGET_OPENCL_VERSION != 120 && CL_HPP_TARGET_OPENCL_VERSION != 200 -# pragma message("cl2.hpp: CL_HPP_TARGET_OPENCL_VERSION is not a valid value (100, 110, 120 or 200). It will be set to 200") -# undef CL_HPP_TARGET_OPENCL_VERSION -# define CL_HPP_TARGET_OPENCL_VERSION 200 -#endif - -#if !defined(CL_HPP_MINIMUM_OPENCL_VERSION) -# define CL_HPP_MINIMUM_OPENCL_VERSION 200 -#endif -#if CL_HPP_MINIMUM_OPENCL_VERSION != 100 && CL_HPP_MINIMUM_OPENCL_VERSION != 110 && CL_HPP_MINIMUM_OPENCL_VERSION != 120 && CL_HPP_MINIMUM_OPENCL_VERSION != 200 -# pragma message("cl2.hpp: CL_HPP_MINIMUM_OPENCL_VERSION is not a valid value (100, 110, 120 or 200). It will be set to 100") -# undef CL_HPP_MINIMUM_OPENCL_VERSION -# define CL_HPP_MINIMUM_OPENCL_VERSION 100 -#endif -#if CL_HPP_MINIMUM_OPENCL_VERSION > CL_HPP_TARGET_OPENCL_VERSION -# error "CL_HPP_MINIMUM_OPENCL_VERSION must not be greater than CL_HPP_TARGET_OPENCL_VERSION" -#endif - -#if CL_HPP_MINIMUM_OPENCL_VERSION <= 100 && !defined(CL_USE_DEPRECATED_OPENCL_1_0_APIS) -# define CL_USE_DEPRECATED_OPENCL_1_0_APIS -#endif -#if CL_HPP_MINIMUM_OPENCL_VERSION <= 110 && !defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) -# define CL_USE_DEPRECATED_OPENCL_1_1_APIS -#endif -#if CL_HPP_MINIMUM_OPENCL_VERSION <= 120 && !defined(CL_USE_DEPRECATED_OPENCL_1_2_APIS) -# define CL_USE_DEPRECATED_OPENCL_1_2_APIS -#endif -#if CL_HPP_MINIMUM_OPENCL_VERSION <= 200 && !defined(CL_USE_DEPRECATED_OPENCL_2_0_APIS) -# define CL_USE_DEPRECATED_OPENCL_2_0_APIS -#endif - -#ifdef _WIN32 - -#include - -#if defined(CL_HPP_USE_DX_INTEROP) -#include -#include -#endif -#endif // _WIN32 - -#if defined(_MSC_VER) -#include -#endif // _MSC_VER - - // Check for a valid C++ version - -// Need to do both tests here because for some reason __cplusplus is not -// updated in visual studio -#if (!defined(_MSC_VER) && __cplusplus < 201103L) || (defined(_MSC_VER) && _MSC_VER < 1700) -#error Visual studio 2013 or another C++11-supporting compiler required -#endif - -#if defined(__APPLE__) || defined(__MACOSX) -#include "DynamicOCL.h" -#else -#include "DynamicOCL.h" -#endif // !__APPLE__ - -#if defined(CL_HPP_USE_CL_DEVICE_FISSION) || defined(CL_HPP_USE_CL_SUB_GROUPS_KHR) -#include -#endif - -#if (__cplusplus >= 201103L) -#define CL_HPP_NOEXCEPT_ noexcept -#else -#define CL_HPP_NOEXCEPT_ -#endif - -#if defined(_MSC_VER) -# define CL_HPP_DEFINE_STATIC_MEMBER_ __declspec(selectany) -#else -# define CL_HPP_DEFINE_STATIC_MEMBER_ __attribute__((weak)) -#endif // !_MSC_VER - -// Define deprecated prefixes and suffixes to ensure compilation -// in case they are not pre-defined -#if !defined(CL_EXT_PREFIX__VERSION_1_1_DEPRECATED) -#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED -#endif // #if !defined(CL_EXT_PREFIX__VERSION_1_1_DEPRECATED) -#if !defined(CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED) -#define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED -#endif // #if !defined(CL_EXT_PREFIX__VERSION_1_1_DEPRECATED) - -#if !defined(CL_EXT_PREFIX__VERSION_1_2_DEPRECATED) -#define CL_EXT_PREFIX__VERSION_1_2_DEPRECATED -#endif // #if !defined(CL_EXT_PREFIX__VERSION_1_2_DEPRECATED) -#if !defined(CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED) -#define CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED -#endif // #if !defined(CL_EXT_PREFIX__VERSION_1_2_DEPRECATED) - -#if !defined(CL_CALLBACK) -#define CL_CALLBACK -#endif //CL_CALLBACK - -#include -#include -#include -#include -#include -#include - - -// Define a size_type to represent a correctly resolved size_t -#if defined(CL_HPP_ENABLE_SIZE_T_COMPATIBILITY) -namespace cl { - using size_type = ::size_t; -} // namespace cl -#else // #if defined(CL_HPP_ENABLE_SIZE_T_COMPATIBILITY) -namespace cl { - using size_type = size_t; -} // namespace cl -#endif // #if defined(CL_HPP_ENABLE_SIZE_T_COMPATIBILITY) - - -#if defined(CL_HPP_ENABLE_EXCEPTIONS) -#include -#endif // #if defined(CL_HPP_ENABLE_EXCEPTIONS) - -#if !defined(CL_HPP_NO_STD_VECTOR) -#include -namespace cl { - template < class T, class Alloc = std::allocator > - using vector = std::vector; -} // namespace cl -#endif // #if !defined(CL_HPP_NO_STD_VECTOR) - -#if !defined(CL_HPP_NO_STD_STRING) -#include -namespace cl { - using string = std::string; -} // namespace cl -#endif // #if !defined(CL_HPP_NO_STD_STRING) - -#if CL_HPP_TARGET_OPENCL_VERSION >= 200 - -#if !defined(CL_HPP_NO_STD_UNIQUE_PTR) -#include -namespace cl { - // Replace unique_ptr and allocate_pointer for internal use - // to allow user to replace them - template - using pointer = std::unique_ptr; -} // namespace cl -#endif -#endif // #if CL_HPP_TARGET_OPENCL_VERSION >= 200 -#if !defined(CL_HPP_NO_STD_ARRAY) -#include -namespace cl { - template < class T, size_type N > - using array = std::array; -} // namespace cl -#endif // #if !defined(CL_HPP_NO_STD_ARRAY) - -// Define size_type appropriately to allow backward-compatibility -// use of the old size_t interface class -#if defined(CL_HPP_ENABLE_SIZE_T_COMPATIBILITY) -namespace cl { - namespace compatibility { - /*! \brief class used to interface between C++ and - * OpenCL C calls that require arrays of size_t values, whose - * size is known statically. - */ - template - class size_t - { - private: - size_type data_[N]; - - public: - //! \brief Initialize size_t to all 0s - size_t() - { - for (int i = 0; i < N; ++i) { - data_[i] = 0; - } - } - - size_t(const array &rhs) - { - for (int i = 0; i < N; ++i) { - data_[i] = rhs[i]; - } - } - - size_type& operator[](int index) - { - return data_[index]; - } - - const size_type& operator[](int index) const - { - return data_[index]; - } - - //! \brief Conversion operator to T*. - operator size_type* () { return data_; } - - //! \brief Conversion operator to const T*. - operator const size_type* () const { return data_; } - - operator array() const - { - array ret; - - for (int i = 0; i < N; ++i) { - ret[i] = data_[i]; - } - return ret; - } - }; - } // namespace compatibility - - template - using size_t = compatibility::size_t; -} // namespace cl -#endif // #if defined(CL_HPP_ENABLE_SIZE_T_COMPATIBILITY) - -// Helper alias to avoid confusing the macros -namespace cl { - namespace detail { - using size_t_array = array; - } // namespace detail -} // namespace cl - - -/*! \namespace cl - * - * \brief The OpenCL C++ bindings are defined within this namespace. - * - */ -namespace cl { - class Memory; - -#define CL_HPP_INIT_CL_EXT_FCN_PTR_(name) \ - if (!pfn_##name) { \ - pfn_##name = (PFN_##name) \ - clGetExtensionFunctionAddress(#name); \ - if (!pfn_##name) { \ - } \ - } - -#define CL_HPP_INIT_CL_EXT_FCN_PTR_PLATFORM_(platform, name) \ - if (!pfn_##name) { \ - pfn_##name = (PFN_##name) \ - clGetExtensionFunctionAddressForPlatform(platform, #name); \ - if (!pfn_##name) { \ - } \ - } - - class Program; - class Device; - class Context; - class CommandQueue; - class DeviceCommandQueue; - class Memory; - class Buffer; - class Pipe; - -#if defined(CL_HPP_ENABLE_EXCEPTIONS) - /*! \brief Exception class - * - * This may be thrown by API functions when CL_HPP_ENABLE_EXCEPTIONS is defined. - */ - class Error : public std::exception - { - private: - cl_int err_; - const char * errStr_; - public: - /*! \brief Create a new CL error exception for a given error code - * and corresponding message. - * - * \param err error code value. - * - * \param errStr a descriptive string that must remain in scope until - * handling of the exception has concluded. If set, it - * will be returned by what(). - */ - Error(cl_int err, const char * errStr = NULL) : err_(err), errStr_(errStr) - {} - - ~Error() throw() {} - - /*! \brief Get error string associated with exception - * - * \return A memory pointer to the error message string. - */ - virtual const char * what() const throw () - { - if (errStr_ == NULL) { - return "empty"; - } - else { - return errStr_; - } - } - - /*! \brief Get error code associated with exception - * - * \return The error code. - */ - cl_int err(void) const { return err_; } - }; -#define CL_HPP_ERR_STR_(x) #x -#else -#define CL_HPP_ERR_STR_(x) NULL -#endif // CL_HPP_ENABLE_EXCEPTIONS - - -namespace detail -{ -#if defined(CL_HPP_ENABLE_EXCEPTIONS) -static inline cl_int errHandler ( - cl_int err, - const char * errStr = NULL) -{ - if (err != CL_SUCCESS) { - throw Error(err, errStr); - } - return err; -} -#else -static inline cl_int errHandler (cl_int err, const char * errStr = NULL) -{ - (void) errStr; // suppress unused variable warning - return err; -} -#endif // CL_HPP_ENABLE_EXCEPTIONS -} - - - -//! \cond DOXYGEN_DETAIL -#if !defined(CL_HPP_USER_OVERRIDE_ERROR_STRINGS) -#define __GET_DEVICE_INFO_ERR CL_HPP_ERR_STR_(clGetDeviceInfo) -#define __GET_PLATFORM_INFO_ERR CL_HPP_ERR_STR_(clGetPlatformInfo) -#define __GET_DEVICE_IDS_ERR CL_HPP_ERR_STR_(clGetDeviceIDs) -#define __GET_PLATFORM_IDS_ERR CL_HPP_ERR_STR_(clGetPlatformIDs) -#define __GET_CONTEXT_INFO_ERR CL_HPP_ERR_STR_(clGetContextInfo) -#define __GET_EVENT_INFO_ERR CL_HPP_ERR_STR_(clGetEventInfo) -#define __GET_EVENT_PROFILE_INFO_ERR CL_HPP_ERR_STR_(clGetEventProfileInfo) -#define __GET_MEM_OBJECT_INFO_ERR CL_HPP_ERR_STR_(clGetMemObjectInfo) -#define __GET_IMAGE_INFO_ERR CL_HPP_ERR_STR_(clGetImageInfo) -#define __GET_SAMPLER_INFO_ERR CL_HPP_ERR_STR_(clGetSamplerInfo) -#define __GET_KERNEL_INFO_ERR CL_HPP_ERR_STR_(clGetKernelInfo) -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 -#define __GET_KERNEL_ARG_INFO_ERR CL_HPP_ERR_STR_(clGetKernelArgInfo) -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 120 -#define __GET_KERNEL_WORK_GROUP_INFO_ERR CL_HPP_ERR_STR_(clGetKernelWorkGroupInfo) -#define __GET_PROGRAM_INFO_ERR CL_HPP_ERR_STR_(clGetProgramInfo) -#define __GET_PROGRAM_BUILD_INFO_ERR CL_HPP_ERR_STR_(clGetProgramBuildInfo) -#define __GET_COMMAND_QUEUE_INFO_ERR CL_HPP_ERR_STR_(clGetCommandQueueInfo) - -#define __CREATE_CONTEXT_ERR CL_HPP_ERR_STR_(clCreateContext) -#define __CREATE_CONTEXT_FROM_TYPE_ERR CL_HPP_ERR_STR_(clCreateContextFromType) -#define __GET_SUPPORTED_IMAGE_FORMATS_ERR CL_HPP_ERR_STR_(clGetSupportedImageFormats) - -#define __CREATE_BUFFER_ERR CL_HPP_ERR_STR_(clCreateBuffer) -#define __COPY_ERR CL_HPP_ERR_STR_(cl::copy) -#define __CREATE_SUBBUFFER_ERR CL_HPP_ERR_STR_(clCreateSubBuffer) -#define __CREATE_GL_BUFFER_ERR CL_HPP_ERR_STR_(clCreateFromGLBuffer) -#define __CREATE_GL_RENDER_BUFFER_ERR CL_HPP_ERR_STR_(clCreateFromGLBuffer) -#define __GET_GL_OBJECT_INFO_ERR CL_HPP_ERR_STR_(clGetGLObjectInfo) -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 -#define __CREATE_IMAGE_ERR CL_HPP_ERR_STR_(clCreateImage) -#define __CREATE_GL_TEXTURE_ERR CL_HPP_ERR_STR_(clCreateFromGLTexture) -#define __IMAGE_DIMENSION_ERR CL_HPP_ERR_STR_(Incorrect image dimensions) -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 120 -#define __SET_MEM_OBJECT_DESTRUCTOR_CALLBACK_ERR CL_HPP_ERR_STR_(clSetMemObjectDestructorCallback) - -#define __CREATE_USER_EVENT_ERR CL_HPP_ERR_STR_(clCreateUserEvent) -#define __SET_USER_EVENT_STATUS_ERR CL_HPP_ERR_STR_(clSetUserEventStatus) -#define __SET_EVENT_CALLBACK_ERR CL_HPP_ERR_STR_(clSetEventCallback) -#define __WAIT_FOR_EVENTS_ERR CL_HPP_ERR_STR_(clWaitForEvents) - -#define __CREATE_KERNEL_ERR CL_HPP_ERR_STR_(clCreateKernel) -#define __SET_KERNEL_ARGS_ERR CL_HPP_ERR_STR_(clSetKernelArg) -#define __CREATE_PROGRAM_WITH_SOURCE_ERR CL_HPP_ERR_STR_(clCreateProgramWithSource) -#define __CREATE_PROGRAM_WITH_BINARY_ERR CL_HPP_ERR_STR_(clCreateProgramWithBinary) -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 -#define __CREATE_PROGRAM_WITH_BUILT_IN_KERNELS_ERR CL_HPP_ERR_STR_(clCreateProgramWithBuiltInKernels) -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 120 -#define __BUILD_PROGRAM_ERR CL_HPP_ERR_STR_(clBuildProgram) -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 -#define __COMPILE_PROGRAM_ERR CL_HPP_ERR_STR_(clCompileProgram) -#define __LINK_PROGRAM_ERR CL_HPP_ERR_STR_(clLinkProgram) -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 120 -#define __CREATE_KERNELS_IN_PROGRAM_ERR CL_HPP_ERR_STR_(clCreateKernelsInProgram) - -#if CL_HPP_TARGET_OPENCL_VERSION >= 200 -#define __CREATE_COMMAND_QUEUE_WITH_PROPERTIES_ERR CL_HPP_ERR_STR_(clCreateCommandQueueWithProperties) -#define __CREATE_SAMPLER_WITH_PROPERTIES_ERR CL_HPP_ERR_STR_(clCreateSamplerWithProperties) -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 200 -#define __SET_COMMAND_QUEUE_PROPERTY_ERR CL_HPP_ERR_STR_(clSetCommandQueueProperty) -#define __ENQUEUE_READ_BUFFER_ERR CL_HPP_ERR_STR_(clEnqueueReadBuffer) -#define __ENQUEUE_READ_BUFFER_RECT_ERR CL_HPP_ERR_STR_(clEnqueueReadBufferRect) -#define __ENQUEUE_WRITE_BUFFER_ERR CL_HPP_ERR_STR_(clEnqueueWriteBuffer) -#define __ENQUEUE_WRITE_BUFFER_RECT_ERR CL_HPP_ERR_STR_(clEnqueueWriteBufferRect) -#define __ENQEUE_COPY_BUFFER_ERR CL_HPP_ERR_STR_(clEnqueueCopyBuffer) -#define __ENQEUE_COPY_BUFFER_RECT_ERR CL_HPP_ERR_STR_(clEnqueueCopyBufferRect) -#define __ENQUEUE_FILL_BUFFER_ERR CL_HPP_ERR_STR_(clEnqueueFillBuffer) -#define __ENQUEUE_READ_IMAGE_ERR CL_HPP_ERR_STR_(clEnqueueReadImage) -#define __ENQUEUE_WRITE_IMAGE_ERR CL_HPP_ERR_STR_(clEnqueueWriteImage) -#define __ENQUEUE_COPY_IMAGE_ERR CL_HPP_ERR_STR_(clEnqueueCopyImage) -#define __ENQUEUE_FILL_IMAGE_ERR CL_HPP_ERR_STR_(clEnqueueFillImage) -#define __ENQUEUE_COPY_IMAGE_TO_BUFFER_ERR CL_HPP_ERR_STR_(clEnqueueCopyImageToBuffer) -#define __ENQUEUE_COPY_BUFFER_TO_IMAGE_ERR CL_HPP_ERR_STR_(clEnqueueCopyBufferToImage) -#define __ENQUEUE_MAP_BUFFER_ERR CL_HPP_ERR_STR_(clEnqueueMapBuffer) -#define __ENQUEUE_MAP_IMAGE_ERR CL_HPP_ERR_STR_(clEnqueueMapImage) -#define __ENQUEUE_UNMAP_MEM_OBJECT_ERR CL_HPP_ERR_STR_(clEnqueueUnMapMemObject) -#define __ENQUEUE_NDRANGE_KERNEL_ERR CL_HPP_ERR_STR_(clEnqueueNDRangeKernel) -#define __ENQUEUE_NATIVE_KERNEL CL_HPP_ERR_STR_(clEnqueueNativeKernel) -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 -#define __ENQUEUE_MIGRATE_MEM_OBJECTS_ERR CL_HPP_ERR_STR_(clEnqueueMigrateMemObjects) -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 120 - -#define __ENQUEUE_ACQUIRE_GL_ERR CL_HPP_ERR_STR_(clEnqueueAcquireGLObjects) -#define __ENQUEUE_RELEASE_GL_ERR CL_HPP_ERR_STR_(clEnqueueReleaseGLObjects) - -#define __CREATE_PIPE_ERR CL_HPP_ERR_STR_(clCreatePipe) -#define __GET_PIPE_INFO_ERR CL_HPP_ERR_STR_(clGetPipeInfo) - - -#define __RETAIN_ERR CL_HPP_ERR_STR_(Retain Object) -#define __RELEASE_ERR CL_HPP_ERR_STR_(Release Object) -#define __FLUSH_ERR CL_HPP_ERR_STR_(clFlush) -#define __FINISH_ERR CL_HPP_ERR_STR_(clFinish) -#define __VECTOR_CAPACITY_ERR CL_HPP_ERR_STR_(Vector capacity error) - -/** - * CL 1.2 version that uses device fission. - */ -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 -#define __CREATE_SUB_DEVICES_ERR CL_HPP_ERR_STR_(clCreateSubDevices) -#else -#define __CREATE_SUB_DEVICES_ERR CL_HPP_ERR_STR_(clCreateSubDevicesEXT) -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 120 - -/** - * Deprecated APIs for 1.2 - */ -#if defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) -#define __ENQUEUE_MARKER_ERR CL_HPP_ERR_STR_(clEnqueueMarker) -#define __ENQUEUE_WAIT_FOR_EVENTS_ERR CL_HPP_ERR_STR_(clEnqueueWaitForEvents) -#define __ENQUEUE_BARRIER_ERR CL_HPP_ERR_STR_(clEnqueueBarrier) -#define __UNLOAD_COMPILER_ERR CL_HPP_ERR_STR_(clUnloadCompiler) -#define __CREATE_GL_TEXTURE_2D_ERR CL_HPP_ERR_STR_(clCreateFromGLTexture2D) -#define __CREATE_GL_TEXTURE_3D_ERR CL_HPP_ERR_STR_(clCreateFromGLTexture3D) -#define __CREATE_IMAGE2D_ERR CL_HPP_ERR_STR_(clCreateImage2D) -#define __CREATE_IMAGE3D_ERR CL_HPP_ERR_STR_(clCreateImage3D) -#endif // #if defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) - -/** - * Deprecated APIs for 2.0 - */ -#if defined(CL_USE_DEPRECATED_OPENCL_1_2_APIS) -#define __CREATE_COMMAND_QUEUE_ERR CL_HPP_ERR_STR_(clCreateCommandQueue) -#define __ENQUEUE_TASK_ERR CL_HPP_ERR_STR_(clEnqueueTask) -#define __CREATE_SAMPLER_ERR CL_HPP_ERR_STR_(clCreateSampler) -#endif // #if defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) - -/** - * CL 1.2 marker and barrier commands - */ -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 -#define __ENQUEUE_MARKER_WAIT_LIST_ERR CL_HPP_ERR_STR_(clEnqueueMarkerWithWaitList) -#define __ENQUEUE_BARRIER_WAIT_LIST_ERR CL_HPP_ERR_STR_(clEnqueueBarrierWithWaitList) -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 120 - -#endif // CL_HPP_USER_OVERRIDE_ERROR_STRINGS -//! \endcond - - -namespace detail { - -// Generic getInfoHelper. The final parameter is used to guide overload -// resolution: the actual parameter passed is an int, which makes this -// a worse conversion sequence than a specialization that declares the -// parameter as an int. -template -inline cl_int getInfoHelper(Functor f, cl_uint name, T* param, long) -{ - return f(name, sizeof(T), param, NULL); -} - -// Specialized for getInfo -// Assumes that the output vector was correctly resized on the way in -template -inline cl_int getInfoHelper(Func f, cl_uint name, vector>* param, int) -{ - if (name != CL_PROGRAM_BINARIES) { - return CL_INVALID_VALUE; - } - if (param) { - // Create array of pointers, calculate total size and pass pointer array in - size_type numBinaries = param->size(); - vector binariesPointers(numBinaries); - - for (size_type i = 0; i < numBinaries; ++i) - { - binariesPointers[i] = (*param)[i].data(); - } - - cl_int err = f(name, numBinaries * sizeof(unsigned char*), binariesPointers.data(), NULL); - - if (err != CL_SUCCESS) { - return err; - } - } - - - return CL_SUCCESS; -} - -// Specialized getInfoHelper for vector params -template -inline cl_int getInfoHelper(Func f, cl_uint name, vector* param, long) -{ - size_type required; - cl_int err = f(name, 0, NULL, &required); - if (err != CL_SUCCESS) { - return err; - } - const size_type elements = required / sizeof(T); - - // Temporary to avoid changing param on an error - vector localData(elements); - err = f(name, required, localData.data(), NULL); - if (err != CL_SUCCESS) { - return err; - } - if (param) { - *param = std::move(localData); - } - - return CL_SUCCESS; -} - -/* Specialization for reference-counted types. This depends on the - * existence of Wrapper::cl_type, and none of the other types having the - * cl_type member. Note that simplify specifying the parameter as Wrapper - * does not work, because when using a derived type (e.g. Context) the generic - * template will provide a better match. - */ -template -inline cl_int getInfoHelper( - Func f, cl_uint name, vector* param, int, typename T::cl_type = 0) -{ - size_type required; - cl_int err = f(name, 0, NULL, &required); - if (err != CL_SUCCESS) { - return err; - } - - const size_type elements = required / sizeof(typename T::cl_type); - - vector value(elements); - err = f(name, required, value.data(), NULL); - if (err != CL_SUCCESS) { - return err; - } - - if (param) { - // Assign to convert CL type to T for each element - param->resize(elements); - - // Assign to param, constructing with retain behaviour - // to correctly capture each underlying CL object - for (size_type i = 0; i < elements; i++) { - (*param)[i] = T(value[i], true); - } - } - return CL_SUCCESS; -} - -// Specialized GetInfoHelper for string params -template -inline cl_int getInfoHelper(Func f, cl_uint name, string* param, long) -{ - size_type required; - cl_int err = f(name, 0, NULL, &required); - if (err != CL_SUCCESS) { - return err; - } - - // std::string has a constant data member - // a char vector does not - if (required > 0) { - vector value(required); - err = f(name, required, value.data(), NULL); - if (err != CL_SUCCESS) { - return err; - } - if (param) { - param->assign(begin(value), prev(end(value))); - } - } - else if (param) { - param->assign(""); - } - return CL_SUCCESS; -} - -// Specialized GetInfoHelper for clsize_t params -template -inline cl_int getInfoHelper(Func f, cl_uint name, array* param, long) -{ - size_type required; - cl_int err = f(name, 0, NULL, &required); - if (err != CL_SUCCESS) { - return err; - } - - size_type elements = required / sizeof(size_type); - vector value(elements, 0); - - err = f(name, required, value.data(), NULL); - if (err != CL_SUCCESS) { - return err; - } - - // Bound the copy with N to prevent overruns - // if passed N > than the amount copied - if (elements > N) { - elements = N; - } - for (size_type i = 0; i < elements; ++i) { - (*param)[i] = value[i]; - } - - return CL_SUCCESS; -} - -template struct ReferenceHandler; - -/* Specialization for reference-counted types. This depends on the - * existence of Wrapper::cl_type, and none of the other types having the - * cl_type member. Note that simplify specifying the parameter as Wrapper - * does not work, because when using a derived type (e.g. Context) the generic - * template will provide a better match. - */ -template -inline cl_int getInfoHelper(Func f, cl_uint name, T* param, int, typename T::cl_type = 0) -{ - typename T::cl_type value; - cl_int err = f(name, sizeof(value), &value, NULL); - if (err != CL_SUCCESS) { - return err; - } - *param = value; - if (value != NULL) - { - err = param->retain(); - if (err != CL_SUCCESS) { - return err; - } - } - return CL_SUCCESS; -} - -#define CL_HPP_PARAM_NAME_INFO_1_0_(F) \ - F(cl_platform_info, CL_PLATFORM_PROFILE, string) \ - F(cl_platform_info, CL_PLATFORM_VERSION, string) \ - F(cl_platform_info, CL_PLATFORM_NAME, string) \ - F(cl_platform_info, CL_PLATFORM_VENDOR, string) \ - F(cl_platform_info, CL_PLATFORM_EXTENSIONS, string) \ - \ - F(cl_device_info, CL_DEVICE_TYPE, cl_device_type) \ - F(cl_device_info, CL_DEVICE_VENDOR_ID, cl_uint) \ - F(cl_device_info, CL_DEVICE_MAX_COMPUTE_UNITS, cl_uint) \ - F(cl_device_info, CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS, cl_uint) \ - F(cl_device_info, CL_DEVICE_MAX_WORK_GROUP_SIZE, size_type) \ - F(cl_device_info, CL_DEVICE_MAX_WORK_ITEM_SIZES, cl::vector) \ - F(cl_device_info, CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR, cl_uint) \ - F(cl_device_info, CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT, cl_uint) \ - F(cl_device_info, CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT, cl_uint) \ - F(cl_device_info, CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG, cl_uint) \ - F(cl_device_info, CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT, cl_uint) \ - F(cl_device_info, CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE, cl_uint) \ - F(cl_device_info, CL_DEVICE_MAX_CLOCK_FREQUENCY, cl_uint) \ - F(cl_device_info, CL_DEVICE_ADDRESS_BITS, cl_uint) \ - F(cl_device_info, CL_DEVICE_MAX_READ_IMAGE_ARGS, cl_uint) \ - F(cl_device_info, CL_DEVICE_MAX_WRITE_IMAGE_ARGS, cl_uint) \ - F(cl_device_info, CL_DEVICE_MAX_MEM_ALLOC_SIZE, cl_ulong) \ - F(cl_device_info, CL_DEVICE_IMAGE2D_MAX_WIDTH, size_type) \ - F(cl_device_info, CL_DEVICE_IMAGE2D_MAX_HEIGHT, size_type) \ - F(cl_device_info, CL_DEVICE_IMAGE3D_MAX_WIDTH, size_type) \ - F(cl_device_info, CL_DEVICE_IMAGE3D_MAX_HEIGHT, size_type) \ - F(cl_device_info, CL_DEVICE_IMAGE3D_MAX_DEPTH, size_type) \ - F(cl_device_info, CL_DEVICE_IMAGE_SUPPORT, cl_bool) \ - F(cl_device_info, CL_DEVICE_MAX_PARAMETER_SIZE, size_type) \ - F(cl_device_info, CL_DEVICE_MAX_SAMPLERS, cl_uint) \ - F(cl_device_info, CL_DEVICE_MEM_BASE_ADDR_ALIGN, cl_uint) \ - F(cl_device_info, CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE, cl_uint) \ - F(cl_device_info, CL_DEVICE_SINGLE_FP_CONFIG, cl_device_fp_config) \ - F(cl_device_info, CL_DEVICE_GLOBAL_MEM_CACHE_TYPE, cl_device_mem_cache_type) \ - F(cl_device_info, CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE, cl_uint)\ - F(cl_device_info, CL_DEVICE_GLOBAL_MEM_CACHE_SIZE, cl_ulong) \ - F(cl_device_info, CL_DEVICE_GLOBAL_MEM_SIZE, cl_ulong) \ - F(cl_device_info, CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE, cl_ulong) \ - F(cl_device_info, CL_DEVICE_MAX_CONSTANT_ARGS, cl_uint) \ - F(cl_device_info, CL_DEVICE_LOCAL_MEM_TYPE, cl_device_local_mem_type) \ - F(cl_device_info, CL_DEVICE_LOCAL_MEM_SIZE, cl_ulong) \ - F(cl_device_info, CL_DEVICE_ERROR_CORRECTION_SUPPORT, cl_bool) \ - F(cl_device_info, CL_DEVICE_PROFILING_TIMER_RESOLUTION, size_type) \ - F(cl_device_info, CL_DEVICE_ENDIAN_LITTLE, cl_bool) \ - F(cl_device_info, CL_DEVICE_AVAILABLE, cl_bool) \ - F(cl_device_info, CL_DEVICE_COMPILER_AVAILABLE, cl_bool) \ - F(cl_device_info, CL_DEVICE_EXECUTION_CAPABILITIES, cl_device_exec_capabilities) \ - F(cl_device_info, CL_DEVICE_PLATFORM, cl_platform_id) \ - F(cl_device_info, CL_DEVICE_NAME, string) \ - F(cl_device_info, CL_DEVICE_VENDOR, string) \ - F(cl_device_info, CL_DRIVER_VERSION, string) \ - F(cl_device_info, CL_DEVICE_PROFILE, string) \ - F(cl_device_info, CL_DEVICE_VERSION, string) \ - F(cl_device_info, CL_DEVICE_EXTENSIONS, string) \ - \ - F(cl_context_info, CL_CONTEXT_REFERENCE_COUNT, cl_uint) \ - F(cl_context_info, CL_CONTEXT_DEVICES, cl::vector) \ - F(cl_context_info, CL_CONTEXT_PROPERTIES, cl::vector) \ - \ - F(cl_event_info, CL_EVENT_COMMAND_QUEUE, cl::CommandQueue) \ - F(cl_event_info, CL_EVENT_COMMAND_TYPE, cl_command_type) \ - F(cl_event_info, CL_EVENT_REFERENCE_COUNT, cl_uint) \ - F(cl_event_info, CL_EVENT_COMMAND_EXECUTION_STATUS, cl_int) \ - \ - F(cl_profiling_info, CL_PROFILING_COMMAND_QUEUED, cl_ulong) \ - F(cl_profiling_info, CL_PROFILING_COMMAND_SUBMIT, cl_ulong) \ - F(cl_profiling_info, CL_PROFILING_COMMAND_START, cl_ulong) \ - F(cl_profiling_info, CL_PROFILING_COMMAND_END, cl_ulong) \ - \ - F(cl_mem_info, CL_MEM_TYPE, cl_mem_object_type) \ - F(cl_mem_info, CL_MEM_FLAGS, cl_mem_flags) \ - F(cl_mem_info, CL_MEM_SIZE, size_type) \ - F(cl_mem_info, CL_MEM_HOST_PTR, void*) \ - F(cl_mem_info, CL_MEM_MAP_COUNT, cl_uint) \ - F(cl_mem_info, CL_MEM_REFERENCE_COUNT, cl_uint) \ - F(cl_mem_info, CL_MEM_CONTEXT, cl::Context) \ - \ - F(cl_image_info, CL_IMAGE_FORMAT, cl_image_format) \ - F(cl_image_info, CL_IMAGE_ELEMENT_SIZE, size_type) \ - F(cl_image_info, CL_IMAGE_ROW_PITCH, size_type) \ - F(cl_image_info, CL_IMAGE_SLICE_PITCH, size_type) \ - F(cl_image_info, CL_IMAGE_WIDTH, size_type) \ - F(cl_image_info, CL_IMAGE_HEIGHT, size_type) \ - F(cl_image_info, CL_IMAGE_DEPTH, size_type) \ - \ - F(cl_sampler_info, CL_SAMPLER_REFERENCE_COUNT, cl_uint) \ - F(cl_sampler_info, CL_SAMPLER_CONTEXT, cl::Context) \ - F(cl_sampler_info, CL_SAMPLER_NORMALIZED_COORDS, cl_bool) \ - F(cl_sampler_info, CL_SAMPLER_ADDRESSING_MODE, cl_addressing_mode) \ - F(cl_sampler_info, CL_SAMPLER_FILTER_MODE, cl_filter_mode) \ - \ - F(cl_program_info, CL_PROGRAM_REFERENCE_COUNT, cl_uint) \ - F(cl_program_info, CL_PROGRAM_CONTEXT, cl::Context) \ - F(cl_program_info, CL_PROGRAM_NUM_DEVICES, cl_uint) \ - F(cl_program_info, CL_PROGRAM_DEVICES, cl::vector) \ - F(cl_program_info, CL_PROGRAM_SOURCE, string) \ - F(cl_program_info, CL_PROGRAM_BINARY_SIZES, cl::vector) \ - F(cl_program_info, CL_PROGRAM_BINARIES, cl::vector>) \ - \ - F(cl_program_build_info, CL_PROGRAM_BUILD_STATUS, cl_build_status) \ - F(cl_program_build_info, CL_PROGRAM_BUILD_OPTIONS, string) \ - F(cl_program_build_info, CL_PROGRAM_BUILD_LOG, string) \ - \ - F(cl_kernel_info, CL_KERNEL_FUNCTION_NAME, string) \ - F(cl_kernel_info, CL_KERNEL_NUM_ARGS, cl_uint) \ - F(cl_kernel_info, CL_KERNEL_REFERENCE_COUNT, cl_uint) \ - F(cl_kernel_info, CL_KERNEL_CONTEXT, cl::Context) \ - F(cl_kernel_info, CL_KERNEL_PROGRAM, cl::Program) \ - \ - F(cl_kernel_work_group_info, CL_KERNEL_WORK_GROUP_SIZE, size_type) \ - F(cl_kernel_work_group_info, CL_KERNEL_COMPILE_WORK_GROUP_SIZE, cl::detail::size_t_array) \ - F(cl_kernel_work_group_info, CL_KERNEL_LOCAL_MEM_SIZE, cl_ulong) \ - \ - F(cl_command_queue_info, CL_QUEUE_CONTEXT, cl::Context) \ - F(cl_command_queue_info, CL_QUEUE_DEVICE, cl::Device) \ - F(cl_command_queue_info, CL_QUEUE_REFERENCE_COUNT, cl_uint) \ - F(cl_command_queue_info, CL_QUEUE_PROPERTIES, cl_command_queue_properties) - - -#define CL_HPP_PARAM_NAME_INFO_1_1_(F) \ - F(cl_context_info, CL_CONTEXT_NUM_DEVICES, cl_uint)\ - F(cl_device_info, CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF, cl_uint) \ - F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR, cl_uint) \ - F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT, cl_uint) \ - F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_INT, cl_uint) \ - F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG, cl_uint) \ - F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT, cl_uint) \ - F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE, cl_uint) \ - F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF, cl_uint) \ - F(cl_device_info, CL_DEVICE_DOUBLE_FP_CONFIG, cl_device_fp_config) \ - F(cl_device_info, CL_DEVICE_HALF_FP_CONFIG, cl_device_fp_config) \ - F(cl_device_info, CL_DEVICE_OPENCL_C_VERSION, string) \ - \ - F(cl_mem_info, CL_MEM_ASSOCIATED_MEMOBJECT, cl::Memory) \ - F(cl_mem_info, CL_MEM_OFFSET, size_type) \ - \ - F(cl_kernel_work_group_info, CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE, size_type) \ - F(cl_kernel_work_group_info, CL_KERNEL_PRIVATE_MEM_SIZE, cl_ulong) \ - \ - F(cl_event_info, CL_EVENT_CONTEXT, cl::Context) - -#define CL_HPP_PARAM_NAME_INFO_1_2_(F) \ - F(cl_program_info, CL_PROGRAM_NUM_KERNELS, size_type) \ - F(cl_program_info, CL_PROGRAM_KERNEL_NAMES, string) \ - \ - F(cl_program_build_info, CL_PROGRAM_BINARY_TYPE, cl_program_binary_type) \ - \ - F(cl_kernel_info, CL_KERNEL_ATTRIBUTES, string) \ - \ - F(cl_kernel_arg_info, CL_KERNEL_ARG_ADDRESS_QUALIFIER, cl_kernel_arg_address_qualifier) \ - F(cl_kernel_arg_info, CL_KERNEL_ARG_ACCESS_QUALIFIER, cl_kernel_arg_access_qualifier) \ - F(cl_kernel_arg_info, CL_KERNEL_ARG_TYPE_NAME, string) \ - F(cl_kernel_arg_info, CL_KERNEL_ARG_NAME, string) \ - F(cl_kernel_arg_info, CL_KERNEL_ARG_TYPE_QUALIFIER, cl_kernel_arg_type_qualifier) \ - \ - F(cl_device_info, CL_DEVICE_PARENT_DEVICE, cl::Device) \ - F(cl_device_info, CL_DEVICE_PARTITION_PROPERTIES, cl::vector) \ - F(cl_device_info, CL_DEVICE_PARTITION_TYPE, cl::vector) \ - F(cl_device_info, CL_DEVICE_REFERENCE_COUNT, cl_uint) \ - F(cl_device_info, CL_DEVICE_PREFERRED_INTEROP_USER_SYNC, size_type) \ - F(cl_device_info, CL_DEVICE_PARTITION_AFFINITY_DOMAIN, cl_device_affinity_domain) \ - F(cl_device_info, CL_DEVICE_BUILT_IN_KERNELS, string) \ - \ - F(cl_image_info, CL_IMAGE_ARRAY_SIZE, size_type) \ - F(cl_image_info, CL_IMAGE_NUM_MIP_LEVELS, cl_uint) \ - F(cl_image_info, CL_IMAGE_NUM_SAMPLES, cl_uint) - -#define CL_HPP_PARAM_NAME_INFO_2_0_(F) \ - F(cl_device_info, CL_DEVICE_QUEUE_ON_HOST_PROPERTIES, cl_command_queue_properties) \ - F(cl_device_info, CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES, cl_command_queue_properties) \ - F(cl_device_info, CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE, cl_uint) \ - F(cl_device_info, CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE, cl_uint) \ - F(cl_device_info, CL_DEVICE_MAX_ON_DEVICE_QUEUES, cl_uint) \ - F(cl_device_info, CL_DEVICE_MAX_ON_DEVICE_EVENTS, cl_uint) \ - F(cl_device_info, CL_DEVICE_MAX_PIPE_ARGS, cl_uint) \ - F(cl_device_info, CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS, cl_uint) \ - F(cl_device_info, CL_DEVICE_PIPE_MAX_PACKET_SIZE, cl_uint) \ - F(cl_device_info, CL_DEVICE_SVM_CAPABILITIES, cl_device_svm_capabilities) \ - F(cl_device_info, CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT, cl_uint) \ - F(cl_device_info, CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT, cl_uint) \ - F(cl_device_info, CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT, cl_uint) \ - F(cl_command_queue_info, CL_QUEUE_SIZE, cl_uint) \ - F(cl_mem_info, CL_MEM_USES_SVM_POINTER, cl_bool) \ - F(cl_program_build_info, CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE, size_type) \ - F(cl_pipe_info, CL_PIPE_PACKET_SIZE, cl_uint) \ - F(cl_pipe_info, CL_PIPE_MAX_PACKETS, cl_uint) - -#define CL_HPP_PARAM_NAME_DEVICE_FISSION_(F) \ - F(cl_device_info, CL_DEVICE_PARENT_DEVICE_EXT, cl_device_id) \ - F(cl_device_info, CL_DEVICE_PARTITION_TYPES_EXT, cl::vector) \ - F(cl_device_info, CL_DEVICE_AFFINITY_DOMAINS_EXT, cl::vector) \ - F(cl_device_info, CL_DEVICE_REFERENCE_COUNT_EXT , cl_uint) \ - F(cl_device_info, CL_DEVICE_PARTITION_STYLE_EXT, cl::vector) - -template -struct param_traits {}; - -#define CL_HPP_DECLARE_PARAM_TRAITS_(token, param_name, T) \ -struct token; \ -template<> \ -struct param_traits \ -{ \ - enum { value = param_name }; \ - typedef T param_type; \ -}; - -CL_HPP_PARAM_NAME_INFO_1_0_(CL_HPP_DECLARE_PARAM_TRAITS_) -#if CL_HPP_TARGET_OPENCL_VERSION >= 110 -CL_HPP_PARAM_NAME_INFO_1_1_(CL_HPP_DECLARE_PARAM_TRAITS_) -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 110 -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 -CL_HPP_PARAM_NAME_INFO_1_2_(CL_HPP_DECLARE_PARAM_TRAITS_) -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 110 -#if CL_HPP_TARGET_OPENCL_VERSION >= 200 -CL_HPP_PARAM_NAME_INFO_2_0_(CL_HPP_DECLARE_PARAM_TRAITS_) -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 110 - - -// Flags deprecated in OpenCL 2.0 -#define CL_HPP_PARAM_NAME_INFO_1_0_DEPRECATED_IN_2_0_(F) \ - F(cl_device_info, CL_DEVICE_QUEUE_PROPERTIES, cl_command_queue_properties) - -#define CL_HPP_PARAM_NAME_INFO_1_1_DEPRECATED_IN_2_0_(F) \ - F(cl_device_info, CL_DEVICE_HOST_UNIFIED_MEMORY, cl_bool) - -#define CL_HPP_PARAM_NAME_INFO_1_2_DEPRECATED_IN_2_0_(F) \ - F(cl_image_info, CL_IMAGE_BUFFER, cl::Buffer) - -// Include deprecated query flags based on versions -// Only include deprecated 1.0 flags if 2.0 not active as there is an enum clash -#if CL_HPP_TARGET_OPENCL_VERSION > 100 && CL_HPP_MINIMUM_OPENCL_VERSION < 200 && CL_HPP_TARGET_OPENCL_VERSION < 200 -CL_HPP_PARAM_NAME_INFO_1_0_DEPRECATED_IN_2_0_(CL_HPP_DECLARE_PARAM_TRAITS_) -#endif // CL_HPP_MINIMUM_OPENCL_VERSION < 110 -#if CL_HPP_TARGET_OPENCL_VERSION > 110 && CL_HPP_MINIMUM_OPENCL_VERSION < 200 -CL_HPP_PARAM_NAME_INFO_1_1_DEPRECATED_IN_2_0_(CL_HPP_DECLARE_PARAM_TRAITS_) -#endif // CL_HPP_MINIMUM_OPENCL_VERSION < 120 -#if CL_HPP_TARGET_OPENCL_VERSION > 120 && CL_HPP_MINIMUM_OPENCL_VERSION < 200 -CL_HPP_PARAM_NAME_INFO_1_2_DEPRECATED_IN_2_0_(CL_HPP_DECLARE_PARAM_TRAITS_) -#endif // CL_HPP_MINIMUM_OPENCL_VERSION < 200 - -#if defined(CL_HPP_USE_CL_DEVICE_FISSION) -CL_HPP_PARAM_NAME_DEVICE_FISSION_(CL_HPP_DECLARE_PARAM_TRAITS_); -#endif // CL_HPP_USE_CL_DEVICE_FISSION - -#ifdef CL_PLATFORM_ICD_SUFFIX_KHR -CL_HPP_DECLARE_PARAM_TRAITS_(cl_platform_info, CL_PLATFORM_ICD_SUFFIX_KHR, string) -#endif - -#ifdef CL_DEVICE_PROFILING_TIMER_OFFSET_AMD -CL_HPP_DECLARE_PARAM_TRAITS_(cl_device_info, CL_DEVICE_PROFILING_TIMER_OFFSET_AMD, cl_ulong) -#endif - -#ifdef CL_DEVICE_GLOBAL_FREE_MEMORY_AMD -CL_HPP_DECLARE_PARAM_TRAITS_(cl_device_info, CL_DEVICE_GLOBAL_FREE_MEMORY_AMD, vector) -#endif -#ifdef CL_DEVICE_SIMD_PER_COMPUTE_UNIT_AMD -CL_HPP_DECLARE_PARAM_TRAITS_(cl_device_info, CL_DEVICE_SIMD_PER_COMPUTE_UNIT_AMD, cl_uint) -#endif -#ifdef CL_DEVICE_SIMD_WIDTH_AMD -CL_HPP_DECLARE_PARAM_TRAITS_(cl_device_info, CL_DEVICE_SIMD_WIDTH_AMD, cl_uint) -#endif -#ifdef CL_DEVICE_SIMD_INSTRUCTION_WIDTH_AMD -CL_HPP_DECLARE_PARAM_TRAITS_(cl_device_info, CL_DEVICE_SIMD_INSTRUCTION_WIDTH_AMD, cl_uint) -#endif -#ifdef CL_DEVICE_WAVEFRONT_WIDTH_AMD -CL_HPP_DECLARE_PARAM_TRAITS_(cl_device_info, CL_DEVICE_WAVEFRONT_WIDTH_AMD, cl_uint) -#endif -#ifdef CL_DEVICE_GLOBAL_MEM_CHANNELS_AMD -CL_HPP_DECLARE_PARAM_TRAITS_(cl_device_info, CL_DEVICE_GLOBAL_MEM_CHANNELS_AMD, cl_uint) -#endif -#ifdef CL_DEVICE_GLOBAL_MEM_CHANNEL_BANKS_AMD -CL_HPP_DECLARE_PARAM_TRAITS_(cl_device_info, CL_DEVICE_GLOBAL_MEM_CHANNEL_BANKS_AMD, cl_uint) -#endif -#ifdef CL_DEVICE_GLOBAL_MEM_CHANNEL_BANK_WIDTH_AMD -CL_HPP_DECLARE_PARAM_TRAITS_(cl_device_info, CL_DEVICE_GLOBAL_MEM_CHANNEL_BANK_WIDTH_AMD, cl_uint) -#endif -#ifdef CL_DEVICE_LOCAL_MEM_SIZE_PER_COMPUTE_UNIT_AMD -CL_HPP_DECLARE_PARAM_TRAITS_(cl_device_info, CL_DEVICE_LOCAL_MEM_SIZE_PER_COMPUTE_UNIT_AMD, cl_uint) -#endif -#ifdef CL_DEVICE_LOCAL_MEM_BANKS_AMD -CL_HPP_DECLARE_PARAM_TRAITS_(cl_device_info, CL_DEVICE_LOCAL_MEM_BANKS_AMD, cl_uint) -#endif - -#ifdef CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV -CL_HPP_DECLARE_PARAM_TRAITS_(cl_device_info, CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV, cl_uint) -#endif -#ifdef CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV -CL_HPP_DECLARE_PARAM_TRAITS_(cl_device_info, CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV, cl_uint) -#endif -#ifdef CL_DEVICE_REGISTERS_PER_BLOCK_NV -CL_HPP_DECLARE_PARAM_TRAITS_(cl_device_info, CL_DEVICE_REGISTERS_PER_BLOCK_NV, cl_uint) -#endif -#ifdef CL_DEVICE_WARP_SIZE_NV -CL_HPP_DECLARE_PARAM_TRAITS_(cl_device_info, CL_DEVICE_WARP_SIZE_NV, cl_uint) -#endif -#ifdef CL_DEVICE_GPU_OVERLAP_NV -CL_HPP_DECLARE_PARAM_TRAITS_(cl_device_info, CL_DEVICE_GPU_OVERLAP_NV, cl_bool) -#endif -#ifdef CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV -CL_HPP_DECLARE_PARAM_TRAITS_(cl_device_info, CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV, cl_bool) -#endif -#ifdef CL_DEVICE_INTEGRATED_MEMORY_NV -CL_HPP_DECLARE_PARAM_TRAITS_(cl_device_info, CL_DEVICE_INTEGRATED_MEMORY_NV, cl_bool) -#endif - -// Convenience functions - -template -inline cl_int -getInfo(Func f, cl_uint name, T* param) -{ - return getInfoHelper(f, name, param, 0); -} - -template -struct GetInfoFunctor0 -{ - Func f_; const Arg0& arg0_; - cl_int operator ()( - cl_uint param, size_type size, void* value, size_type* size_ret) - { return f_(arg0_, param, size, value, size_ret); } -}; - -template -struct GetInfoFunctor1 -{ - Func f_; const Arg0& arg0_; const Arg1& arg1_; - cl_int operator ()( - cl_uint param, size_type size, void* value, size_type* size_ret) - { return f_(arg0_, arg1_, param, size, value, size_ret); } -}; - -template -inline cl_int -getInfo(Func f, const Arg0& arg0, cl_uint name, T* param) -{ - GetInfoFunctor0 f0 = { f, arg0 }; - return getInfoHelper(f0, name, param, 0); -} - -template -inline cl_int -getInfo(Func f, const Arg0& arg0, const Arg1& arg1, cl_uint name, T* param) -{ - GetInfoFunctor1 f0 = { f, arg0, arg1 }; - return getInfoHelper(f0, name, param, 0); -} - - -template -struct ReferenceHandler -{ }; - -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 -/** - * OpenCL 1.2 devices do have retain/release. - */ -template <> -struct ReferenceHandler -{ - /** - * Retain the device. - * \param device A valid device created using createSubDevices - * \return - * CL_SUCCESS if the function executed successfully. - * CL_INVALID_DEVICE if device was not a valid subdevice - * CL_OUT_OF_RESOURCES - * CL_OUT_OF_HOST_MEMORY - */ - static cl_int retain(cl_device_id device) - { return ::clRetainDevice(device); } - /** - * Retain the device. - * \param device A valid device created using createSubDevices - * \return - * CL_SUCCESS if the function executed successfully. - * CL_INVALID_DEVICE if device was not a valid subdevice - * CL_OUT_OF_RESOURCES - * CL_OUT_OF_HOST_MEMORY - */ - static cl_int release(cl_device_id device) - { return ::clReleaseDevice(device); } -}; -#else // CL_HPP_TARGET_OPENCL_VERSION >= 120 -/** - * OpenCL 1.1 devices do not have retain/release. - */ -template <> -struct ReferenceHandler -{ - // cl_device_id does not have retain(). - static cl_int retain(cl_device_id) - { return CL_SUCCESS; } - // cl_device_id does not have release(). - static cl_int release(cl_device_id) - { return CL_SUCCESS; } -}; -#endif // ! (CL_HPP_TARGET_OPENCL_VERSION >= 120) - -template <> -struct ReferenceHandler -{ - // cl_platform_id does not have retain(). - static cl_int retain(cl_platform_id) - { return CL_SUCCESS; } - // cl_platform_id does not have release(). - static cl_int release(cl_platform_id) - { return CL_SUCCESS; } -}; - -template <> -struct ReferenceHandler -{ - static cl_int retain(cl_context context) - { return ::clRetainContext(context); } - static cl_int release(cl_context context) - { return ::clReleaseContext(context); } -}; - -template <> -struct ReferenceHandler -{ - static cl_int retain(cl_command_queue queue) - { return ::clRetainCommandQueue(queue); } - static cl_int release(cl_command_queue queue) - { return ::clReleaseCommandQueue(queue); } -}; - -template <> -struct ReferenceHandler -{ - static cl_int retain(cl_mem memory) - { return ::clRetainMemObject(memory); } - static cl_int release(cl_mem memory) - { return ::clReleaseMemObject(memory); } -}; - -template <> -struct ReferenceHandler -{ - static cl_int retain(cl_sampler sampler) - { return ::clRetainSampler(sampler); } - static cl_int release(cl_sampler sampler) - { return ::clReleaseSampler(sampler); } -}; - -template <> -struct ReferenceHandler -{ - static cl_int retain(cl_program program) - { return ::clRetainProgram(program); } - static cl_int release(cl_program program) - { return ::clReleaseProgram(program); } -}; - -template <> -struct ReferenceHandler -{ - static cl_int retain(cl_kernel kernel) - { return ::clRetainKernel(kernel); } - static cl_int release(cl_kernel kernel) - { return ::clReleaseKernel(kernel); } -}; - -template <> -struct ReferenceHandler -{ - static cl_int retain(cl_event event) - { return ::clRetainEvent(event); } - static cl_int release(cl_event event) - { return ::clReleaseEvent(event); } -}; - - -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 && CL_HPP_MINIMUM_OPENCL_VERSION < 120 -// Extracts version number with major in the upper 16 bits, minor in the lower 16 -static cl_uint getVersion(const vector &versionInfo) -{ - int highVersion = 0; - int lowVersion = 0; - int index = 7; - while(versionInfo[index] != '.' ) { - highVersion *= 10; - highVersion += versionInfo[index]-'0'; - ++index; - } - ++index; - while(versionInfo[index] != ' ' && versionInfo[index] != '\0') { - lowVersion *= 10; - lowVersion += versionInfo[index]-'0'; - ++index; - } - return (highVersion << 16) | lowVersion; -} - -static cl_uint getPlatformVersion(cl_platform_id platform) -{ - size_type size = 0; - clGetPlatformInfo(platform, CL_PLATFORM_VERSION, 0, NULL, &size); - - vector versionInfo(size); - clGetPlatformInfo(platform, CL_PLATFORM_VERSION, size, versionInfo.data(), &size); - return getVersion(versionInfo); -} - -static cl_uint getDevicePlatformVersion(cl_device_id device) -{ - cl_platform_id platform; - clGetDeviceInfo(device, CL_DEVICE_PLATFORM, sizeof(platform), &platform, NULL); - return getPlatformVersion(platform); -} - -static cl_uint getContextPlatformVersion(cl_context context) -{ - // The platform cannot be queried directly, so we first have to grab a - // device and obtain its context - size_type size = 0; - clGetContextInfo(context, CL_CONTEXT_DEVICES, 0, NULL, &size); - if (size == 0) - return 0; - vector devices(size/sizeof(cl_device_id)); - clGetContextInfo(context, CL_CONTEXT_DEVICES, size, devices.data(), NULL); - return getDevicePlatformVersion(devices[0]); -} -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 120 && CL_HPP_MINIMUM_OPENCL_VERSION < 120 - -template -class Wrapper -{ -public: - typedef T cl_type; - -protected: - cl_type object_; - -public: - Wrapper() : object_(NULL) { } - - Wrapper(const cl_type &obj, bool retainObject) : object_(obj) - { - if (retainObject) { - detail::errHandler(retain(), __RETAIN_ERR); - } - } - - ~Wrapper() - { - if (object_ != NULL) { release(); } - } - - Wrapper(const Wrapper& rhs) - { - object_ = rhs.object_; - detail::errHandler(retain(), __RETAIN_ERR); - } - - Wrapper(Wrapper&& rhs) CL_HPP_NOEXCEPT_ - { - object_ = rhs.object_; - rhs.object_ = NULL; - } - - Wrapper& operator = (const Wrapper& rhs) - { - if (this != &rhs) { - detail::errHandler(release(), __RELEASE_ERR); - object_ = rhs.object_; - detail::errHandler(retain(), __RETAIN_ERR); - } - return *this; - } - - Wrapper& operator = (Wrapper&& rhs) - { - if (this != &rhs) { - detail::errHandler(release(), __RELEASE_ERR); - object_ = rhs.object_; - rhs.object_ = NULL; - } - return *this; - } - - Wrapper& operator = (const cl_type &rhs) - { - detail::errHandler(release(), __RELEASE_ERR); - object_ = rhs; - return *this; - } - - const cl_type& operator ()() const { return object_; } - - cl_type& operator ()() { return object_; } - - const cl_type get() const { return object_; } - - cl_type get() { return object_; } - - -protected: - template - friend inline cl_int getInfoHelper(Func, cl_uint, U*, int, typename U::cl_type); - - cl_int retain() const - { - if (object_ != nullptr) { - return ReferenceHandler::retain(object_); - } - else { - return CL_SUCCESS; - } - } - - cl_int release() const - { - if (object_ != nullptr) { - return ReferenceHandler::release(object_); - } - else { - return CL_SUCCESS; - } - } -}; - -template <> -class Wrapper -{ -public: - typedef cl_device_id cl_type; - -protected: - cl_type object_; - bool referenceCountable_; - - static bool isReferenceCountable(cl_device_id device) - { - bool retVal = false; -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 -#if CL_HPP_MINIMUM_OPENCL_VERSION < 120 - if (device != NULL) { - int version = getDevicePlatformVersion(device); - if(version > ((1 << 16) + 1)) { - retVal = true; - } - } -#else // CL_HPP_MINIMUM_OPENCL_VERSION < 120 - retVal = true; -#endif // CL_HPP_MINIMUM_OPENCL_VERSION < 120 -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 120 - return retVal; - } - -public: - Wrapper() : object_(NULL), referenceCountable_(false) - { - } - - Wrapper(const cl_type &obj, bool retainObject) : - object_(obj), - referenceCountable_(false) - { - referenceCountable_ = isReferenceCountable(obj); - - if (retainObject) { - detail::errHandler(retain(), __RETAIN_ERR); - } - } - - ~Wrapper() - { - release(); - } - - Wrapper(const Wrapper& rhs) - { - object_ = rhs.object_; - referenceCountable_ = isReferenceCountable(object_); - detail::errHandler(retain(), __RETAIN_ERR); - } - - Wrapper(Wrapper&& rhs) CL_HPP_NOEXCEPT_ - { - object_ = rhs.object_; - referenceCountable_ = rhs.referenceCountable_; - rhs.object_ = NULL; - rhs.referenceCountable_ = false; - } - - Wrapper& operator = (const Wrapper& rhs) - { - if (this != &rhs) { - detail::errHandler(release(), __RELEASE_ERR); - object_ = rhs.object_; - referenceCountable_ = rhs.referenceCountable_; - detail::errHandler(retain(), __RETAIN_ERR); - } - return *this; - } - - Wrapper& operator = (Wrapper&& rhs) - { - if (this != &rhs) { - detail::errHandler(release(), __RELEASE_ERR); - object_ = rhs.object_; - referenceCountable_ = rhs.referenceCountable_; - rhs.object_ = NULL; - rhs.referenceCountable_ = false; - } - return *this; - } - - Wrapper& operator = (const cl_type &rhs) - { - detail::errHandler(release(), __RELEASE_ERR); - object_ = rhs; - referenceCountable_ = isReferenceCountable(object_); - return *this; - } - - const cl_type& operator ()() const { return object_; } - - cl_type& operator ()() { return object_; } - - const cl_type get() const { return object_; } - - cl_type get() { return object_; } - -protected: - template - friend inline cl_int getInfoHelper(Func, cl_uint, U*, int, typename U::cl_type); - - template - friend inline cl_int getInfoHelper(Func, cl_uint, vector*, int, typename U::cl_type); - - cl_int retain() const - { - if( object_ != nullptr && referenceCountable_ ) { - return ReferenceHandler::retain(object_); - } - else { - return CL_SUCCESS; - } - } - - cl_int release() const - { - if (object_ != nullptr && referenceCountable_) { - return ReferenceHandler::release(object_); - } - else { - return CL_SUCCESS; - } - } -}; - -template -inline bool operator==(const Wrapper &lhs, const Wrapper &rhs) -{ - return lhs() == rhs(); -} - -template -inline bool operator!=(const Wrapper &lhs, const Wrapper &rhs) -{ - return !operator==(lhs, rhs); -} - -} // namespace detail -//! \endcond - - -using BuildLogType = vector::param_type>>; -#if defined(CL_HPP_ENABLE_EXCEPTIONS) -/** -* Exception class for build errors to carry build info -*/ -class BuildError : public Error -{ -private: - BuildLogType buildLogs; -public: - BuildError(cl_int err, const char * errStr, const BuildLogType &vec) : Error(err, errStr), buildLogs(vec) - { - } - - BuildLogType getBuildLog() const - { - return buildLogs; - } -}; -namespace detail { - static inline cl_int buildErrHandler( - cl_int err, - const char * errStr, - const BuildLogType &buildLogs) - { - if (err != CL_SUCCESS) { - throw BuildError(err, errStr, buildLogs); - } - return err; - } -} // namespace detail - -#else -namespace detail { - static inline cl_int buildErrHandler( - cl_int err, - const char * errStr, - const BuildLogType &buildLogs) - { - (void)buildLogs; // suppress unused variable warning - (void)errStr; - return err; - } -} // namespace detail -#endif // #if defined(CL_HPP_ENABLE_EXCEPTIONS) - - -/*! \stuct ImageFormat - * \brief Adds constructors and member functions for cl_image_format. - * - * \see cl_image_format - */ -struct ImageFormat : public cl_image_format -{ - //! \brief Default constructor - performs no initialization. - ImageFormat(){} - - //! \brief Initializing constructor. - ImageFormat(cl_channel_order order, cl_channel_type type) - { - image_channel_order = order; - image_channel_data_type = type; - } - - //! \brief Assignment operator. - ImageFormat& operator = (const ImageFormat& rhs) - { - if (this != &rhs) { - this->image_channel_data_type = rhs.image_channel_data_type; - this->image_channel_order = rhs.image_channel_order; - } - return *this; - } -}; - -/*! \brief Class interface for cl_device_id. - * - * \note Copies of these objects are inexpensive, since they don't 'own' - * any underlying resources or data structures. - * - * \see cl_device_id - */ -class Device : public detail::Wrapper -{ -private: - static std::once_flag default_initialized_; - static Device default_; - static cl_int default_error_; - - /*! \brief Create the default context. - * - * This sets @c default_ and @c default_error_. It does not throw - * @c cl::Error. - */ - static void makeDefault(); - - /*! \brief Create the default platform from a provided platform. - * - * This sets @c default_. It does not throw - * @c cl::Error. - */ - static void makeDefaultProvided(const Device &p) { - default_ = p; - } - -public: -#ifdef CL_HPP_UNIT_TEST_ENABLE - /*! \brief Reset the default. - * - * This sets @c default_ to an empty value to support cleanup in - * the unit test framework. - * This function is not thread safe. - */ - static void unitTestClearDefault() { - default_ = Device(); - } -#endif // #ifdef CL_HPP_UNIT_TEST_ENABLE - - //! \brief Default constructor - initializes to NULL. - Device() : detail::Wrapper() { } - - /*! \brief Constructor from cl_device_id. - * - * This simply copies the device ID value, which is an inexpensive operation. - */ - explicit Device(const cl_device_id &device, bool retainObject = false) : - detail::Wrapper(device, retainObject) { } - - /*! \brief Returns the first device on the default context. - * - * \see Context::getDefault() - */ - static Device getDefault( - cl_int *errResult = NULL) - { - std::call_once(default_initialized_, makeDefault); - detail::errHandler(default_error_); - if (errResult != NULL) { - *errResult = default_error_; - } - return default_; - } - - /** - * Modify the default device to be used by - * subsequent operations. - * Will only set the default if no default was previously created. - * @return updated default device. - * Should be compared to the passed value to ensure that it was updated. - */ - static Device setDefault(const Device &default_device) - { - std::call_once(default_initialized_, makeDefaultProvided, std::cref(default_device)); - detail::errHandler(default_error_); - return default_; - } - - /*! \brief Assignment operator from cl_device_id. - * - * This simply copies the device ID value, which is an inexpensive operation. - */ - Device& operator = (const cl_device_id& rhs) - { - detail::Wrapper::operator=(rhs); - return *this; - } - - /*! \brief Copy constructor to forward copy to the superclass correctly. - * Required for MSVC. - */ - Device(const Device& dev) : detail::Wrapper(dev) {} - - /*! \brief Copy assignment to forward copy to the superclass correctly. - * Required for MSVC. - */ - Device& operator = (const Device &dev) - { - detail::Wrapper::operator=(dev); - return *this; - } - - /*! \brief Move constructor to forward move to the superclass correctly. - * Required for MSVC. - */ - Device(Device&& dev) CL_HPP_NOEXCEPT_ : detail::Wrapper(std::move(dev)) {} - - /*! \brief Move assignment to forward move to the superclass correctly. - * Required for MSVC. - */ - Device& operator = (Device &&dev) - { - detail::Wrapper::operator=(std::move(dev)); - return *this; - } - - //! \brief Wrapper for clGetDeviceInfo(). - template - cl_int getInfo(cl_device_info name, T* param) const - { - return detail::errHandler( - detail::getInfo(&::clGetDeviceInfo, object_, name, param), - __GET_DEVICE_INFO_ERR); - } - - //! \brief Wrapper for clGetDeviceInfo() that returns by value. - template typename - detail::param_traits::param_type - getInfo(cl_int* err = NULL) const - { - typename detail::param_traits< - detail::cl_device_info, name>::param_type param; - cl_int result = getInfo(name, ¶m); - if (err != NULL) { - *err = result; - } - return param; - } - - /** - * CL 1.2 version - */ -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 - //! \brief Wrapper for clCreateSubDevices(). - cl_int createSubDevices( - const cl_device_partition_property * properties, - vector* devices) - { - cl_uint n = 0; - cl_int err = clCreateSubDevices(object_, properties, 0, NULL, &n); - if (err != CL_SUCCESS) { - return detail::errHandler(err, __CREATE_SUB_DEVICES_ERR); - } - - vector ids(n); - err = clCreateSubDevices(object_, properties, n, ids.data(), NULL); - if (err != CL_SUCCESS) { - return detail::errHandler(err, __CREATE_SUB_DEVICES_ERR); - } - - // Cannot trivially assign because we need to capture intermediates - // with safe construction - if (devices) { - devices->resize(ids.size()); - - // Assign to param, constructing with retain behaviour - // to correctly capture each underlying CL object - for (size_type i = 0; i < ids.size(); i++) { - // We do not need to retain because this device is being created - // by the runtime - (*devices)[i] = Device(ids[i], false); - } - } - - return CL_SUCCESS; - } -#elif defined(CL_HPP_USE_CL_DEVICE_FISSION) - -/** - * CL 1.1 version that uses device fission extension. - */ - cl_int createSubDevices( - const cl_device_partition_property_ext * properties, - vector* devices) - { - typedef CL_API_ENTRY cl_int - ( CL_API_CALL * PFN_clCreateSubDevicesEXT)( - cl_device_id /*in_device*/, - const cl_device_partition_property_ext * /* properties */, - cl_uint /*num_entries*/, - cl_device_id * /*out_devices*/, - cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1; - - static PFN_clCreateSubDevicesEXT pfn_clCreateSubDevicesEXT = NULL; - CL_HPP_INIT_CL_EXT_FCN_PTR_(clCreateSubDevicesEXT); - - cl_uint n = 0; - cl_int err = pfn_clCreateSubDevicesEXT(object_, properties, 0, NULL, &n); - if (err != CL_SUCCESS) { - return detail::errHandler(err, __CREATE_SUB_DEVICES_ERR); - } - - vector ids(n); - err = pfn_clCreateSubDevicesEXT(object_, properties, n, ids.data(), NULL); - if (err != CL_SUCCESS) { - return detail::errHandler(err, __CREATE_SUB_DEVICES_ERR); - } - // Cannot trivially assign because we need to capture intermediates - // with safe construction - if (devices) { - devices->resize(ids.size()); - - // Assign to param, constructing with retain behaviour - // to correctly capture each underlying CL object - for (size_type i = 0; i < ids.size(); i++) { - // We do not need to retain because this device is being created - // by the runtime - (*devices)[i] = Device(ids[i], false); - } - } - return CL_SUCCESS; - } -#endif // defined(CL_HPP_USE_CL_DEVICE_FISSION) -}; - -CL_HPP_DEFINE_STATIC_MEMBER_ std::once_flag Device::default_initialized_; -CL_HPP_DEFINE_STATIC_MEMBER_ Device Device::default_; -CL_HPP_DEFINE_STATIC_MEMBER_ cl_int Device::default_error_ = CL_SUCCESS; - -/*! \brief Class interface for cl_platform_id. - * - * \note Copies of these objects are inexpensive, since they don't 'own' - * any underlying resources or data structures. - * - * \see cl_platform_id - */ -class Platform : public detail::Wrapper -{ -private: - static std::once_flag default_initialized_; - static Platform default_; - static cl_int default_error_; - - /*! \brief Create the default context. - * - * This sets @c default_ and @c default_error_. It does not throw - * @c cl::Error. - */ - static void makeDefault() { - /* Throwing an exception from a call_once invocation does not do - * what we wish, so we catch it and save the error. - */ -#if defined(CL_HPP_ENABLE_EXCEPTIONS) - try -#endif - { - // If default wasn't passed ,generate one - // Otherwise set it - cl_uint n = 0; - - cl_int err = ::clGetPlatformIDs(0, NULL, &n); - if (err != CL_SUCCESS) { - default_error_ = err; - return; - } - if (n == 0) { - default_error_ = CL_INVALID_PLATFORM; - return; - } - - vector ids(n); - err = ::clGetPlatformIDs(n, ids.data(), NULL); - if (err != CL_SUCCESS) { - default_error_ = err; - return; - } - - default_ = Platform(ids[0]); - } -#if defined(CL_HPP_ENABLE_EXCEPTIONS) - catch (cl::Error &e) { - default_error_ = e.err(); - } -#endif - } - - /*! \brief Create the default platform from a provided platform. - * - * This sets @c default_. It does not throw - * @c cl::Error. - */ - static void makeDefaultProvided(const Platform &p) { - default_ = p; - } - -public: -#ifdef CL_HPP_UNIT_TEST_ENABLE - /*! \brief Reset the default. - * - * This sets @c default_ to an empty value to support cleanup in - * the unit test framework. - * This function is not thread safe. - */ - static void unitTestClearDefault() { - default_ = Platform(); - } -#endif // #ifdef CL_HPP_UNIT_TEST_ENABLE - - //! \brief Default constructor - initializes to NULL. - Platform() : detail::Wrapper() { } - - /*! \brief Constructor from cl_platform_id. - * - * \param retainObject will cause the constructor to retain its cl object. - * Defaults to false to maintain compatibility with - * earlier versions. - * This simply copies the platform ID value, which is an inexpensive operation. - */ - explicit Platform(const cl_platform_id &platform, bool retainObject = false) : - detail::Wrapper(platform, retainObject) { } - - /*! \brief Assignment operator from cl_platform_id. - * - * This simply copies the platform ID value, which is an inexpensive operation. - */ - Platform& operator = (const cl_platform_id& rhs) - { - detail::Wrapper::operator=(rhs); - return *this; - } - - static Platform getDefault( - cl_int *errResult = NULL) - { - std::call_once(default_initialized_, makeDefault); - detail::errHandler(default_error_); - if (errResult != NULL) { - *errResult = default_error_; - } - return default_; - } - - /** - * Modify the default platform to be used by - * subsequent operations. - * Will only set the default if no default was previously created. - * @return updated default platform. - * Should be compared to the passed value to ensure that it was updated. - */ - static Platform setDefault(const Platform &default_platform) - { - std::call_once(default_initialized_, makeDefaultProvided, std::cref(default_platform)); - detail::errHandler(default_error_); - return default_; - } - - //! \brief Wrapper for clGetPlatformInfo(). - cl_int getInfo(cl_platform_info name, string* param) const - { - return detail::errHandler( - detail::getInfo(&::clGetPlatformInfo, object_, name, param), - __GET_PLATFORM_INFO_ERR); - } - - //! \brief Wrapper for clGetPlatformInfo() that returns by value. - template typename - detail::param_traits::param_type - getInfo(cl_int* err = NULL) const - { - typename detail::param_traits< - detail::cl_platform_info, name>::param_type param; - cl_int result = getInfo(name, ¶m); - if (err != NULL) { - *err = result; - } - return param; - } - - /*! \brief Gets a list of devices for this platform. - * - * Wraps clGetDeviceIDs(). - */ - cl_int getDevices( - cl_device_type type, - vector* devices) const - { - cl_uint n = 0; - if( devices == NULL ) { - return detail::errHandler(CL_INVALID_ARG_VALUE, __GET_DEVICE_IDS_ERR); - } - cl_int err = ::clGetDeviceIDs(object_, type, 0, NULL, &n); - if (err != CL_SUCCESS) { - return detail::errHandler(err, __GET_DEVICE_IDS_ERR); - } - - vector ids(n); - err = ::clGetDeviceIDs(object_, type, n, ids.data(), NULL); - if (err != CL_SUCCESS) { - return detail::errHandler(err, __GET_DEVICE_IDS_ERR); - } - - // Cannot trivially assign because we need to capture intermediates - // with safe construction - // We must retain things we obtain from the API to avoid releasing - // API-owned objects. - if (devices) { - devices->resize(ids.size()); - - // Assign to param, constructing with retain behaviour - // to correctly capture each underlying CL object - for (size_type i = 0; i < ids.size(); i++) { - (*devices)[i] = Device(ids[i], true); - } - } - return CL_SUCCESS; - } - -#if defined(CL_HPP_USE_DX_INTEROP) - /*! \brief Get the list of available D3D10 devices. - * - * \param d3d_device_source. - * - * \param d3d_object. - * - * \param d3d_device_set. - * - * \param devices returns a vector of OpenCL D3D10 devices found. The cl::Device - * values returned in devices can be used to identify a specific OpenCL - * device. If \a devices argument is NULL, this argument is ignored. - * - * \return One of the following values: - * - CL_SUCCESS if the function is executed successfully. - * - * The application can query specific capabilities of the OpenCL device(s) - * returned by cl::getDevices. This can be used by the application to - * determine which device(s) to use. - * - * \note In the case that exceptions are enabled and a return value - * other than CL_SUCCESS is generated, then cl::Error exception is - * generated. - */ - cl_int getDevices( - cl_d3d10_device_source_khr d3d_device_source, - void * d3d_object, - cl_d3d10_device_set_khr d3d_device_set, - vector* devices) const - { - typedef CL_API_ENTRY cl_int (CL_API_CALL *PFN_clGetDeviceIDsFromD3D10KHR)( - cl_platform_id platform, - cl_d3d10_device_source_khr d3d_device_source, - void * d3d_object, - cl_d3d10_device_set_khr d3d_device_set, - cl_uint num_entries, - cl_device_id * devices, - cl_uint* num_devices); - - if( devices == NULL ) { - return detail::errHandler(CL_INVALID_ARG_VALUE, __GET_DEVICE_IDS_ERR); - } - - static PFN_clGetDeviceIDsFromD3D10KHR pfn_clGetDeviceIDsFromD3D10KHR = NULL; - CL_HPP_INIT_CL_EXT_FCN_PTR_PLATFORM_(object_, clGetDeviceIDsFromD3D10KHR); - - cl_uint n = 0; - cl_int err = pfn_clGetDeviceIDsFromD3D10KHR( - object_, - d3d_device_source, - d3d_object, - d3d_device_set, - 0, - NULL, - &n); - if (err != CL_SUCCESS) { - return detail::errHandler(err, __GET_DEVICE_IDS_ERR); - } - - vector ids(n); - err = pfn_clGetDeviceIDsFromD3D10KHR( - object_, - d3d_device_source, - d3d_object, - d3d_device_set, - n, - ids.data(), - NULL); - if (err != CL_SUCCESS) { - return detail::errHandler(err, __GET_DEVICE_IDS_ERR); - } - - // Cannot trivially assign because we need to capture intermediates - // with safe construction - // We must retain things we obtain from the API to avoid releasing - // API-owned objects. - if (devices) { - devices->resize(ids.size()); - - // Assign to param, constructing with retain behaviour - // to correctly capture each underlying CL object - for (size_type i = 0; i < ids.size(); i++) { - (*devices)[i] = Device(ids[i], true); - } - } - return CL_SUCCESS; - } -#endif - - /*! \brief Gets a list of available platforms. - * - * Wraps clGetPlatformIDs(). - */ - static cl_int get( - vector* platforms) - { - cl_uint n = 0; - - if( platforms == NULL ) { - return detail::errHandler(CL_INVALID_ARG_VALUE, __GET_PLATFORM_IDS_ERR); - } - - cl_int err = ::clGetPlatformIDs(0, NULL, &n); - if (err != CL_SUCCESS) { - return detail::errHandler(err, __GET_PLATFORM_IDS_ERR); - } - - vector ids(n); - err = ::clGetPlatformIDs(n, ids.data(), NULL); - if (err != CL_SUCCESS) { - return detail::errHandler(err, __GET_PLATFORM_IDS_ERR); - } - - if (platforms) { - platforms->resize(ids.size()); - - // Platforms don't reference count - for (size_type i = 0; i < ids.size(); i++) { - (*platforms)[i] = Platform(ids[i]); - } - } - return CL_SUCCESS; - } - - /*! \brief Gets the first available platform. - * - * Wraps clGetPlatformIDs(), returning the first result. - */ - static cl_int get( - Platform * platform) - { - cl_int err; - Platform default_platform = Platform::getDefault(&err); - if (platform) { - *platform = default_platform; - } - return err; - } - - /*! \brief Gets the first available platform, returning it by value. - * - * \return Returns a valid platform if one is available. - * If no platform is available will return a null platform. - * Throws an exception if no platforms are available - * or an error condition occurs. - * Wraps clGetPlatformIDs(), returning the first result. - */ - static Platform get( - cl_int * errResult = NULL) - { - cl_int err; - Platform default_platform = Platform::getDefault(&err); - if (errResult) { - *errResult = err; - } - return default_platform; - } - -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 - //! \brief Wrapper for clUnloadCompiler(). - cl_int - unloadCompiler() - { - return ::clUnloadPlatformCompiler(object_); - } -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 120 -}; // class Platform - -CL_HPP_DEFINE_STATIC_MEMBER_ std::once_flag Platform::default_initialized_; -CL_HPP_DEFINE_STATIC_MEMBER_ Platform Platform::default_; -CL_HPP_DEFINE_STATIC_MEMBER_ cl_int Platform::default_error_ = CL_SUCCESS; - - -/** - * Deprecated APIs for 1.2 - */ -#if defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) -/** - * Unload the OpenCL compiler. - * \note Deprecated for OpenCL 1.2. Use Platform::unloadCompiler instead. - */ -inline CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int -UnloadCompiler() CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; -inline cl_int -UnloadCompiler() -{ - return ::clUnloadCompiler(); -} -#endif // #if defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) - -/*! \brief Class interface for cl_context. - * - * \note Copies of these objects are shallow, meaning that the copy will refer - * to the same underlying cl_context as the original. For details, see - * clRetainContext() and clReleaseContext(). - * - * \see cl_context - */ -class Context - : public detail::Wrapper -{ -private: - static std::once_flag default_initialized_; - static Context default_; - static cl_int default_error_; - - /*! \brief Create the default context from the default device type in the default platform. - * - * This sets @c default_ and @c default_error_. It does not throw - * @c cl::Error. - */ - static void makeDefault() { - /* Throwing an exception from a call_once invocation does not do - * what we wish, so we catch it and save the error. - */ -#if defined(CL_HPP_ENABLE_EXCEPTIONS) - try -#endif - { -#if !defined(__APPLE__) && !defined(__MACOS) - const Platform &p = Platform::getDefault(); - cl_platform_id defaultPlatform = p(); - cl_context_properties properties[3] = { - CL_CONTEXT_PLATFORM, (cl_context_properties)defaultPlatform, 0 - }; -#else // #if !defined(__APPLE__) && !defined(__MACOS) - cl_context_properties *properties = nullptr; -#endif // #if !defined(__APPLE__) && !defined(__MACOS) - - default_ = Context( - CL_DEVICE_TYPE_DEFAULT, - properties, - NULL, - NULL, - &default_error_); - } -#if defined(CL_HPP_ENABLE_EXCEPTIONS) - catch (cl::Error &e) { - default_error_ = e.err(); - } -#endif - } - - - /*! \brief Create the default context from a provided Context. - * - * This sets @c default_. It does not throw - * @c cl::Error. - */ - static void makeDefaultProvided(const Context &c) { - default_ = c; - } - -public: -#ifdef CL_HPP_UNIT_TEST_ENABLE - /*! \brief Reset the default. - * - * This sets @c default_ to an empty value to support cleanup in - * the unit test framework. - * This function is not thread safe. - */ - static void unitTestClearDefault() { - default_ = Context(); - } -#endif // #ifdef CL_HPP_UNIT_TEST_ENABLE - - /*! \brief Constructs a context including a list of specified devices. - * - * Wraps clCreateContext(). - */ - Context( - const vector& devices, - cl_context_properties* properties = NULL, - void (CL_CALLBACK * notifyFptr)( - const char *, - const void *, - size_type, - void *) = NULL, - void* data = NULL, - cl_int* err = NULL) - { - cl_int error; - - size_type numDevices = devices.size(); - vector deviceIDs(numDevices); - - for( size_type deviceIndex = 0; deviceIndex < numDevices; ++deviceIndex ) { - deviceIDs[deviceIndex] = (devices[deviceIndex])(); - } - - object_ = ::clCreateContext( - properties, (cl_uint) numDevices, - deviceIDs.data(), - notifyFptr, data, &error); - - detail::errHandler(error, __CREATE_CONTEXT_ERR); - if (err != NULL) { - *err = error; - } - } - - Context( - const Device& device, - cl_context_properties* properties = NULL, - void (CL_CALLBACK * notifyFptr)( - const char *, - const void *, - size_type, - void *) = NULL, - void* data = NULL, - cl_int* err = NULL) - { - cl_int error; - - cl_device_id deviceID = device(); - - object_ = ::clCreateContext( - properties, 1, - &deviceID, - notifyFptr, data, &error); - - detail::errHandler(error, __CREATE_CONTEXT_ERR); - if (err != NULL) { - *err = error; - } - } - - /*! \brief Constructs a context including all or a subset of devices of a specified type. - * - * Wraps clCreateContextFromType(). - */ - Context( - cl_device_type type, - cl_context_properties* properties = NULL, - void (CL_CALLBACK * notifyFptr)( - const char *, - const void *, - size_type, - void *) = NULL, - void* data = NULL, - cl_int* err = NULL) - { - cl_int error; - -#if !defined(__APPLE__) && !defined(__MACOS) - cl_context_properties prop[4] = {CL_CONTEXT_PLATFORM, 0, 0, 0 }; - - if (properties == NULL) { - // Get a valid platform ID as we cannot send in a blank one - vector platforms; - error = Platform::get(&platforms); - if (error != CL_SUCCESS) { - detail::errHandler(error, __CREATE_CONTEXT_FROM_TYPE_ERR); - if (err != NULL) { - *err = error; - } - return; - } - - // Check the platforms we found for a device of our specified type - cl_context_properties platform_id = 0; - for (unsigned int i = 0; i < platforms.size(); i++) { - - vector devices; - -#if defined(CL_HPP_ENABLE_EXCEPTIONS) - try { -#endif - - error = platforms[i].getDevices(type, &devices); - -#if defined(CL_HPP_ENABLE_EXCEPTIONS) - } catch (Error) {} - // Catch if exceptions are enabled as we don't want to exit if first platform has no devices of type - // We do error checking next anyway, and can throw there if needed -#endif - - // Only squash CL_SUCCESS and CL_DEVICE_NOT_FOUND - if (error != CL_SUCCESS && error != CL_DEVICE_NOT_FOUND) { - detail::errHandler(error, __CREATE_CONTEXT_FROM_TYPE_ERR); - if (err != NULL) { - *err = error; - } - } - - if (devices.size() > 0) { - platform_id = (cl_context_properties)platforms[i](); - break; - } - } - - if (platform_id == 0) { - detail::errHandler(CL_DEVICE_NOT_FOUND, __CREATE_CONTEXT_FROM_TYPE_ERR); - if (err != NULL) { - *err = CL_DEVICE_NOT_FOUND; - } - return; - } - - prop[1] = platform_id; - properties = &prop[0]; - } -#endif - object_ = ::clCreateContextFromType( - properties, type, notifyFptr, data, &error); - - detail::errHandler(error, __CREATE_CONTEXT_FROM_TYPE_ERR); - if (err != NULL) { - *err = error; - } - } - - /*! \brief Copy constructor to forward copy to the superclass correctly. - * Required for MSVC. - */ - Context(const Context& ctx) : detail::Wrapper(ctx) {} - - /*! \brief Copy assignment to forward copy to the superclass correctly. - * Required for MSVC. - */ - Context& operator = (const Context &ctx) - { - detail::Wrapper::operator=(ctx); - return *this; - } - - /*! \brief Move constructor to forward move to the superclass correctly. - * Required for MSVC. - */ - Context(Context&& ctx) CL_HPP_NOEXCEPT_ : detail::Wrapper(std::move(ctx)) {} - - /*! \brief Move assignment to forward move to the superclass correctly. - * Required for MSVC. - */ - Context& operator = (Context &&ctx) - { - detail::Wrapper::operator=(std::move(ctx)); - return *this; - } - - - /*! \brief Returns a singleton context including all devices of CL_DEVICE_TYPE_DEFAULT. - * - * \note All calls to this function return the same cl_context as the first. - */ - static Context getDefault(cl_int * err = NULL) - { - std::call_once(default_initialized_, makeDefault); - detail::errHandler(default_error_); - if (err != NULL) { - *err = default_error_; - } - return default_; - } - - /** - * Modify the default context to be used by - * subsequent operations. - * Will only set the default if no default was previously created. - * @return updated default context. - * Should be compared to the passed value to ensure that it was updated. - */ - static Context setDefault(const Context &default_context) - { - std::call_once(default_initialized_, makeDefaultProvided, std::cref(default_context)); - detail::errHandler(default_error_); - return default_; - } - - //! \brief Default constructor - initializes to NULL. - Context() : detail::Wrapper() { } - - /*! \brief Constructor from cl_context - takes ownership. - * - * This effectively transfers ownership of a refcount on the cl_context - * into the new Context object. - */ - explicit Context(const cl_context& context, bool retainObject = false) : - detail::Wrapper(context, retainObject) { } - - /*! \brief Assignment operator from cl_context - takes ownership. - * - * This effectively transfers ownership of a refcount on the rhs and calls - * clReleaseContext() on the value previously held by this instance. - */ - Context& operator = (const cl_context& rhs) - { - detail::Wrapper::operator=(rhs); - return *this; - } - - //! \brief Wrapper for clGetContextInfo(). - template - cl_int getInfo(cl_context_info name, T* param) const - { - return detail::errHandler( - detail::getInfo(&::clGetContextInfo, object_, name, param), - __GET_CONTEXT_INFO_ERR); - } - - //! \brief Wrapper for clGetContextInfo() that returns by value. - template typename - detail::param_traits::param_type - getInfo(cl_int* err = NULL) const - { - typename detail::param_traits< - detail::cl_context_info, name>::param_type param; - cl_int result = getInfo(name, ¶m); - if (err != NULL) { - *err = result; - } - return param; - } - - /*! \brief Gets a list of supported image formats. - * - * Wraps clGetSupportedImageFormats(). - */ - cl_int getSupportedImageFormats( - cl_mem_flags flags, - cl_mem_object_type type, - vector* formats) const - { - cl_uint numEntries; - - if (!formats) { - return CL_SUCCESS; - } - - cl_int err = ::clGetSupportedImageFormats( - object_, - flags, - type, - 0, - NULL, - &numEntries); - if (err != CL_SUCCESS) { - return detail::errHandler(err, __GET_SUPPORTED_IMAGE_FORMATS_ERR); - } - - if (numEntries > 0) { - vector value(numEntries); - err = ::clGetSupportedImageFormats( - object_, - flags, - type, - numEntries, - (cl_image_format*)value.data(), - NULL); - if (err != CL_SUCCESS) { - return detail::errHandler(err, __GET_SUPPORTED_IMAGE_FORMATS_ERR); - } - - formats->assign(begin(value), end(value)); - } - else { - // If no values are being returned, ensure an empty vector comes back - formats->clear(); - } - - return CL_SUCCESS; - } -}; - -inline void Device::makeDefault() -{ - /* Throwing an exception from a call_once invocation does not do - * what we wish, so we catch it and save the error. - */ -#if defined(CL_HPP_ENABLE_EXCEPTIONS) - try -#endif - { - cl_int error = 0; - - Context context = Context::getDefault(&error); - detail::errHandler(error, __CREATE_CONTEXT_ERR); - - if (error != CL_SUCCESS) { - default_error_ = error; - } - else { - default_ = context.getInfo()[0]; - default_error_ = CL_SUCCESS; - } - } -#if defined(CL_HPP_ENABLE_EXCEPTIONS) - catch (cl::Error &e) { - default_error_ = e.err(); - } -#endif -} - -CL_HPP_DEFINE_STATIC_MEMBER_ std::once_flag Context::default_initialized_; -CL_HPP_DEFINE_STATIC_MEMBER_ Context Context::default_; -CL_HPP_DEFINE_STATIC_MEMBER_ cl_int Context::default_error_ = CL_SUCCESS; - -/*! \brief Class interface for cl_event. - * - * \note Copies of these objects are shallow, meaning that the copy will refer - * to the same underlying cl_event as the original. For details, see - * clRetainEvent() and clReleaseEvent(). - * - * \see cl_event - */ -class Event : public detail::Wrapper -{ -public: - //! \brief Default constructor - initializes to NULL. - Event() : detail::Wrapper() { } - - /*! \brief Constructor from cl_event - takes ownership. - * - * \param retainObject will cause the constructor to retain its cl object. - * Defaults to false to maintain compatibility with - * earlier versions. - * This effectively transfers ownership of a refcount on the cl_event - * into the new Event object. - */ - explicit Event(const cl_event& event, bool retainObject = false) : - detail::Wrapper(event, retainObject) { } - - /*! \brief Assignment operator from cl_event - takes ownership. - * - * This effectively transfers ownership of a refcount on the rhs and calls - * clReleaseEvent() on the value previously held by this instance. - */ - Event& operator = (const cl_event& rhs) - { - detail::Wrapper::operator=(rhs); - return *this; - } - - //! \brief Wrapper for clGetEventInfo(). - template - cl_int getInfo(cl_event_info name, T* param) const - { - return detail::errHandler( - detail::getInfo(&::clGetEventInfo, object_, name, param), - __GET_EVENT_INFO_ERR); - } - - //! \brief Wrapper for clGetEventInfo() that returns by value. - template typename - detail::param_traits::param_type - getInfo(cl_int* err = NULL) const - { - typename detail::param_traits< - detail::cl_event_info, name>::param_type param; - cl_int result = getInfo(name, ¶m); - if (err != NULL) { - *err = result; - } - return param; - } - - //! \brief Wrapper for clGetEventProfilingInfo(). - template - cl_int getProfilingInfo(cl_profiling_info name, T* param) const - { - return detail::errHandler(detail::getInfo( - &::clGetEventProfilingInfo, object_, name, param), - __GET_EVENT_PROFILE_INFO_ERR); - } - - //! \brief Wrapper for clGetEventProfilingInfo() that returns by value. - template typename - detail::param_traits::param_type - getProfilingInfo(cl_int* err = NULL) const - { - typename detail::param_traits< - detail::cl_profiling_info, name>::param_type param; - cl_int result = getProfilingInfo(name, ¶m); - if (err != NULL) { - *err = result; - } - return param; - } - - /*! \brief Blocks the calling thread until this event completes. - * - * Wraps clWaitForEvents(). - */ - cl_int wait() const - { - return detail::errHandler( - ::clWaitForEvents(1, &object_), - __WAIT_FOR_EVENTS_ERR); - } - -#if CL_HPP_TARGET_OPENCL_VERSION >= 110 - /*! \brief Registers a user callback function for a specific command execution status. - * - * Wraps clSetEventCallback(). - */ - cl_int setCallback( - cl_int type, - void (CL_CALLBACK * pfn_notify)(cl_event, cl_int, void *), - void * user_data = NULL) - { - return detail::errHandler( - ::clSetEventCallback( - object_, - type, - pfn_notify, - user_data), - __SET_EVENT_CALLBACK_ERR); - } -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 110 - - /*! \brief Blocks the calling thread until every event specified is complete. - * - * Wraps clWaitForEvents(). - */ - static cl_int - waitForEvents(const vector& events) - { - return detail::errHandler( - ::clWaitForEvents( - (cl_uint) events.size(), (events.size() > 0) ? (cl_event*)&events.front() : NULL), - __WAIT_FOR_EVENTS_ERR); - } -}; - -#if CL_HPP_TARGET_OPENCL_VERSION >= 110 -/*! \brief Class interface for user events (a subset of cl_event's). - * - * See Event for details about copy semantics, etc. - */ -class UserEvent : public Event -{ -public: - /*! \brief Constructs a user event on a given context. - * - * Wraps clCreateUserEvent(). - */ - UserEvent( - const Context& context, - cl_int * err = NULL) - { - cl_int error; - object_ = ::clCreateUserEvent( - context(), - &error); - - detail::errHandler(error, __CREATE_USER_EVENT_ERR); - if (err != NULL) { - *err = error; - } - } - - //! \brief Default constructor - initializes to NULL. - UserEvent() : Event() { } - - /*! \brief Sets the execution status of a user event object. - * - * Wraps clSetUserEventStatus(). - */ - cl_int setStatus(cl_int status) - { - return detail::errHandler( - ::clSetUserEventStatus(object_,status), - __SET_USER_EVENT_STATUS_ERR); - } -}; -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 110 - -/*! \brief Blocks the calling thread until every event specified is complete. - * - * Wraps clWaitForEvents(). - */ -inline static cl_int -WaitForEvents(const vector& events) -{ - return detail::errHandler( - ::clWaitForEvents( - (cl_uint) events.size(), (events.size() > 0) ? (cl_event*)&events.front() : NULL), - __WAIT_FOR_EVENTS_ERR); -} - -/*! \brief Class interface for cl_mem. - * - * \note Copies of these objects are shallow, meaning that the copy will refer - * to the same underlying cl_mem as the original. For details, see - * clRetainMemObject() and clReleaseMemObject(). - * - * \see cl_mem - */ -class Memory : public detail::Wrapper -{ -public: - //! \brief Default constructor - initializes to NULL. - Memory() : detail::Wrapper() { } - - /*! \brief Constructor from cl_mem - takes ownership. - * - * Optionally transfer ownership of a refcount on the cl_mem - * into the new Memory object. - * - * \param retainObject will cause the constructor to retain its cl object. - * Defaults to false to maintain compatibility with - * earlier versions. - * - * See Memory for further details. - */ - explicit Memory(const cl_mem& memory, bool retainObject) : - detail::Wrapper(memory, retainObject) { } - - /*! \brief Assignment operator from cl_mem - takes ownership. - * - * This effectively transfers ownership of a refcount on the rhs and calls - * clReleaseMemObject() on the value previously held by this instance. - */ - Memory& operator = (const cl_mem& rhs) - { - detail::Wrapper::operator=(rhs); - return *this; - } - - /*! \brief Copy constructor to forward copy to the superclass correctly. - * Required for MSVC. - */ - Memory(const Memory& mem) : detail::Wrapper(mem) {} - - /*! \brief Copy assignment to forward copy to the superclass correctly. - * Required for MSVC. - */ - Memory& operator = (const Memory &mem) - { - detail::Wrapper::operator=(mem); - return *this; - } - - /*! \brief Move constructor to forward move to the superclass correctly. - * Required for MSVC. - */ - Memory(Memory&& mem) CL_HPP_NOEXCEPT_ : detail::Wrapper(std::move(mem)) {} - - /*! \brief Move assignment to forward move to the superclass correctly. - * Required for MSVC. - */ - Memory& operator = (Memory &&mem) - { - detail::Wrapper::operator=(std::move(mem)); - return *this; - } - - - //! \brief Wrapper for clGetMemObjectInfo(). - template - cl_int getInfo(cl_mem_info name, T* param) const - { - return detail::errHandler( - detail::getInfo(&::clGetMemObjectInfo, object_, name, param), - __GET_MEM_OBJECT_INFO_ERR); - } - - //! \brief Wrapper for clGetMemObjectInfo() that returns by value. - template typename - detail::param_traits::param_type - getInfo(cl_int* err = NULL) const - { - typename detail::param_traits< - detail::cl_mem_info, name>::param_type param; - cl_int result = getInfo(name, ¶m); - if (err != NULL) { - *err = result; - } - return param; - } - -#if CL_HPP_TARGET_OPENCL_VERSION >= 110 - /*! \brief Registers a callback function to be called when the memory object - * is no longer needed. - * - * Wraps clSetMemObjectDestructorCallback(). - * - * Repeated calls to this function, for a given cl_mem value, will append - * to the list of functions called (in reverse order) when memory object's - * resources are freed and the memory object is deleted. - * - * \note - * The registered callbacks are associated with the underlying cl_mem - * value - not the Memory class instance. - */ - cl_int setDestructorCallback( - void (CL_CALLBACK * pfn_notify)(cl_mem, void *), - void * user_data = NULL) - { - return detail::errHandler( - ::clSetMemObjectDestructorCallback( - object_, - pfn_notify, - user_data), - __SET_MEM_OBJECT_DESTRUCTOR_CALLBACK_ERR); - } -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 110 - -}; - -// Pre-declare copy functions -class Buffer; -template< typename IteratorType > -cl_int copy( IteratorType startIterator, IteratorType endIterator, cl::Buffer &buffer ); -template< typename IteratorType > -cl_int copy( const cl::Buffer &buffer, IteratorType startIterator, IteratorType endIterator ); -template< typename IteratorType > -cl_int copy( const CommandQueue &queue, IteratorType startIterator, IteratorType endIterator, cl::Buffer &buffer ); -template< typename IteratorType > -cl_int copy( const CommandQueue &queue, const cl::Buffer &buffer, IteratorType startIterator, IteratorType endIterator ); - - -#if CL_HPP_TARGET_OPENCL_VERSION >= 200 -namespace detail -{ - class SVMTraitNull - { - public: - static cl_svm_mem_flags getSVMMemFlags() - { - return 0; - } - }; -} // namespace detail - -template -class SVMTraitReadWrite -{ -public: - static cl_svm_mem_flags getSVMMemFlags() - { - return CL_MEM_READ_WRITE | - Trait::getSVMMemFlags(); - } -}; - -template -class SVMTraitReadOnly -{ -public: - static cl_svm_mem_flags getSVMMemFlags() - { - return CL_MEM_READ_ONLY | - Trait::getSVMMemFlags(); - } -}; - -template -class SVMTraitWriteOnly -{ -public: - static cl_svm_mem_flags getSVMMemFlags() - { - return CL_MEM_WRITE_ONLY | - Trait::getSVMMemFlags(); - } -}; - -template> -class SVMTraitCoarse -{ -public: - static cl_svm_mem_flags getSVMMemFlags() - { - return Trait::getSVMMemFlags(); - } -}; - -template> -class SVMTraitFine -{ -public: - static cl_svm_mem_flags getSVMMemFlags() - { - return CL_MEM_SVM_FINE_GRAIN_BUFFER | - Trait::getSVMMemFlags(); - } -}; - -template> -class SVMTraitAtomic -{ -public: - static cl_svm_mem_flags getSVMMemFlags() - { - return - CL_MEM_SVM_FINE_GRAIN_BUFFER | - CL_MEM_SVM_ATOMICS | - Trait::getSVMMemFlags(); - } -}; - -// Pre-declare SVM map function -template -inline cl_int enqueueMapSVM( - T* ptr, - cl_bool blocking, - cl_map_flags flags, - size_type size, - const vector* events = NULL, - Event* event = NULL); - -/** - * STL-like allocator class for managing SVM objects provided for convenience. - * - * Note that while this behaves like an allocator for the purposes of constructing vectors and similar objects, - * care must be taken when using with smart pointers. - * The allocator should not be used to construct a unique_ptr if we are using coarse-grained SVM mode because - * the coarse-grained management behaviour would behave incorrectly with respect to reference counting. - * - * Instead the allocator embeds a Deleter which may be used with unique_ptr and is used - * with the allocate_shared and allocate_ptr supplied operations. - */ -template -class SVMAllocator { -private: - Context context_; - -public: - typedef T value_type; - typedef value_type* pointer; - typedef const value_type* const_pointer; - typedef value_type& reference; - typedef const value_type& const_reference; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - - template - struct rebind - { - typedef SVMAllocator other; - }; - - template - friend class SVMAllocator; - - SVMAllocator() : - context_(Context::getDefault()) - { - } - - explicit SVMAllocator(cl::Context context) : - context_(context) - { - } - - - SVMAllocator(const SVMAllocator &other) : - context_(other.context_) - { - } - - template - SVMAllocator(const SVMAllocator &other) : - context_(other.context_) - { - } - - ~SVMAllocator() - { - } - - pointer address(reference r) CL_HPP_NOEXCEPT_ - { - return std::addressof(r); - } - - const_pointer address(const_reference r) CL_HPP_NOEXCEPT_ - { - return std::addressof(r); - } - - /** - * Allocate an SVM pointer. - * - * If the allocator is coarse-grained, this will take ownership to allow - * containers to correctly construct data in place. - */ - pointer allocate( - size_type size, - typename cl::SVMAllocator::const_pointer = 0) - { - // Allocate memory with default alignment matching the size of the type - void* voidPointer = - clSVMAlloc( - context_(), - SVMTrait::getSVMMemFlags(), - size*sizeof(T), - 0); - pointer retValue = reinterpret_cast( - voidPointer); -#if defined(CL_HPP_ENABLE_EXCEPTIONS) - if (!retValue) { - std::bad_alloc excep; - throw excep; - } -#endif // #if defined(CL_HPP_ENABLE_EXCEPTIONS) - - // If allocation was coarse-grained then map it - if (!(SVMTrait::getSVMMemFlags() & CL_MEM_SVM_FINE_GRAIN_BUFFER)) { - cl_int err = enqueueMapSVM(retValue, CL_TRUE, CL_MAP_READ | CL_MAP_WRITE, size*sizeof(T)); - if (err != CL_SUCCESS) { - std::bad_alloc excep; - throw excep; - } - } - - // If exceptions disabled, return null pointer from allocator - return retValue; - } - - void deallocate(pointer p, size_type) - { - clSVMFree(context_(), p); - } - - /** - * Return the maximum possible allocation size. - * This is the minimum of the maximum sizes of all devices in the context. - */ - size_type max_size() const CL_HPP_NOEXCEPT_ - { - size_type maxSize = std::numeric_limits::max() / sizeof(T); - - for (Device &d : context_.getInfo()) { - maxSize = std::min( - maxSize, - static_cast(d.getInfo())); - } - - return maxSize; - } - - template< class U, class... Args > - void construct(U* p, Args&&... args) - { - new(p)T(args...); - } - - template< class U > - void destroy(U* p) - { - p->~U(); - } - - /** - * Returns true if the contexts match. - */ - inline bool operator==(SVMAllocator const& rhs) - { - return (context_==rhs.context_); - } - - inline bool operator!=(SVMAllocator const& a) - { - return !operator==(a); - } -}; // class SVMAllocator return cl::pointer(tmp, detail::Deleter{alloc, copies}); - - -template -class SVMAllocator { -public: - typedef void value_type; - typedef value_type* pointer; - typedef const value_type* const_pointer; - - template - struct rebind - { - typedef SVMAllocator other; - }; - - template - friend class SVMAllocator; -}; - -#if !defined(CL_HPP_NO_STD_UNIQUE_PTR) -namespace detail -{ - template - class Deleter { - private: - Alloc alloc_; - size_type copies_; - - public: - typedef typename std::allocator_traits::pointer pointer; - - Deleter(const Alloc &alloc, size_type copies) : alloc_{ alloc }, copies_{ copies } - { - } - - void operator()(pointer ptr) const { - Alloc tmpAlloc{ alloc_ }; - std::allocator_traits::destroy(tmpAlloc, std::addressof(*ptr)); - std::allocator_traits::deallocate(tmpAlloc, ptr, copies_); - } - }; -} // namespace detail - -/** - * Allocation operation compatible with std::allocate_ptr. - * Creates a unique_ptr by default. - * This requirement is to ensure that the control block is not - * allocated in memory inaccessible to the host. - */ -template -cl::pointer> allocate_pointer(const Alloc &alloc_, Args&&... args) -{ - Alloc alloc(alloc_); - static const size_type copies = 1; - - // Ensure that creation of the management block and the - // object are dealt with separately such that we only provide a deleter - - T* tmp = std::allocator_traits::allocate(alloc, copies); - if (!tmp) { - std::bad_alloc excep; - throw excep; - } - try { - std::allocator_traits::construct( - alloc, - std::addressof(*tmp), - std::forward(args)...); - - return cl::pointer>(tmp, detail::Deleter{alloc, copies}); - } - catch (std::bad_alloc b) - { - std::allocator_traits::deallocate(alloc, tmp, copies); - throw; - } -} - -template< class T, class SVMTrait, class... Args > -cl::pointer>> allocate_svm(Args... args) -{ - SVMAllocator alloc; - return cl::allocate_pointer(alloc, args...); -} - -template< class T, class SVMTrait, class... Args > -cl::pointer>> allocate_svm(const cl::Context &c, Args... args) -{ - SVMAllocator alloc(c); - return cl::allocate_pointer(alloc, args...); -} -#endif // #if !defined(CL_HPP_NO_STD_UNIQUE_PTR) - -/*! \brief Vector alias to simplify contruction of coarse-grained SVM containers. - * - */ -template < class T > -using coarse_svm_vector = vector>>; - -/*! \brief Vector alias to simplify contruction of fine-grained SVM containers. -* -*/ -template < class T > -using fine_svm_vector = vector>>; - -/*! \brief Vector alias to simplify contruction of fine-grained SVM containers that support platform atomics. -* -*/ -template < class T > -using atomic_svm_vector = vector>>; - -#endif // #if CL_HPP_TARGET_OPENCL_VERSION >= 200 - - -/*! \brief Class interface for Buffer Memory Objects. - * - * See Memory for details about copy semantics, etc. - * - * \see Memory - */ -class Buffer : public Memory -{ -public: - - /*! \brief Constructs a Buffer in a specified context. - * - * Wraps clCreateBuffer(). - * - * \param host_ptr Storage to be used if the CL_MEM_USE_HOST_PTR flag was - * specified. Note alignment & exclusivity requirements. - */ - Buffer( - const Context& context, - cl_mem_flags flags, - size_type size, - void* host_ptr = NULL, - cl_int* err = NULL) - { - cl_int error; - object_ = ::clCreateBuffer(context(), flags, size, host_ptr, &error); - - detail::errHandler(error, __CREATE_BUFFER_ERR); - if (err != NULL) { - *err = error; - } - } - - /*! \brief Constructs a Buffer in the default context. - * - * Wraps clCreateBuffer(). - * - * \param host_ptr Storage to be used if the CL_MEM_USE_HOST_PTR flag was - * specified. Note alignment & exclusivity requirements. - * - * \see Context::getDefault() - */ - Buffer( - cl_mem_flags flags, - size_type size, - void* host_ptr = NULL, - cl_int* err = NULL) - { - cl_int error; - - Context context = Context::getDefault(err); - - object_ = ::clCreateBuffer(context(), flags, size, host_ptr, &error); - - detail::errHandler(error, __CREATE_BUFFER_ERR); - if (err != NULL) { - *err = error; - } - } - - /*! - * \brief Construct a Buffer from a host container via iterators. - * IteratorType must be random access. - * If useHostPtr is specified iterators must represent contiguous data. - */ - template< typename IteratorType > - Buffer( - IteratorType startIterator, - IteratorType endIterator, - bool readOnly, - bool useHostPtr = false, - cl_int* err = NULL) - { - typedef typename std::iterator_traits::value_type DataType; - cl_int error; - - cl_mem_flags flags = 0; - if( readOnly ) { - flags |= CL_MEM_READ_ONLY; - } - else { - flags |= CL_MEM_READ_WRITE; - } - if( useHostPtr ) { - flags |= CL_MEM_USE_HOST_PTR; - } - - size_type size = sizeof(DataType)*(endIterator - startIterator); - - Context context = Context::getDefault(err); - - if( useHostPtr ) { - object_ = ::clCreateBuffer(context(), flags, size, static_cast(&*startIterator), &error); - } else { - object_ = ::clCreateBuffer(context(), flags, size, 0, &error); - } - - detail::errHandler(error, __CREATE_BUFFER_ERR); - if (err != NULL) { - *err = error; - } - - if( !useHostPtr ) { - error = cl::copy(startIterator, endIterator, *this); - detail::errHandler(error, __CREATE_BUFFER_ERR); - if (err != NULL) { - *err = error; - } - } - } - - /*! - * \brief Construct a Buffer from a host container via iterators using a specified context. - * IteratorType must be random access. - * If useHostPtr is specified iterators must represent contiguous data. - */ - template< typename IteratorType > - Buffer(const Context &context, IteratorType startIterator, IteratorType endIterator, - bool readOnly, bool useHostPtr = false, cl_int* err = NULL); - - /*! - * \brief Construct a Buffer from a host container via iterators using a specified queue. - * If useHostPtr is specified iterators must be random access. - */ - template< typename IteratorType > - Buffer(const CommandQueue &queue, IteratorType startIterator, IteratorType endIterator, - bool readOnly, bool useHostPtr = false, cl_int* err = NULL); - - //! \brief Default constructor - initializes to NULL. - Buffer() : Memory() { } - - /*! \brief Constructor from cl_mem - takes ownership. - * - * \param retainObject will cause the constructor to retain its cl object. - * Defaults to false to maintain compatibility with earlier versions. - * - * See Memory for further details. - */ - explicit Buffer(const cl_mem& buffer, bool retainObject = false) : - Memory(buffer, retainObject) { } - - /*! \brief Assignment from cl_mem - performs shallow copy. - * - * See Memory for further details. - */ - Buffer& operator = (const cl_mem& rhs) - { - Memory::operator=(rhs); - return *this; - } - - /*! \brief Copy constructor to forward copy to the superclass correctly. - * Required for MSVC. - */ - Buffer(const Buffer& buf) : Memory(buf) {} - - /*! \brief Copy assignment to forward copy to the superclass correctly. - * Required for MSVC. - */ - Buffer& operator = (const Buffer &buf) - { - Memory::operator=(buf); - return *this; - } - - /*! \brief Move constructor to forward move to the superclass correctly. - * Required for MSVC. - */ - Buffer(Buffer&& buf) CL_HPP_NOEXCEPT_ : Memory(std::move(buf)) {} - - /*! \brief Move assignment to forward move to the superclass correctly. - * Required for MSVC. - */ - Buffer& operator = (Buffer &&buf) - { - Memory::operator=(std::move(buf)); - return *this; - } - -#if CL_HPP_TARGET_OPENCL_VERSION >= 110 - /*! \brief Creates a new buffer object from this. - * - * Wraps clCreateSubBuffer(). - */ - Buffer createSubBuffer( - cl_mem_flags flags, - cl_buffer_create_type buffer_create_type, - const void * buffer_create_info, - cl_int * err = NULL) - { - Buffer result; - cl_int error; - result.object_ = ::clCreateSubBuffer( - object_, - flags, - buffer_create_type, - buffer_create_info, - &error); - - detail::errHandler(error, __CREATE_SUBBUFFER_ERR); - if (err != NULL) { - *err = error; - } - - return result; - } -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 110 -}; - -#if defined (CL_HPP_USE_DX_INTEROP) -/*! \brief Class interface for creating OpenCL buffers from ID3D10Buffer's. - * - * This is provided to facilitate interoperability with Direct3D. - * - * See Memory for details about copy semantics, etc. - * - * \see Memory - */ -class BufferD3D10 : public Buffer -{ -public: - - - /*! \brief Constructs a BufferD3D10, in a specified context, from a - * given ID3D10Buffer. - * - * Wraps clCreateFromD3D10BufferKHR(). - */ - BufferD3D10( - const Context& context, - cl_mem_flags flags, - ID3D10Buffer* bufobj, - cl_int * err = NULL) : pfn_clCreateFromD3D10BufferKHR(nullptr) - { - typedef CL_API_ENTRY cl_mem (CL_API_CALL *PFN_clCreateFromD3D10BufferKHR)( - cl_context context, cl_mem_flags flags, ID3D10Buffer* buffer, - cl_int* errcode_ret); - PFN_clCreateFromD3D10BufferKHR pfn_clCreateFromD3D10BufferKHR; -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 - vector props = context.getInfo(); - cl_platform platform = -1; - for( int i = 0; i < props.size(); ++i ) { - if( props[i] == CL_CONTEXT_PLATFORM ) { - platform = props[i+1]; - } - } - CL_HPP_INIT_CL_EXT_FCN_PTR_PLATFORM_(platform, clCreateFromD3D10BufferKHR); -#elif CL_HPP_TARGET_OPENCL_VERSION >= 110 - CL_HPP_INIT_CL_EXT_FCN_PTR_(clCreateFromD3D10BufferKHR); -#endif - - cl_int error; - object_ = pfn_clCreateFromD3D10BufferKHR( - context(), - flags, - bufobj, - &error); - - detail::errHandler(error, __CREATE_GL_BUFFER_ERR); - if (err != NULL) { - *err = error; - } - } - - //! \brief Default constructor - initializes to NULL. - BufferD3D10() : Buffer() { } - - /*! \brief Constructor from cl_mem - takes ownership. - * - * \param retainObject will cause the constructor to retain its cl object. - * Defaults to false to maintain compatibility with - * earlier versions. - * See Memory for further details. - */ - explicit BufferD3D10(const cl_mem& buffer, bool retainObject = false) : - Buffer(buffer, retainObject) { } - - /*! \brief Assignment from cl_mem - performs shallow copy. - * - * See Memory for further details. - */ - BufferD3D10& operator = (const cl_mem& rhs) - { - Buffer::operator=(rhs); - return *this; - } - - /*! \brief Copy constructor to forward copy to the superclass correctly. - * Required for MSVC. - */ - BufferD3D10(const BufferD3D10& buf) : - Buffer(buf) {} - - /*! \brief Copy assignment to forward copy to the superclass correctly. - * Required for MSVC. - */ - BufferD3D10& operator = (const BufferD3D10 &buf) - { - Buffer::operator=(buf); - return *this; - } - - /*! \brief Move constructor to forward move to the superclass correctly. - * Required for MSVC. - */ - BufferD3D10(BufferD3D10&& buf) CL_HPP_NOEXCEPT_ : Buffer(std::move(buf)) {} - - /*! \brief Move assignment to forward move to the superclass correctly. - * Required for MSVC. - */ - BufferD3D10& operator = (BufferD3D10 &&buf) - { - Buffer::operator=(std::move(buf)); - return *this; - } -}; -#endif - -/*! \brief Class interface for GL Buffer Memory Objects. - * - * This is provided to facilitate interoperability with OpenGL. - * - * See Memory for details about copy semantics, etc. - * - * \see Memory - */ -class BufferGL : public Buffer -{ -public: - /*! \brief Constructs a BufferGL in a specified context, from a given - * GL buffer. - * - * Wraps clCreateFromGLBuffer(). - */ - BufferGL( - const Context& context, - cl_mem_flags flags, - cl_GLuint bufobj, - cl_int * err = NULL) - { - cl_int error; - object_ = ::clCreateFromGLBuffer( - context(), - flags, - bufobj, - &error); - - detail::errHandler(error, __CREATE_GL_BUFFER_ERR); - if (err != NULL) { - *err = error; - } - } - - //! \brief Default constructor - initializes to NULL. - BufferGL() : Buffer() { } - - /*! \brief Constructor from cl_mem - takes ownership. - * - * \param retainObject will cause the constructor to retain its cl object. - * Defaults to false to maintain compatibility with - * earlier versions. - * See Memory for further details. - */ - explicit BufferGL(const cl_mem& buffer, bool retainObject = false) : - Buffer(buffer, retainObject) { } - - /*! \brief Assignment from cl_mem - performs shallow copy. - * - * See Memory for further details. - */ - BufferGL& operator = (const cl_mem& rhs) - { - Buffer::operator=(rhs); - return *this; - } - - /*! \brief Copy constructor to forward copy to the superclass correctly. - * Required for MSVC. - */ - BufferGL(const BufferGL& buf) : Buffer(buf) {} - - /*! \brief Copy assignment to forward copy to the superclass correctly. - * Required for MSVC. - */ - BufferGL& operator = (const BufferGL &buf) - { - Buffer::operator=(buf); - return *this; - } - - /*! \brief Move constructor to forward move to the superclass correctly. - * Required for MSVC. - */ - BufferGL(BufferGL&& buf) CL_HPP_NOEXCEPT_ : Buffer(std::move(buf)) {} - - /*! \brief Move assignment to forward move to the superclass correctly. - * Required for MSVC. - */ - BufferGL& operator = (BufferGL &&buf) - { - Buffer::operator=(std::move(buf)); - return *this; - } - - //! \brief Wrapper for clGetGLObjectInfo(). - cl_int getObjectInfo( - cl_gl_object_type *type, - cl_GLuint * gl_object_name) - { - return detail::errHandler( - ::clGetGLObjectInfo(object_,type,gl_object_name), - __GET_GL_OBJECT_INFO_ERR); - } -}; - -/*! \brief Class interface for GL Render Buffer Memory Objects. - * - * This is provided to facilitate interoperability with OpenGL. - * - * See Memory for details about copy semantics, etc. - * - * \see Memory - */ -class BufferRenderGL : public Buffer -{ -public: - /*! \brief Constructs a BufferRenderGL in a specified context, from a given - * GL Renderbuffer. - * - * Wraps clCreateFromGLRenderbuffer(). - */ - BufferRenderGL( - const Context& context, - cl_mem_flags flags, - cl_GLuint bufobj, - cl_int * err = NULL) - { - cl_int error; - object_ = ::clCreateFromGLRenderbuffer( - context(), - flags, - bufobj, - &error); - - detail::errHandler(error, __CREATE_GL_RENDER_BUFFER_ERR); - if (err != NULL) { - *err = error; - } - } - - //! \brief Default constructor - initializes to NULL. - BufferRenderGL() : Buffer() { } - - /*! \brief Constructor from cl_mem - takes ownership. - * - * \param retainObject will cause the constructor to retain its cl object. - * Defaults to false to maintain compatibility with - * earlier versions. - * See Memory for further details. - */ - explicit BufferRenderGL(const cl_mem& buffer, bool retainObject = false) : - Buffer(buffer, retainObject) { } - - /*! \brief Assignment from cl_mem - performs shallow copy. - * - * See Memory for further details. - */ - BufferRenderGL& operator = (const cl_mem& rhs) - { - Buffer::operator=(rhs); - return *this; - } - - /*! \brief Copy constructor to forward copy to the superclass correctly. - * Required for MSVC. - */ - BufferRenderGL(const BufferRenderGL& buf) : Buffer(buf) {} - - /*! \brief Copy assignment to forward copy to the superclass correctly. - * Required for MSVC. - */ - BufferRenderGL& operator = (const BufferRenderGL &buf) - { - Buffer::operator=(buf); - return *this; - } - - /*! \brief Move constructor to forward move to the superclass correctly. - * Required for MSVC. - */ - BufferRenderGL(BufferRenderGL&& buf) CL_HPP_NOEXCEPT_ : Buffer(std::move(buf)) {} - - /*! \brief Move assignment to forward move to the superclass correctly. - * Required for MSVC. - */ - BufferRenderGL& operator = (BufferRenderGL &&buf) - { - Buffer::operator=(std::move(buf)); - return *this; - } - - //! \brief Wrapper for clGetGLObjectInfo(). - cl_int getObjectInfo( - cl_gl_object_type *type, - cl_GLuint * gl_object_name) - { - return detail::errHandler( - ::clGetGLObjectInfo(object_,type,gl_object_name), - __GET_GL_OBJECT_INFO_ERR); - } -}; - -/*! \brief C++ base class for Image Memory objects. - * - * See Memory for details about copy semantics, etc. - * - * \see Memory - */ -class Image : public Memory -{ -protected: - //! \brief Default constructor - initializes to NULL. - Image() : Memory() { } - - /*! \brief Constructor from cl_mem - takes ownership. - * - * \param retainObject will cause the constructor to retain its cl object. - * Defaults to false to maintain compatibility with - * earlier versions. - * See Memory for further details. - */ - explicit Image(const cl_mem& image, bool retainObject = false) : - Memory(image, retainObject) { } - - /*! \brief Assignment from cl_mem - performs shallow copy. - * - * See Memory for further details. - */ - Image& operator = (const cl_mem& rhs) - { - Memory::operator=(rhs); - return *this; - } - - /*! \brief Copy constructor to forward copy to the superclass correctly. - * Required for MSVC. - */ - Image(const Image& img) : Memory(img) {} - - /*! \brief Copy assignment to forward copy to the superclass correctly. - * Required for MSVC. - */ - Image& operator = (const Image &img) - { - Memory::operator=(img); - return *this; - } - - /*! \brief Move constructor to forward move to the superclass correctly. - * Required for MSVC. - */ - Image(Image&& img) CL_HPP_NOEXCEPT_ : Memory(std::move(img)) {} - - /*! \brief Move assignment to forward move to the superclass correctly. - * Required for MSVC. - */ - Image& operator = (Image &&img) - { - Memory::operator=(std::move(img)); - return *this; - } - - -public: - //! \brief Wrapper for clGetImageInfo(). - template - cl_int getImageInfo(cl_image_info name, T* param) const - { - return detail::errHandler( - detail::getInfo(&::clGetImageInfo, object_, name, param), - __GET_IMAGE_INFO_ERR); - } - - //! \brief Wrapper for clGetImageInfo() that returns by value. - template typename - detail::param_traits::param_type - getImageInfo(cl_int* err = NULL) const - { - typename detail::param_traits< - detail::cl_image_info, name>::param_type param; - cl_int result = getImageInfo(name, ¶m); - if (err != NULL) { - *err = result; - } - return param; - } -}; - -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 -/*! \brief Class interface for 1D Image Memory objects. - * - * See Memory for details about copy semantics, etc. - * - * \see Memory - */ -class Image1D : public Image -{ -public: - /*! \brief Constructs a 1D Image in a specified context. - * - * Wraps clCreateImage(). - */ - Image1D( - const Context& context, - cl_mem_flags flags, - ImageFormat format, - size_type width, - void* host_ptr = NULL, - cl_int* err = NULL) - { - cl_int error; - cl_image_desc desc = - { - CL_MEM_OBJECT_IMAGE1D, - width, - 0, 0, 0, 0, 0, 0, 0, 0 - }; - object_ = ::clCreateImage( - context(), - flags, - &format, - &desc, - host_ptr, - &error); - - detail::errHandler(error, __CREATE_IMAGE_ERR); - if (err != NULL) { - *err = error; - } - } - - //! \brief Default constructor - initializes to NULL. - Image1D() { } - - /*! \brief Constructor from cl_mem - takes ownership. - * - * \param retainObject will cause the constructor to retain its cl object. - * Defaults to false to maintain compatibility with - * earlier versions. - * See Memory for further details. - */ - explicit Image1D(const cl_mem& image1D, bool retainObject = false) : - Image(image1D, retainObject) { } - - /*! \brief Assignment from cl_mem - performs shallow copy. - * - * See Memory for further details. - */ - Image1D& operator = (const cl_mem& rhs) - { - Image::operator=(rhs); - return *this; - } - - /*! \brief Copy constructor to forward copy to the superclass correctly. - * Required for MSVC. - */ - Image1D(const Image1D& img) : Image(img) {} - - /*! \brief Copy assignment to forward copy to the superclass correctly. - * Required for MSVC. - */ - Image1D& operator = (const Image1D &img) - { - Image::operator=(img); - return *this; - } - - /*! \brief Move constructor to forward move to the superclass correctly. - * Required for MSVC. - */ - Image1D(Image1D&& img) CL_HPP_NOEXCEPT_ : Image(std::move(img)) {} - - /*! \brief Move assignment to forward move to the superclass correctly. - * Required for MSVC. - */ - Image1D& operator = (Image1D &&img) - { - Image::operator=(std::move(img)); - return *this; - } - -}; - -/*! \class Image1DBuffer - * \brief Image interface for 1D buffer images. - */ -class Image1DBuffer : public Image -{ -public: - Image1DBuffer( - const Context& context, - cl_mem_flags flags, - ImageFormat format, - size_type width, - const Buffer &buffer, - cl_int* err = NULL) - { - cl_int error; - cl_image_desc desc = - { - CL_MEM_OBJECT_IMAGE1D_BUFFER, - width, - 0, 0, 0, 0, 0, 0, 0, - buffer() - }; - object_ = ::clCreateImage( - context(), - flags, - &format, - &desc, - NULL, - &error); - - detail::errHandler(error, __CREATE_IMAGE_ERR); - if (err != NULL) { - *err = error; - } - } - - Image1DBuffer() { } - - /*! \brief Constructor from cl_mem - takes ownership. - * - * \param retainObject will cause the constructor to retain its cl object. - * Defaults to false to maintain compatibility with - * earlier versions. - * See Memory for further details. - */ - explicit Image1DBuffer(const cl_mem& image1D, bool retainObject = false) : - Image(image1D, retainObject) { } - - Image1DBuffer& operator = (const cl_mem& rhs) - { - Image::operator=(rhs); - return *this; - } - - /*! \brief Copy constructor to forward copy to the superclass correctly. - * Required for MSVC. - */ - Image1DBuffer(const Image1DBuffer& img) : Image(img) {} - - /*! \brief Copy assignment to forward copy to the superclass correctly. - * Required for MSVC. - */ - Image1DBuffer& operator = (const Image1DBuffer &img) - { - Image::operator=(img); - return *this; - } - - /*! \brief Move constructor to forward move to the superclass correctly. - * Required for MSVC. - */ - Image1DBuffer(Image1DBuffer&& img) CL_HPP_NOEXCEPT_ : Image(std::move(img)) {} - - /*! \brief Move assignment to forward move to the superclass correctly. - * Required for MSVC. - */ - Image1DBuffer& operator = (Image1DBuffer &&img) - { - Image::operator=(std::move(img)); - return *this; - } - -}; - -/*! \class Image1DArray - * \brief Image interface for arrays of 1D images. - */ -class Image1DArray : public Image -{ -public: - Image1DArray( - const Context& context, - cl_mem_flags flags, - ImageFormat format, - size_type arraySize, - size_type width, - size_type rowPitch, - void* host_ptr = NULL, - cl_int* err = NULL) - { - cl_int error; - cl_image_desc desc = - { - CL_MEM_OBJECT_IMAGE1D_ARRAY, - width, - 0, 0, // height, depth (unused) - arraySize, - rowPitch, - 0, 0, 0, 0 - }; - object_ = ::clCreateImage( - context(), - flags, - &format, - &desc, - host_ptr, - &error); - - detail::errHandler(error, __CREATE_IMAGE_ERR); - if (err != NULL) { - *err = error; - } - } - - Image1DArray() { } - - /*! \brief Constructor from cl_mem - takes ownership. - * - * \param retainObject will cause the constructor to retain its cl object. - * Defaults to false to maintain compatibility with - * earlier versions. - * See Memory for further details. - */ - explicit Image1DArray(const cl_mem& imageArray, bool retainObject = false) : - Image(imageArray, retainObject) { } - - - Image1DArray& operator = (const cl_mem& rhs) - { - Image::operator=(rhs); - return *this; - } - - /*! \brief Copy constructor to forward copy to the superclass correctly. - * Required for MSVC. - */ - Image1DArray(const Image1DArray& img) : Image(img) {} - - /*! \brief Copy assignment to forward copy to the superclass correctly. - * Required for MSVC. - */ - Image1DArray& operator = (const Image1DArray &img) - { - Image::operator=(img); - return *this; - } - - /*! \brief Move constructor to forward move to the superclass correctly. - * Required for MSVC. - */ - Image1DArray(Image1DArray&& img) CL_HPP_NOEXCEPT_ : Image(std::move(img)) {} - - /*! \brief Move assignment to forward move to the superclass correctly. - * Required for MSVC. - */ - Image1DArray& operator = (Image1DArray &&img) - { - Image::operator=(std::move(img)); - return *this; - } - -}; -#endif // #if CL_HPP_TARGET_OPENCL_VERSION >= 120 - - -/*! \brief Class interface for 2D Image Memory objects. - * - * See Memory for details about copy semantics, etc. - * - * \see Memory - */ -class Image2D : public Image -{ -public: - /*! \brief Constructs a 2D Image in a specified context. - * - * Wraps clCreateImage(). - */ - Image2D( - const Context& context, - cl_mem_flags flags, - ImageFormat format, - size_type width, - size_type height, - size_type row_pitch = 0, - void* host_ptr = NULL, - cl_int* err = NULL) - { - cl_int error; - bool useCreateImage; - -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 && CL_HPP_MINIMUM_OPENCL_VERSION < 120 - // Run-time decision based on the actual platform - { - cl_uint version = detail::getContextPlatformVersion(context()); - useCreateImage = (version >= 0x10002); // OpenCL 1.2 or above - } -#elif CL_HPP_TARGET_OPENCL_VERSION >= 120 - useCreateImage = true; -#else - useCreateImage = false; -#endif - -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 - if (useCreateImage) - { - cl_image_desc desc = - { - CL_MEM_OBJECT_IMAGE2D, - width, - height, - 0, 0, // depth, array size (unused) - row_pitch, - 0, 0, 0, 0 - }; - object_ = ::clCreateImage( - context(), - flags, - &format, - &desc, - host_ptr, - &error); - - detail::errHandler(error, __CREATE_IMAGE_ERR); - if (err != NULL) { - *err = error; - } - } -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 120 -#if CL_HPP_MINIMUM_OPENCL_VERSION < 120 - if (!useCreateImage) - { - object_ = ::clCreateImage2D( - context(), flags,&format, width, height, row_pitch, host_ptr, &error); - - detail::errHandler(error, __CREATE_IMAGE2D_ERR); - if (err != NULL) { - *err = error; - } - } -#endif // CL_HPP_MINIMUM_OPENCL_VERSION < 120 - } - -#if CL_HPP_TARGET_OPENCL_VERSION >= 200 - /*! \brief Constructs a 2D Image from a buffer. - * \note This will share storage with the underlying buffer. - * - * Wraps clCreateImage(). - */ - Image2D( - const Context& context, - ImageFormat format, - const Buffer &sourceBuffer, - size_type width, - size_type height, - size_type row_pitch = 0, - cl_int* err = nullptr) - { - cl_int error; - - cl_image_desc desc = - { - CL_MEM_OBJECT_IMAGE2D, - width, - height, - 0, 0, // depth, array size (unused) - row_pitch, - 0, 0, 0, - // Use buffer as input to image - sourceBuffer() - }; - object_ = ::clCreateImage( - context(), - 0, // flags inherited from buffer - &format, - &desc, - nullptr, - &error); - - detail::errHandler(error, __CREATE_IMAGE_ERR); - if (err != nullptr) { - *err = error; - } - } -#endif //#if CL_HPP_TARGET_OPENCL_VERSION >= 200 - -#if CL_HPP_TARGET_OPENCL_VERSION >= 200 - /*! \brief Constructs a 2D Image from an image. - * \note This will share storage with the underlying image but may - * reinterpret the channel order and type. - * - * The image will be created matching with a descriptor matching the source. - * - * \param order is the channel order to reinterpret the image data as. - * The channel order may differ as described in the OpenCL - * 2.0 API specification. - * - * Wraps clCreateImage(). - */ - Image2D( - const Context& context, - cl_channel_order order, - const Image &sourceImage, - cl_int* err = nullptr) - { - cl_int error; - - // Descriptor fields have to match source image - size_type sourceWidth = - sourceImage.getImageInfo(); - size_type sourceHeight = - sourceImage.getImageInfo(); - size_type sourceRowPitch = - sourceImage.getImageInfo(); - cl_uint sourceNumMIPLevels = - sourceImage.getImageInfo(); - cl_uint sourceNumSamples = - sourceImage.getImageInfo(); - cl_image_format sourceFormat = - sourceImage.getImageInfo(); - - // Update only the channel order. - // Channel format inherited from source. - sourceFormat.image_channel_order = order; - cl_image_desc desc = - { - CL_MEM_OBJECT_IMAGE2D, - sourceWidth, - sourceHeight, - 0, 0, // depth (unused), array size (unused) - sourceRowPitch, - 0, // slice pitch (unused) - sourceNumMIPLevels, - sourceNumSamples, - // Use buffer as input to image - sourceImage() - }; - object_ = ::clCreateImage( - context(), - 0, // flags should be inherited from mem_object - &sourceFormat, - &desc, - nullptr, - &error); - - detail::errHandler(error, __CREATE_IMAGE_ERR); - if (err != nullptr) { - *err = error; - } - } -#endif //#if CL_HPP_TARGET_OPENCL_VERSION >= 200 - - //! \brief Default constructor - initializes to NULL. - Image2D() { } - - /*! \brief Constructor from cl_mem - takes ownership. - * - * \param retainObject will cause the constructor to retain its cl object. - * Defaults to false to maintain compatibility with - * earlier versions. - * See Memory for further details. - */ - explicit Image2D(const cl_mem& image2D, bool retainObject = false) : - Image(image2D, retainObject) { } - - /*! \brief Assignment from cl_mem - performs shallow copy. - * - * See Memory for further details. - */ - Image2D& operator = (const cl_mem& rhs) - { - Image::operator=(rhs); - return *this; - } - - /*! \brief Copy constructor to forward copy to the superclass correctly. - * Required for MSVC. - */ - Image2D(const Image2D& img) : Image(img) {} - - /*! \brief Copy assignment to forward copy to the superclass correctly. - * Required for MSVC. - */ - Image2D& operator = (const Image2D &img) - { - Image::operator=(img); - return *this; - } - - /*! \brief Move constructor to forward move to the superclass correctly. - * Required for MSVC. - */ - Image2D(Image2D&& img) CL_HPP_NOEXCEPT_ : Image(std::move(img)) {} - - /*! \brief Move assignment to forward move to the superclass correctly. - * Required for MSVC. - */ - Image2D& operator = (Image2D &&img) - { - Image::operator=(std::move(img)); - return *this; - } - -}; - - -#if defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) -/*! \brief Class interface for GL 2D Image Memory objects. - * - * This is provided to facilitate interoperability with OpenGL. - * - * See Memory for details about copy semantics, etc. - * - * \see Memory - * \note Deprecated for OpenCL 1.2. Please use ImageGL instead. - */ -class CL_EXT_PREFIX__VERSION_1_1_DEPRECATED Image2DGL : public Image2D -{ -public: - /*! \brief Constructs an Image2DGL in a specified context, from a given - * GL Texture. - * - * Wraps clCreateFromGLTexture2D(). - */ - Image2DGL( - const Context& context, - cl_mem_flags flags, - cl_GLenum target, - cl_GLint miplevel, - cl_GLuint texobj, - cl_int * err = NULL) - { - cl_int error; - object_ = ::clCreateFromGLTexture2D( - context(), - flags, - target, - miplevel, - texobj, - &error); - - detail::errHandler(error, __CREATE_GL_TEXTURE_2D_ERR); - if (err != NULL) { - *err = error; - } - - } - - //! \brief Default constructor - initializes to NULL. - Image2DGL() : Image2D() { } - - /*! \brief Constructor from cl_mem - takes ownership. - * - * \param retainObject will cause the constructor to retain its cl object. - * Defaults to false to maintain compatibility with - * earlier versions. - * See Memory for further details. - */ - explicit Image2DGL(const cl_mem& image, bool retainObject = false) : - Image2D(image, retainObject) { } - - /*! \brief Assignment from cl_mem - performs shallow copy. - *c - * See Memory for further details. - */ - Image2DGL& operator = (const cl_mem& rhs) - { - Image2D::operator=(rhs); - return *this; - } - - /*! \brief Copy constructor to forward copy to the superclass correctly. - * Required for MSVC. - */ - Image2DGL(const Image2DGL& img) : Image2D(img) {} - - /*! \brief Copy assignment to forward copy to the superclass correctly. - * Required for MSVC. - */ - Image2DGL& operator = (const Image2DGL &img) - { - Image2D::operator=(img); - return *this; - } - - /*! \brief Move constructor to forward move to the superclass correctly. - * Required for MSVC. - */ - Image2DGL(Image2DGL&& img) CL_HPP_NOEXCEPT_ : Image2D(std::move(img)) {} - - /*! \brief Move assignment to forward move to the superclass correctly. - * Required for MSVC. - */ - Image2DGL& operator = (Image2DGL &&img) - { - Image2D::operator=(std::move(img)); - return *this; - } - -} CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; -#endif // CL_USE_DEPRECATED_OPENCL_1_1_APIS - -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 -/*! \class Image2DArray - * \brief Image interface for arrays of 2D images. - */ -class Image2DArray : public Image -{ -public: - Image2DArray( - const Context& context, - cl_mem_flags flags, - ImageFormat format, - size_type arraySize, - size_type width, - size_type height, - size_type rowPitch, - size_type slicePitch, - void* host_ptr = NULL, - cl_int* err = NULL) - { - cl_int error; - cl_image_desc desc = - { - CL_MEM_OBJECT_IMAGE2D_ARRAY, - width, - height, - 0, // depth (unused) - arraySize, - rowPitch, - slicePitch, - 0, 0, 0 - }; - object_ = ::clCreateImage( - context(), - flags, - &format, - &desc, - host_ptr, - &error); - - detail::errHandler(error, __CREATE_IMAGE_ERR); - if (err != NULL) { - *err = error; - } - } - - Image2DArray() { } - - /*! \brief Constructor from cl_mem - takes ownership. - * - * \param retainObject will cause the constructor to retain its cl object. - * Defaults to false to maintain compatibility with - * earlier versions. - * See Memory for further details. - */ - explicit Image2DArray(const cl_mem& imageArray, bool retainObject = false) : Image(imageArray, retainObject) { } - - Image2DArray& operator = (const cl_mem& rhs) - { - Image::operator=(rhs); - return *this; - } - - /*! \brief Copy constructor to forward copy to the superclass correctly. - * Required for MSVC. - */ - Image2DArray(const Image2DArray& img) : Image(img) {} - - /*! \brief Copy assignment to forward copy to the superclass correctly. - * Required for MSVC. - */ - Image2DArray& operator = (const Image2DArray &img) - { - Image::operator=(img); - return *this; - } - - /*! \brief Move constructor to forward move to the superclass correctly. - * Required for MSVC. - */ - Image2DArray(Image2DArray&& img) CL_HPP_NOEXCEPT_ : Image(std::move(img)) {} - - /*! \brief Move assignment to forward move to the superclass correctly. - * Required for MSVC. - */ - Image2DArray& operator = (Image2DArray &&img) - { - Image::operator=(std::move(img)); - return *this; - } -}; -#endif // #if CL_HPP_TARGET_OPENCL_VERSION >= 120 - -/*! \brief Class interface for 3D Image Memory objects. - * - * See Memory for details about copy semantics, etc. - * - * \see Memory - */ -class Image3D : public Image -{ -public: - /*! \brief Constructs a 3D Image in a specified context. - * - * Wraps clCreateImage(). - */ - Image3D( - const Context& context, - cl_mem_flags flags, - ImageFormat format, - size_type width, - size_type height, - size_type depth, - size_type row_pitch = 0, - size_type slice_pitch = 0, - void* host_ptr = NULL, - cl_int* err = NULL) - { - cl_int error; - bool useCreateImage; - -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 && CL_HPP_MINIMUM_OPENCL_VERSION < 120 - // Run-time decision based on the actual platform - { - cl_uint version = detail::getContextPlatformVersion(context()); - useCreateImage = (version >= 0x10002); // OpenCL 1.2 or above - } -#elif CL_HPP_TARGET_OPENCL_VERSION >= 120 - useCreateImage = true; -#else - useCreateImage = false; -#endif - -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 - if (useCreateImage) - { - cl_image_desc desc = - { - CL_MEM_OBJECT_IMAGE3D, - width, - height, - depth, - 0, // array size (unused) - row_pitch, - slice_pitch, - 0, 0, 0 - }; - object_ = ::clCreateImage( - context(), - flags, - &format, - &desc, - host_ptr, - &error); - - detail::errHandler(error, __CREATE_IMAGE_ERR); - if (err != NULL) { - *err = error; - } - } -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 120 -#if CL_HPP_MINIMUM_OPENCL_VERSION < 120 - if (!useCreateImage) - { - object_ = ::clCreateImage3D( - context(), flags, &format, width, height, depth, row_pitch, - slice_pitch, host_ptr, &error); - - detail::errHandler(error, __CREATE_IMAGE3D_ERR); - if (err != NULL) { - *err = error; - } - } -#endif // CL_HPP_MINIMUM_OPENCL_VERSION < 120 - } - - //! \brief Default constructor - initializes to NULL. - Image3D() : Image() { } - - /*! \brief Constructor from cl_mem - takes ownership. - * - * \param retainObject will cause the constructor to retain its cl object. - * Defaults to false to maintain compatibility with - * earlier versions. - * See Memory for further details. - */ - explicit Image3D(const cl_mem& image3D, bool retainObject = false) : - Image(image3D, retainObject) { } - - /*! \brief Assignment from cl_mem - performs shallow copy. - * - * See Memory for further details. - */ - Image3D& operator = (const cl_mem& rhs) - { - Image::operator=(rhs); - return *this; - } - - /*! \brief Copy constructor to forward copy to the superclass correctly. - * Required for MSVC. - */ - Image3D(const Image3D& img) : Image(img) {} - - /*! \brief Copy assignment to forward copy to the superclass correctly. - * Required for MSVC. - */ - Image3D& operator = (const Image3D &img) - { - Image::operator=(img); - return *this; - } - - /*! \brief Move constructor to forward move to the superclass correctly. - * Required for MSVC. - */ - Image3D(Image3D&& img) CL_HPP_NOEXCEPT_ : Image(std::move(img)) {} - - /*! \brief Move assignment to forward move to the superclass correctly. - * Required for MSVC. - */ - Image3D& operator = (Image3D &&img) - { - Image::operator=(std::move(img)); - return *this; - } -}; - -#if defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) -/*! \brief Class interface for GL 3D Image Memory objects. - * - * This is provided to facilitate interoperability with OpenGL. - * - * See Memory for details about copy semantics, etc. - * - * \see Memory - */ -class Image3DGL : public Image3D -{ -public: - /*! \brief Constructs an Image3DGL in a specified context, from a given - * GL Texture. - * - * Wraps clCreateFromGLTexture3D(). - */ - Image3DGL( - const Context& context, - cl_mem_flags flags, - cl_GLenum target, - cl_GLint miplevel, - cl_GLuint texobj, - cl_int * err = NULL) - { - cl_int error; - object_ = ::clCreateFromGLTexture3D( - context(), - flags, - target, - miplevel, - texobj, - &error); - - detail::errHandler(error, __CREATE_GL_TEXTURE_3D_ERR); - if (err != NULL) { - *err = error; - } - } - - //! \brief Default constructor - initializes to NULL. - Image3DGL() : Image3D() { } - - /*! \brief Constructor from cl_mem - takes ownership. - * - * \param retainObject will cause the constructor to retain its cl object. - * Defaults to false to maintain compatibility with - * earlier versions. - * See Memory for further details. - */ - explicit Image3DGL(const cl_mem& image, bool retainObject = false) : - Image3D(image, retainObject) { } - - /*! \brief Assignment from cl_mem - performs shallow copy. - * - * See Memory for further details. - */ - Image3DGL& operator = (const cl_mem& rhs) - { - Image3D::operator=(rhs); - return *this; - } - - /*! \brief Copy constructor to forward copy to the superclass correctly. - * Required for MSVC. - */ - Image3DGL(const Image3DGL& img) : Image3D(img) {} - - /*! \brief Copy assignment to forward copy to the superclass correctly. - * Required for MSVC. - */ - Image3DGL& operator = (const Image3DGL &img) - { - Image3D::operator=(img); - return *this; - } - - /*! \brief Move constructor to forward move to the superclass correctly. - * Required for MSVC. - */ - Image3DGL(Image3DGL&& img) CL_HPP_NOEXCEPT_ : Image3D(std::move(img)) {} - - /*! \brief Move assignment to forward move to the superclass correctly. - * Required for MSVC. - */ - Image3DGL& operator = (Image3DGL &&img) - { - Image3D::operator=(std::move(img)); - return *this; - } -}; -#endif // CL_USE_DEPRECATED_OPENCL_1_1_APIS - -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 -/*! \class ImageGL - * \brief general image interface for GL interop. - * We abstract the 2D and 3D GL images into a single instance here - * that wraps all GL sourced images on the grounds that setup information - * was performed by OpenCL anyway. - */ -class ImageGL : public Image -{ -public: - ImageGL( - const Context& context, - cl_mem_flags flags, - cl_GLenum target, - cl_GLint miplevel, - cl_GLuint texobj, - cl_int * err = NULL) - { - cl_int error; - object_ = ::clCreateFromGLTexture( - context(), - flags, - target, - miplevel, - texobj, - &error); - - detail::errHandler(error, __CREATE_GL_TEXTURE_ERR); - if (err != NULL) { - *err = error; - } - } - - ImageGL() : Image() { } - - /*! \brief Constructor from cl_mem - takes ownership. - * - * \param retainObject will cause the constructor to retain its cl object. - * Defaults to false to maintain compatibility with - * earlier versions. - * See Memory for further details. - */ - explicit ImageGL(const cl_mem& image, bool retainObject = false) : - Image(image, retainObject) { } - - ImageGL& operator = (const cl_mem& rhs) - { - Image::operator=(rhs); - return *this; - } - - /*! \brief Copy constructor to forward copy to the superclass correctly. - * Required for MSVC. - */ - ImageGL(const ImageGL& img) : Image(img) {} - - /*! \brief Copy assignment to forward copy to the superclass correctly. - * Required for MSVC. - */ - ImageGL& operator = (const ImageGL &img) - { - Image::operator=(img); - return *this; - } - - /*! \brief Move constructor to forward move to the superclass correctly. - * Required for MSVC. - */ - ImageGL(ImageGL&& img) CL_HPP_NOEXCEPT_ : Image(std::move(img)) {} - - /*! \brief Move assignment to forward move to the superclass correctly. - * Required for MSVC. - */ - ImageGL& operator = (ImageGL &&img) - { - Image::operator=(std::move(img)); - return *this; - } -}; -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 120 - - - -#if CL_HPP_TARGET_OPENCL_VERSION >= 200 -/*! \brief Class interface for Pipe Memory Objects. -* -* See Memory for details about copy semantics, etc. -* -* \see Memory -*/ -class Pipe : public Memory -{ -public: - - /*! \brief Constructs a Pipe in a specified context. - * - * Wraps clCreatePipe(). - * @param context Context in which to create the pipe. - * @param flags Bitfield. Only CL_MEM_READ_WRITE and CL_MEM_HOST_NO_ACCESS are valid. - * @param packet_size Size in bytes of a single packet of the pipe. - * @param max_packets Number of packets that may be stored in the pipe. - * - */ - Pipe( - const Context& context, - cl_uint packet_size, - cl_uint max_packets, - cl_int* err = NULL) - { - cl_int error; - - cl_mem_flags flags = CL_MEM_READ_WRITE | CL_MEM_HOST_NO_ACCESS; - object_ = ::clCreatePipe(context(), flags, packet_size, max_packets, nullptr, &error); - - detail::errHandler(error, __CREATE_PIPE_ERR); - if (err != NULL) { - *err = error; - } - } - - /*! \brief Constructs a Pipe in a the default context. - * - * Wraps clCreatePipe(). - * @param flags Bitfield. Only CL_MEM_READ_WRITE and CL_MEM_HOST_NO_ACCESS are valid. - * @param packet_size Size in bytes of a single packet of the pipe. - * @param max_packets Number of packets that may be stored in the pipe. - * - */ - Pipe( - cl_uint packet_size, - cl_uint max_packets, - cl_int* err = NULL) - { - cl_int error; - - Context context = Context::getDefault(err); - - cl_mem_flags flags = CL_MEM_READ_WRITE | CL_MEM_HOST_NO_ACCESS; - object_ = ::clCreatePipe(context(), flags, packet_size, max_packets, nullptr, &error); - - detail::errHandler(error, __CREATE_PIPE_ERR); - if (err != NULL) { - *err = error; - } - } - - //! \brief Default constructor - initializes to NULL. - Pipe() : Memory() { } - - /*! \brief Constructor from cl_mem - takes ownership. - * - * \param retainObject will cause the constructor to retain its cl object. - * Defaults to false to maintain compatibility with earlier versions. - * - * See Memory for further details. - */ - explicit Pipe(const cl_mem& pipe, bool retainObject = false) : - Memory(pipe, retainObject) { } - - /*! \brief Assignment from cl_mem - performs shallow copy. - * - * See Memory for further details. - */ - Pipe& operator = (const cl_mem& rhs) - { - Memory::operator=(rhs); - return *this; - } - - /*! \brief Copy constructor to forward copy to the superclass correctly. - * Required for MSVC. - */ - Pipe(const Pipe& pipe) : Memory(pipe) {} - - /*! \brief Copy assignment to forward copy to the superclass correctly. - * Required for MSVC. - */ - Pipe& operator = (const Pipe &pipe) - { - Memory::operator=(pipe); - return *this; - } - - /*! \brief Move constructor to forward move to the superclass correctly. - * Required for MSVC. - */ - Pipe(Pipe&& pipe) CL_HPP_NOEXCEPT_ : Memory(std::move(pipe)) {} - - /*! \brief Move assignment to forward move to the superclass correctly. - * Required for MSVC. - */ - Pipe& operator = (Pipe &&pipe) - { - Memory::operator=(std::move(pipe)); - return *this; - } - - //! \brief Wrapper for clGetMemObjectInfo(). - template - cl_int getInfo(cl_pipe_info name, T* param) const - { - return detail::errHandler( - detail::getInfo(&::clGetPipeInfo, object_, name, param), - __GET_PIPE_INFO_ERR); - } - - //! \brief Wrapper for clGetMemObjectInfo() that returns by value. - template typename - detail::param_traits::param_type - getInfo(cl_int* err = NULL) const - { - typename detail::param_traits< - detail::cl_pipe_info, name>::param_type param; - cl_int result = getInfo(name, ¶m); - if (err != NULL) { - *err = result; - } - return param; - } -}; // class Pipe -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 200 - - -/*! \brief Class interface for cl_sampler. - * - * \note Copies of these objects are shallow, meaning that the copy will refer - * to the same underlying cl_sampler as the original. For details, see - * clRetainSampler() and clReleaseSampler(). - * - * \see cl_sampler - */ -class Sampler : public detail::Wrapper -{ -public: - //! \brief Default constructor - initializes to NULL. - Sampler() { } - - /*! \brief Constructs a Sampler in a specified context. - * - * Wraps clCreateSampler(). - */ - Sampler( - const Context& context, - cl_bool normalized_coords, - cl_addressing_mode addressing_mode, - cl_filter_mode filter_mode, - cl_int* err = NULL) - { - cl_int error; - -#if CL_HPP_TARGET_OPENCL_VERSION >= 200 - cl_sampler_properties sampler_properties[] = { - CL_SAMPLER_NORMALIZED_COORDS, normalized_coords, - CL_SAMPLER_ADDRESSING_MODE, addressing_mode, - CL_SAMPLER_FILTER_MODE, filter_mode, - 0 }; - object_ = ::clCreateSamplerWithProperties( - context(), - sampler_properties, - &error); - - detail::errHandler(error, __CREATE_SAMPLER_WITH_PROPERTIES_ERR); - if (err != NULL) { - *err = error; - } -#else - object_ = ::clCreateSampler( - context(), - normalized_coords, - addressing_mode, - filter_mode, - &error); - - detail::errHandler(error, __CREATE_SAMPLER_ERR); - if (err != NULL) { - *err = error; - } -#endif - } - - /*! \brief Constructor from cl_sampler - takes ownership. - * - * \param retainObject will cause the constructor to retain its cl object. - * Defaults to false to maintain compatibility with - * earlier versions. - * This effectively transfers ownership of a refcount on the cl_sampler - * into the new Sampler object. - */ - explicit Sampler(const cl_sampler& sampler, bool retainObject = false) : - detail::Wrapper(sampler, retainObject) { } - - /*! \brief Assignment operator from cl_sampler - takes ownership. - * - * This effectively transfers ownership of a refcount on the rhs and calls - * clReleaseSampler() on the value previously held by this instance. - */ - Sampler& operator = (const cl_sampler& rhs) - { - detail::Wrapper::operator=(rhs); - return *this; - } - - /*! \brief Copy constructor to forward copy to the superclass correctly. - * Required for MSVC. - */ - Sampler(const Sampler& sam) : detail::Wrapper(sam) {} - - /*! \brief Copy assignment to forward copy to the superclass correctly. - * Required for MSVC. - */ - Sampler& operator = (const Sampler &sam) - { - detail::Wrapper::operator=(sam); - return *this; - } - - /*! \brief Move constructor to forward move to the superclass correctly. - * Required for MSVC. - */ - Sampler(Sampler&& sam) CL_HPP_NOEXCEPT_ : detail::Wrapper(std::move(sam)) {} - - /*! \brief Move assignment to forward move to the superclass correctly. - * Required for MSVC. - */ - Sampler& operator = (Sampler &&sam) - { - detail::Wrapper::operator=(std::move(sam)); - return *this; - } - - //! \brief Wrapper for clGetSamplerInfo(). - template - cl_int getInfo(cl_sampler_info name, T* param) const - { - return detail::errHandler( - detail::getInfo(&::clGetSamplerInfo, object_, name, param), - __GET_SAMPLER_INFO_ERR); - } - - //! \brief Wrapper for clGetSamplerInfo() that returns by value. - template typename - detail::param_traits::param_type - getInfo(cl_int* err = NULL) const - { - typename detail::param_traits< - detail::cl_sampler_info, name>::param_type param; - cl_int result = getInfo(name, ¶m); - if (err != NULL) { - *err = result; - } - return param; - } -}; - -class Program; -class CommandQueue; -class DeviceCommandQueue; -class Kernel; - -//! \brief Class interface for specifying NDRange values. -class NDRange -{ -private: - size_type sizes_[3]; - cl_uint dimensions_; - -public: - //! \brief Default constructor - resulting range has zero dimensions. - NDRange() - : dimensions_(0) - { - sizes_[0] = 0; - sizes_[1] = 0; - sizes_[2] = 0; - } - - //! \brief Constructs one-dimensional range. - NDRange(size_type size0) - : dimensions_(1) - { - sizes_[0] = size0; - sizes_[1] = 1; - sizes_[2] = 1; - } - - //! \brief Constructs two-dimensional range. - NDRange(size_type size0, size_type size1) - : dimensions_(2) - { - sizes_[0] = size0; - sizes_[1] = size1; - sizes_[2] = 1; - } - - //! \brief Constructs three-dimensional range. - NDRange(size_type size0, size_type size1, size_type size2) - : dimensions_(3) - { - sizes_[0] = size0; - sizes_[1] = size1; - sizes_[2] = size2; - } - - /*! \brief Conversion operator to const size_type *. - * - * \returns a pointer to the size of the first dimension. - */ - operator const size_type*() const { - return sizes_; - } - - //! \brief Queries the number of dimensions in the range. - size_type dimensions() const - { - return dimensions_; - } - - //! \brief Returns the size of the object in bytes based on the - // runtime number of dimensions - size_type size() const - { - return dimensions_*sizeof(size_type); - } - - size_type* get() - { - return sizes_; - } - - const size_type* get() const - { - return sizes_; - } -}; - -//! \brief A zero-dimensional range. -static const NDRange NullRange; - -//! \brief Local address wrapper for use with Kernel::setArg -struct LocalSpaceArg -{ - size_type size_; -}; - -namespace detail { - -template -struct KernelArgumentHandler; - -// Enable for objects that are not subclasses of memory -// Pointers, constants etc -template -struct KernelArgumentHandler::value>::type> -{ - static size_type size(const T&) { return sizeof(T); } - static const T* ptr(const T& value) { return &value; } -}; - -// Enable for subclasses of memory where we want to get a reference to the cl_mem out -// and pass that in for safety -template -struct KernelArgumentHandler::value>::type> -{ - static size_type size(const T&) { return sizeof(cl_mem); } - static const cl_mem* ptr(const T& value) { return &(value()); } -}; - -// Specialization for DeviceCommandQueue defined later - -template <> -struct KernelArgumentHandler -{ - static size_type size(const LocalSpaceArg& value) { return value.size_; } - static const void* ptr(const LocalSpaceArg&) { return NULL; } -}; - -} -//! \endcond - -/*! Local - * \brief Helper function for generating LocalSpaceArg objects. - */ -inline LocalSpaceArg -Local(size_type size) -{ - LocalSpaceArg ret = { size }; - return ret; -} - -/*! \brief Class interface for cl_kernel. - * - * \note Copies of these objects are shallow, meaning that the copy will refer - * to the same underlying cl_kernel as the original. For details, see - * clRetainKernel() and clReleaseKernel(). - * - * \see cl_kernel - */ -class Kernel : public detail::Wrapper -{ -public: - inline Kernel(const Program& program, const char* name, cl_int* err = NULL); - - //! \brief Default constructor - initializes to NULL. - Kernel() { } - - /*! \brief Constructor from cl_kernel - takes ownership. - * - * \param retainObject will cause the constructor to retain its cl object. - * Defaults to false to maintain compatibility with - * earlier versions. - * This effectively transfers ownership of a refcount on the cl_kernel - * into the new Kernel object. - */ - explicit Kernel(const cl_kernel& kernel, bool retainObject = false) : - detail::Wrapper(kernel, retainObject) { } - - /*! \brief Assignment operator from cl_kernel - takes ownership. - * - * This effectively transfers ownership of a refcount on the rhs and calls - * clReleaseKernel() on the value previously held by this instance. - */ - Kernel& operator = (const cl_kernel& rhs) - { - detail::Wrapper::operator=(rhs); - return *this; - } - - /*! \brief Copy constructor to forward copy to the superclass correctly. - * Required for MSVC. - */ - Kernel(const Kernel& kernel) : detail::Wrapper(kernel) {} - - /*! \brief Copy assignment to forward copy to the superclass correctly. - * Required for MSVC. - */ - Kernel& operator = (const Kernel &kernel) - { - detail::Wrapper::operator=(kernel); - return *this; - } - - /*! \brief Move constructor to forward move to the superclass correctly. - * Required for MSVC. - */ - Kernel(Kernel&& kernel) CL_HPP_NOEXCEPT_ : detail::Wrapper(std::move(kernel)) {} - - /*! \brief Move assignment to forward move to the superclass correctly. - * Required for MSVC. - */ - Kernel& operator = (Kernel &&kernel) - { - detail::Wrapper::operator=(std::move(kernel)); - return *this; - } - - template - cl_int getInfo(cl_kernel_info name, T* param) const - { - return detail::errHandler( - detail::getInfo(&::clGetKernelInfo, object_, name, param), - __GET_KERNEL_INFO_ERR); - } - - template typename - detail::param_traits::param_type - getInfo(cl_int* err = NULL) const - { - typename detail::param_traits< - detail::cl_kernel_info, name>::param_type param; - cl_int result = getInfo(name, ¶m); - if (err != NULL) { - *err = result; - } - return param; - } - -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 - template - cl_int getArgInfo(cl_uint argIndex, cl_kernel_arg_info name, T* param) const - { - return detail::errHandler( - detail::getInfo(&::clGetKernelArgInfo, object_, argIndex, name, param), - __GET_KERNEL_ARG_INFO_ERR); - } - - template typename - detail::param_traits::param_type - getArgInfo(cl_uint argIndex, cl_int* err = NULL) const - { - typename detail::param_traits< - detail::cl_kernel_arg_info, name>::param_type param; - cl_int result = getArgInfo(argIndex, name, ¶m); - if (err != NULL) { - *err = result; - } - return param; - } -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 120 - - template - cl_int getWorkGroupInfo( - const Device& device, cl_kernel_work_group_info name, T* param) const - { - return detail::errHandler( - detail::getInfo( - &::clGetKernelWorkGroupInfo, object_, device(), name, param), - __GET_KERNEL_WORK_GROUP_INFO_ERR); - } - - template typename - detail::param_traits::param_type - getWorkGroupInfo(const Device& device, cl_int* err = NULL) const - { - typename detail::param_traits< - detail::cl_kernel_work_group_info, name>::param_type param; - cl_int result = getWorkGroupInfo(device, name, ¶m); - if (err != NULL) { - *err = result; - } - return param; - } - -#if CL_HPP_TARGET_OPENCL_VERSION >= 200 -#if defined(CL_HPP_USE_CL_SUB_GROUPS_KHR) - cl_int getSubGroupInfo(const cl::Device &dev, cl_kernel_sub_group_info name, const cl::NDRange &range, size_type* param) const - { - typedef clGetKernelSubGroupInfoKHR_fn PFN_clGetKernelSubGroupInfoKHR; - static PFN_clGetKernelSubGroupInfoKHR pfn_clGetKernelSubGroupInfoKHR = NULL; - CL_HPP_INIT_CL_EXT_FCN_PTR_(clGetKernelSubGroupInfoKHR); - - return detail::errHandler( - pfn_clGetKernelSubGroupInfoKHR(object_, dev(), name, range.size(), range.get(), sizeof(size_type), param, nullptr), - __GET_KERNEL_ARG_INFO_ERR); - } - - template - size_type getSubGroupInfo(const cl::Device &dev, const cl::NDRange &range, cl_int* err = NULL) const - { - size_type param; - cl_int result = getSubGroupInfo(dev, name, range, ¶m); - if (err != NULL) { - *err = result; - } - return param; - } -#endif // #if defined(CL_HPP_USE_CL_SUB_GROUPS_KHR) -#endif // #if CL_HPP_TARGET_OPENCL_VERSION >= 200 - -#if CL_HPP_TARGET_OPENCL_VERSION >= 200 - /*! \brief setArg overload taking a shared_ptr type - */ - template - cl_int setArg(cl_uint index, const cl::pointer &argPtr) - { - return detail::errHandler( - ::clSetKernelArgSVMPointer(object_, index, argPtr.get()), - __SET_KERNEL_ARGS_ERR); - } - - /*! \brief setArg overload taking a vector type. - */ - template - cl_int setArg(cl_uint index, const cl::vector &argPtr) - { - return detail::errHandler( - ::clSetKernelArgSVMPointer(object_, index, argPtr.data()), - __SET_KERNEL_ARGS_ERR); - } - - /*! \brief setArg overload taking a pointer type - */ - template - typename std::enable_if::value, cl_int>::type - setArg(cl_uint index, const T argPtr) - { - return detail::errHandler( - ::clSetKernelArgSVMPointer(object_, index, argPtr), - __SET_KERNEL_ARGS_ERR); - } -#endif // #if CL_HPP_TARGET_OPENCL_VERSION >= 200 - - /*! \brief setArg overload taking a POD type - */ - template - typename std::enable_if::value, cl_int>::type - setArg(cl_uint index, const T &value) - { - return detail::errHandler( - ::clSetKernelArg( - object_, - index, - detail::KernelArgumentHandler::size(value), - detail::KernelArgumentHandler::ptr(value)), - __SET_KERNEL_ARGS_ERR); - } - - cl_int setArg(cl_uint index, size_type size, const void* argPtr) - { - return detail::errHandler( - ::clSetKernelArg(object_, index, size, argPtr), - __SET_KERNEL_ARGS_ERR); - } - -#if CL_HPP_TARGET_OPENCL_VERSION >= 200 - /*! - * Specify a vector of SVM pointers that the kernel may access in - * addition to its arguments. - */ - cl_int setSVMPointers(const vector &pointerList) - { - return detail::errHandler( - ::clSetKernelExecInfo( - object_, - CL_KERNEL_EXEC_INFO_SVM_PTRS, - sizeof(void*)*pointerList.size(), - pointerList.data())); - } - - /*! - * Specify a std::array of SVM pointers that the kernel may access in - * addition to its arguments. - */ - template - cl_int setSVMPointers(const std::array &pointerList) - { - return detail::errHandler( - ::clSetKernelExecInfo( - object_, - CL_KERNEL_EXEC_INFO_SVM_PTRS, - sizeof(void*)*pointerList.size(), - pointerList.data())); - } - - /*! \brief Enable fine-grained system SVM. - * - * \note It is only possible to enable fine-grained system SVM if all devices - * in the context associated with kernel support it. - * - * \param svmEnabled True if fine-grained system SVM is requested. False otherwise. - * \return CL_SUCCESS if the function was executed succesfully. CL_INVALID_OPERATION - * if no devices in the context support fine-grained system SVM. - * - * \see clSetKernelExecInfo - */ - cl_int enableFineGrainedSystemSVM(bool svmEnabled) - { - cl_bool svmEnabled_ = svmEnabled ? CL_TRUE : CL_FALSE; - return detail::errHandler( - ::clSetKernelExecInfo( - object_, - CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM, - sizeof(cl_bool), - &svmEnabled_ - ) - ); - } - - template - void setSVMPointersHelper(std::array &pointerList, const pointer &t0, Ts... ts) - { - pointerList[index] = static_cast(t0.get()); - setSVMPointersHelper(ts...); - } - - template - typename std::enable_if::value, void>::type - setSVMPointersHelper(std::array &pointerList, T0 t0, Ts... ts) - { - pointerList[index] = static_cast(t0); - setSVMPointersHelper(ts...); - } - - template - void setSVMPointersHelper(std::array &pointerList, const pointer &t0) - { - pointerList[index] = static_cast(t0.get()); - } - - template - typename std::enable_if::value, void>::type - setSVMPointersHelper(std::array &pointerList, T0 t0) - { - pointerList[index] = static_cast(t0); - } - - template - cl_int setSVMPointers(const T0 &t0, Ts... ts) - { - std::array pointerList; - - setSVMPointersHelper<0, 1 + sizeof...(Ts)>(pointerList, t0, ts...); - return detail::errHandler( - ::clSetKernelExecInfo( - object_, - CL_KERNEL_EXEC_INFO_SVM_PTRS, - sizeof(void*)*(1 + sizeof...(Ts)), - pointerList.data())); - } -#endif // #if CL_HPP_TARGET_OPENCL_VERSION >= 200 -}; - -/*! \class Program - * \brief Program interface that implements cl_program. - */ -class Program : public detail::Wrapper -{ -public: -#if !defined(CL_HPP_ENABLE_PROGRAM_CONSTRUCTION_FROM_ARRAY_COMPATIBILITY) - typedef vector> Binaries; - typedef vector Sources; -#else // #if !defined(CL_HPP_ENABLE_PROGRAM_CONSTRUCTION_FROM_ARRAY_COMPATIBILITY) - typedef vector > Binaries; - typedef vector > Sources; -#endif // #if !defined(CL_HPP_ENABLE_PROGRAM_CONSTRUCTION_FROM_ARRAY_COMPATIBILITY) - - Program( - const string& source, - bool build = false, - cl_int* err = NULL) - { - cl_int error; - - const char * strings = source.c_str(); - const size_type length = source.size(); - - Context context = Context::getDefault(err); - - object_ = ::clCreateProgramWithSource( - context(), (cl_uint)1, &strings, &length, &error); - - detail::errHandler(error, __CREATE_PROGRAM_WITH_SOURCE_ERR); - - if (error == CL_SUCCESS && build) { - - error = ::clBuildProgram( - object_, - 0, - NULL, -#if !defined(CL_HPP_CL_1_2_DEFAULT_BUILD) - "-cl-std=CL2.0", -#else - "", -#endif // #if !defined(CL_HPP_CL_1_2_DEFAULT_BUILD) - NULL, - NULL); - - detail::buildErrHandler(error, __BUILD_PROGRAM_ERR, getBuildInfo()); - } - - if (err != NULL) { - *err = error; - } - } - - Program( - const Context& context, - const string& source, - bool build = false, - cl_int* err = NULL) - { - cl_int error; - - const char * strings = source.c_str(); - const size_type length = source.size(); - - object_ = ::clCreateProgramWithSource( - context(), (cl_uint)1, &strings, &length, &error); - - detail::errHandler(error, __CREATE_PROGRAM_WITH_SOURCE_ERR); - - if (error == CL_SUCCESS && build) { - error = ::clBuildProgram( - object_, - 0, - NULL, -#if !defined(CL_HPP_CL_1_2_DEFAULT_BUILD) - "-cl-std=CL2.0", -#else - "", -#endif // #if !defined(CL_HPP_CL_1_2_DEFAULT_BUILD) - NULL, - NULL); - - detail::buildErrHandler(error, __BUILD_PROGRAM_ERR, getBuildInfo()); - } - - if (err != NULL) { - *err = error; - } - } - - /** - * Create a program from a vector of source strings and the default context. - * Does not compile or link the program. - */ - Program( - const Sources& sources, - cl_int* err = NULL) - { - cl_int error; - Context context = Context::getDefault(err); - - const size_type n = (size_type)sources.size(); - - vector lengths(n); - vector strings(n); - - for (size_type i = 0; i < n; ++i) { -#if !defined(CL_HPP_ENABLE_PROGRAM_CONSTRUCTION_FROM_ARRAY_COMPATIBILITY) - strings[i] = sources[(int)i].data(); - lengths[i] = sources[(int)i].length(); -#else // #if !defined(CL_HPP_ENABLE_PROGRAM_CONSTRUCTION_FROM_ARRAY_COMPATIBILITY) - strings[i] = sources[(int)i].first; - lengths[i] = sources[(int)i].second; -#endif // #if !defined(CL_HPP_ENABLE_PROGRAM_CONSTRUCTION_FROM_ARRAY_COMPATIBILITY) - } - - object_ = ::clCreateProgramWithSource( - context(), (cl_uint)n, strings.data(), lengths.data(), &error); - - detail::errHandler(error, __CREATE_PROGRAM_WITH_SOURCE_ERR); - if (err != NULL) { - *err = error; - } - } - - /** - * Create a program from a vector of source strings and a provided context. - * Does not compile or link the program. - */ - Program( - const Context& context, - const Sources& sources, - cl_int* err = NULL) - { - cl_int error; - - const size_type n = (size_type)sources.size(); - - vector lengths(n); - vector strings(n); - - for (size_type i = 0; i < n; ++i) { -#if !defined(CL_HPP_ENABLE_PROGRAM_CONSTRUCTION_FROM_ARRAY_COMPATIBILITY) - strings[i] = sources[(int)i].data(); - lengths[i] = sources[(int)i].length(); -#else // #if !defined(CL_HPP_ENABLE_PROGRAM_CONSTRUCTION_FROM_ARRAY_COMPATIBILITY) - strings[i] = sources[(int)i].first; - lengths[i] = sources[(int)i].second; -#endif // #if !defined(CL_HPP_ENABLE_PROGRAM_CONSTRUCTION_FROM_ARRAY_COMPATIBILITY) - } - - object_ = ::clCreateProgramWithSource( - context(), (cl_uint)n, strings.data(), lengths.data(), &error); - - detail::errHandler(error, __CREATE_PROGRAM_WITH_SOURCE_ERR); - if (err != NULL) { - *err = error; - } - } - - /** - * Construct a program object from a list of devices and a per-device list of binaries. - * \param context A valid OpenCL context in which to construct the program. - * \param devices A vector of OpenCL device objects for which the program will be created. - * \param binaries A vector of pairs of a pointer to a binary object and its length. - * \param binaryStatus An optional vector that on completion will be resized to - * match the size of binaries and filled with values to specify if each binary - * was successfully loaded. - * Set to CL_SUCCESS if the binary was successfully loaded. - * Set to CL_INVALID_VALUE if the length is 0 or the binary pointer is NULL. - * Set to CL_INVALID_BINARY if the binary provided is not valid for the matching device. - * \param err if non-NULL will be set to CL_SUCCESS on successful operation or one of the following errors: - * CL_INVALID_CONTEXT if context is not a valid context. - * CL_INVALID_VALUE if the length of devices is zero; or if the length of binaries does not match the length of devices; - * or if any entry in binaries is NULL or has length 0. - * CL_INVALID_DEVICE if OpenCL devices listed in devices are not in the list of devices associated with context. - * CL_INVALID_BINARY if an invalid program binary was encountered for any device. binaryStatus will return specific status for each device. - * CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host. - */ - Program( - const Context& context, - const vector& devices, - const Binaries& binaries, - vector* binaryStatus = NULL, - cl_int* err = NULL) - { - cl_int error; - - const size_type numDevices = devices.size(); - - // Catch size mismatch early and return - if(binaries.size() != numDevices) { - error = CL_INVALID_VALUE; - detail::errHandler(error, __CREATE_PROGRAM_WITH_BINARY_ERR); - if (err != NULL) { - *err = error; - } - return; - } - - - vector lengths(numDevices); - vector images(numDevices); -#if !defined(CL_HPP_ENABLE_PROGRAM_CONSTRUCTION_FROM_ARRAY_COMPATIBILITY) - for (size_type i = 0; i < numDevices; ++i) { - images[i] = binaries[i].data(); - lengths[i] = binaries[(int)i].size(); - } -#else // #if !defined(CL_HPP_ENABLE_PROGRAM_CONSTRUCTION_FROM_ARRAY_COMPATIBILITY) - for (size_type i = 0; i < numDevices; ++i) { - images[i] = (const unsigned char*)binaries[i].first; - lengths[i] = binaries[(int)i].second; - } -#endif // #if !defined(CL_HPP_ENABLE_PROGRAM_CONSTRUCTION_FROM_ARRAY_COMPATIBILITY) - - vector deviceIDs(numDevices); - for( size_type deviceIndex = 0; deviceIndex < numDevices; ++deviceIndex ) { - deviceIDs[deviceIndex] = (devices[deviceIndex])(); - } - - if(binaryStatus) { - binaryStatus->resize(numDevices); - } - - object_ = ::clCreateProgramWithBinary( - context(), (cl_uint) devices.size(), - deviceIDs.data(), - lengths.data(), images.data(), (binaryStatus != NULL && numDevices > 0) - ? &binaryStatus->front() - : NULL, &error); - - detail::errHandler(error, __CREATE_PROGRAM_WITH_BINARY_ERR); - if (err != NULL) { - *err = error; - } - } - - -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 - /** - * Create program using builtin kernels. - * \param kernelNames Semi-colon separated list of builtin kernel names - */ - Program( - const Context& context, - const vector& devices, - const string& kernelNames, - cl_int* err = NULL) - { - cl_int error; - - - size_type numDevices = devices.size(); - vector deviceIDs(numDevices); - for( size_type deviceIndex = 0; deviceIndex < numDevices; ++deviceIndex ) { - deviceIDs[deviceIndex] = (devices[deviceIndex])(); - } - - object_ = ::clCreateProgramWithBuiltInKernels( - context(), - (cl_uint) devices.size(), - deviceIDs.data(), - kernelNames.c_str(), - &error); - - detail::errHandler(error, __CREATE_PROGRAM_WITH_BUILT_IN_KERNELS_ERR); - if (err != NULL) { - *err = error; - } - } -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 120 - - Program() { } - - - /*! \brief Constructor from cl_mem - takes ownership. - * - * \param retainObject will cause the constructor to retain its cl object. - * Defaults to false to maintain compatibility with - * earlier versions. - */ - explicit Program(const cl_program& program, bool retainObject = false) : - detail::Wrapper(program, retainObject) { } - - Program& operator = (const cl_program& rhs) - { - detail::Wrapper::operator=(rhs); - return *this; - } - - /*! \brief Copy constructor to forward copy to the superclass correctly. - * Required for MSVC. - */ - Program(const Program& program) : detail::Wrapper(program) {} - - /*! \brief Copy assignment to forward copy to the superclass correctly. - * Required for MSVC. - */ - Program& operator = (const Program &program) - { - detail::Wrapper::operator=(program); - return *this; - } - - /*! \brief Move constructor to forward move to the superclass correctly. - * Required for MSVC. - */ - Program(Program&& program) CL_HPP_NOEXCEPT_ : detail::Wrapper(std::move(program)) {} - - /*! \brief Move assignment to forward move to the superclass correctly. - * Required for MSVC. - */ - Program& operator = (Program &&program) - { - detail::Wrapper::operator=(std::move(program)); - return *this; - } - - cl_int build( - const vector& devices, - const char* options = NULL, - void (CL_CALLBACK * notifyFptr)(cl_program, void *) = NULL, - void* data = NULL) const - { - size_type numDevices = devices.size(); - vector deviceIDs(numDevices); - - for( size_type deviceIndex = 0; deviceIndex < numDevices; ++deviceIndex ) { - deviceIDs[deviceIndex] = (devices[deviceIndex])(); - } - - cl_int buildError = ::clBuildProgram( - object_, - (cl_uint) - devices.size(), - deviceIDs.data(), - options, - notifyFptr, - data); - - return detail::buildErrHandler(buildError, __BUILD_PROGRAM_ERR, getBuildInfo()); - } - - cl_int build( - const char* options = NULL, - void (CL_CALLBACK * notifyFptr)(cl_program, void *) = NULL, - void* data = NULL) const - { - cl_int buildError = ::clBuildProgram( - object_, - 0, - NULL, - options, - notifyFptr, - data); - - - return detail::buildErrHandler(buildError, __BUILD_PROGRAM_ERR, getBuildInfo()); - } - -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 - cl_int compile( - const char* options = NULL, - void (CL_CALLBACK * notifyFptr)(cl_program, void *) = NULL, - void* data = NULL) const - { - cl_int error = ::clCompileProgram( - object_, - 0, - NULL, - options, - 0, - NULL, - NULL, - notifyFptr, - data); - return detail::buildErrHandler(error, __COMPILE_PROGRAM_ERR, getBuildInfo()); - } -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 120 - - template - cl_int getInfo(cl_program_info name, T* param) const - { - return detail::errHandler( - detail::getInfo(&::clGetProgramInfo, object_, name, param), - __GET_PROGRAM_INFO_ERR); - } - - template typename - detail::param_traits::param_type - getInfo(cl_int* err = NULL) const - { - typename detail::param_traits< - detail::cl_program_info, name>::param_type param; - cl_int result = getInfo(name, ¶m); - if (err != NULL) { - *err = result; - } - return param; - } - - template - cl_int getBuildInfo( - const Device& device, cl_program_build_info name, T* param) const - { - return detail::errHandler( - detail::getInfo( - &::clGetProgramBuildInfo, object_, device(), name, param), - __GET_PROGRAM_BUILD_INFO_ERR); - } - - template typename - detail::param_traits::param_type - getBuildInfo(const Device& device, cl_int* err = NULL) const - { - typename detail::param_traits< - detail::cl_program_build_info, name>::param_type param; - cl_int result = getBuildInfo(device, name, ¶m); - if (err != NULL) { - *err = result; - } - return param; - } - - /** - * Build info function that returns a vector of device/info pairs for the specified - * info type and for all devices in the program. - * On an error reading the info for any device, an empty vector of info will be returned. - */ - template - vector::param_type>> - getBuildInfo(cl_int *err = NULL) const - { - cl_int result = CL_SUCCESS; - - auto devs = getInfo(&result); - vector::param_type>> - devInfo; - - // If there was an initial error from getInfo return the error - if (result != CL_SUCCESS) { - if (err != NULL) { - *err = result; - } - return devInfo; - } - - for (cl::Device d : devs) { - typename detail::param_traits< - detail::cl_program_build_info, name>::param_type param; - result = getBuildInfo(d, name, ¶m); - devInfo.push_back( - std::pair::param_type> - (d, param)); - if (result != CL_SUCCESS) { - // On error, leave the loop and return the error code - break; - } - } - if (err != NULL) { - *err = result; - } - if (result != CL_SUCCESS) { - devInfo.clear(); - } - return devInfo; - } - - cl_int createKernels(vector* kernels) - { - cl_uint numKernels; - cl_int err = ::clCreateKernelsInProgram(object_, 0, NULL, &numKernels); - if (err != CL_SUCCESS) { - return detail::errHandler(err, __CREATE_KERNELS_IN_PROGRAM_ERR); - } - - vector value(numKernels); - - err = ::clCreateKernelsInProgram( - object_, numKernels, value.data(), NULL); - if (err != CL_SUCCESS) { - return detail::errHandler(err, __CREATE_KERNELS_IN_PROGRAM_ERR); - } - - if (kernels) { - kernels->resize(value.size()); - - // Assign to param, constructing with retain behaviour - // to correctly capture each underlying CL object - for (size_type i = 0; i < value.size(); i++) { - // We do not need to retain because this kernel is being created - // by the runtime - (*kernels)[i] = Kernel(value[i], false); - } - } - return CL_SUCCESS; - } -}; - -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 -inline Program linkProgram( - Program input1, - Program input2, - const char* options = NULL, - void (CL_CALLBACK * notifyFptr)(cl_program, void *) = NULL, - void* data = NULL, - cl_int* err = NULL) -{ - cl_int error_local = CL_SUCCESS; - - cl_program programs[2] = { input1(), input2() }; - - Context ctx = input1.getInfo(&error_local); - if(error_local!=CL_SUCCESS) { - detail::errHandler(error_local, __LINK_PROGRAM_ERR); - } - - cl_program prog = ::clLinkProgram( - ctx(), - 0, - NULL, - options, - 2, - programs, - notifyFptr, - data, - &error_local); - - detail::errHandler(error_local,__COMPILE_PROGRAM_ERR); - if (err != NULL) { - *err = error_local; - } - - return Program(prog); -} - -inline Program linkProgram( - vector inputPrograms, - const char* options = NULL, - void (CL_CALLBACK * notifyFptr)(cl_program, void *) = NULL, - void* data = NULL, - cl_int* err = NULL) -{ - cl_int error_local = CL_SUCCESS; - - vector programs(inputPrograms.size()); - - for (unsigned int i = 0; i < inputPrograms.size(); i++) { - programs[i] = inputPrograms[i](); - } - - Context ctx; - if(inputPrograms.size() > 0) { - ctx = inputPrograms[0].getInfo(&error_local); - if(error_local!=CL_SUCCESS) { - detail::errHandler(error_local, __LINK_PROGRAM_ERR); - } - } - cl_program prog = ::clLinkProgram( - ctx(), - 0, - NULL, - options, - (cl_uint)inputPrograms.size(), - programs.data(), - notifyFptr, - data, - &error_local); - - detail::errHandler(error_local,__COMPILE_PROGRAM_ERR); - if (err != NULL) { - *err = error_local; - } - - return Program(prog, false); -} -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 120 - -// Template specialization for CL_PROGRAM_BINARIES -template <> -inline cl_int cl::Program::getInfo(cl_program_info name, vector>* param) const -{ - if (name != CL_PROGRAM_BINARIES) { - return CL_INVALID_VALUE; - } - if (param) { - // Resize the parameter array appropriately for each allocation - // and pass down to the helper - - vector sizes = getInfo(); - size_type numBinaries = sizes.size(); - - // Resize the parameter array and constituent arrays - param->resize(numBinaries); - for (size_type i = 0; i < numBinaries; ++i) { - (*param)[i].resize(sizes[i]); - } - - return detail::errHandler( - detail::getInfo(&::clGetProgramInfo, object_, name, param), - __GET_PROGRAM_INFO_ERR); - } - - return CL_SUCCESS; -} - -template<> -inline vector> cl::Program::getInfo(cl_int* err) const -{ - vector> binariesVectors; - - cl_int result = getInfo(CL_PROGRAM_BINARIES, &binariesVectors); - if (err != NULL) { - *err = result; - } - return binariesVectors; -} - -inline Kernel::Kernel(const Program& program, const char* name, cl_int* err) -{ - cl_int error; - - object_ = ::clCreateKernel(program(), name, &error); - detail::errHandler(error, __CREATE_KERNEL_ERR); - - if (err != NULL) { - *err = error; - } - -} - -enum class QueueProperties : cl_command_queue_properties -{ - None = 0, - Profiling = CL_QUEUE_PROFILING_ENABLE, - OutOfOrder = CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, -}; - -inline QueueProperties operator|(QueueProperties lhs, QueueProperties rhs) -{ - return static_cast(static_cast(lhs) | static_cast(rhs)); -} - -/*! \class CommandQueue - * \brief CommandQueue interface for cl_command_queue. - */ -class CommandQueue : public detail::Wrapper -{ -private: - static std::once_flag default_initialized_; - static CommandQueue default_; - static cl_int default_error_; - - /*! \brief Create the default command queue returned by @ref getDefault. - * - * It sets default_error_ to indicate success or failure. It does not throw - * @c cl::Error. - */ - static void makeDefault() - { - /* We don't want to throw an error from this function, so we have to - * catch and set the error flag. - */ -#if defined(CL_HPP_ENABLE_EXCEPTIONS) - try -#endif - { - int error; - Context context = Context::getDefault(&error); - - if (error != CL_SUCCESS) { - default_error_ = error; - } - else { - Device device = Device::getDefault(); - default_ = CommandQueue(context, device, 0, &default_error_); - } - } -#if defined(CL_HPP_ENABLE_EXCEPTIONS) - catch (cl::Error &e) { - default_error_ = e.err(); - } -#endif - } - - /*! \brief Create the default command queue. - * - * This sets @c default_. It does not throw - * @c cl::Error. - */ - static void makeDefaultProvided(const CommandQueue &c) { - default_ = c; - } - -public: -#ifdef CL_HPP_UNIT_TEST_ENABLE - /*! \brief Reset the default. - * - * This sets @c default_ to an empty value to support cleanup in - * the unit test framework. - * This function is not thread safe. - */ - static void unitTestClearDefault() { - default_ = CommandQueue(); - } -#endif // #ifdef CL_HPP_UNIT_TEST_ENABLE - - - /*! - * \brief Constructs a CommandQueue based on passed properties. - * Will return an CL_INVALID_QUEUE_PROPERTIES error if CL_QUEUE_ON_DEVICE is specified. - */ - CommandQueue( - cl_command_queue_properties properties, - cl_int* err = NULL) - { - cl_int error; - - Context context = Context::getDefault(&error); - detail::errHandler(error, __CREATE_CONTEXT_ERR); - - if (error != CL_SUCCESS) { - if (err != NULL) { - *err = error; - } - } - else { - Device device = context.getInfo()[0]; - -#if CL_HPP_TARGET_OPENCL_VERSION >= 200 - cl_queue_properties queue_properties[] = { - CL_QUEUE_PROPERTIES, properties, 0 }; - if ((properties & CL_QUEUE_ON_DEVICE) == 0) { - object_ = ::clCreateCommandQueueWithProperties( - context(), device(), queue_properties, &error); - } - else { - error = CL_INVALID_QUEUE_PROPERTIES; - } - - detail::errHandler(error, __CREATE_COMMAND_QUEUE_WITH_PROPERTIES_ERR); - if (err != NULL) { - *err = error; - } -#else - object_ = ::clCreateCommandQueue( - context(), device(), properties, &error); - - detail::errHandler(error, __CREATE_COMMAND_QUEUE_ERR); - if (err != NULL) { - *err = error; - } -#endif - } - } - - /*! - * \brief Constructs a CommandQueue based on passed properties. - * Will return an CL_INVALID_QUEUE_PROPERTIES error if CL_QUEUE_ON_DEVICE is specified. - */ - CommandQueue( - QueueProperties properties, - cl_int* err = NULL) - { - cl_int error; - - Context context = Context::getDefault(&error); - detail::errHandler(error, __CREATE_CONTEXT_ERR); - - if (error != CL_SUCCESS) { - if (err != NULL) { - *err = error; - } - } - else { - Device device = context.getInfo()[0]; - -#if CL_HPP_TARGET_OPENCL_VERSION >= 200 - cl_queue_properties queue_properties[] = { - CL_QUEUE_PROPERTIES, static_cast(properties), 0 }; - - object_ = ::clCreateCommandQueueWithProperties( - context(), device(), queue_properties, &error); - - - detail::errHandler(error, __CREATE_COMMAND_QUEUE_WITH_PROPERTIES_ERR); - if (err != NULL) { - *err = error; - } -#else - object_ = ::clCreateCommandQueue( - context(), device(), static_cast(properties), &error); - - detail::errHandler(error, __CREATE_COMMAND_QUEUE_ERR); - if (err != NULL) { - *err = error; - } -#endif - } - } - - /*! - * \brief Constructs a CommandQueue for an implementation defined device in the given context - * Will return an CL_INVALID_QUEUE_PROPERTIES error if CL_QUEUE_ON_DEVICE is specified. - */ - explicit CommandQueue( - const Context& context, - cl_command_queue_properties properties = 0, - cl_int* err = NULL) - { - cl_int error; - vector devices; - error = context.getInfo(CL_CONTEXT_DEVICES, &devices); - - detail::errHandler(error, __CREATE_CONTEXT_ERR); - - if (error != CL_SUCCESS) - { - if (err != NULL) { - *err = error; - } - return; - } - -#if CL_HPP_TARGET_OPENCL_VERSION >= 200 - cl_queue_properties queue_properties[] = { - CL_QUEUE_PROPERTIES, properties, 0 }; - if ((properties & CL_QUEUE_ON_DEVICE) == 0) { - object_ = ::clCreateCommandQueueWithProperties( - context(), devices[0](), queue_properties, &error); - } - else { - error = CL_INVALID_QUEUE_PROPERTIES; - } - - detail::errHandler(error, __CREATE_COMMAND_QUEUE_WITH_PROPERTIES_ERR); - if (err != NULL) { - *err = error; - } -#else - object_ = ::clCreateCommandQueue( - context(), devices[0](), properties, &error); - - detail::errHandler(error, __CREATE_COMMAND_QUEUE_ERR); - if (err != NULL) { - *err = error; - } -#endif - - } - - /*! - * \brief Constructs a CommandQueue for an implementation defined device in the given context - * Will return an CL_INVALID_QUEUE_PROPERTIES error if CL_QUEUE_ON_DEVICE is specified. - */ - explicit CommandQueue( - const Context& context, - QueueProperties properties, - cl_int* err = NULL) - { - cl_int error; - vector devices; - error = context.getInfo(CL_CONTEXT_DEVICES, &devices); - - detail::errHandler(error, __CREATE_CONTEXT_ERR); - - if (error != CL_SUCCESS) - { - if (err != NULL) { - *err = error; - } - return; - } - -#if CL_HPP_TARGET_OPENCL_VERSION >= 200 - cl_queue_properties queue_properties[] = { - CL_QUEUE_PROPERTIES, static_cast(properties), 0 }; - object_ = ::clCreateCommandQueueWithProperties( - context(), devices[0](), queue_properties, &error); - - detail::errHandler(error, __CREATE_COMMAND_QUEUE_WITH_PROPERTIES_ERR); - if (err != NULL) { - *err = error; - } -#else - object_ = ::clCreateCommandQueue( - context(), devices[0](), static_cast(properties), &error); - - detail::errHandler(error, __CREATE_COMMAND_QUEUE_ERR); - if (err != NULL) { - *err = error; - } -#endif - - } - - /*! - * \brief Constructs a CommandQueue for a passed device and context - * Will return an CL_INVALID_QUEUE_PROPERTIES error if CL_QUEUE_ON_DEVICE is specified. - */ - CommandQueue( - const Context& context, - const Device& device, - cl_command_queue_properties properties = 0, - cl_int* err = NULL) - { - cl_int error; - -#if CL_HPP_TARGET_OPENCL_VERSION >= 200 - cl_queue_properties queue_properties[] = { - CL_QUEUE_PROPERTIES, properties, 0 }; - object_ = ::clCreateCommandQueueWithProperties( - context(), device(), queue_properties, &error); - - detail::errHandler(error, __CREATE_COMMAND_QUEUE_WITH_PROPERTIES_ERR); - if (err != NULL) { - *err = error; - } -#else - object_ = ::clCreateCommandQueue( - context(), device(), properties, &error); - - detail::errHandler(error, __CREATE_COMMAND_QUEUE_ERR); - if (err != NULL) { - *err = error; - } -#endif - } - - /*! - * \brief Constructs a CommandQueue for a passed device and context - * Will return an CL_INVALID_QUEUE_PROPERTIES error if CL_QUEUE_ON_DEVICE is specified. - */ - CommandQueue( - const Context& context, - const Device& device, - QueueProperties properties, - cl_int* err = NULL) - { - cl_int error; - -#if CL_HPP_TARGET_OPENCL_VERSION >= 200 - cl_queue_properties queue_properties[] = { - CL_QUEUE_PROPERTIES, static_cast(properties), 0 }; - object_ = ::clCreateCommandQueueWithProperties( - context(), device(), queue_properties, &error); - - detail::errHandler(error, __CREATE_COMMAND_QUEUE_WITH_PROPERTIES_ERR); - if (err != NULL) { - *err = error; - } -#else - object_ = ::clCreateCommandQueue( - context(), device(), static_cast(properties), &error); - - detail::errHandler(error, __CREATE_COMMAND_QUEUE_ERR); - if (err != NULL) { - *err = error; - } -#endif - } - - static CommandQueue getDefault(cl_int * err = NULL) - { - std::call_once(default_initialized_, makeDefault); -#if CL_HPP_TARGET_OPENCL_VERSION >= 200 - detail::errHandler(default_error_, __CREATE_COMMAND_QUEUE_WITH_PROPERTIES_ERR); -#else // CL_HPP_TARGET_OPENCL_VERSION >= 200 - detail::errHandler(default_error_, __CREATE_COMMAND_QUEUE_ERR); -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 200 - if (err != NULL) { - *err = default_error_; - } - return default_; - } - - /** - * Modify the default command queue to be used by - * subsequent operations. - * Will only set the default if no default was previously created. - * @return updated default command queue. - * Should be compared to the passed value to ensure that it was updated. - */ - static CommandQueue setDefault(const CommandQueue &default_queue) - { - std::call_once(default_initialized_, makeDefaultProvided, std::cref(default_queue)); - detail::errHandler(default_error_); - return default_; - } - - CommandQueue() { } - - - /*! \brief Constructor from cl_mem - takes ownership. - * - * \param retainObject will cause the constructor to retain its cl object. - * Defaults to false to maintain compatibility with - * earlier versions. - */ - explicit CommandQueue(const cl_command_queue& commandQueue, bool retainObject = false) : - detail::Wrapper(commandQueue, retainObject) { } - - CommandQueue& operator = (const cl_command_queue& rhs) - { - detail::Wrapper::operator=(rhs); - return *this; - } - - /*! \brief Copy constructor to forward copy to the superclass correctly. - * Required for MSVC. - */ - CommandQueue(const CommandQueue& queue) : detail::Wrapper(queue) {} - - /*! \brief Copy assignment to forward copy to the superclass correctly. - * Required for MSVC. - */ - CommandQueue& operator = (const CommandQueue &queue) - { - detail::Wrapper::operator=(queue); - return *this; - } - - /*! \brief Move constructor to forward move to the superclass correctly. - * Required for MSVC. - */ - CommandQueue(CommandQueue&& queue) CL_HPP_NOEXCEPT_ : detail::Wrapper(std::move(queue)) {} - - /*! \brief Move assignment to forward move to the superclass correctly. - * Required for MSVC. - */ - CommandQueue& operator = (CommandQueue &&queue) - { - detail::Wrapper::operator=(std::move(queue)); - return *this; - } - - template - cl_int getInfo(cl_command_queue_info name, T* param) const - { - return detail::errHandler( - detail::getInfo( - &::clGetCommandQueueInfo, object_, name, param), - __GET_COMMAND_QUEUE_INFO_ERR); - } - - template typename - detail::param_traits::param_type - getInfo(cl_int* err = NULL) const - { - typename detail::param_traits< - detail::cl_command_queue_info, name>::param_type param; - cl_int result = getInfo(name, ¶m); - if (err != NULL) { - *err = result; - } - return param; - } - - cl_int enqueueReadBuffer( - const Buffer& buffer, - cl_bool blocking, - size_type offset, - size_type size, - void* ptr, - const vector* events = NULL, - Event* event = NULL) const - { - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueReadBuffer( - object_, buffer(), blocking, offset, size, - ptr, - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_READ_BUFFER_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } - - cl_int enqueueWriteBuffer( - const Buffer& buffer, - cl_bool blocking, - size_type offset, - size_type size, - const void* ptr, - const vector* events = NULL, - Event* event = NULL) const - { - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueWriteBuffer( - object_, buffer(), blocking, offset, size, - ptr, - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_WRITE_BUFFER_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } - - cl_int enqueueCopyBuffer( - const Buffer& src, - const Buffer& dst, - size_type src_offset, - size_type dst_offset, - size_type size, - const vector* events = NULL, - Event* event = NULL) const - { - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueCopyBuffer( - object_, src(), dst(), src_offset, dst_offset, size, - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQEUE_COPY_BUFFER_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } - - cl_int enqueueReadBufferRect( - const Buffer& buffer, - cl_bool blocking, - const array& buffer_offset, - const array& host_offset, - const array& region, - size_type buffer_row_pitch, - size_type buffer_slice_pitch, - size_type host_row_pitch, - size_type host_slice_pitch, - void *ptr, - const vector* events = NULL, - Event* event = NULL) const - { - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueReadBufferRect( - object_, - buffer(), - blocking, - buffer_offset.data(), - host_offset.data(), - region.data(), - buffer_row_pitch, - buffer_slice_pitch, - host_row_pitch, - host_slice_pitch, - ptr, - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_READ_BUFFER_RECT_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } - - cl_int enqueueWriteBufferRect( - const Buffer& buffer, - cl_bool blocking, - const array& buffer_offset, - const array& host_offset, - const array& region, - size_type buffer_row_pitch, - size_type buffer_slice_pitch, - size_type host_row_pitch, - size_type host_slice_pitch, - const void *ptr, - const vector* events = NULL, - Event* event = NULL) const - { - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueWriteBufferRect( - object_, - buffer(), - blocking, - buffer_offset.data(), - host_offset.data(), - region.data(), - buffer_row_pitch, - buffer_slice_pitch, - host_row_pitch, - host_slice_pitch, - ptr, - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_WRITE_BUFFER_RECT_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } - - cl_int enqueueCopyBufferRect( - const Buffer& src, - const Buffer& dst, - const array& src_origin, - const array& dst_origin, - const array& region, - size_type src_row_pitch, - size_type src_slice_pitch, - size_type dst_row_pitch, - size_type dst_slice_pitch, - const vector* events = NULL, - Event* event = NULL) const - { - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueCopyBufferRect( - object_, - src(), - dst(), - src_origin.data(), - dst_origin.data(), - region.data(), - src_row_pitch, - src_slice_pitch, - dst_row_pitch, - dst_slice_pitch, - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQEUE_COPY_BUFFER_RECT_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } - -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 - /** - * Enqueue a command to fill a buffer object with a pattern - * of a given size. The pattern is specified as a vector type. - * \tparam PatternType The datatype of the pattern field. - * The pattern type must be an accepted OpenCL data type. - * \tparam offset Is the offset in bytes into the buffer at - * which to start filling. This must be a multiple of - * the pattern size. - * \tparam size Is the size in bytes of the region to fill. - * This must be a multiple of the pattern size. - */ - template - cl_int enqueueFillBuffer( - const Buffer& buffer, - PatternType pattern, - size_type offset, - size_type size, - const vector* events = NULL, - Event* event = NULL) const - { - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueFillBuffer( - object_, - buffer(), - static_cast(&pattern), - sizeof(PatternType), - offset, - size, - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_FILL_BUFFER_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 120 - - cl_int enqueueReadImage( - const Image& image, - cl_bool blocking, - const array& origin, - const array& region, - size_type row_pitch, - size_type slice_pitch, - void* ptr, - const vector* events = NULL, - Event* event = NULL) const - { - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueReadImage( - object_, - image(), - blocking, - origin.data(), - region.data(), - row_pitch, - slice_pitch, - ptr, - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_READ_IMAGE_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } - - cl_int enqueueWriteImage( - const Image& image, - cl_bool blocking, - const array& origin, - const array& region, - size_type row_pitch, - size_type slice_pitch, - const void* ptr, - const vector* events = NULL, - Event* event = NULL) const - { - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueWriteImage( - object_, - image(), - blocking, - origin.data(), - region.data(), - row_pitch, - slice_pitch, - ptr, - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_WRITE_IMAGE_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } - - cl_int enqueueCopyImage( - const Image& src, - const Image& dst, - const array& src_origin, - const array& dst_origin, - const array& region, - const vector* events = NULL, - Event* event = NULL) const - { - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueCopyImage( - object_, - src(), - dst(), - src_origin.data(), - dst_origin.data(), - region.data(), - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_COPY_IMAGE_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } - -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 - /** - * Enqueue a command to fill an image object with a specified color. - * \param fillColor is the color to use to fill the image. - * This is a four component RGBA floating-point color value if - * the image channel data type is not an unnormalized signed or - * unsigned data type. - */ - cl_int enqueueFillImage( - const Image& image, - cl_float4 fillColor, - const array& origin, - const array& region, - const vector* events = NULL, - Event* event = NULL) const - { - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueFillImage( - object_, - image(), - static_cast(&fillColor), - origin.data(), - region.data(), - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_FILL_IMAGE_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } - - /** - * Enqueue a command to fill an image object with a specified color. - * \param fillColor is the color to use to fill the image. - * This is a four component RGBA signed integer color value if - * the image channel data type is an unnormalized signed integer - * type. - */ - cl_int enqueueFillImage( - const Image& image, - cl_int4 fillColor, - const array& origin, - const array& region, - const vector* events = NULL, - Event* event = NULL) const - { - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueFillImage( - object_, - image(), - static_cast(&fillColor), - origin.data(), - region.data(), - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_FILL_IMAGE_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } - - /** - * Enqueue a command to fill an image object with a specified color. - * \param fillColor is the color to use to fill the image. - * This is a four component RGBA unsigned integer color value if - * the image channel data type is an unnormalized unsigned integer - * type. - */ - cl_int enqueueFillImage( - const Image& image, - cl_uint4 fillColor, - const array& origin, - const array& region, - const vector* events = NULL, - Event* event = NULL) const - { - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueFillImage( - object_, - image(), - static_cast(&fillColor), - origin.data(), - region.data(), - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_FILL_IMAGE_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 120 - - cl_int enqueueCopyImageToBuffer( - const Image& src, - const Buffer& dst, - const array& src_origin, - const array& region, - size_type dst_offset, - const vector* events = NULL, - Event* event = NULL) const - { - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueCopyImageToBuffer( - object_, - src(), - dst(), - src_origin.data(), - region.data(), - dst_offset, - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_COPY_IMAGE_TO_BUFFER_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } - - cl_int enqueueCopyBufferToImage( - const Buffer& src, - const Image& dst, - size_type src_offset, - const array& dst_origin, - const array& region, - const vector* events = NULL, - Event* event = NULL) const - { - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueCopyBufferToImage( - object_, - src(), - dst(), - src_offset, - dst_origin.data(), - region.data(), - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_COPY_BUFFER_TO_IMAGE_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } - - void* enqueueMapBuffer( - const Buffer& buffer, - cl_bool blocking, - cl_map_flags flags, - size_type offset, - size_type size, - const vector* events = NULL, - Event* event = NULL, - cl_int* err = NULL) const - { - cl_event tmp; - cl_int error; - void * result = ::clEnqueueMapBuffer( - object_, buffer(), blocking, flags, offset, size, - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL, - &error); - - detail::errHandler(error, __ENQUEUE_MAP_BUFFER_ERR); - if (err != NULL) { - *err = error; - } - if (event != NULL && error == CL_SUCCESS) - *event = tmp; - - return result; - } - - void* enqueueMapImage( - const Image& buffer, - cl_bool blocking, - cl_map_flags flags, - const array& origin, - const array& region, - size_type * row_pitch, - size_type * slice_pitch, - const vector* events = NULL, - Event* event = NULL, - cl_int* err = NULL) const - { - cl_event tmp; - cl_int error; - void * result = ::clEnqueueMapImage( - object_, buffer(), blocking, flags, - origin.data(), - region.data(), - row_pitch, slice_pitch, - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL, - &error); - - detail::errHandler(error, __ENQUEUE_MAP_IMAGE_ERR); - if (err != NULL) { - *err = error; - } - if (event != NULL && error == CL_SUCCESS) - *event = tmp; - return result; - } - -#if CL_HPP_TARGET_OPENCL_VERSION >= 200 - /** - * Enqueues a command that will allow the host to update a region of a coarse-grained SVM buffer. - * This variant takes a raw SVM pointer. - */ - template - cl_int enqueueMapSVM( - T* ptr, - cl_bool blocking, - cl_map_flags flags, - size_type size, - const vector* events = NULL, - Event* event = NULL) const - { - cl_event tmp; - cl_int err = detail::errHandler(::clEnqueueSVMMap( - object_, blocking, flags, static_cast(ptr), size, - (events != NULL) ? (cl_uint)events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*)&events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_MAP_BUFFER_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } - - - /** - * Enqueues a command that will allow the host to update a region of a coarse-grained SVM buffer. - * This variant takes a cl::pointer instance. - */ - template - cl_int enqueueMapSVM( - cl::pointer &ptr, - cl_bool blocking, - cl_map_flags flags, - size_type size, - const vector* events = NULL, - Event* event = NULL) const - { - cl_event tmp; - cl_int err = detail::errHandler(::clEnqueueSVMMap( - object_, blocking, flags, static_cast(ptr.get()), size, - (events != NULL) ? (cl_uint)events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*)&events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_MAP_BUFFER_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } - - /** - * Enqueues a command that will allow the host to update a region of a coarse-grained SVM buffer. - * This variant takes a cl::vector instance. - */ - template - cl_int enqueueMapSVM( - cl::vector &container, - cl_bool blocking, - cl_map_flags flags, - const vector* events = NULL, - Event* event = NULL) const - { - cl_event tmp; - cl_int err = detail::errHandler(::clEnqueueSVMMap( - object_, blocking, flags, static_cast(container.data()), container.size(), - (events != NULL) ? (cl_uint)events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*)&events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_MAP_BUFFER_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } -#endif // #if CL_HPP_TARGET_OPENCL_VERSION >= 200 - - cl_int enqueueUnmapMemObject( - const Memory& memory, - void* mapped_ptr, - const vector* events = NULL, - Event* event = NULL) const - { - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueUnmapMemObject( - object_, memory(), mapped_ptr, - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_UNMAP_MEM_OBJECT_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } - - -#if CL_HPP_TARGET_OPENCL_VERSION >= 200 - /** - * Enqueues a command that will release a coarse-grained SVM buffer back to the OpenCL runtime. - * This variant takes a raw SVM pointer. - */ - template - cl_int enqueueUnmapSVM( - T* ptr, - const vector* events = NULL, - Event* event = NULL) const - { - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueSVMUnmap( - object_, static_cast(ptr), - (events != NULL) ? (cl_uint)events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*)&events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_UNMAP_MEM_OBJECT_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } - - /** - * Enqueues a command that will release a coarse-grained SVM buffer back to the OpenCL runtime. - * This variant takes a cl::pointer instance. - */ - template - cl_int enqueueUnmapSVM( - cl::pointer &ptr, - const vector* events = NULL, - Event* event = NULL) const - { - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueSVMUnmap( - object_, static_cast(ptr.get()), - (events != NULL) ? (cl_uint)events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*)&events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_UNMAP_MEM_OBJECT_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } - - /** - * Enqueues a command that will release a coarse-grained SVM buffer back to the OpenCL runtime. - * This variant takes a cl::vector instance. - */ - template - cl_int enqueueUnmapSVM( - cl::vector &container, - const vector* events = NULL, - Event* event = NULL) const - { - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueSVMUnmap( - object_, static_cast(container.data()), - (events != NULL) ? (cl_uint)events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*)&events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_UNMAP_MEM_OBJECT_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } -#endif // #if CL_HPP_TARGET_OPENCL_VERSION >= 200 - -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 - /** - * Enqueues a marker command which waits for either a list of events to complete, - * or all previously enqueued commands to complete. - * - * Enqueues a marker command which waits for either a list of events to complete, - * or if the list is empty it waits for all commands previously enqueued in command_queue - * to complete before it completes. This command returns an event which can be waited on, - * i.e. this event can be waited on to insure that all events either in the event_wait_list - * or all previously enqueued commands, queued before this command to command_queue, - * have completed. - */ - cl_int enqueueMarkerWithWaitList( - const vector *events = 0, - Event *event = 0) - { - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueMarkerWithWaitList( - object_, - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_MARKER_WAIT_LIST_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } - - /** - * A synchronization point that enqueues a barrier operation. - * - * Enqueues a barrier command which waits for either a list of events to complete, - * or if the list is empty it waits for all commands previously enqueued in command_queue - * to complete before it completes. This command blocks command execution, that is, any - * following commands enqueued after it do not execute until it completes. This command - * returns an event which can be waited on, i.e. this event can be waited on to insure that - * all events either in the event_wait_list or all previously enqueued commands, queued - * before this command to command_queue, have completed. - */ - cl_int enqueueBarrierWithWaitList( - const vector *events = 0, - Event *event = 0) - { - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueBarrierWithWaitList( - object_, - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_BARRIER_WAIT_LIST_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } - - /** - * Enqueues a command to indicate with which device a set of memory objects - * should be associated. - */ - cl_int enqueueMigrateMemObjects( - const vector &memObjects, - cl_mem_migration_flags flags, - const vector* events = NULL, - Event* event = NULL - ) - { - cl_event tmp; - - vector localMemObjects(memObjects.size()); - - for( int i = 0; i < (int)memObjects.size(); ++i ) { - localMemObjects[i] = memObjects[i](); - } - - - cl_int err = detail::errHandler( - ::clEnqueueMigrateMemObjects( - object_, - (cl_uint)memObjects.size(), - localMemObjects.data(), - flags, - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_UNMAP_MEM_OBJECT_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 120 - - cl_int enqueueNDRangeKernel( - const Kernel& kernel, - const NDRange& offset, - const NDRange& global, - const NDRange& local = NullRange, - const vector* events = NULL, - Event* event = NULL) const - { - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueNDRangeKernel( - object_, kernel(), (cl_uint) global.dimensions(), - offset.dimensions() != 0 ? (const size_type*) offset : NULL, - (const size_type*) global, - local.dimensions() != 0 ? (const size_type*) local : NULL, - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_NDRANGE_KERNEL_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } - -#if defined(CL_USE_DEPRECATED_OPENCL_1_2_APIS) - CL_EXT_PREFIX__VERSION_1_2_DEPRECATED cl_int enqueueTask( - const Kernel& kernel, - const vector* events = NULL, - Event* event = NULL) const CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED - { - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueTask( - object_, kernel(), - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_TASK_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } -#endif // #if defined(CL_USE_DEPRECATED_OPENCL_1_2_APIS) - - cl_int enqueueNativeKernel( - void (CL_CALLBACK *userFptr)(void *), - std::pair args, - const vector* mem_objects = NULL, - const vector* mem_locs = NULL, - const vector* events = NULL, - Event* event = NULL) const - { - size_type elements = 0; - if (mem_objects != NULL) { - elements = mem_objects->size(); - } - vector mems(elements); - for (unsigned int i = 0; i < elements; i++) { - mems[i] = ((*mem_objects)[i])(); - } - - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueNativeKernel( - object_, userFptr, args.first, args.second, - (mem_objects != NULL) ? (cl_uint) mem_objects->size() : 0, - mems.data(), - (mem_locs != NULL && mem_locs->size() > 0) ? (const void **) &mem_locs->front() : NULL, - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_NATIVE_KERNEL); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } - -/** - * Deprecated APIs for 1.2 - */ -#if defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) - CL_EXT_PREFIX__VERSION_1_1_DEPRECATED - cl_int enqueueMarker(Event* event = NULL) const CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED - { - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueMarker( - object_, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_MARKER_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } - - CL_EXT_PREFIX__VERSION_1_1_DEPRECATED - cl_int enqueueWaitForEvents(const vector& events) const CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED - { - return detail::errHandler( - ::clEnqueueWaitForEvents( - object_, - (cl_uint) events.size(), - events.size() > 0 ? (const cl_event*) &events.front() : NULL), - __ENQUEUE_WAIT_FOR_EVENTS_ERR); - } -#endif // defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) - - cl_int enqueueAcquireGLObjects( - const vector* mem_objects = NULL, - const vector* events = NULL, - Event* event = NULL) const - { - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueAcquireGLObjects( - object_, - (mem_objects != NULL) ? (cl_uint) mem_objects->size() : 0, - (mem_objects != NULL && mem_objects->size() > 0) ? (const cl_mem *) &mem_objects->front(): NULL, - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_ACQUIRE_GL_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } - - cl_int enqueueReleaseGLObjects( - const vector* mem_objects = NULL, - const vector* events = NULL, - Event* event = NULL) const - { - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueReleaseGLObjects( - object_, - (mem_objects != NULL) ? (cl_uint) mem_objects->size() : 0, - (mem_objects != NULL && mem_objects->size() > 0) ? (const cl_mem *) &mem_objects->front(): NULL, - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_RELEASE_GL_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } - -#if defined (CL_HPP_USE_DX_INTEROP) -typedef CL_API_ENTRY cl_int (CL_API_CALL *PFN_clEnqueueAcquireD3D10ObjectsKHR)( - cl_command_queue command_queue, cl_uint num_objects, - const cl_mem* mem_objects, cl_uint num_events_in_wait_list, - const cl_event* event_wait_list, cl_event* event); -typedef CL_API_ENTRY cl_int (CL_API_CALL *PFN_clEnqueueReleaseD3D10ObjectsKHR)( - cl_command_queue command_queue, cl_uint num_objects, - const cl_mem* mem_objects, cl_uint num_events_in_wait_list, - const cl_event* event_wait_list, cl_event* event); - - cl_int enqueueAcquireD3D10Objects( - const vector* mem_objects = NULL, - const vector* events = NULL, - Event* event = NULL) const - { - static PFN_clEnqueueAcquireD3D10ObjectsKHR pfn_clEnqueueAcquireD3D10ObjectsKHR = NULL; -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 - cl_context context = getInfo(); - cl::Device device(getInfo()); - cl_platform_id platform = device.getInfo(); - CL_HPP_INIT_CL_EXT_FCN_PTR_PLATFORM_(platform, clEnqueueAcquireD3D10ObjectsKHR); -#endif -#if CL_HPP_TARGET_OPENCL_VERSION >= 110 - CL_HPP_INIT_CL_EXT_FCN_PTR_(clEnqueueAcquireD3D10ObjectsKHR); -#endif - - cl_event tmp; - cl_int err = detail::errHandler( - pfn_clEnqueueAcquireD3D10ObjectsKHR( - object_, - (mem_objects != NULL) ? (cl_uint) mem_objects->size() : 0, - (mem_objects != NULL && mem_objects->size() > 0) ? (const cl_mem *) &mem_objects->front(): NULL, - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_ACQUIRE_GL_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } - - cl_int enqueueReleaseD3D10Objects( - const vector* mem_objects = NULL, - const vector* events = NULL, - Event* event = NULL) const - { - static PFN_clEnqueueReleaseD3D10ObjectsKHR pfn_clEnqueueReleaseD3D10ObjectsKHR = NULL; -#if CL_HPP_TARGET_OPENCL_VERSION >= 120 - cl_context context = getInfo(); - cl::Device device(getInfo()); - cl_platform_id platform = device.getInfo(); - CL_HPP_INIT_CL_EXT_FCN_PTR_PLATFORM_(platform, clEnqueueReleaseD3D10ObjectsKHR); -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 120 -#if CL_HPP_TARGET_OPENCL_VERSION >= 110 - CL_HPP_INIT_CL_EXT_FCN_PTR_(clEnqueueReleaseD3D10ObjectsKHR); -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 110 - - cl_event tmp; - cl_int err = detail::errHandler( - pfn_clEnqueueReleaseD3D10ObjectsKHR( - object_, - (mem_objects != NULL) ? (cl_uint) mem_objects->size() : 0, - (mem_objects != NULL && mem_objects->size() > 0) ? (const cl_mem *) &mem_objects->front(): NULL, - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_RELEASE_GL_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; - } -#endif - -/** - * Deprecated APIs for 1.2 - */ -#if defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) - CL_EXT_PREFIX__VERSION_1_1_DEPRECATED - cl_int enqueueBarrier() const CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED - { - return detail::errHandler( - ::clEnqueueBarrier(object_), - __ENQUEUE_BARRIER_ERR); - } -#endif // CL_USE_DEPRECATED_OPENCL_1_1_APIS - - cl_int flush() const - { - return detail::errHandler(::clFlush(object_), __FLUSH_ERR); - } - - cl_int finish() const - { - return detail::errHandler(::clFinish(object_), __FINISH_ERR); - } -}; // CommandQueue - -CL_HPP_DEFINE_STATIC_MEMBER_ std::once_flag CommandQueue::default_initialized_; -CL_HPP_DEFINE_STATIC_MEMBER_ CommandQueue CommandQueue::default_; -CL_HPP_DEFINE_STATIC_MEMBER_ cl_int CommandQueue::default_error_ = CL_SUCCESS; - - -#if CL_HPP_TARGET_OPENCL_VERSION >= 200 -enum class DeviceQueueProperties : cl_command_queue_properties -{ - None = 0, - Profiling = CL_QUEUE_PROFILING_ENABLE, -}; - -inline DeviceQueueProperties operator|(DeviceQueueProperties lhs, DeviceQueueProperties rhs) -{ - return static_cast(static_cast(lhs) | static_cast(rhs)); -} - -/*! \class DeviceCommandQueue - * \brief DeviceCommandQueue interface for device cl_command_queues. - */ -class DeviceCommandQueue : public detail::Wrapper -{ -public: - - /*! - * Trivial empty constructor to create a null queue. - */ - DeviceCommandQueue() { } - - /*! - * Default construct device command queue on default context and device - */ - DeviceCommandQueue(DeviceQueueProperties properties, cl_int* err = NULL) - { - cl_int error; - cl::Context context = cl::Context::getDefault(); - cl::Device device = cl::Device::getDefault(); - - cl_command_queue_properties mergedProperties = - CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE | CL_QUEUE_ON_DEVICE | static_cast(properties); - - cl_queue_properties queue_properties[] = { - CL_QUEUE_PROPERTIES, mergedProperties, 0 }; - object_ = ::clCreateCommandQueueWithProperties( - context(), device(), queue_properties, &error); - - detail::errHandler(error, __CREATE_COMMAND_QUEUE_WITH_PROPERTIES_ERR); - if (err != NULL) { - *err = error; - } - } - - /*! - * Create a device command queue for a specified device in the passed context. - */ - DeviceCommandQueue( - const Context& context, - const Device& device, - DeviceQueueProperties properties = DeviceQueueProperties::None, - cl_int* err = NULL) - { - cl_int error; - - cl_command_queue_properties mergedProperties = - CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE | CL_QUEUE_ON_DEVICE | static_cast(properties); - cl_queue_properties queue_properties[] = { - CL_QUEUE_PROPERTIES, mergedProperties, 0 }; - object_ = ::clCreateCommandQueueWithProperties( - context(), device(), queue_properties, &error); - - detail::errHandler(error, __CREATE_COMMAND_QUEUE_WITH_PROPERTIES_ERR); - if (err != NULL) { - *err = error; - } - } - - /*! - * Create a device command queue for a specified device in the passed context. - */ - DeviceCommandQueue( - const Context& context, - const Device& device, - cl_uint queueSize, - DeviceQueueProperties properties = DeviceQueueProperties::None, - cl_int* err = NULL) - { - cl_int error; - - cl_command_queue_properties mergedProperties = - CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE | CL_QUEUE_ON_DEVICE | static_cast(properties); - cl_queue_properties queue_properties[] = { - CL_QUEUE_PROPERTIES, mergedProperties, - CL_QUEUE_SIZE, queueSize, - 0 }; - object_ = ::clCreateCommandQueueWithProperties( - context(), device(), queue_properties, &error); - - detail::errHandler(error, __CREATE_COMMAND_QUEUE_WITH_PROPERTIES_ERR); - if (err != NULL) { - *err = error; - } - } - - /*! \brief Constructor from cl_command_queue - takes ownership. - * - * \param retainObject will cause the constructor to retain its cl object. - * Defaults to false to maintain compatibility with - * earlier versions. - */ - explicit DeviceCommandQueue(const cl_command_queue& commandQueue, bool retainObject = false) : - detail::Wrapper(commandQueue, retainObject) { } - - DeviceCommandQueue& operator = (const cl_command_queue& rhs) - { - detail::Wrapper::operator=(rhs); - return *this; - } - - /*! \brief Copy constructor to forward copy to the superclass correctly. - * Required for MSVC. - */ - DeviceCommandQueue(const DeviceCommandQueue& queue) : detail::Wrapper(queue) {} - - /*! \brief Copy assignment to forward copy to the superclass correctly. - * Required for MSVC. - */ - DeviceCommandQueue& operator = (const DeviceCommandQueue &queue) - { - detail::Wrapper::operator=(queue); - return *this; - } - - /*! \brief Move constructor to forward move to the superclass correctly. - * Required for MSVC. - */ - DeviceCommandQueue(DeviceCommandQueue&& queue) CL_HPP_NOEXCEPT_ : detail::Wrapper(std::move(queue)) {} - - /*! \brief Move assignment to forward move to the superclass correctly. - * Required for MSVC. - */ - DeviceCommandQueue& operator = (DeviceCommandQueue &&queue) - { - detail::Wrapper::operator=(std::move(queue)); - return *this; - } - - template - cl_int getInfo(cl_command_queue_info name, T* param) const - { - return detail::errHandler( - detail::getInfo( - &::clGetCommandQueueInfo, object_, name, param), - __GET_COMMAND_QUEUE_INFO_ERR); - } - - template typename - detail::param_traits::param_type - getInfo(cl_int* err = NULL) const - { - typename detail::param_traits< - detail::cl_command_queue_info, name>::param_type param; - cl_int result = getInfo(name, ¶m); - if (err != NULL) { - *err = result; - } - return param; - } - - /*! - * Create a new default device command queue for the default device, - * in the default context and of the default size. - * If there is already a default queue for the specified device this - * function will return the pre-existing queue. - */ - static DeviceCommandQueue makeDefault( - cl_int *err = nullptr) - { - cl_int error; - cl::Context context = cl::Context::getDefault(); - cl::Device device = cl::Device::getDefault(); - - cl_command_queue_properties properties = - CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE | CL_QUEUE_ON_DEVICE | CL_QUEUE_ON_DEVICE_DEFAULT; - cl_queue_properties queue_properties[] = { - CL_QUEUE_PROPERTIES, properties, - 0 }; - DeviceCommandQueue deviceQueue( - ::clCreateCommandQueueWithProperties( - context(), device(), queue_properties, &error)); - - detail::errHandler(error, __CREATE_COMMAND_QUEUE_WITH_PROPERTIES_ERR); - if (err != NULL) { - *err = error; - } - - return deviceQueue; - } - - /*! - * Create a new default device command queue for the specified device - * and of the default size. - * If there is already a default queue for the specified device this - * function will return the pre-existing queue. - */ - static DeviceCommandQueue makeDefault( - const Context &context, const Device &device, cl_int *err = nullptr) - { - cl_int error; - - cl_command_queue_properties properties = - CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE | CL_QUEUE_ON_DEVICE | CL_QUEUE_ON_DEVICE_DEFAULT; - cl_queue_properties queue_properties[] = { - CL_QUEUE_PROPERTIES, properties, - 0 }; - DeviceCommandQueue deviceQueue( - ::clCreateCommandQueueWithProperties( - context(), device(), queue_properties, &error)); - - detail::errHandler(error, __CREATE_COMMAND_QUEUE_WITH_PROPERTIES_ERR); - if (err != NULL) { - *err = error; - } - - return deviceQueue; - } - - /*! - * Create a new default device command queue for the specified device - * and of the requested size in bytes. - * If there is already a default queue for the specified device this - * function will return the pre-existing queue. - */ - static DeviceCommandQueue makeDefault( - const Context &context, const Device &device, cl_uint queueSize, cl_int *err = nullptr) - { - cl_int error; - - cl_command_queue_properties properties = - CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE | CL_QUEUE_ON_DEVICE | CL_QUEUE_ON_DEVICE_DEFAULT; - cl_queue_properties queue_properties[] = { - CL_QUEUE_PROPERTIES, properties, - CL_QUEUE_SIZE, queueSize, - 0 }; - DeviceCommandQueue deviceQueue( - ::clCreateCommandQueueWithProperties( - context(), device(), queue_properties, &error)); - - detail::errHandler(error, __CREATE_COMMAND_QUEUE_WITH_PROPERTIES_ERR); - if (err != NULL) { - *err = error; - } - - return deviceQueue; - } -}; // DeviceCommandQueue - -namespace detail -{ - // Specialization for device command queue - template <> - struct KernelArgumentHandler - { - static size_type size(const cl::DeviceCommandQueue&) { return sizeof(cl_command_queue); } - static const cl_command_queue* ptr(const cl::DeviceCommandQueue& value) { return &(value()); } - }; -} // namespace detail - -#endif // #if CL_HPP_TARGET_OPENCL_VERSION >= 200 - - -template< typename IteratorType > -Buffer::Buffer( - const Context &context, - IteratorType startIterator, - IteratorType endIterator, - bool readOnly, - bool useHostPtr, - cl_int* err) -{ - typedef typename std::iterator_traits::value_type DataType; - cl_int error; - - cl_mem_flags flags = 0; - if( readOnly ) { - flags |= CL_MEM_READ_ONLY; - } - else { - flags |= CL_MEM_READ_WRITE; - } - if( useHostPtr ) { - flags |= CL_MEM_USE_HOST_PTR; - } - - size_type size = sizeof(DataType)*(endIterator - startIterator); - - if( useHostPtr ) { - object_ = ::clCreateBuffer(context(), flags, size, static_cast(&*startIterator), &error); - } else { - object_ = ::clCreateBuffer(context(), flags, size, 0, &error); - } - - detail::errHandler(error, __CREATE_BUFFER_ERR); - if (err != NULL) { - *err = error; - } - - if( !useHostPtr ) { - CommandQueue queue(context, 0, &error); - detail::errHandler(error, __CREATE_BUFFER_ERR); - if (err != NULL) { - *err = error; - } - - error = cl::copy(queue, startIterator, endIterator, *this); - detail::errHandler(error, __CREATE_BUFFER_ERR); - if (err != NULL) { - *err = error; - } - } -} - -template< typename IteratorType > -Buffer::Buffer( - const CommandQueue &queue, - IteratorType startIterator, - IteratorType endIterator, - bool readOnly, - bool useHostPtr, - cl_int* err) -{ - typedef typename std::iterator_traits::value_type DataType; - cl_int error; - - cl_mem_flags flags = 0; - if (readOnly) { - flags |= CL_MEM_READ_ONLY; - } - else { - flags |= CL_MEM_READ_WRITE; - } - if (useHostPtr) { - flags |= CL_MEM_USE_HOST_PTR; - } - - size_type size = sizeof(DataType)*(endIterator - startIterator); - - Context context = queue.getInfo(); - - if (useHostPtr) { - object_ = ::clCreateBuffer(context(), flags, size, static_cast(&*startIterator), &error); - } - else { - object_ = ::clCreateBuffer(context(), flags, size, 0, &error); - } - - detail::errHandler(error, __CREATE_BUFFER_ERR); - if (err != NULL) { - *err = error; - } - - if (!useHostPtr) { - error = cl::copy(queue, startIterator, endIterator, *this); - detail::errHandler(error, __CREATE_BUFFER_ERR); - if (err != NULL) { - *err = error; - } - } -} - -inline cl_int enqueueReadBuffer( - const Buffer& buffer, - cl_bool blocking, - size_type offset, - size_type size, - void* ptr, - const vector* events = NULL, - Event* event = NULL) -{ - cl_int error; - CommandQueue queue = CommandQueue::getDefault(&error); - - if (error != CL_SUCCESS) { - return error; - } - - return queue.enqueueReadBuffer(buffer, blocking, offset, size, ptr, events, event); -} - -inline cl_int enqueueWriteBuffer( - const Buffer& buffer, - cl_bool blocking, - size_type offset, - size_type size, - const void* ptr, - const vector* events = NULL, - Event* event = NULL) -{ - cl_int error; - CommandQueue queue = CommandQueue::getDefault(&error); - - if (error != CL_SUCCESS) { - return error; - } - - return queue.enqueueWriteBuffer(buffer, blocking, offset, size, ptr, events, event); -} - -inline void* enqueueMapBuffer( - const Buffer& buffer, - cl_bool blocking, - cl_map_flags flags, - size_type offset, - size_type size, - const vector* events = NULL, - Event* event = NULL, - cl_int* err = NULL) -{ - cl_int error; - CommandQueue queue = CommandQueue::getDefault(&error); - detail::errHandler(error, __ENQUEUE_MAP_BUFFER_ERR); - if (err != NULL) { - *err = error; - } - - void * result = ::clEnqueueMapBuffer( - queue(), buffer(), blocking, flags, offset, size, - (events != NULL) ? (cl_uint) events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL, - (cl_event*) event, - &error); - - detail::errHandler(error, __ENQUEUE_MAP_BUFFER_ERR); - if (err != NULL) { - *err = error; - } - return result; -} - - -#if CL_HPP_TARGET_OPENCL_VERSION >= 200 -/** - * Enqueues to the default queue a command that will allow the host to - * update a region of a coarse-grained SVM buffer. - * This variant takes a raw SVM pointer. - */ -template -inline cl_int enqueueMapSVM( - T* ptr, - cl_bool blocking, - cl_map_flags flags, - size_type size, - const vector* events, - Event* event) -{ - cl_int error; - CommandQueue queue = CommandQueue::getDefault(&error); - if (error != CL_SUCCESS) { - return detail::errHandler(error, __ENQUEUE_MAP_BUFFER_ERR); - } - - return queue.enqueueMapSVM( - ptr, blocking, flags, size, events, event); -} - -/** - * Enqueues to the default queue a command that will allow the host to - * update a region of a coarse-grained SVM buffer. - * This variant takes a cl::pointer instance. - */ -template -inline cl_int enqueueMapSVM( - cl::pointer ptr, - cl_bool blocking, - cl_map_flags flags, - size_type size, - const vector* events = NULL, - Event* event = NULL) -{ - cl_int error; - CommandQueue queue = CommandQueue::getDefault(&error); - if (error != CL_SUCCESS) { - return detail::errHandler(error, __ENQUEUE_MAP_BUFFER_ERR); - } - - return queue.enqueueMapSVM( - ptr, blocking, flags, size, events, event); -} - -/** - * Enqueues to the default queue a command that will allow the host to - * update a region of a coarse-grained SVM buffer. - * This variant takes a cl::vector instance. - */ -template -inline cl_int enqueueMapSVM( - cl::vector container, - cl_bool blocking, - cl_map_flags flags, - const vector* events = NULL, - Event* event = NULL) -{ - cl_int error; - CommandQueue queue = CommandQueue::getDefault(&error); - if (error != CL_SUCCESS) { - return detail::errHandler(error, __ENQUEUE_MAP_BUFFER_ERR); - } - - return queue.enqueueMapSVM( - container, blocking, flags, events, event); -} - -#endif // #if CL_HPP_TARGET_OPENCL_VERSION >= 200 - -inline cl_int enqueueUnmapMemObject( - const Memory& memory, - void* mapped_ptr, - const vector* events = NULL, - Event* event = NULL) -{ - cl_int error; - CommandQueue queue = CommandQueue::getDefault(&error); - detail::errHandler(error, __ENQUEUE_MAP_BUFFER_ERR); - if (error != CL_SUCCESS) { - return error; - } - - cl_event tmp; - cl_int err = detail::errHandler( - ::clEnqueueUnmapMemObject( - queue(), memory(), mapped_ptr, - (events != NULL) ? (cl_uint)events->size() : 0, - (events != NULL && events->size() > 0) ? (cl_event*)&events->front() : NULL, - (event != NULL) ? &tmp : NULL), - __ENQUEUE_UNMAP_MEM_OBJECT_ERR); - - if (event != NULL && err == CL_SUCCESS) - *event = tmp; - - return err; -} - -#if CL_HPP_TARGET_OPENCL_VERSION >= 200 -/** - * Enqueues to the default queue a command that will release a coarse-grained - * SVM buffer back to the OpenCL runtime. - * This variant takes a raw SVM pointer. - */ -template -inline cl_int enqueueUnmapSVM( - T* ptr, - const vector* events = NULL, - Event* event = NULL) -{ - cl_int error; - CommandQueue queue = CommandQueue::getDefault(&error); - if (error != CL_SUCCESS) { - return detail::errHandler(error, __ENQUEUE_UNMAP_MEM_OBJECT_ERR); - } - - return detail::errHandler(queue.enqueueUnmapSVM(ptr, events, event), - __ENQUEUE_UNMAP_MEM_OBJECT_ERR); - -} - -/** - * Enqueues to the default queue a command that will release a coarse-grained - * SVM buffer back to the OpenCL runtime. - * This variant takes a cl::pointer instance. - */ -template -inline cl_int enqueueUnmapSVM( - cl::pointer &ptr, - const vector* events = NULL, - Event* event = NULL) -{ - cl_int error; - CommandQueue queue = CommandQueue::getDefault(&error); - if (error != CL_SUCCESS) { - return detail::errHandler(error, __ENQUEUE_UNMAP_MEM_OBJECT_ERR); - } - - return detail::errHandler(queue.enqueueUnmapSVM(ptr, events, event), - __ENQUEUE_UNMAP_MEM_OBJECT_ERR); -} - -/** - * Enqueues to the default queue a command that will release a coarse-grained - * SVM buffer back to the OpenCL runtime. - * This variant takes a cl::vector instance. - */ -template -inline cl_int enqueueUnmapSVM( - cl::vector &container, - const vector* events = NULL, - Event* event = NULL) -{ - cl_int error; - CommandQueue queue = CommandQueue::getDefault(&error); - if (error != CL_SUCCESS) { - return detail::errHandler(error, __ENQUEUE_UNMAP_MEM_OBJECT_ERR); - } - - return detail::errHandler(queue.enqueueUnmapSVM(container, events, event), - __ENQUEUE_UNMAP_MEM_OBJECT_ERR); -} - -#endif // #if CL_HPP_TARGET_OPENCL_VERSION >= 200 - -inline cl_int enqueueCopyBuffer( - const Buffer& src, - const Buffer& dst, - size_type src_offset, - size_type dst_offset, - size_type size, - const vector* events = NULL, - Event* event = NULL) -{ - cl_int error; - CommandQueue queue = CommandQueue::getDefault(&error); - - if (error != CL_SUCCESS) { - return error; - } - - return queue.enqueueCopyBuffer(src, dst, src_offset, dst_offset, size, events, event); -} - -/** - * Blocking copy operation between iterators and a buffer. - * Host to Device. - * Uses default command queue. - */ -template< typename IteratorType > -inline cl_int copy( IteratorType startIterator, IteratorType endIterator, cl::Buffer &buffer ) -{ - cl_int error; - CommandQueue queue = CommandQueue::getDefault(&error); - if (error != CL_SUCCESS) - return error; - - return cl::copy(queue, startIterator, endIterator, buffer); -} - -/** - * Blocking copy operation between iterators and a buffer. - * Device to Host. - * Uses default command queue. - */ -template< typename IteratorType > -inline cl_int copy( const cl::Buffer &buffer, IteratorType startIterator, IteratorType endIterator ) -{ - cl_int error; - CommandQueue queue = CommandQueue::getDefault(&error); - if (error != CL_SUCCESS) - return error; - - return cl::copy(queue, buffer, startIterator, endIterator); -} - -/** - * Blocking copy operation between iterators and a buffer. - * Host to Device. - * Uses specified queue. - */ -template< typename IteratorType > -inline cl_int copy( const CommandQueue &queue, IteratorType startIterator, IteratorType endIterator, cl::Buffer &buffer ) -{ - typedef typename std::iterator_traits::value_type DataType; - cl_int error; - - size_type length = endIterator-startIterator; - size_type byteLength = length*sizeof(DataType); - - DataType *pointer = - static_cast(queue.enqueueMapBuffer(buffer, CL_TRUE, CL_MAP_WRITE, 0, byteLength, 0, 0, &error)); - // if exceptions enabled, enqueueMapBuffer will throw - if( error != CL_SUCCESS ) { - return error; - } -#if defined(_MSC_VER) - std::copy( - startIterator, - endIterator, - stdext::checked_array_iterator( - pointer, length)); -#else - std::copy(startIterator, endIterator, pointer); -#endif - Event endEvent; - error = queue.enqueueUnmapMemObject(buffer, pointer, 0, &endEvent); - // if exceptions enabled, enqueueUnmapMemObject will throw - if( error != CL_SUCCESS ) { - return error; - } - endEvent.wait(); - return CL_SUCCESS; -} - -/** - * Blocking copy operation between iterators and a buffer. - * Device to Host. - * Uses specified queue. - */ -template< typename IteratorType > -inline cl_int copy( const CommandQueue &queue, const cl::Buffer &buffer, IteratorType startIterator, IteratorType endIterator ) -{ - typedef typename std::iterator_traits::value_type DataType; - cl_int error; - - size_type length = endIterator-startIterator; - size_type byteLength = length*sizeof(DataType); - - DataType *pointer = - static_cast(queue.enqueueMapBuffer(buffer, CL_TRUE, CL_MAP_READ, 0, byteLength, 0, 0, &error)); - // if exceptions enabled, enqueueMapBuffer will throw - if( error != CL_SUCCESS ) { - return error; - } - std::copy(pointer, pointer + length, startIterator); - Event endEvent; - error = queue.enqueueUnmapMemObject(buffer, pointer, 0, &endEvent); - // if exceptions enabled, enqueueUnmapMemObject will throw - if( error != CL_SUCCESS ) { - return error; - } - endEvent.wait(); - return CL_SUCCESS; -} - - -#if CL_HPP_TARGET_OPENCL_VERSION >= 200 -/** - * Blocking SVM map operation - performs a blocking map underneath. - */ -template -inline cl_int mapSVM(cl::vector &container) -{ - return enqueueMapSVM(container, CL_TRUE, CL_MAP_READ | CL_MAP_WRITE); -} - -/** -* Blocking SVM map operation - performs a blocking map underneath. -*/ -template -inline cl_int unmapSVM(cl::vector &container) -{ - return enqueueUnmapSVM(container); -} - -#endif // #if CL_HPP_TARGET_OPENCL_VERSION >= 200 - -#if CL_HPP_TARGET_OPENCL_VERSION >= 110 -inline cl_int enqueueReadBufferRect( - const Buffer& buffer, - cl_bool blocking, - const array& buffer_offset, - const array& host_offset, - const array& region, - size_type buffer_row_pitch, - size_type buffer_slice_pitch, - size_type host_row_pitch, - size_type host_slice_pitch, - void *ptr, - const vector* events = NULL, - Event* event = NULL) -{ - cl_int error; - CommandQueue queue = CommandQueue::getDefault(&error); - - if (error != CL_SUCCESS) { - return error; - } - - return queue.enqueueReadBufferRect( - buffer, - blocking, - buffer_offset, - host_offset, - region, - buffer_row_pitch, - buffer_slice_pitch, - host_row_pitch, - host_slice_pitch, - ptr, - events, - event); -} - -inline cl_int enqueueWriteBufferRect( - const Buffer& buffer, - cl_bool blocking, - const array& buffer_offset, - const array& host_offset, - const array& region, - size_type buffer_row_pitch, - size_type buffer_slice_pitch, - size_type host_row_pitch, - size_type host_slice_pitch, - const void *ptr, - const vector* events = NULL, - Event* event = NULL) -{ - cl_int error; - CommandQueue queue = CommandQueue::getDefault(&error); - - if (error != CL_SUCCESS) { - return error; - } - - return queue.enqueueWriteBufferRect( - buffer, - blocking, - buffer_offset, - host_offset, - region, - buffer_row_pitch, - buffer_slice_pitch, - host_row_pitch, - host_slice_pitch, - ptr, - events, - event); -} - -inline cl_int enqueueCopyBufferRect( - const Buffer& src, - const Buffer& dst, - const array& src_origin, - const array& dst_origin, - const array& region, - size_type src_row_pitch, - size_type src_slice_pitch, - size_type dst_row_pitch, - size_type dst_slice_pitch, - const vector* events = NULL, - Event* event = NULL) -{ - cl_int error; - CommandQueue queue = CommandQueue::getDefault(&error); - - if (error != CL_SUCCESS) { - return error; - } - - return queue.enqueueCopyBufferRect( - src, - dst, - src_origin, - dst_origin, - region, - src_row_pitch, - src_slice_pitch, - dst_row_pitch, - dst_slice_pitch, - events, - event); -} -#endif // CL_HPP_TARGET_OPENCL_VERSION >= 110 - -inline cl_int enqueueReadImage( - const Image& image, - cl_bool blocking, - const array& origin, - const array& region, - size_type row_pitch, - size_type slice_pitch, - void* ptr, - const vector* events = NULL, - Event* event = NULL) -{ - cl_int error; - CommandQueue queue = CommandQueue::getDefault(&error); - - if (error != CL_SUCCESS) { - return error; - } - - return queue.enqueueReadImage( - image, - blocking, - origin, - region, - row_pitch, - slice_pitch, - ptr, - events, - event); -} - -inline cl_int enqueueWriteImage( - const Image& image, - cl_bool blocking, - const array& origin, - const array& region, - size_type row_pitch, - size_type slice_pitch, - const void* ptr, - const vector* events = NULL, - Event* event = NULL) -{ - cl_int error; - CommandQueue queue = CommandQueue::getDefault(&error); - - if (error != CL_SUCCESS) { - return error; - } - - return queue.enqueueWriteImage( - image, - blocking, - origin, - region, - row_pitch, - slice_pitch, - ptr, - events, - event); -} - -inline cl_int enqueueCopyImage( - const Image& src, - const Image& dst, - const array& src_origin, - const array& dst_origin, - const array& region, - const vector* events = NULL, - Event* event = NULL) -{ - cl_int error; - CommandQueue queue = CommandQueue::getDefault(&error); - - if (error != CL_SUCCESS) { - return error; - } - - return queue.enqueueCopyImage( - src, - dst, - src_origin, - dst_origin, - region, - events, - event); -} - -inline cl_int enqueueCopyImageToBuffer( - const Image& src, - const Buffer& dst, - const array& src_origin, - const array& region, - size_type dst_offset, - const vector* events = NULL, - Event* event = NULL) -{ - cl_int error; - CommandQueue queue = CommandQueue::getDefault(&error); - - if (error != CL_SUCCESS) { - return error; - } - - return queue.enqueueCopyImageToBuffer( - src, - dst, - src_origin, - region, - dst_offset, - events, - event); -} - -inline cl_int enqueueCopyBufferToImage( - const Buffer& src, - const Image& dst, - size_type src_offset, - const array& dst_origin, - const array& region, - const vector* events = NULL, - Event* event = NULL) -{ - cl_int error; - CommandQueue queue = CommandQueue::getDefault(&error); - - if (error != CL_SUCCESS) { - return error; - } - - return queue.enqueueCopyBufferToImage( - src, - dst, - src_offset, - dst_origin, - region, - events, - event); -} - - -inline cl_int flush(void) -{ - cl_int error; - CommandQueue queue = CommandQueue::getDefault(&error); - - if (error != CL_SUCCESS) { - return error; - } - - return queue.flush(); -} - -inline cl_int finish(void) -{ - cl_int error; - CommandQueue queue = CommandQueue::getDefault(&error); - - if (error != CL_SUCCESS) { - return error; - } - - - return queue.finish(); -} - -class EnqueueArgs -{ -private: - CommandQueue queue_; - const NDRange offset_; - const NDRange global_; - const NDRange local_; - vector events_; - - template - friend class KernelFunctor; - -public: - EnqueueArgs(NDRange global) : - queue_(CommandQueue::getDefault()), - offset_(NullRange), - global_(global), - local_(NullRange) - { - - } - - EnqueueArgs(NDRange global, NDRange local) : - queue_(CommandQueue::getDefault()), - offset_(NullRange), - global_(global), - local_(local) - { - - } - - EnqueueArgs(NDRange offset, NDRange global, NDRange local) : - queue_(CommandQueue::getDefault()), - offset_(offset), - global_(global), - local_(local) - { - - } - - EnqueueArgs(Event e, NDRange global) : - queue_(CommandQueue::getDefault()), - offset_(NullRange), - global_(global), - local_(NullRange) - { - events_.push_back(e); - } - - EnqueueArgs(Event e, NDRange global, NDRange local) : - queue_(CommandQueue::getDefault()), - offset_(NullRange), - global_(global), - local_(local) - { - events_.push_back(e); - } - - EnqueueArgs(Event e, NDRange offset, NDRange global, NDRange local) : - queue_(CommandQueue::getDefault()), - offset_(offset), - global_(global), - local_(local) - { - events_.push_back(e); - } - - EnqueueArgs(const vector &events, NDRange global) : - queue_(CommandQueue::getDefault()), - offset_(NullRange), - global_(global), - local_(NullRange), - events_(events) - { - - } - - EnqueueArgs(const vector &events, NDRange global, NDRange local) : - queue_(CommandQueue::getDefault()), - offset_(NullRange), - global_(global), - local_(local), - events_(events) - { - - } - - EnqueueArgs(const vector &events, NDRange offset, NDRange global, NDRange local) : - queue_(CommandQueue::getDefault()), - offset_(offset), - global_(global), - local_(local), - events_(events) - { - - } - - EnqueueArgs(CommandQueue &queue, NDRange global) : - queue_(queue), - offset_(NullRange), - global_(global), - local_(NullRange) - { - - } - - EnqueueArgs(CommandQueue &queue, NDRange global, NDRange local) : - queue_(queue), - offset_(NullRange), - global_(global), - local_(local) - { - - } - - EnqueueArgs(CommandQueue &queue, NDRange offset, NDRange global, NDRange local) : - queue_(queue), - offset_(offset), - global_(global), - local_(local) - { - - } - - EnqueueArgs(CommandQueue &queue, Event e, NDRange global) : - queue_(queue), - offset_(NullRange), - global_(global), - local_(NullRange) - { - events_.push_back(e); - } - - EnqueueArgs(CommandQueue &queue, Event e, NDRange global, NDRange local) : - queue_(queue), - offset_(NullRange), - global_(global), - local_(local) - { - events_.push_back(e); - } - - EnqueueArgs(CommandQueue &queue, Event e, NDRange offset, NDRange global, NDRange local) : - queue_(queue), - offset_(offset), - global_(global), - local_(local) - { - events_.push_back(e); - } - - EnqueueArgs(CommandQueue &queue, const vector &events, NDRange global) : - queue_(queue), - offset_(NullRange), - global_(global), - local_(NullRange), - events_(events) - { - - } - - EnqueueArgs(CommandQueue &queue, const vector &events, NDRange global, NDRange local) : - queue_(queue), - offset_(NullRange), - global_(global), - local_(local), - events_(events) - { - - } - - EnqueueArgs(CommandQueue &queue, const vector &events, NDRange offset, NDRange global, NDRange local) : - queue_(queue), - offset_(offset), - global_(global), - local_(local), - events_(events) - { - - } -}; - - -//---------------------------------------------------------------------------------------------- - - -/** - * Type safe kernel functor. - * - */ -template -class KernelFunctor -{ -private: - Kernel kernel_; - - template - void setArgs(T0&& t0, T1s&&... t1s) - { - kernel_.setArg(index, t0); - setArgs(std::forward(t1s)...); - } - - template - void setArgs(T0&& t0) - { - kernel_.setArg(index, t0); - } - - template - void setArgs() - { - } - - -public: - KernelFunctor(Kernel kernel) : kernel_(kernel) - {} - - KernelFunctor( - const Program& program, - const string name, - cl_int * err = NULL) : - kernel_(program, name.c_str(), err) - {} - - //! \brief Return type of the functor - typedef Event result_type; - - /** - * Enqueue kernel. - * @param args Launch parameters of the kernel. - * @param t0... List of kernel arguments based on the template type of the functor. - */ - Event operator() ( - const EnqueueArgs& args, - Ts... ts) - { - Event event; - setArgs<0>(std::forward(ts)...); - - args.queue_.enqueueNDRangeKernel( - kernel_, - args.offset_, - args.global_, - args.local_, - &args.events_, - &event); - - return event; - } - - /** - * Enqueue kernel with support for error code. - * @param args Launch parameters of the kernel. - * @param t0... List of kernel arguments based on the template type of the functor. - * @param error Out parameter returning the error code from the execution. - */ - Event operator() ( - const EnqueueArgs& args, - Ts... ts, - cl_int &error) - { - Event event; - setArgs<0>(std::forward(ts)...); - - error = args.queue_.enqueueNDRangeKernel( - kernel_, - args.offset_, - args.global_, - args.local_, - &args.events_, - &event); - - return event; - } - -#if CL_HPP_TARGET_OPENCL_VERSION >= 200 - cl_int setSVMPointers(const vector &pointerList) - { - return kernel_.setSVMPointers(pointerList); - } - - template - cl_int setSVMPointers(const T0 &t0, T1s... ts) - { - return kernel_.setSVMPointers(t0, ts...); - } -#endif // #if CL_HPP_TARGET_OPENCL_VERSION >= 200 - - Kernel getKernel() - { - return kernel_; - } -}; - -namespace compatibility { - /** - * Backward compatibility class to ensure that cl.hpp code works with cl2.hpp. - * Please use KernelFunctor directly. - */ - template - struct make_kernel - { - typedef KernelFunctor FunctorType; - - FunctorType functor_; - - make_kernel( - const Program& program, - const string name, - cl_int * err = NULL) : - functor_(FunctorType(program, name, err)) - {} - - make_kernel( - const Kernel kernel) : - functor_(FunctorType(kernel)) - {} - - //! \brief Return type of the functor - typedef Event result_type; - - //! \brief Function signature of kernel functor with no event dependency. - typedef Event type_( - const EnqueueArgs&, - Ts...); - - Event operator()( - const EnqueueArgs& enqueueArgs, - Ts... args) - { - return functor_( - enqueueArgs, args...); - } - }; -} // namespace compatibility - - -//---------------------------------------------------------------------------------------------------------------------- - -#undef CL_HPP_ERR_STR_ -#if !defined(CL_HPP_USER_OVERRIDE_ERROR_STRINGS) -#undef __GET_DEVICE_INFO_ERR -#undef __GET_PLATFORM_INFO_ERR -#undef __GET_DEVICE_IDS_ERR -#undef __GET_CONTEXT_INFO_ERR -#undef __GET_EVENT_INFO_ERR -#undef __GET_EVENT_PROFILE_INFO_ERR -#undef __GET_MEM_OBJECT_INFO_ERR -#undef __GET_IMAGE_INFO_ERR -#undef __GET_SAMPLER_INFO_ERR -#undef __GET_KERNEL_INFO_ERR -#undef __GET_KERNEL_ARG_INFO_ERR -#undef __GET_KERNEL_WORK_GROUP_INFO_ERR -#undef __GET_PROGRAM_INFO_ERR -#undef __GET_PROGRAM_BUILD_INFO_ERR -#undef __GET_COMMAND_QUEUE_INFO_ERR - -#undef __CREATE_CONTEXT_ERR -#undef __CREATE_CONTEXT_FROM_TYPE_ERR -#undef __GET_SUPPORTED_IMAGE_FORMATS_ERR - -#undef __CREATE_BUFFER_ERR -#undef __CREATE_SUBBUFFER_ERR -#undef __CREATE_IMAGE2D_ERR -#undef __CREATE_IMAGE3D_ERR -#undef __CREATE_SAMPLER_ERR -#undef __SET_MEM_OBJECT_DESTRUCTOR_CALLBACK_ERR - -#undef __CREATE_USER_EVENT_ERR -#undef __SET_USER_EVENT_STATUS_ERR -#undef __SET_EVENT_CALLBACK_ERR -#undef __SET_PRINTF_CALLBACK_ERR - -#undef __WAIT_FOR_EVENTS_ERR - -#undef __CREATE_KERNEL_ERR -#undef __SET_KERNEL_ARGS_ERR -#undef __CREATE_PROGRAM_WITH_SOURCE_ERR -#undef __CREATE_PROGRAM_WITH_BINARY_ERR -#undef __CREATE_PROGRAM_WITH_BUILT_IN_KERNELS_ERR -#undef __BUILD_PROGRAM_ERR -#undef __CREATE_KERNELS_IN_PROGRAM_ERR - -#undef __CREATE_COMMAND_QUEUE_ERR -#undef __SET_COMMAND_QUEUE_PROPERTY_ERR -#undef __ENQUEUE_READ_BUFFER_ERR -#undef __ENQUEUE_WRITE_BUFFER_ERR -#undef __ENQUEUE_READ_BUFFER_RECT_ERR -#undef __ENQUEUE_WRITE_BUFFER_RECT_ERR -#undef __ENQEUE_COPY_BUFFER_ERR -#undef __ENQEUE_COPY_BUFFER_RECT_ERR -#undef __ENQUEUE_READ_IMAGE_ERR -#undef __ENQUEUE_WRITE_IMAGE_ERR -#undef __ENQUEUE_COPY_IMAGE_ERR -#undef __ENQUEUE_COPY_IMAGE_TO_BUFFER_ERR -#undef __ENQUEUE_COPY_BUFFER_TO_IMAGE_ERR -#undef __ENQUEUE_MAP_BUFFER_ERR -#undef __ENQUEUE_MAP_IMAGE_ERR -#undef __ENQUEUE_UNMAP_MEM_OBJECT_ERR -#undef __ENQUEUE_NDRANGE_KERNEL_ERR -#undef __ENQUEUE_TASK_ERR -#undef __ENQUEUE_NATIVE_KERNEL - -#undef __UNLOAD_COMPILER_ERR -#undef __CREATE_SUB_DEVICES_ERR - -#undef __CREATE_PIPE_ERR -#undef __GET_PIPE_INFO_ERR - -#endif //CL_HPP_USER_OVERRIDE_ERROR_STRINGS - -// Extensions -#undef CL_HPP_INIT_CL_EXT_FCN_PTR_ -#undef CL_HPP_INIT_CL_EXT_FCN_PTR_PLATFORM_ - -#if defined(CL_HPP_USE_CL_DEVICE_FISSION) -#undef CL_HPP_PARAM_NAME_DEVICE_FISSION_ -#endif // CL_HPP_USE_CL_DEVICE_FISSION - -#undef CL_HPP_NOEXCEPT_ -#undef CL_HPP_DEFINE_STATIC_MEMBER_ - -} // namespace cl - -#endif // CL_HPP_ diff --git a/emscripten/include/pvrsdk/CL/cl_d3d10.h b/emscripten/include/pvrsdk/CL/cl_d3d10.h deleted file mode 100644 index d5960a43..00000000 --- a/emscripten/include/pvrsdk/CL/cl_d3d10.h +++ /dev/null @@ -1,131 +0,0 @@ -/********************************************************************************** - * Copyright (c) 2008-2015 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and/or associated documentation files (the - * "Materials"), to deal in the Materials without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Materials, and to - * permit persons to whom the Materials are furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS - * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS - * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT - * https://www.khronos.org/registry/ - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER 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. - **********************************************************************************/ - -/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */ - -#ifndef __OPENCL_CL_D3D10_H -#define __OPENCL_CL_D3D10_H - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/****************************************************************************** - * cl_khr_d3d10_sharing */ -#define cl_khr_d3d10_sharing 1 - -typedef cl_uint cl_d3d10_device_source_khr; -typedef cl_uint cl_d3d10_device_set_khr; - -/******************************************************************************/ - -/* Error Codes */ -#define CL_INVALID_D3D10_DEVICE_KHR -1002 -#define CL_INVALID_D3D10_RESOURCE_KHR -1003 -#define CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR -1004 -#define CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR -1005 - -/* cl_d3d10_device_source_nv */ -#define CL_D3D10_DEVICE_KHR 0x4010 -#define CL_D3D10_DXGI_ADAPTER_KHR 0x4011 - -/* cl_d3d10_device_set_nv */ -#define CL_PREFERRED_DEVICES_FOR_D3D10_KHR 0x4012 -#define CL_ALL_DEVICES_FOR_D3D10_KHR 0x4013 - -/* cl_context_info */ -#define CL_CONTEXT_D3D10_DEVICE_KHR 0x4014 -#define CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR 0x402C - -/* cl_mem_info */ -#define CL_MEM_D3D10_RESOURCE_KHR 0x4015 - -/* cl_image_info */ -#define CL_IMAGE_D3D10_SUBRESOURCE_KHR 0x4016 - -/* cl_command_type */ -#define CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR 0x4017 -#define CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR 0x4018 - -/******************************************************************************/ - -typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D10KHR_fn)( - cl_platform_id platform, - cl_d3d10_device_source_khr d3d_device_source, - void * d3d_object, - cl_d3d10_device_set_khr d3d_device_set, - cl_uint num_entries, - cl_device_id * devices, - cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_0; - -typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10BufferKHR_fn)( - cl_context context, - cl_mem_flags flags, - ID3D10Buffer * resource, - cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; - -typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture2DKHR_fn)( - cl_context context, - cl_mem_flags flags, - ID3D10Texture2D * resource, - UINT subresource, - cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; - -typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture3DKHR_fn)( - cl_context context, - cl_mem_flags flags, - ID3D10Texture3D * resource, - UINT subresource, - cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; - -typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D10ObjectsKHR_fn)( - cl_command_queue command_queue, - cl_uint num_objects, - const cl_mem * mem_objects, - cl_uint num_events_in_wait_list, - const cl_event * event_wait_list, - cl_event * event) CL_API_SUFFIX__VERSION_1_0; - -typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D10ObjectsKHR_fn)( - cl_command_queue command_queue, - cl_uint num_objects, - const cl_mem * mem_objects, - cl_uint num_events_in_wait_list, - const cl_event * event_wait_list, - cl_event * event) CL_API_SUFFIX__VERSION_1_0; - -#ifdef __cplusplus -} -#endif - -#endif /* __OPENCL_CL_D3D10_H */ - diff --git a/emscripten/include/pvrsdk/CL/cl_d3d11.h b/emscripten/include/pvrsdk/CL/cl_d3d11.h deleted file mode 100644 index 39f90723..00000000 --- a/emscripten/include/pvrsdk/CL/cl_d3d11.h +++ /dev/null @@ -1,131 +0,0 @@ -/********************************************************************************** - * Copyright (c) 2008-2015 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and/or associated documentation files (the - * "Materials"), to deal in the Materials without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Materials, and to - * permit persons to whom the Materials are furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS - * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS - * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT - * https://www.khronos.org/registry/ - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER 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. - **********************************************************************************/ - -/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */ - -#ifndef __OPENCL_CL_D3D11_H -#define __OPENCL_CL_D3D11_H - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/****************************************************************************** - * cl_khr_d3d11_sharing */ -#define cl_khr_d3d11_sharing 1 - -typedef cl_uint cl_d3d11_device_source_khr; -typedef cl_uint cl_d3d11_device_set_khr; - -/******************************************************************************/ - -/* Error Codes */ -#define CL_INVALID_D3D11_DEVICE_KHR -1006 -#define CL_INVALID_D3D11_RESOURCE_KHR -1007 -#define CL_D3D11_RESOURCE_ALREADY_ACQUIRED_KHR -1008 -#define CL_D3D11_RESOURCE_NOT_ACQUIRED_KHR -1009 - -/* cl_d3d11_device_source */ -#define CL_D3D11_DEVICE_KHR 0x4019 -#define CL_D3D11_DXGI_ADAPTER_KHR 0x401A - -/* cl_d3d11_device_set */ -#define CL_PREFERRED_DEVICES_FOR_D3D11_KHR 0x401B -#define CL_ALL_DEVICES_FOR_D3D11_KHR 0x401C - -/* cl_context_info */ -#define CL_CONTEXT_D3D11_DEVICE_KHR 0x401D -#define CL_CONTEXT_D3D11_PREFER_SHARED_RESOURCES_KHR 0x402D - -/* cl_mem_info */ -#define CL_MEM_D3D11_RESOURCE_KHR 0x401E - -/* cl_image_info */ -#define CL_IMAGE_D3D11_SUBRESOURCE_KHR 0x401F - -/* cl_command_type */ -#define CL_COMMAND_ACQUIRE_D3D11_OBJECTS_KHR 0x4020 -#define CL_COMMAND_RELEASE_D3D11_OBJECTS_KHR 0x4021 - -/******************************************************************************/ - -typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D11KHR_fn)( - cl_platform_id platform, - cl_d3d11_device_source_khr d3d_device_source, - void * d3d_object, - cl_d3d11_device_set_khr d3d_device_set, - cl_uint num_entries, - cl_device_id * devices, - cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_2; - -typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11BufferKHR_fn)( - cl_context context, - cl_mem_flags flags, - ID3D11Buffer * resource, - cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2; - -typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11Texture2DKHR_fn)( - cl_context context, - cl_mem_flags flags, - ID3D11Texture2D * resource, - UINT subresource, - cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2; - -typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11Texture3DKHR_fn)( - cl_context context, - cl_mem_flags flags, - ID3D11Texture3D * resource, - UINT subresource, - cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2; - -typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D11ObjectsKHR_fn)( - cl_command_queue command_queue, - cl_uint num_objects, - const cl_mem * mem_objects, - cl_uint num_events_in_wait_list, - const cl_event * event_wait_list, - cl_event * event) CL_API_SUFFIX__VERSION_1_2; - -typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D11ObjectsKHR_fn)( - cl_command_queue command_queue, - cl_uint num_objects, - const cl_mem * mem_objects, - cl_uint num_events_in_wait_list, - const cl_event * event_wait_list, - cl_event * event) CL_API_SUFFIX__VERSION_1_2; - -#ifdef __cplusplus -} -#endif - -#endif /* __OPENCL_CL_D3D11_H */ - diff --git a/emscripten/include/pvrsdk/CL/cl_dx9_media_sharing.h b/emscripten/include/pvrsdk/CL/cl_dx9_media_sharing.h deleted file mode 100644 index 2729e8b9..00000000 --- a/emscripten/include/pvrsdk/CL/cl_dx9_media_sharing.h +++ /dev/null @@ -1,132 +0,0 @@ -/********************************************************************************** - * Copyright (c) 2008-2015 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and/or associated documentation files (the - * "Materials"), to deal in the Materials without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Materials, and to - * permit persons to whom the Materials are furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS - * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS - * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT - * https://www.khronos.org/registry/ - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER 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. - **********************************************************************************/ - -/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */ - -#ifndef __OPENCL_CL_DX9_MEDIA_SHARING_H -#define __OPENCL_CL_DX9_MEDIA_SHARING_H - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/******************************************************************************/ -/* cl_khr_dx9_media_sharing */ -#define cl_khr_dx9_media_sharing 1 - -typedef cl_uint cl_dx9_media_adapter_type_khr; -typedef cl_uint cl_dx9_media_adapter_set_khr; - -#if defined(_WIN32) -#include -typedef struct _cl_dx9_surface_info_khr -{ - IDirect3DSurface9 *resource; - HANDLE shared_handle; -} cl_dx9_surface_info_khr; -#endif - - -/******************************************************************************/ - -/* Error Codes */ -#define CL_INVALID_DX9_MEDIA_ADAPTER_KHR -1010 -#define CL_INVALID_DX9_MEDIA_SURFACE_KHR -1011 -#define CL_DX9_MEDIA_SURFACE_ALREADY_ACQUIRED_KHR -1012 -#define CL_DX9_MEDIA_SURFACE_NOT_ACQUIRED_KHR -1013 - -/* cl_media_adapter_type_khr */ -#define CL_ADAPTER_D3D9_KHR 0x2020 -#define CL_ADAPTER_D3D9EX_KHR 0x2021 -#define CL_ADAPTER_DXVA_KHR 0x2022 - -/* cl_media_adapter_set_khr */ -#define CL_PREFERRED_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x2023 -#define CL_ALL_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x2024 - -/* cl_context_info */ -#define CL_CONTEXT_ADAPTER_D3D9_KHR 0x2025 -#define CL_CONTEXT_ADAPTER_D3D9EX_KHR 0x2026 -#define CL_CONTEXT_ADAPTER_DXVA_KHR 0x2027 - -/* cl_mem_info */ -#define CL_MEM_DX9_MEDIA_ADAPTER_TYPE_KHR 0x2028 -#define CL_MEM_DX9_MEDIA_SURFACE_INFO_KHR 0x2029 - -/* cl_image_info */ -#define CL_IMAGE_DX9_MEDIA_PLANE_KHR 0x202A - -/* cl_command_type */ -#define CL_COMMAND_ACQUIRE_DX9_MEDIA_SURFACES_KHR 0x202B -#define CL_COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHR 0x202C - -/******************************************************************************/ - -typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromDX9MediaAdapterKHR_fn)( - cl_platform_id platform, - cl_uint num_media_adapters, - cl_dx9_media_adapter_type_khr * media_adapter_type, - void * media_adapters, - cl_dx9_media_adapter_set_khr media_adapter_set, - cl_uint num_entries, - cl_device_id * devices, - cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_2; - -typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromDX9MediaSurfaceKHR_fn)( - cl_context context, - cl_mem_flags flags, - cl_dx9_media_adapter_type_khr adapter_type, - void * surface_info, - cl_uint plane, - cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2; - -typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireDX9MediaSurfacesKHR_fn)( - cl_command_queue command_queue, - cl_uint num_objects, - const cl_mem * mem_objects, - cl_uint num_events_in_wait_list, - const cl_event * event_wait_list, - cl_event * event) CL_API_SUFFIX__VERSION_1_2; - -typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseDX9MediaSurfacesKHR_fn)( - cl_command_queue command_queue, - cl_uint num_objects, - const cl_mem * mem_objects, - cl_uint num_events_in_wait_list, - const cl_event * event_wait_list, - cl_event * event) CL_API_SUFFIX__VERSION_1_2; - -#ifdef __cplusplus -} -#endif - -#endif /* __OPENCL_CL_DX9_MEDIA_SHARING_H */ - diff --git a/emscripten/include/pvrsdk/CL/cl_egl.h b/emscripten/include/pvrsdk/CL/cl_egl.h deleted file mode 100644 index a58b562f..00000000 --- a/emscripten/include/pvrsdk/CL/cl_egl.h +++ /dev/null @@ -1,136 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008-2015 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and/or associated documentation files (the - * "Materials"), to deal in the Materials without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Materials, and to - * permit persons to whom the Materials are furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS - * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS - * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT - * https://www.khronos.org/registry/ - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER 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. - ******************************************************************************/ - -#ifndef __OPENCL_CL_EGL_H -#define __OPENCL_CL_EGL_H - -#ifdef __APPLE__ - -#else -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Command type for events created with clEnqueueAcquireEGLObjectsKHR */ -#define CL_COMMAND_EGL_FENCE_SYNC_OBJECT_KHR 0x202F -#define CL_COMMAND_ACQUIRE_EGL_OBJECTS_KHR 0x202D -#define CL_COMMAND_RELEASE_EGL_OBJECTS_KHR 0x202E - -/* Error type for clCreateFromEGLImageKHR */ -#define CL_INVALID_EGL_OBJECT_KHR -1093 -#define CL_EGL_RESOURCE_NOT_ACQUIRED_KHR -1092 - -/* CLeglImageKHR is an opaque handle to an EGLImage */ -typedef void* CLeglImageKHR; - -/* CLeglDisplayKHR is an opaque handle to an EGLDisplay */ -typedef void* CLeglDisplayKHR; - -/* CLeglSyncKHR is an opaque handle to an EGLSync object */ -typedef void* CLeglSyncKHR; - -/* properties passed to clCreateFromEGLImageKHR */ -typedef intptr_t cl_egl_image_properties_khr; - - -#define cl_khr_egl_image 1 -#ifndef CL_NO_PROTOTYPES -extern CL_API_ENTRY cl_mem CL_API_CALL -clCreateFromEGLImageKHR(cl_context /* context */, - CLeglDisplayKHR /* egldisplay */, - CLeglImageKHR /* eglimage */, - cl_mem_flags /* flags */, - const cl_egl_image_properties_khr* /* properties */, - cl_int* /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; -#endif -typedef CL_API_ENTRY cl_mem(CL_API_CALL* clCreateFromEGLImageKHR_fn)( - cl_context context, - CLeglDisplayKHR egldisplay, - CLeglImageKHR eglimage, - cl_mem_flags flags, - const cl_egl_image_properties_khr* properties, - cl_int* errcode_ret); - -#ifndef CL_NO_PROTOTYPES -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueAcquireEGLObjectsKHR(cl_command_queue /* command_queue */, - cl_uint /* num_objects */, - const cl_mem* /* mem_objects */, - cl_uint /* num_events_in_wait_list */, - const cl_event* /* event_wait_list */, - cl_event* /* event */) CL_API_SUFFIX__VERSION_1_0; -#endif -typedef CL_API_ENTRY cl_int(CL_API_CALL* clEnqueueAcquireEGLObjectsKHR_fn)( - cl_command_queue command_queue, - cl_uint num_objects, - const cl_mem* mem_objects, - cl_uint num_events_in_wait_list, - const cl_event* event_wait_list, - cl_event* event); - -#ifndef CL_NO_PROTOTYPES -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueReleaseEGLObjectsKHR(cl_command_queue /* command_queue */, - cl_uint /* num_objects */, - const cl_mem* /* mem_objects */, - cl_uint /* num_events_in_wait_list */, - const cl_event* /* event_wait_list */, - cl_event* /* event */) CL_API_SUFFIX__VERSION_1_0; -#endif -typedef CL_API_ENTRY cl_int(CL_API_CALL* clEnqueueReleaseEGLObjectsKHR_fn)( - cl_command_queue command_queue, - cl_uint num_objects, - const cl_mem* mem_objects, - cl_uint num_events_in_wait_list, - const cl_event* event_wait_list, - cl_event* event); - - -#define cl_khr_egl_event 1 -#ifndef CL_NO_PROTOTYPES -extern CL_API_ENTRY cl_event CL_API_CALL -clCreateEventFromEGLSyncKHR(cl_context /* context */, - CLeglSyncKHR /* sync */, - CLeglDisplayKHR /* display */, - cl_int* /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; -#endif -typedef CL_API_ENTRY cl_event(CL_API_CALL* clCreateEventFromEGLSyncKHR_fn)( - cl_context context, - CLeglSyncKHR sync, - CLeglDisplayKHR display, - cl_int* errcode_ret); - -#ifdef __cplusplus -} -#endif - -#endif /* __OPENCL_CL_EGL_H */ diff --git a/emscripten/include/pvrsdk/CL/cl_ext.h b/emscripten/include/pvrsdk/CL/cl_ext.h deleted file mode 100644 index 5078e8f4..00000000 --- a/emscripten/include/pvrsdk/CL/cl_ext.h +++ /dev/null @@ -1,607 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008-2015 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and/or associated documentation files (the - * "Materials"), to deal in the Materials without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Materials, and to - * permit persons to whom the Materials are furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS - * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS - * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT - * https://www.khronos.org/registry/ - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER 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. - ******************************************************************************/ - -/* $Revision: 11928 $ on $Date: 2010-07-13 09:04:56 -0700 (Tue, 13 Jul 2010) $ */ - -/* cl_ext.h contains OpenCL extensions which don't have external */ -/* (OpenGL, D3D) dependencies. */ - -#ifndef __CL_EXT_H -#define __CL_EXT_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __APPLE__ - #include - #include -#else - #include -#endif - -/* cl_khr_fp16 extension - no extension #define since it has no functions */ -#define CL_DEVICE_HALF_FP_CONFIG 0x1033 - -/* Memory object destruction - * - * Apple extension for use to manage externally allocated buffers used with cl_mem objects with CL_MEM_USE_HOST_PTR - * - * Registers a user callback function that will be called when the memory object is deleted and its resources - * freed. Each call to clSetMemObjectCallbackFn registers the specified user callback function on a callback - * stack associated with memobj. The registered user callback functions are called in the reverse order in - * which they were registered. The user callback functions are called and then the memory object is deleted - * and its resources freed. This provides a mechanism for the application (and libraries) using memobj to be - * notified when the memory referenced by host_ptr, specified when the memory object is created and used as - * the storage bits for the memory object, can be reused or freed. - * - * The application may not call CL api's with the cl_mem object passed to the pfn_notify. - * - * Please check for the "cl_APPLE_SetMemObjectDestructor" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS) - * before using. - */ -#define cl_APPLE_SetMemObjectDestructor 1 -cl_int CL_API_ENTRY clSetMemObjectDestructorAPPLE( cl_mem /* memobj */, - void (* /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/), - void * /*user_data */ ) CL_EXT_SUFFIX__VERSION_1_0; - - -/* Context Logging Functions - * - * The next three convenience functions are intended to be used as the pfn_notify parameter to clCreateContext(). - * Please check for the "cl_APPLE_ContextLoggingFunctions" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS) - * before using. - * - * clLogMessagesToSystemLog fowards on all log messages to the Apple System Logger - */ -#define cl_APPLE_ContextLoggingFunctions 1 -extern void CL_API_ENTRY clLogMessagesToSystemLogAPPLE( const char * /* errstr */, - const void * /* private_info */, - size_t /* cb */, - void * /* user_data */ ) CL_EXT_SUFFIX__VERSION_1_0; - -/* clLogMessagesToStdout sends all log messages to the file descriptor stdout */ -extern void CL_API_ENTRY clLogMessagesToStdoutAPPLE( const char * /* errstr */, - const void * /* private_info */, - size_t /* cb */, - void * /* user_data */ ) CL_EXT_SUFFIX__VERSION_1_0; - -/* clLogMessagesToStderr sends all log messages to the file descriptor stderr */ -extern void CL_API_ENTRY clLogMessagesToStderrAPPLE( const char * /* errstr */, - const void * /* private_info */, - size_t /* cb */, - void * /* user_data */ ) CL_EXT_SUFFIX__VERSION_1_0; - - -/************************ -* cl_khr_icd extension * -************************/ -#define cl_khr_icd 1 - -/* cl_platform_info */ -#define CL_PLATFORM_ICD_SUFFIX_KHR 0x0920 - -/* Additional Error Codes */ -#define CL_PLATFORM_NOT_FOUND_KHR -1001 - -extern CL_API_ENTRY cl_int CL_API_CALL -clIcdGetPlatformIDsKHR(cl_uint /* num_entries */, - cl_platform_id * /* platforms */, - cl_uint * /* num_platforms */); - -typedef CL_API_ENTRY cl_int (CL_API_CALL *clIcdGetPlatformIDsKHR_fn)( - cl_uint /* num_entries */, - cl_platform_id * /* platforms */, - cl_uint * /* num_platforms */); - - -/* Extension: cl_khr_image2D_buffer - * - * This extension allows a 2D image to be created from a cl_mem buffer without a copy. - * The type associated with a 2D image created from a buffer in an OpenCL program is image2d_t. - * Both the sampler and sampler-less read_image built-in functions are supported for 2D images - * and 2D images created from a buffer. Similarly, the write_image built-ins are also supported - * for 2D images created from a buffer. - * - * When the 2D image from buffer is created, the client must specify the width, - * height, image format (i.e. channel order and channel data type) and optionally the row pitch - * - * The pitch specified must be a multiple of CL_DEVICE_IMAGE_PITCH_ALIGNMENT pixels. - * The base address of the buffer must be aligned to CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT pixels. - */ - -/************************************* - * cl_khr_initalize_memory extension * - *************************************/ - -#define CL_CONTEXT_MEMORY_INITIALIZE_KHR 0x2030 - - -/************************************** - * cl_khr_terminate_context extension * - **************************************/ - -#define CL_DEVICE_TERMINATE_CAPABILITY_KHR 0x2031 -#define CL_CONTEXT_TERMINATE_KHR 0x2032 - -#define cl_khr_terminate_context 1 -extern CL_API_ENTRY cl_int CL_API_CALL clTerminateContextKHR(cl_context /* context */) CL_EXT_SUFFIX__VERSION_1_2; - -typedef CL_API_ENTRY cl_int (CL_API_CALL *clTerminateContextKHR_fn)(cl_context /* context */) CL_EXT_SUFFIX__VERSION_1_2; - - -/* - * Extension: cl_khr_spir - * - * This extension adds support to create an OpenCL program object from a - * Standard Portable Intermediate Representation (SPIR) instance - */ - -#define CL_DEVICE_SPIR_VERSIONS 0x40E0 -#define CL_PROGRAM_BINARY_TYPE_INTERMEDIATE 0x40E1 - - -/****************************************** -* cl_nv_device_attribute_query extension * -******************************************/ -/* cl_nv_device_attribute_query extension - no extension #define since it has no functions */ -#define CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV 0x4000 -#define CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV 0x4001 -#define CL_DEVICE_REGISTERS_PER_BLOCK_NV 0x4002 -#define CL_DEVICE_WARP_SIZE_NV 0x4003 -#define CL_DEVICE_GPU_OVERLAP_NV 0x4004 -#define CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV 0x4005 -#define CL_DEVICE_INTEGRATED_MEMORY_NV 0x4006 - -/********************************* -* cl_amd_device_attribute_query * -*********************************/ -#define CL_DEVICE_PROFILING_TIMER_OFFSET_AMD 0x4036 - -/********************************* -* cl_arm_printf extension -*********************************/ -#define CL_PRINTF_CALLBACK_ARM 0x40B0 -#define CL_PRINTF_BUFFERSIZE_ARM 0x40B1 - -#ifdef CL_VERSION_1_1 - /*********************************** - * cl_ext_device_fission extension * - ***********************************/ - #define cl_ext_device_fission 1 - - extern CL_API_ENTRY cl_int CL_API_CALL - clReleaseDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1; - - typedef CL_API_ENTRY cl_int - (CL_API_CALL *clReleaseDeviceEXT_fn)( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1; - - extern CL_API_ENTRY cl_int CL_API_CALL - clRetainDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1; - - typedef CL_API_ENTRY cl_int - (CL_API_CALL *clRetainDeviceEXT_fn)( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1; - - typedef cl_ulong cl_device_partition_property_ext; - extern CL_API_ENTRY cl_int CL_API_CALL - clCreateSubDevicesEXT( cl_device_id /*in_device*/, - const cl_device_partition_property_ext * /* properties */, - cl_uint /*num_entries*/, - cl_device_id * /*out_devices*/, - cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1; - - typedef CL_API_ENTRY cl_int - ( CL_API_CALL * clCreateSubDevicesEXT_fn)( cl_device_id /*in_device*/, - const cl_device_partition_property_ext * /* properties */, - cl_uint /*num_entries*/, - cl_device_id * /*out_devices*/, - cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1; - - /* cl_device_partition_property_ext */ - #define CL_DEVICE_PARTITION_EQUALLY_EXT 0x4050 - #define CL_DEVICE_PARTITION_BY_COUNTS_EXT 0x4051 - #define CL_DEVICE_PARTITION_BY_NAMES_EXT 0x4052 - #define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN_EXT 0x4053 - - /* clDeviceGetInfo selectors */ - #define CL_DEVICE_PARENT_DEVICE_EXT 0x4054 - #define CL_DEVICE_PARTITION_TYPES_EXT 0x4055 - #define CL_DEVICE_AFFINITY_DOMAINS_EXT 0x4056 - #define CL_DEVICE_REFERENCE_COUNT_EXT 0x4057 - #define CL_DEVICE_PARTITION_STYLE_EXT 0x4058 - - /* error codes */ - #define CL_DEVICE_PARTITION_FAILED_EXT -1057 - #define CL_INVALID_PARTITION_COUNT_EXT -1058 - #define CL_INVALID_PARTITION_NAME_EXT -1059 - - /* CL_AFFINITY_DOMAINs */ - #define CL_AFFINITY_DOMAIN_L1_CACHE_EXT 0x1 - #define CL_AFFINITY_DOMAIN_L2_CACHE_EXT 0x2 - #define CL_AFFINITY_DOMAIN_L3_CACHE_EXT 0x3 - #define CL_AFFINITY_DOMAIN_L4_CACHE_EXT 0x4 - #define CL_AFFINITY_DOMAIN_NUMA_EXT 0x10 - #define CL_AFFINITY_DOMAIN_NEXT_FISSIONABLE_EXT 0x100 - - /* cl_device_partition_property_ext list terminators */ - #define CL_PROPERTIES_LIST_END_EXT ((cl_device_partition_property_ext) 0) - #define CL_PARTITION_BY_COUNTS_LIST_END_EXT ((cl_device_partition_property_ext) 0) - #define CL_PARTITION_BY_NAMES_LIST_END_EXT ((cl_device_partition_property_ext) 0 - 1) - -/********************************* -* cl_qcom_ext_host_ptr extension -*********************************/ - -#define CL_MEM_EXT_HOST_PTR_QCOM (1 << 29) - -#define CL_DEVICE_EXT_MEM_PADDING_IN_BYTES_QCOM 0x40A0 -#define CL_DEVICE_PAGE_SIZE_QCOM 0x40A1 -#define CL_IMAGE_ROW_ALIGNMENT_QCOM 0x40A2 -#define CL_IMAGE_SLICE_ALIGNMENT_QCOM 0x40A3 -#define CL_MEM_HOST_UNCACHED_QCOM 0x40A4 -#define CL_MEM_HOST_WRITEBACK_QCOM 0x40A5 -#define CL_MEM_HOST_WRITETHROUGH_QCOM 0x40A6 -#define CL_MEM_HOST_WRITE_COMBINING_QCOM 0x40A7 - -typedef cl_uint cl_image_pitch_info_qcom; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetDeviceImageInfoQCOM(cl_device_id device, - size_t image_width, - size_t image_height, - const cl_image_format *image_format, - cl_image_pitch_info_qcom param_name, - size_t param_value_size, - void *param_value, - size_t *param_value_size_ret); - -typedef struct _cl_mem_ext_host_ptr -{ - /* Type of external memory allocation. */ - /* Legal values will be defined in layered extensions. */ - cl_uint allocation_type; - - /* Host cache policy for this external memory allocation. */ - cl_uint host_cache_policy; - -} cl_mem_ext_host_ptr; - -/********************************* -* cl_qcom_ion_host_ptr extension -*********************************/ - -#define CL_MEM_ION_HOST_PTR_QCOM 0x40A8 - -typedef struct _cl_mem_ion_host_ptr -{ - /* Type of external memory allocation. */ - /* Must be CL_MEM_ION_HOST_PTR_QCOM for ION allocations. */ - cl_mem_ext_host_ptr ext_host_ptr; - - /* ION file descriptor */ - int ion_filedesc; - - /* Host pointer to the ION allocated memory */ - void* ion_hostptr; - -} cl_mem_ion_host_ptr; - -#endif /* CL_VERSION_1_1 */ - -#if defined(CL_VERSION_1_2) - -/****************************************** - * cl_img_yuv_image extension * - ******************************************/ - -/* Image formats used in clCreateImage */ -#define CL_NV21_IMG 0x40D0 -#define CL_YV12_IMG 0x40D1 - -/****************************************** - * cl_img_cached_allocations extension * - ******************************************/ - -/* Flag values used by clCreteBuffer */ -#define CL_MEM_USE_UNCACHED_CPU_MEMORY_IMG (1 << 26) -#define CL_MEM_USE_CACHED_CPU_MEMORY_IMG (1 << 27) - -/****************************************** - * cl_img_use_gralloc_ptr extension * - ******************************************/ - -/* Flag values used by clCreteBuffer */ -#define CL_MEM_USE_GRALLOC_PTR_IMG (1 << 28) - -/* To be used by clGetEventInfo: */ -#define CL_COMMAND_ACQUIRE_GRALLOC_OBJECTS_IMG 0x40D2 -#define CL_COMMAND_RELEASE_GRALLOC_OBJECTS_IMG 0x40D3 - -/* Error code from clEnqueueReleaseGrallocObjectsIMG */ -#define CL_GRALLOC_RESOURCE_NOT_ACQUIRED_IMG 0x40D4 - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueAcquireGrallocObjectsIMG(cl_command_queue /* command_queue */, - cl_uint /* num_objects */, - const cl_mem * /* mem_objects */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueReleaseGrallocObjectsIMG(cl_command_queue /* command_queue */, - cl_uint /* num_objects */, - const cl_mem * /* mem_objects */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2; - -#endif /* CL_VERSION_1_2 */ - -#ifdef CL_VERSION_2_0 -/********************************* -* cl_khr_subgroups extension -*********************************/ -#define cl_khr_subgroups 1 - -/* cl_kernel_sub_group_info is declared in CL.h. */ - -/* cl_kernel_sub_group_info */ -#define CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE_KHR 0x2033 -#define CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE_KHR 0x2034 - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetKernelSubGroupInfoKHR(cl_kernel /* in_kernel */, - cl_device_id /*in_device*/, - cl_kernel_sub_group_info /* param_name */, - size_t /*input_value_size*/, - const void * /*input_value*/, - size_t /*param_value_size*/, - void* /*param_value*/, - size_t* /*param_value_size_ret*/ ) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED; - -typedef CL_API_ENTRY cl_int - ( CL_API_CALL * clGetKernelSubGroupInfoKHR_fn)(cl_kernel /* in_kernel */, - cl_device_id /*in_device*/, - cl_kernel_sub_group_info /* param_name */, - size_t /*input_value_size*/, - const void * /*input_value*/, - size_t /*param_value_size*/, - void* /*param_value*/, - size_t* /*param_value_size_ret*/ ) CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED; -#endif /* CL_VERSION_2_0 */ - -#ifdef CL_VERSION_2_1 -/********************************* -* cl_khr_priority_hints extension -*********************************/ -#define cl_khr_priority_hints 1 - -typedef cl_uint cl_queue_priority_khr; - -/* cl_command_queue_properties */ -#define CL_QUEUE_PRIORITY_KHR 0x1096 - -/* cl_queue_priority_khr */ -#define CL_QUEUE_PRIORITY_HIGH_KHR (1<<0) -#define CL_QUEUE_PRIORITY_MED_KHR (1<<1) -#define CL_QUEUE_PRIORITY_LOW_KHR (1<<2) - -#endif /* CL_VERSION_2_1 */ - -#ifdef CL_VERSION_2_1 -/********************************* -* cl_khr_throttle_hints extension -*********************************/ -#define cl_khr_throttle_hints 1 - -typedef cl_uint cl_queue_throttle_khr; - -/* cl_command_queue_properties */ -#define CL_QUEUE_THROTTLE_KHR 0x1097 - -/* cl_queue_throttle_khr */ -#define CL_QUEUE_THROTTLE_HIGH_KHR (1<<0) -#define CL_QUEUE_THROTTLE_MED_KHR (1<<1) -#define CL_QUEUE_THROTTLE_LOW_KHR (1<<2) - -#endif /* CL_VERSION_2_1 */ - -#ifdef CL_VERSION_2_2 -/********************************* -* cl_khr_subgroup_named_barrier -*********************************/ -#define cl_khr_subgroup_named_barrier 1 - -/* cl_device_info */ -#define CL_DEVICE_MAX_NAMED_BARRIER_COUNT_KHR 0x2035 - -#endif /* CL_VERSION_2_2 */ - -/********************************** - * cl_arm_import_memory extension * - **********************************/ - -#ifdef CL_VERSION_1_0 - -typedef intptr_t cl_import_properties_arm; - -/* Default and valid proporties name for cl_arm_import_memory */ -#define CL_IMPORT_TYPE_ARM 0x40B2 - -/* Host process memory type default value for CL_IMPORT_TYPE_ARM property */ -#define CL_IMPORT_TYPE_HOST_ARM 0x40B3 - -/* DMA BUF memory type value for CL_IMPORT_TYPE_ARM property */ -#define CL_IMPORT_TYPE_DMA_BUF_ARM 0x40B4 - -/* Secure DMA BUF memory type value for CL_IMPORT_TYPE_ARM property */ -#define CL_IMPORT_TYPE_SECURE_ARM 0x40B5 - -/* This extension adds a new function that allows for direct memory import into - * OpenCL via the clImportMemoryARM function. - * - * Memory imported through this interface will be mapped into the device's page - * tables directly, providing zero copy access. It will never fall back to copy - * operations and aliased buffers. - * - * Types of memory supported for import are specified as additional extension - * strings. - * - * This extension produces cl_mem allocations which are compatible with all other - * users of cl_mem in the standard API. - * - * This extension maps pages with the same properties as the normal buffer creation - * function clCreateBuffer. - */ -extern CL_API_ENTRY cl_mem CL_API_CALL -clImportMemoryARM( cl_context context, - cl_mem_flags flags, - const cl_import_properties_arm *properties, - void *memory, - size_t size, - cl_int *errcode_ret) CL_EXT_SUFFIX__VERSION_1_0; - - -#endif /* CL_VERSION_1_0 */ - -/****************************************** - * cl_arm_shared_virtual_memory extension * - ******************************************/ - -#ifdef CL_VERSION_1_2 - -/* Used by clGetDeviceInfo */ -#define CL_DEVICE_SVM_CAPABILITIES_ARM 0x40B6 - -/* Used by clGetMemObjectInfo */ -#define CL_MEM_USES_SVM_POINTER_ARM 0x40B7 - -/* Used by clSetKernelExecInfoARM: */ -#define CL_KERNEL_EXEC_INFO_SVM_PTRS_ARM 0x40B8 -#define CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM_ARM 0x40B9 - -/* To be used by clGetEventInfo: */ -#define CL_COMMAND_SVM_FREE_ARM 0x40BA -#define CL_COMMAND_SVM_MEMCPY_ARM 0x40BB -#define CL_COMMAND_SVM_MEMFILL_ARM 0x40BC -#define CL_COMMAND_SVM_MAP_ARM 0x40BD -#define CL_COMMAND_SVM_UNMAP_ARM 0x40BE - -/* Flag values returned by clGetDeviceInfo with CL_DEVICE_SVM_CAPABILITIES_ARM as the param_name. */ -#define CL_DEVICE_SVM_COARSE_GRAIN_BUFFER_ARM (1 << 0) -#define CL_DEVICE_SVM_FINE_GRAIN_BUFFER_ARM (1 << 1) -#define CL_DEVICE_SVM_FINE_GRAIN_SYSTEM_ARM (1 << 2) -#define CL_DEVICE_SVM_ATOMICS_ARM (1 << 3) - -/* Flag values used by clSVMAllocARM: */ -#define CL_MEM_SVM_FINE_GRAIN_BUFFER_ARM (1 << 10) -#define CL_MEM_SVM_ATOMICS_ARM (1 << 11) - -typedef cl_bitfield cl_svm_mem_flags_arm; -typedef cl_uint cl_kernel_exec_info_arm; -typedef cl_bitfield cl_device_svm_capabilities_arm; - -extern CL_API_ENTRY void * CL_API_CALL -clSVMAllocARM(cl_context /* context */, - cl_svm_mem_flags_arm /* flags */, - size_t /* size */, - cl_uint /* alignment */) CL_EXT_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY void CL_API_CALL -clSVMFreeARM(cl_context /* context */, - void * /* svm_pointer */) CL_EXT_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueSVMFreeARM(cl_command_queue /* command_queue */, - cl_uint /* num_svm_pointers */, - void *[] /* svm_pointers[] */, - void (CL_CALLBACK * /*pfn_free_func*/)(cl_command_queue /* queue */, - cl_uint /* num_svm_pointers */, - void *[] /* svm_pointers[] */, - void * /* user_data */), - void * /* user_data */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueSVMMemcpyARM(cl_command_queue /* command_queue */, - cl_bool /* blocking_copy */, - void * /* dst_ptr */, - const void * /* src_ptr */, - size_t /* size */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueSVMMemFillARM(cl_command_queue /* command_queue */, - void * /* svm_ptr */, - const void * /* pattern */, - size_t /* pattern_size */, - size_t /* size */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueSVMMapARM(cl_command_queue /* command_queue */, - cl_bool /* blocking_map */, - cl_map_flags /* flags */, - void * /* svm_ptr */, - size_t /* size */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueSVMUnmapARM(cl_command_queue /* command_queue */, - void * /* svm_ptr */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_int CL_API_CALL -clSetKernelArgSVMPointerARM(cl_kernel /* kernel */, - cl_uint /* arg_index */, - const void * /* arg_value */) CL_EXT_SUFFIX__VERSION_1_2; -extern CL_API_ENTRY cl_int CL_API_CALL -clSetKernelExecInfoARM(cl_kernel /* kernel */, - cl_kernel_exec_info_arm /* param_name */, - size_t /* param_value_size */, - const void * /* param_value */) CL_EXT_SUFFIX__VERSION_1_2; - -#endif /* CL_VERSION_1_2 */ - -#ifdef __cplusplus -} -#endif - - -#endif /* __CL_EXT_H */ diff --git a/emscripten/include/pvrsdk/CL/cl_gl.h b/emscripten/include/pvrsdk/CL/cl_gl.h deleted file mode 100644 index 4fbac655..00000000 --- a/emscripten/include/pvrsdk/CL/cl_gl.h +++ /dev/null @@ -1,167 +0,0 @@ -/********************************************************************************** - * Copyright (c) 2008-2015 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and/or associated documentation files (the - * "Materials"), to deal in the Materials without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Materials, and to - * permit persons to whom the Materials are furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS - * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS - * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT - * https://www.khronos.org/registry/ - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER 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. - **********************************************************************************/ - -#ifndef __OPENCL_CL_GL_H -#define __OPENCL_CL_GL_H - -#ifdef __APPLE__ -#include -#else -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -typedef cl_uint cl_gl_object_type; -typedef cl_uint cl_gl_texture_info; -typedef cl_uint cl_gl_platform_info; -typedef struct __GLsync *cl_GLsync; - -/* cl_gl_object_type = 0x2000 - 0x200F enum values are currently taken */ -#define CL_GL_OBJECT_BUFFER 0x2000 -#define CL_GL_OBJECT_TEXTURE2D 0x2001 -#define CL_GL_OBJECT_TEXTURE3D 0x2002 -#define CL_GL_OBJECT_RENDERBUFFER 0x2003 -#define CL_GL_OBJECT_TEXTURE2D_ARRAY 0x200E -#define CL_GL_OBJECT_TEXTURE1D 0x200F -#define CL_GL_OBJECT_TEXTURE1D_ARRAY 0x2010 -#define CL_GL_OBJECT_TEXTURE_BUFFER 0x2011 - -/* cl_gl_texture_info */ -#define CL_GL_TEXTURE_TARGET 0x2004 -#define CL_GL_MIPMAP_LEVEL 0x2005 -#define CL_GL_NUM_SAMPLES 0x2012 - -#ifndef CL_NO_PROTOTYPES -extern CL_API_ENTRY cl_mem CL_API_CALL -clCreateFromGLBuffer(cl_context /* context */, - cl_mem_flags /* flags */, - cl_GLuint /* bufobj */, - int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_mem CL_API_CALL -clCreateFromGLTexture(cl_context /* context */, - cl_mem_flags /* flags */, - cl_GLenum /* target */, - cl_GLint /* miplevel */, - cl_GLuint /* texture */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2; - -extern CL_API_ENTRY cl_mem CL_API_CALL -clCreateFromGLRenderbuffer(cl_context /* context */, - cl_mem_flags /* flags */, - cl_GLuint /* renderbuffer */, - cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetGLObjectInfo(cl_mem /* memobj */, - cl_gl_object_type * /* gl_object_type */, - cl_GLuint * /* gl_object_name */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetGLTextureInfo(cl_mem /* memobj */, - cl_gl_texture_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueAcquireGLObjects(cl_command_queue /* command_queue */, - cl_uint /* num_objects */, - const cl_mem * /* mem_objects */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - -extern CL_API_ENTRY cl_int CL_API_CALL -clEnqueueReleaseGLObjects(cl_command_queue /* command_queue */, - cl_uint /* num_objects */, - const cl_mem * /* mem_objects */, - cl_uint /* num_events_in_wait_list */, - const cl_event * /* event_wait_list */, - cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; - - -/* Deprecated OpenCL 1.1 APIs */ -extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL -clCreateFromGLTexture2D(cl_context /* context */, - cl_mem_flags /* flags */, - cl_GLenum /* target */, - cl_GLint /* miplevel */, - cl_GLuint /* texture */, - cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; - -extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL -clCreateFromGLTexture3D(cl_context /* context */, - cl_mem_flags /* flags */, - cl_GLenum /* target */, - cl_GLint /* miplevel */, - cl_GLuint /* texture */, - cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED; -#endif -/* cl_khr_gl_sharing extension */ - -#define cl_khr_gl_sharing 1 - -typedef cl_uint cl_gl_context_info; - -/* Additional Error Codes */ -#define CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR -1000 - -/* cl_gl_context_info */ -#define CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR 0x2006 -#define CL_DEVICES_FOR_GL_CONTEXT_KHR 0x2007 - -/* Additional cl_context_properties */ -#define CL_GL_CONTEXT_KHR 0x2008 -#define CL_EGL_DISPLAY_KHR 0x2009 -#define CL_GLX_DISPLAY_KHR 0x200A -#define CL_WGL_HDC_KHR 0x200B -#define CL_CGL_SHAREGROUP_KHR 0x200C - -extern CL_API_ENTRY cl_int CL_API_CALL -clGetGLContextInfoKHR(const cl_context_properties * /* properties */, - cl_gl_context_info /* param_name */, - size_t /* param_value_size */, - void * /* param_value */, - size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; - -typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetGLContextInfoKHR_fn)( - const cl_context_properties * properties, - cl_gl_context_info param_name, - size_t param_value_size, - void * param_value, - size_t * param_value_size_ret); - -#ifdef __cplusplus -} -#endif - -#endif /* __OPENCL_CL_GL_H */ diff --git a/emscripten/include/pvrsdk/CL/cl_gl_ext.h b/emscripten/include/pvrsdk/CL/cl_gl_ext.h deleted file mode 100644 index e3c14c64..00000000 --- a/emscripten/include/pvrsdk/CL/cl_gl_ext.h +++ /dev/null @@ -1,74 +0,0 @@ -/********************************************************************************** - * Copyright (c) 2008-2015 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and/or associated documentation files (the - * "Materials"), to deal in the Materials without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Materials, and to - * permit persons to whom the Materials are furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS - * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS - * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT - * https://www.khronos.org/registry/ - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER 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. - **********************************************************************************/ - -/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */ - -/* cl_gl_ext.h contains vendor (non-KHR) OpenCL extensions which have */ -/* OpenGL dependencies. */ - -#ifndef __OPENCL_CL_GL_EXT_H -#define __OPENCL_CL_GL_EXT_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __APPLE__ - #include -#else - #include -#endif - -/* - * For each extension, follow this template - * cl_VEN_extname extension */ -/* #define cl_VEN_extname 1 - * ... define new types, if any - * ... define new tokens, if any - * ... define new APIs, if any - * - * If you need GLtypes here, mirror them with a cl_GLtype, rather than including a GL header - * This allows us to avoid having to decide whether to include GL headers or GLES here. - */ - -/* - * cl_khr_gl_event extension - * See section 9.9 in the OpenCL 1.1 spec for more information - */ -#define CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR 0x200D - -extern CL_API_ENTRY cl_event CL_API_CALL -clCreateEventFromGLsyncKHR(cl_context /* context */, - cl_GLsync /* cl_GLsync */, - cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1; - -#ifdef __cplusplus -} -#endif - -#endif /* __OPENCL_CL_GL_EXT_H */ diff --git a/emscripten/include/pvrsdk/CL/cl_platform.h b/emscripten/include/pvrsdk/CL/cl_platform.h deleted file mode 100644 index 10d99edc..00000000 --- a/emscripten/include/pvrsdk/CL/cl_platform.h +++ /dev/null @@ -1,1468 +0,0 @@ -/********************************************************************************** - * Copyright (c) 2008-2015 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and/or associated documentation files (the - * "Materials"), to deal in the Materials without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Materials, and to - * permit persons to whom the Materials are furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS - * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS - * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT - * https://www.khronos.org/registry/ - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER 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. - **********************************************************************************/ - -/* $Revision: 11803 $ on $Date: 2010-06-25 10:02:12 -0700 (Fri, 25 Jun 2010) $ */ - -#ifndef __CL_PLATFORM_H -#define __CL_PLATFORM_H - -#ifdef __APPLE__ - /* Contains #defines for AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER below */ - #include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined(_WIN32) - #define CL_API_ENTRY - #define CL_API_CALL __stdcall - #define CL_CALLBACK __stdcall -#else - #define CL_API_ENTRY - #define CL_API_CALL - #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 - #define CL_EXT_SUFFIX__VERSION_1_0 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER - #define CL_API_SUFFIX__VERSION_1_1 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER - #define GCL_API_SUFFIX__VERSION_1_1 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER - #define CL_EXT_SUFFIX__VERSION_1_1 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER - #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 - - #ifdef AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER - #define CL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER - #define GCL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER - #define CL_EXT_SUFFIX__VERSION_1_2 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER - #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED - #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 - #else - #warning This path should never happen outside of internal operating system development. AvailabilityMacros do not function correctly here! - #define CL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER - #define GCL_API_SUFFIX__VERSION_1_2 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER - #define CL_EXT_SUFFIX__VERSION_1_2 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER - #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER - #endif - - #define CL_API_SUFFIX__VERSION_2_0 - #define CL_EXT_SUFFIX__VERSION_2_0 - #define CL_API_SUFFIX__VERSION_2_1 - #define CL_EXT_SUFFIX__VERSION_2_1 - #define CL_API_SUFFIX__VERSION_2_2 - #define CL_EXT_SUFFIX__VERSION_2_2 - #define CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED - #define CL_EXT_PREFIX__VERSION_1_2_DEPRECATED - #define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED -#else - #define CL_EXTENSION_WEAK_LINK - #define CL_API_SUFFIX__VERSION_1_0 - #define CL_EXT_SUFFIX__VERSION_1_0 - #define CL_API_SUFFIX__VERSION_1_1 - #define CL_EXT_SUFFIX__VERSION_1_1 - #define CL_API_SUFFIX__VERSION_1_2 - #define CL_EXT_SUFFIX__VERSION_1_2 - #define CL_API_SUFFIX__VERSION_2_0 - #define CL_EXT_SUFFIX__VERSION_2_0 - #define CL_API_SUFFIX__VERSION_2_1 - #define CL_EXT_SUFFIX__VERSION_2_1 - #define CL_API_SUFFIX__VERSION_2_2 - #define CL_EXT_SUFFIX__VERSION_2_2 - - #ifdef __GNUC__ - #ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS - #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED - #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED - #else - #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED __attribute__((deprecated)) - #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED - #endif - - #ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS - #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED - #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED - #else - #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED __attribute__((deprecated)) - #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED - #endif - - #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_1_2_DEPRECATED __attribute__((deprecated)) - #define CL_EXT_PREFIX__VERSION_1_2_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 - #else - #define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED __attribute__((deprecated)) - #define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED - #endif - - #ifdef CL_USE_DEPRECATED_OPENCL_2_1_APIS - #define CL_EXT_SUFFIX__VERSION_2_1_DEPRECATED - #define CL_EXT_PREFIX__VERSION_2_1_DEPRECATED - #else - #define CL_EXT_SUFFIX__VERSION_2_1_DEPRECATED __attribute__((deprecated)) - #define CL_EXT_PREFIX__VERSION_2_1_DEPRECATED - #endif - #elif defined(_WIN32) - #ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS - #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED - #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED - #else - #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED - #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED __declspec(deprecated) - #endif - - #ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS - #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED - #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED - #else - #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED - #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED __declspec(deprecated) - #endif - - #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_1_2_DEPRECATED - #define CL_EXT_PREFIX__VERSION_1_2_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 - #else - #define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED - #define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED __declspec(deprecated) - #endif - - #ifdef CL_USE_DEPRECATED_OPENCL_2_1_APIS - #define CL_EXT_SUFFIX__VERSION_2_1_DEPRECATED - #define CL_EXT_PREFIX__VERSION_2_1_DEPRECATED - #else - #define CL_EXT_SUFFIX__VERSION_2_1_DEPRECATED - #define CL_EXT_PREFIX__VERSION_2_1_DEPRECATED __declspec(deprecated) - #endif - #else - #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED - #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED - - #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED - #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED - - #define CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED - #define CL_EXT_PREFIX__VERSION_1_2_DEPRECATED - - #define CL_EXT_SUFFIX__VERSION_2_0_DEPRECATED - #define CL_EXT_PREFIX__VERSION_2_0_DEPRECATED - - #define CL_EXT_SUFFIX__VERSION_2_1_DEPRECATED - #define CL_EXT_PREFIX__VERSION_2_1_DEPRECATED - #endif -#endif - -#if (defined (_WIN32) && defined(_MSC_VER)) - -/* scalar types */ -typedef signed __int8 cl_char; -typedef unsigned __int8 cl_uchar; -typedef signed __int16 cl_short; -typedef unsigned __int16 cl_ushort; -typedef signed __int32 cl_int; -typedef unsigned __int32 cl_uint; -typedef signed __int64 cl_long; -typedef unsigned __int64 cl_ulong; - -typedef unsigned __int16 cl_half; -typedef float cl_float; -typedef double cl_double; - -/* Macro names and corresponding values defined by OpenCL */ -#define CL_CHAR_BIT 8 -#define CL_SCHAR_MAX 127 -#define CL_SCHAR_MIN (-127-1) -#define CL_CHAR_MAX CL_SCHAR_MAX -#define CL_CHAR_MIN CL_SCHAR_MIN -#define CL_UCHAR_MAX 255 -#define CL_SHRT_MAX 32767 -#define CL_SHRT_MIN (-32767-1) -#define CL_USHRT_MAX 65535 -#define CL_INT_MAX 2147483647 -#define CL_INT_MIN (-2147483647-1) -#define CL_UINT_MAX 0xffffffffU -#define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL) -#define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL) -#define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL) - -#define CL_FLT_DIG 6 -#define CL_FLT_MANT_DIG 24 -#define CL_FLT_MAX_10_EXP +38 -#define CL_FLT_MAX_EXP +128 -#define CL_FLT_MIN_10_EXP -37 -#define CL_FLT_MIN_EXP -125 -#define CL_FLT_RADIX 2 -#define CL_FLT_MAX 340282346638528859811704183484516925440.0f -#define CL_FLT_MIN 1.175494350822287507969e-38f -#define CL_FLT_EPSILON 1.1920928955078125e-7f - -#define CL_HALF_DIG 3 -#define CL_HALF_MANT_DIG 11 -#define CL_HALF_MAX_10_EXP +4 -#define CL_HALF_MAX_EXP +16 -#define CL_HALF_MIN_10_EXP -4 -#define CL_HALF_MIN_EXP -13 -#define CL_HALF_RADIX 2 -#define CL_HALF_MAX 65504.0f -#define CL_HALF_MIN 6.103515625e-05f -#define CL_HALF_EPSILON 9.765625e-04f - -#define CL_DBL_DIG 15 -#define CL_DBL_MANT_DIG 53 -#define CL_DBL_MAX_10_EXP +308 -#define CL_DBL_MAX_EXP +1024 -#define CL_DBL_MIN_10_EXP -307 -#define CL_DBL_MIN_EXP -1021 -#define CL_DBL_RADIX 2 -#define CL_DBL_MAX 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0 -#define CL_DBL_MIN 2.225073858507201383090e-308 -#define CL_DBL_EPSILON 2.220446049250313080847e-16 - -#define CL_M_E 2.718281828459045090796 -#define CL_M_LOG2E 1.442695040888963387005 -#define CL_M_LOG10E 0.434294481903251816668 -#define CL_M_LN2 0.693147180559945286227 -#define CL_M_LN10 2.302585092994045901094 -#define CL_M_PI 3.141592653589793115998 -#define CL_M_PI_2 1.570796326794896557999 -#define CL_M_PI_4 0.785398163397448278999 -#define CL_M_1_PI 0.318309886183790691216 -#define CL_M_2_PI 0.636619772367581382433 -#define CL_M_2_SQRTPI 1.128379167095512558561 -#define CL_M_SQRT2 1.414213562373095145475 -#define CL_M_SQRT1_2 0.707106781186547572737 - -#define CL_M_E_F 2.71828174591064f -#define CL_M_LOG2E_F 1.44269502162933f -#define CL_M_LOG10E_F 0.43429449200630f -#define CL_M_LN2_F 0.69314718246460f -#define CL_M_LN10_F 2.30258512496948f -#define CL_M_PI_F 3.14159274101257f -#define CL_M_PI_2_F 1.57079637050629f -#define CL_M_PI_4_F 0.78539818525314f -#define CL_M_1_PI_F 0.31830987334251f -#define CL_M_2_PI_F 0.63661974668503f -#define CL_M_2_SQRTPI_F 1.12837922573090f -#define CL_M_SQRT2_F 1.41421353816986f -#define CL_M_SQRT1_2_F 0.70710676908493f - -#define CL_NAN (CL_INFINITY - CL_INFINITY) -#define CL_HUGE_VALF ((cl_float) 1e50) -#define CL_HUGE_VAL ((cl_double) 1e500) -#define CL_MAXFLOAT CL_FLT_MAX -#define CL_INFINITY CL_HUGE_VALF - -#else - -#include - -/* scalar types */ -typedef int8_t cl_char; -typedef uint8_t cl_uchar; -typedef int16_t cl_short __attribute__((aligned(2))); -typedef uint16_t cl_ushort __attribute__((aligned(2))); -typedef int32_t cl_int __attribute__((aligned(4))); -typedef uint32_t cl_uint __attribute__((aligned(4))); -typedef int64_t cl_long __attribute__((aligned(8))); -typedef uint64_t cl_ulong __attribute__((aligned(8))); - -typedef uint16_t cl_half __attribute__((aligned(2))); -typedef float cl_float __attribute__((aligned(4))); -typedef double cl_double __attribute__((aligned(8))); - -/* Macro names and corresponding values defined by OpenCL */ -#define CL_CHAR_BIT 8 -#define CL_SCHAR_MAX 127 -#define CL_SCHAR_MIN (-127-1) -#define CL_CHAR_MAX CL_SCHAR_MAX -#define CL_CHAR_MIN CL_SCHAR_MIN -#define CL_UCHAR_MAX 255 -#define CL_SHRT_MAX 32767 -#define CL_SHRT_MIN (-32767-1) -#define CL_USHRT_MAX 65535 -#define CL_INT_MAX 2147483647 -#define CL_INT_MIN (-2147483647-1) -#define CL_UINT_MAX 0xffffffffU -#define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL) -#define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL) -#define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL) - -#define CL_FLT_DIG 6 -#define CL_FLT_MANT_DIG 24 -#define CL_FLT_MAX_10_EXP +38 -#define CL_FLT_MAX_EXP +128 -#define CL_FLT_MIN_10_EXP -37 -#define CL_FLT_MIN_EXP -125 -#define CL_FLT_RADIX 2 -#define CL_FLT_MAX 340282346638528859811704183484516925440.0f -#define CL_FLT_MIN 1.175494350822287507969e-38f -#define CL_FLT_EPSILON 1.1920928955078125e-7f - -#define CL_HALF_DIG 3 -#define CL_HALF_MANT_DIG 11 -#define CL_HALF_MAX_10_EXP +4 -#define CL_HALF_MAX_EXP +16 -#define CL_HALF_MIN_10_EXP -4 -#define CL_HALF_MIN_EXP -13 -#define CL_HALF_RADIX 2 -#define CL_HALF_MAX 65504.0f -#define CL_HALF_MIN 6.103515625e-05f -#define CL_HALF_EPSILON 9.765625e-04f - -#define CL_DBL_DIG 15 -#define CL_DBL_MANT_DIG 53 -#define CL_DBL_MAX_10_EXP +308 -#define CL_DBL_MAX_EXP +1024 -#define CL_DBL_MIN_10_EXP -307 -#define CL_DBL_MIN_EXP -1021 -#define CL_DBL_RADIX 2 -#define CL_DBL_MAX 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0 -#define CL_DBL_MIN 2.225073858507201383090e-308 -#define CL_DBL_EPSILON 2.220446049250313080847e-16 - -#define CL_M_E 2.718281828459045090796 -#define CL_M_LOG2E 1.442695040888963387005 -#define CL_M_LOG10E 0.434294481903251816668 -#define CL_M_LN2 0.693147180559945286227 -#define CL_M_LN10 2.302585092994045901094 -#define CL_M_PI 3.141592653589793115998 -#define CL_M_PI_2 1.570796326794896557999 -#define CL_M_PI_4 0.785398163397448278999 -#define CL_M_1_PI 0.318309886183790691216 -#define CL_M_2_PI 0.636619772367581382433 -#define CL_M_2_SQRTPI 1.128379167095512558561 -#define CL_M_SQRT2 1.414213562373095145475 -#define CL_M_SQRT1_2 0.707106781186547572737 - -#define CL_M_E_F 2.71828174591064f -#define CL_M_LOG2E_F 1.44269502162933f -#define CL_M_LOG10E_F 0.43429449200630f -#define CL_M_LN2_F 0.69314718246460f -#define CL_M_LN10_F 2.30258512496948f -#define CL_M_PI_F 3.14159274101257f -#define CL_M_PI_2_F 1.57079637050629f -#define CL_M_PI_4_F 0.78539818525314f -#define CL_M_1_PI_F 0.31830987334251f -#define CL_M_2_PI_F 0.63661974668503f -#define CL_M_2_SQRTPI_F 1.12837922573090f -#define CL_M_SQRT2_F 1.41421353816986f -#define CL_M_SQRT1_2_F 0.70710676908493f - -#if defined( __GNUC__ ) - #define CL_HUGE_VALF __builtin_huge_valf() - #define CL_HUGE_VAL __builtin_huge_val() - #define CL_NAN __builtin_nanf( "" ) -#else - #define CL_HUGE_VALF ((cl_float) 1e50) - #define CL_HUGE_VAL ((cl_double) 1e500) - float nanf( const char * ); - #define CL_NAN nanf( "" ) -#endif -#define CL_MAXFLOAT CL_FLT_MAX -#define CL_INFINITY CL_HUGE_VALF - -#endif - -#include - -/* Mirror types to GL types. Mirror types allow us to avoid deciding which 87s to load based on whether we are using GL or GLES here. */ -typedef unsigned int cl_GLuint; -typedef int cl_GLint; -typedef unsigned int cl_GLenum; - -/* - * Vector types - * - * Note: OpenCL requires that all types be naturally aligned. - * This means that vector types must be naturally aligned. - * For example, a vector of four floats must be aligned to - * a 16 byte boundary (calculated as 4 * the natural 4-byte - * alignment of the float). The alignment qualifiers here - * will only function properly if your compiler supports them - * and if you don't actively work to defeat them. For example, - * in order for a cl_float4 to be 16 byte aligned in a struct, - * the start of the struct must itself be 16-byte aligned. - * - * Maintaining proper alignment is the user's responsibility. - */ - -/* Define basic vector types */ -#if defined( __VEC__ ) - #include /* may be omitted depending on compiler. AltiVec spec provides no way to detect whether the header is required. */ - typedef vector unsigned char __cl_uchar16; - typedef vector signed char __cl_char16; - typedef vector unsigned short __cl_ushort8; - typedef vector signed short __cl_short8; - typedef vector unsigned int __cl_uint4; - typedef vector signed int __cl_int4; - typedef vector float __cl_float4; - #define __CL_UCHAR16__ 1 - #define __CL_CHAR16__ 1 - #define __CL_USHORT8__ 1 - #define __CL_SHORT8__ 1 - #define __CL_UINT4__ 1 - #define __CL_INT4__ 1 - #define __CL_FLOAT4__ 1 -#endif - -#if defined( __SSE__ ) - #if defined( __MINGW64__ ) - #include - #else - #include - #endif - #if defined( __GNUC__ ) - typedef float __cl_float4 __attribute__((vector_size(16))); - #else - typedef __m128 __cl_float4; - #endif - #define __CL_FLOAT4__ 1 -#endif - -#if defined( __SSE2__ ) - #if defined( __MINGW64__ ) - #include - #else - #include - #endif - #if defined( __GNUC__ ) - typedef cl_uchar __cl_uchar16 __attribute__((vector_size(16))); - typedef cl_char __cl_char16 __attribute__((vector_size(16))); - typedef cl_ushort __cl_ushort8 __attribute__((vector_size(16))); - typedef cl_short __cl_short8 __attribute__((vector_size(16))); - typedef cl_uint __cl_uint4 __attribute__((vector_size(16))); - typedef cl_int __cl_int4 __attribute__((vector_size(16))); - typedef cl_ulong __cl_ulong2 __attribute__((vector_size(16))); - typedef cl_long __cl_long2 __attribute__((vector_size(16))); - typedef cl_double __cl_double2 __attribute__((vector_size(16))); - #else - typedef __m128i __cl_uchar16; - typedef __m128i __cl_char16; - typedef __m128i __cl_ushort8; - typedef __m128i __cl_short8; - typedef __m128i __cl_uint4; - typedef __m128i __cl_int4; - typedef __m128i __cl_ulong2; - typedef __m128i __cl_long2; - typedef __m128d __cl_double2; - #endif - #define __CL_UCHAR16__ 1 - #define __CL_CHAR16__ 1 - #define __CL_USHORT8__ 1 - #define __CL_SHORT8__ 1 - #define __CL_INT4__ 1 - #define __CL_UINT4__ 1 - #define __CL_ULONG2__ 1 - #define __CL_LONG2__ 1 - #define __CL_DOUBLE2__ 1 -#endif - -#if defined( __MMX__ ) - #include - #if defined( __GNUC__ ) - typedef cl_uchar __cl_uchar8 __attribute__((vector_size(8))); - typedef cl_char __cl_char8 __attribute__((vector_size(8))); - typedef cl_ushort __cl_ushort4 __attribute__((vector_size(8))); - typedef cl_short __cl_short4 __attribute__((vector_size(8))); - typedef cl_uint __cl_uint2 __attribute__((vector_size(8))); - typedef cl_int __cl_int2 __attribute__((vector_size(8))); - typedef cl_ulong __cl_ulong1 __attribute__((vector_size(8))); - typedef cl_long __cl_long1 __attribute__((vector_size(8))); - typedef cl_float __cl_float2 __attribute__((vector_size(8))); - #else - typedef __m64 __cl_uchar8; - typedef __m64 __cl_char8; - typedef __m64 __cl_ushort4; - typedef __m64 __cl_short4; - typedef __m64 __cl_uint2; - typedef __m64 __cl_int2; - typedef __m64 __cl_ulong1; - typedef __m64 __cl_long1; - typedef __m64 __cl_float2; - #endif - #define __CL_UCHAR8__ 1 - #define __CL_CHAR8__ 1 - #define __CL_USHORT4__ 1 - #define __CL_SHORT4__ 1 - #define __CL_INT2__ 1 - #define __CL_UINT2__ 1 - #define __CL_ULONG1__ 1 - #define __CL_LONG1__ 1 - #define __CL_FLOAT2__ 1 -#endif - -#if defined( __AVX__ ) - #if defined( __MINGW64__ ) - #include - #else - #include - #endif - #if defined( __GNUC__ ) - typedef cl_float __cl_float8 __attribute__((vector_size(32))); - typedef cl_double __cl_double4 __attribute__((vector_size(32))); - #else - typedef __m256 __cl_float8; - typedef __m256d __cl_double4; - #endif - #define __CL_FLOAT8__ 1 - #define __CL_DOUBLE4__ 1 -#endif - -/* Define capabilities for anonymous struct members. */ -#if !defined(__cplusplus) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L -#define __CL_HAS_ANON_STRUCT__ 1 -#define __CL_ANON_STRUCT__ -#elif defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) -#define __CL_HAS_ANON_STRUCT__ 1 -#define __CL_ANON_STRUCT__ __extension__ -#elif defined( _WIN32) && defined(_MSC_VER) - #if _MSC_VER >= 1500 - /* Microsoft Developer Studio 2008 supports anonymous structs, but - * complains by default. */ - #define __CL_HAS_ANON_STRUCT__ 1 - #define __CL_ANON_STRUCT__ - /* Disable warning C4201: nonstandard extension used : nameless - * struct/union */ - #pragma warning( push ) - #pragma warning( disable : 4201 ) - #endif -#else -#define __CL_HAS_ANON_STRUCT__ 0 -#define __CL_ANON_STRUCT__ -#endif - -/* Define alignment keys */ -#if defined( __GNUC__ ) - #define CL_ALIGNED(_x) __attribute__ ((aligned(_x))) -#elif defined( _WIN32) && (_MSC_VER) - /* Alignment keys neutered on windows because MSVC can't swallow function arguments with alignment requirements */ - /* http://msdn.microsoft.com/en-us/library/373ak2y1%28VS.71%29.aspx */ - /* #include */ - /* #define CL_ALIGNED(_x) _CRT_ALIGN(_x) */ - #define CL_ALIGNED(_x) -#else - #warning Need to implement some method to align data here - #define CL_ALIGNED(_x) -#endif - -/* Indicate whether .xyzw, .s0123 and .hi.lo are supported */ -#if __CL_HAS_ANON_STRUCT__ - /* .xyzw and .s0123...{f|F} are supported */ - #define CL_HAS_NAMED_VECTOR_FIELDS 1 - /* .hi and .lo are supported */ - #define CL_HAS_HI_LO_VECTOR_FIELDS 1 -#endif - -/* Define cl_vector types */ - -/* ---- cl_charn ---- */ -typedef union -{ - cl_char CL_ALIGNED(2) s[2]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_char x, y; }; - __CL_ANON_STRUCT__ struct{ cl_char s0, s1; }; - __CL_ANON_STRUCT__ struct{ cl_char lo, hi; }; -#endif -#if defined( __CL_CHAR2__) - __cl_char2 v2; -#endif -}cl_char2; - -typedef union -{ - cl_char CL_ALIGNED(4) s[4]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_char x, y, z, w; }; - __CL_ANON_STRUCT__ struct{ cl_char s0, s1, s2, s3; }; - __CL_ANON_STRUCT__ struct{ cl_char2 lo, hi; }; -#endif -#if defined( __CL_CHAR2__) - __cl_char2 v2[2]; -#endif -#if defined( __CL_CHAR4__) - __cl_char4 v4; -#endif -}cl_char4; - -/* cl_char3 is identical in size, alignment and behavior to cl_char4. See section 6.1.5. */ -typedef cl_char4 cl_char3; - -typedef union -{ - cl_char CL_ALIGNED(8) s[8]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_char x, y, z, w; }; - __CL_ANON_STRUCT__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7; }; - __CL_ANON_STRUCT__ struct{ cl_char4 lo, hi; }; -#endif -#if defined( __CL_CHAR2__) - __cl_char2 v2[4]; -#endif -#if defined( __CL_CHAR4__) - __cl_char4 v4[2]; -#endif -#if defined( __CL_CHAR8__ ) - __cl_char8 v8; -#endif -}cl_char8; - -typedef union -{ - cl_char CL_ALIGNED(16) s[16]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_char x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; - __CL_ANON_STRUCT__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; - __CL_ANON_STRUCT__ struct{ cl_char8 lo, hi; }; -#endif -#if defined( __CL_CHAR2__) - __cl_char2 v2[8]; -#endif -#if defined( __CL_CHAR4__) - __cl_char4 v4[4]; -#endif -#if defined( __CL_CHAR8__ ) - __cl_char8 v8[2]; -#endif -#if defined( __CL_CHAR16__ ) - __cl_char16 v16; -#endif -}cl_char16; - - -/* ---- cl_ucharn ---- */ -typedef union -{ - cl_uchar CL_ALIGNED(2) s[2]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_uchar x, y; }; - __CL_ANON_STRUCT__ struct{ cl_uchar s0, s1; }; - __CL_ANON_STRUCT__ struct{ cl_uchar lo, hi; }; -#endif -#if defined( __cl_uchar2__) - __cl_uchar2 v2; -#endif -}cl_uchar2; - -typedef union -{ - cl_uchar CL_ALIGNED(4) s[4]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_uchar x, y, z, w; }; - __CL_ANON_STRUCT__ struct{ cl_uchar s0, s1, s2, s3; }; - __CL_ANON_STRUCT__ struct{ cl_uchar2 lo, hi; }; -#endif -#if defined( __CL_UCHAR2__) - __cl_uchar2 v2[2]; -#endif -#if defined( __CL_UCHAR4__) - __cl_uchar4 v4; -#endif -}cl_uchar4; - -/* cl_uchar3 is identical in size, alignment and behavior to cl_uchar4. See section 6.1.5. */ -typedef cl_uchar4 cl_uchar3; - -typedef union -{ - cl_uchar CL_ALIGNED(8) s[8]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_uchar x, y, z, w; }; - __CL_ANON_STRUCT__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7; }; - __CL_ANON_STRUCT__ struct{ cl_uchar4 lo, hi; }; -#endif -#if defined( __CL_UCHAR2__) - __cl_uchar2 v2[4]; -#endif -#if defined( __CL_UCHAR4__) - __cl_uchar4 v4[2]; -#endif -#if defined( __CL_UCHAR8__ ) - __cl_uchar8 v8; -#endif -}cl_uchar8; - -typedef union -{ - cl_uchar CL_ALIGNED(16) s[16]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_uchar x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; - __CL_ANON_STRUCT__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; - __CL_ANON_STRUCT__ struct{ cl_uchar8 lo, hi; }; -#endif -#if defined( __CL_UCHAR2__) - __cl_uchar2 v2[8]; -#endif -#if defined( __CL_UCHAR4__) - __cl_uchar4 v4[4]; -#endif -#if defined( __CL_UCHAR8__ ) - __cl_uchar8 v8[2]; -#endif -#if defined( __CL_UCHAR16__ ) - __cl_uchar16 v16; -#endif -}cl_uchar16; - - -/* ---- cl_shortn ---- */ -typedef union -{ - cl_short CL_ALIGNED(4) s[2]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_short x, y; }; - __CL_ANON_STRUCT__ struct{ cl_short s0, s1; }; - __CL_ANON_STRUCT__ struct{ cl_short lo, hi; }; -#endif -#if defined( __CL_SHORT2__) - __cl_short2 v2; -#endif -}cl_short2; - -typedef union -{ - cl_short CL_ALIGNED(8) s[4]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_short x, y, z, w; }; - __CL_ANON_STRUCT__ struct{ cl_short s0, s1, s2, s3; }; - __CL_ANON_STRUCT__ struct{ cl_short2 lo, hi; }; -#endif -#if defined( __CL_SHORT2__) - __cl_short2 v2[2]; -#endif -#if defined( __CL_SHORT4__) - __cl_short4 v4; -#endif -}cl_short4; - -/* cl_short3 is identical in size, alignment and behavior to cl_short4. See section 6.1.5. */ -typedef cl_short4 cl_short3; - -typedef union -{ - cl_short CL_ALIGNED(16) s[8]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_short x, y, z, w; }; - __CL_ANON_STRUCT__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7; }; - __CL_ANON_STRUCT__ struct{ cl_short4 lo, hi; }; -#endif -#if defined( __CL_SHORT2__) - __cl_short2 v2[4]; -#endif -#if defined( __CL_SHORT4__) - __cl_short4 v4[2]; -#endif -#if defined( __CL_SHORT8__ ) - __cl_short8 v8; -#endif -}cl_short8; - -typedef union -{ - cl_short CL_ALIGNED(32) s[16]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_short x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; - __CL_ANON_STRUCT__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; - __CL_ANON_STRUCT__ struct{ cl_short8 lo, hi; }; -#endif -#if defined( __CL_SHORT2__) - __cl_short2 v2[8]; -#endif -#if defined( __CL_SHORT4__) - __cl_short4 v4[4]; -#endif -#if defined( __CL_SHORT8__ ) - __cl_short8 v8[2]; -#endif -#if defined( __CL_SHORT16__ ) - __cl_short16 v16; -#endif -}cl_short16; - - -/* ---- cl_ushortn ---- */ -typedef union -{ - cl_ushort CL_ALIGNED(4) s[2]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_ushort x, y; }; - __CL_ANON_STRUCT__ struct{ cl_ushort s0, s1; }; - __CL_ANON_STRUCT__ struct{ cl_ushort lo, hi; }; -#endif -#if defined( __CL_USHORT2__) - __cl_ushort2 v2; -#endif -}cl_ushort2; - -typedef union -{ - cl_ushort CL_ALIGNED(8) s[4]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_ushort x, y, z, w; }; - __CL_ANON_STRUCT__ struct{ cl_ushort s0, s1, s2, s3; }; - __CL_ANON_STRUCT__ struct{ cl_ushort2 lo, hi; }; -#endif -#if defined( __CL_USHORT2__) - __cl_ushort2 v2[2]; -#endif -#if defined( __CL_USHORT4__) - __cl_ushort4 v4; -#endif -}cl_ushort4; - -/* cl_ushort3 is identical in size, alignment and behavior to cl_ushort4. See section 6.1.5. */ -typedef cl_ushort4 cl_ushort3; - -typedef union -{ - cl_ushort CL_ALIGNED(16) s[8]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_ushort x, y, z, w; }; - __CL_ANON_STRUCT__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7; }; - __CL_ANON_STRUCT__ struct{ cl_ushort4 lo, hi; }; -#endif -#if defined( __CL_USHORT2__) - __cl_ushort2 v2[4]; -#endif -#if defined( __CL_USHORT4__) - __cl_ushort4 v4[2]; -#endif -#if defined( __CL_USHORT8__ ) - __cl_ushort8 v8; -#endif -}cl_ushort8; - -typedef union -{ - cl_ushort CL_ALIGNED(32) s[16]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_ushort x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; - __CL_ANON_STRUCT__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; - __CL_ANON_STRUCT__ struct{ cl_ushort8 lo, hi; }; -#endif -#if defined( __CL_USHORT2__) - __cl_ushort2 v2[8]; -#endif -#if defined( __CL_USHORT4__) - __cl_ushort4 v4[4]; -#endif -#if defined( __CL_USHORT8__ ) - __cl_ushort8 v8[2]; -#endif -#if defined( __CL_USHORT16__ ) - __cl_ushort16 v16; -#endif -}cl_ushort16; - - -/* ---- cl_halfn ---- */ -typedef union -{ - cl_half CL_ALIGNED(4) s[2]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_half x, y; }; - __CL_ANON_STRUCT__ struct{ cl_half s0, s1; }; - __CL_ANON_STRUCT__ struct{ cl_half lo, hi; }; -#endif -#if defined( __CL_HALF2__) - __cl_half2 v2; -#endif -}cl_half2; - -typedef union -{ - cl_half CL_ALIGNED(8) s[4]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_half x, y, z, w; }; - __CL_ANON_STRUCT__ struct{ cl_half s0, s1, s2, s3; }; - __CL_ANON_STRUCT__ struct{ cl_half2 lo, hi; }; -#endif -#if defined( __CL_HALF2__) - __cl_half2 v2[2]; -#endif -#if defined( __CL_HALF4__) - __cl_half4 v4; -#endif -}cl_half4; - -/* cl_half3 is identical in size, alignment and behavior to cl_half4. See section 6.1.5. */ -typedef cl_half4 cl_half3; - -typedef union -{ - cl_half CL_ALIGNED(16) s[8]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_half x, y, z, w; }; - __CL_ANON_STRUCT__ struct{ cl_half s0, s1, s2, s3, s4, s5, s6, s7; }; - __CL_ANON_STRUCT__ struct{ cl_half4 lo, hi; }; -#endif -#if defined( __CL_HALF2__) - __cl_half2 v2[4]; -#endif -#if defined( __CL_HALF4__) - __cl_half4 v4[2]; -#endif -#if defined( __CL_HALF8__ ) - __cl_half8 v8; -#endif -}cl_half8; - -typedef union -{ - cl_half CL_ALIGNED(32) s[16]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_half x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; - __CL_ANON_STRUCT__ struct{ cl_half s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; - __CL_ANON_STRUCT__ struct{ cl_half8 lo, hi; }; -#endif -#if defined( __CL_HALF2__) - __cl_half2 v2[8]; -#endif -#if defined( __CL_HALF4__) - __cl_half4 v4[4]; -#endif -#if defined( __CL_HALF8__ ) - __cl_half8 v8[2]; -#endif -#if defined( __CL_HALF16__ ) - __cl_half16 v16; -#endif -}cl_half16; - -/* ---- cl_intn ---- */ -typedef union -{ - cl_int CL_ALIGNED(8) s[2]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_int x, y; }; - __CL_ANON_STRUCT__ struct{ cl_int s0, s1; }; - __CL_ANON_STRUCT__ struct{ cl_int lo, hi; }; -#endif -#if defined( __CL_INT2__) - __cl_int2 v2; -#endif -}cl_int2; - -typedef union -{ - cl_int CL_ALIGNED(16) s[4]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_int x, y, z, w; }; - __CL_ANON_STRUCT__ struct{ cl_int s0, s1, s2, s3; }; - __CL_ANON_STRUCT__ struct{ cl_int2 lo, hi; }; -#endif -#if defined( __CL_INT2__) - __cl_int2 v2[2]; -#endif -#if defined( __CL_INT4__) - __cl_int4 v4; -#endif -}cl_int4; - -/* cl_int3 is identical in size, alignment and behavior to cl_int4. See section 6.1.5. */ -typedef cl_int4 cl_int3; - -typedef union -{ - cl_int CL_ALIGNED(32) s[8]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_int x, y, z, w; }; - __CL_ANON_STRUCT__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7; }; - __CL_ANON_STRUCT__ struct{ cl_int4 lo, hi; }; -#endif -#if defined( __CL_INT2__) - __cl_int2 v2[4]; -#endif -#if defined( __CL_INT4__) - __cl_int4 v4[2]; -#endif -#if defined( __CL_INT8__ ) - __cl_int8 v8; -#endif -}cl_int8; - -typedef union -{ - cl_int CL_ALIGNED(64) s[16]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_int x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; - __CL_ANON_STRUCT__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; - __CL_ANON_STRUCT__ struct{ cl_int8 lo, hi; }; -#endif -#if defined( __CL_INT2__) - __cl_int2 v2[8]; -#endif -#if defined( __CL_INT4__) - __cl_int4 v4[4]; -#endif -#if defined( __CL_INT8__ ) - __cl_int8 v8[2]; -#endif -#if defined( __CL_INT16__ ) - __cl_int16 v16; -#endif -}cl_int16; - - -/* ---- cl_uintn ---- */ -typedef union -{ - cl_uint CL_ALIGNED(8) s[2]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_uint x, y; }; - __CL_ANON_STRUCT__ struct{ cl_uint s0, s1; }; - __CL_ANON_STRUCT__ struct{ cl_uint lo, hi; }; -#endif -#if defined( __CL_UINT2__) - __cl_uint2 v2; -#endif -}cl_uint2; - -typedef union -{ - cl_uint CL_ALIGNED(16) s[4]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_uint x, y, z, w; }; - __CL_ANON_STRUCT__ struct{ cl_uint s0, s1, s2, s3; }; - __CL_ANON_STRUCT__ struct{ cl_uint2 lo, hi; }; -#endif -#if defined( __CL_UINT2__) - __cl_uint2 v2[2]; -#endif -#if defined( __CL_UINT4__) - __cl_uint4 v4; -#endif -}cl_uint4; - -/* cl_uint3 is identical in size, alignment and behavior to cl_uint4. See section 6.1.5. */ -typedef cl_uint4 cl_uint3; - -typedef union -{ - cl_uint CL_ALIGNED(32) s[8]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_uint x, y, z, w; }; - __CL_ANON_STRUCT__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7; }; - __CL_ANON_STRUCT__ struct{ cl_uint4 lo, hi; }; -#endif -#if defined( __CL_UINT2__) - __cl_uint2 v2[4]; -#endif -#if defined( __CL_UINT4__) - __cl_uint4 v4[2]; -#endif -#if defined( __CL_UINT8__ ) - __cl_uint8 v8; -#endif -}cl_uint8; - -typedef union -{ - cl_uint CL_ALIGNED(64) s[16]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_uint x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; - __CL_ANON_STRUCT__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; - __CL_ANON_STRUCT__ struct{ cl_uint8 lo, hi; }; -#endif -#if defined( __CL_UINT2__) - __cl_uint2 v2[8]; -#endif -#if defined( __CL_UINT4__) - __cl_uint4 v4[4]; -#endif -#if defined( __CL_UINT8__ ) - __cl_uint8 v8[2]; -#endif -#if defined( __CL_UINT16__ ) - __cl_uint16 v16; -#endif -}cl_uint16; - -/* ---- cl_longn ---- */ -typedef union -{ - cl_long CL_ALIGNED(16) s[2]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_long x, y; }; - __CL_ANON_STRUCT__ struct{ cl_long s0, s1; }; - __CL_ANON_STRUCT__ struct{ cl_long lo, hi; }; -#endif -#if defined( __CL_LONG2__) - __cl_long2 v2; -#endif -}cl_long2; - -typedef union -{ - cl_long CL_ALIGNED(32) s[4]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_long x, y, z, w; }; - __CL_ANON_STRUCT__ struct{ cl_long s0, s1, s2, s3; }; - __CL_ANON_STRUCT__ struct{ cl_long2 lo, hi; }; -#endif -#if defined( __CL_LONG2__) - __cl_long2 v2[2]; -#endif -#if defined( __CL_LONG4__) - __cl_long4 v4; -#endif -}cl_long4; - -/* cl_long3 is identical in size, alignment and behavior to cl_long4. See section 6.1.5. */ -typedef cl_long4 cl_long3; - -typedef union -{ - cl_long CL_ALIGNED(64) s[8]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_long x, y, z, w; }; - __CL_ANON_STRUCT__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7; }; - __CL_ANON_STRUCT__ struct{ cl_long4 lo, hi; }; -#endif -#if defined( __CL_LONG2__) - __cl_long2 v2[4]; -#endif -#if defined( __CL_LONG4__) - __cl_long4 v4[2]; -#endif -#if defined( __CL_LONG8__ ) - __cl_long8 v8; -#endif -}cl_long8; - -typedef union -{ - cl_long CL_ALIGNED(128) s[16]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_long x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; - __CL_ANON_STRUCT__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; - __CL_ANON_STRUCT__ struct{ cl_long8 lo, hi; }; -#endif -#if defined( __CL_LONG2__) - __cl_long2 v2[8]; -#endif -#if defined( __CL_LONG4__) - __cl_long4 v4[4]; -#endif -#if defined( __CL_LONG8__ ) - __cl_long8 v8[2]; -#endif -#if defined( __CL_LONG16__ ) - __cl_long16 v16; -#endif -}cl_long16; - - -/* ---- cl_ulongn ---- */ -typedef union -{ - cl_ulong CL_ALIGNED(16) s[2]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_ulong x, y; }; - __CL_ANON_STRUCT__ struct{ cl_ulong s0, s1; }; - __CL_ANON_STRUCT__ struct{ cl_ulong lo, hi; }; -#endif -#if defined( __CL_ULONG2__) - __cl_ulong2 v2; -#endif -}cl_ulong2; - -typedef union -{ - cl_ulong CL_ALIGNED(32) s[4]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_ulong x, y, z, w; }; - __CL_ANON_STRUCT__ struct{ cl_ulong s0, s1, s2, s3; }; - __CL_ANON_STRUCT__ struct{ cl_ulong2 lo, hi; }; -#endif -#if defined( __CL_ULONG2__) - __cl_ulong2 v2[2]; -#endif -#if defined( __CL_ULONG4__) - __cl_ulong4 v4; -#endif -}cl_ulong4; - -/* cl_ulong3 is identical in size, alignment and behavior to cl_ulong4. See section 6.1.5. */ -typedef cl_ulong4 cl_ulong3; - -typedef union -{ - cl_ulong CL_ALIGNED(64) s[8]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_ulong x, y, z, w; }; - __CL_ANON_STRUCT__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7; }; - __CL_ANON_STRUCT__ struct{ cl_ulong4 lo, hi; }; -#endif -#if defined( __CL_ULONG2__) - __cl_ulong2 v2[4]; -#endif -#if defined( __CL_ULONG4__) - __cl_ulong4 v4[2]; -#endif -#if defined( __CL_ULONG8__ ) - __cl_ulong8 v8; -#endif -}cl_ulong8; - -typedef union -{ - cl_ulong CL_ALIGNED(128) s[16]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_ulong x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; - __CL_ANON_STRUCT__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; - __CL_ANON_STRUCT__ struct{ cl_ulong8 lo, hi; }; -#endif -#if defined( __CL_ULONG2__) - __cl_ulong2 v2[8]; -#endif -#if defined( __CL_ULONG4__) - __cl_ulong4 v4[4]; -#endif -#if defined( __CL_ULONG8__ ) - __cl_ulong8 v8[2]; -#endif -#if defined( __CL_ULONG16__ ) - __cl_ulong16 v16; -#endif -}cl_ulong16; - - -/* --- cl_floatn ---- */ - -typedef union -{ - cl_float CL_ALIGNED(8) s[2]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_float x, y; }; - __CL_ANON_STRUCT__ struct{ cl_float s0, s1; }; - __CL_ANON_STRUCT__ struct{ cl_float lo, hi; }; -#endif -#if defined( __CL_FLOAT2__) - __cl_float2 v2; -#endif -}cl_float2; - -typedef union -{ - cl_float CL_ALIGNED(16) s[4]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_float x, y, z, w; }; - __CL_ANON_STRUCT__ struct{ cl_float s0, s1, s2, s3; }; - __CL_ANON_STRUCT__ struct{ cl_float2 lo, hi; }; -#endif -#if defined( __CL_FLOAT2__) - __cl_float2 v2[2]; -#endif -#if defined( __CL_FLOAT4__) - __cl_float4 v4; -#endif -}cl_float4; - -/* cl_float3 is identical in size, alignment and behavior to cl_float4. See section 6.1.5. */ -typedef cl_float4 cl_float3; - -typedef union -{ - cl_float CL_ALIGNED(32) s[8]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_float x, y, z, w; }; - __CL_ANON_STRUCT__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7; }; - __CL_ANON_STRUCT__ struct{ cl_float4 lo, hi; }; -#endif -#if defined( __CL_FLOAT2__) - __cl_float2 v2[4]; -#endif -#if defined( __CL_FLOAT4__) - __cl_float4 v4[2]; -#endif -#if defined( __CL_FLOAT8__ ) - __cl_float8 v8; -#endif -}cl_float8; - -typedef union -{ - cl_float CL_ALIGNED(64) s[16]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_float x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; - __CL_ANON_STRUCT__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; - __CL_ANON_STRUCT__ struct{ cl_float8 lo, hi; }; -#endif -#if defined( __CL_FLOAT2__) - __cl_float2 v2[8]; -#endif -#if defined( __CL_FLOAT4__) - __cl_float4 v4[4]; -#endif -#if defined( __CL_FLOAT8__ ) - __cl_float8 v8[2]; -#endif -#if defined( __CL_FLOAT16__ ) - __cl_float16 v16; -#endif -}cl_float16; - -/* --- cl_doublen ---- */ - -typedef union -{ - cl_double CL_ALIGNED(16) s[2]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_double x, y; }; - __CL_ANON_STRUCT__ struct{ cl_double s0, s1; }; - __CL_ANON_STRUCT__ struct{ cl_double lo, hi; }; -#endif -#if defined( __CL_DOUBLE2__) - __cl_double2 v2; -#endif -}cl_double2; - -typedef union -{ - cl_double CL_ALIGNED(32) s[4]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_double x, y, z, w; }; - __CL_ANON_STRUCT__ struct{ cl_double s0, s1, s2, s3; }; - __CL_ANON_STRUCT__ struct{ cl_double2 lo, hi; }; -#endif -#if defined( __CL_DOUBLE2__) - __cl_double2 v2[2]; -#endif -#if defined( __CL_DOUBLE4__) - __cl_double4 v4; -#endif -}cl_double4; - -/* cl_double3 is identical in size, alignment and behavior to cl_double4. See section 6.1.5. */ -typedef cl_double4 cl_double3; - -typedef union -{ - cl_double CL_ALIGNED(64) s[8]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_double x, y, z, w; }; - __CL_ANON_STRUCT__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7; }; - __CL_ANON_STRUCT__ struct{ cl_double4 lo, hi; }; -#endif -#if defined( __CL_DOUBLE2__) - __cl_double2 v2[4]; -#endif -#if defined( __CL_DOUBLE4__) - __cl_double4 v4[2]; -#endif -#if defined( __CL_DOUBLE8__ ) - __cl_double8 v8; -#endif -}cl_double8; - -typedef union -{ - cl_double CL_ALIGNED(128) s[16]; -#if __CL_HAS_ANON_STRUCT__ - __CL_ANON_STRUCT__ struct{ cl_double x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; - __CL_ANON_STRUCT__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; - __CL_ANON_STRUCT__ struct{ cl_double8 lo, hi; }; -#endif -#if defined( __CL_DOUBLE2__) - __cl_double2 v2[8]; -#endif -#if defined( __CL_DOUBLE4__) - __cl_double4 v4[4]; -#endif -#if defined( __CL_DOUBLE8__ ) - __cl_double8 v8[2]; -#endif -#if defined( __CL_DOUBLE16__ ) - __cl_double16 v16; -#endif -}cl_double16; - -/* Macro to facilitate debugging - * Usage: - * Place CL_PROGRAM_STRING_DEBUG_INFO on the line before the first line of your source. - * The first line ends with: CL_PROGRAM_STRING_DEBUG_INFO \" - * Each line thereafter of OpenCL C source must end with: \n\ - * The last line ends in "; - * - * Example: - * - * const char *my_program = CL_PROGRAM_STRING_DEBUG_INFO "\ - * kernel void foo( int a, float * b ) \n\ - * { \n\ - * // my comment \n\ - * *b[ get_global_id(0)] = a; \n\ - * } \n\ - * "; - * - * This should correctly set up the line, (column) and file information for your source - * string so you can do source level debugging. - */ -#define __CL_STRINGIFY( _x ) # _x -#define _CL_STRINGIFY( _x ) __CL_STRINGIFY( _x ) -#define CL_PROGRAM_STRING_DEBUG_INFO "#line " _CL_STRINGIFY(__LINE__) " \"" __FILE__ "\" \n\n" - -#ifdef __cplusplus -} -#endif - -#undef __CL_HAS_ANON_STRUCT__ -#undef __CL_ANON_STRUCT__ -#if defined( _WIN32) && defined(_MSC_VER) - #if _MSC_VER >=1500 - #pragma warning( pop ) - #endif -#endif - -#endif /* __CL_PLATFORM_H */ diff --git a/emscripten/include/pvrsdk/CL/opencl.h b/emscripten/include/pvrsdk/CL/opencl.h deleted file mode 100644 index bef4d212..00000000 --- a/emscripten/include/pvrsdk/CL/opencl.h +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008-2015 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and/or associated documentation files (the - * "Materials"), to deal in the Materials without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Materials, and to - * permit persons to whom the Materials are furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS - * KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS - * SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT - * https://www.khronos.org/registry/ - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER 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. - ******************************************************************************/ - -/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */ - -#ifndef __OPENCL_H -#define __OPENCL_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __APPLE__ -#ifndef TARGET_OS_IPHONE -#include -#include -#include -#include -#include -#endif -#else - -#include -#include -#include -#include - -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __OPENCL_H */ - diff --git a/emscripten/include/pvrsdk/DynamicEgl.h b/emscripten/include/pvrsdk/DynamicEgl.h deleted file mode 100644 index f5018145..00000000 --- a/emscripten/include/pvrsdk/DynamicEgl.h +++ /dev/null @@ -1,1190 +0,0 @@ -#pragma once -#ifdef __APPLE__ -#include "TargetConditionals.h" -#endif -#if TARGET_OS_IPHONE -#ifdef __OBJC__ -#import -#else -class EAGLContext; -#endif -#else -#if defined( _WIN32 ) -#define WIN32_LEAN_AND_MEAN -#define NOMINMAX -#elif defined(WAYLAND) -#include -#endif -#define EGL_NO_PROTOTYPES -#include "EGL/egl.h" -#include "EGL/eglext.h" -#include -#include -#include "pvr_openlib.h" - -namespace egl { - namespace internal { -#ifdef _WIN32 - static const char* libName = "libEGL.dll"; -#elif defined(__APPLE__) - static const char* libName = "libEGL.dylib"; -#else - static const char* libName = "libEGL.so"; -#endif - } -} - -namespace egl { -namespace internal { -namespace EglFuncName { -enum EglFunctionName -{ - ChooseConfig, CopyBuffers, CreateContext, CreatePbufferSurface, CreatePixmapSurface, CreateWindowSurface, DestroyContext, DestroySurface, GetConfigAttrib, - GetConfigs, GetCurrentDisplay, GetCurrentSurface, GetDisplay, GetError, GetProcAddress, Initialize, MakeCurrent, QueryContext, QueryString, QuerySurface, - SwapBuffers, Terminate, WaitGL, WaitNative, BindTexImage, ReleaseTexImage, SurfaceAttrib, SwapInterval, BindAPI, QueryAPI, CreatePbufferFromClientBuffer, - ReleaseThread, WaitClient, GetCurrentContext, CreateSync, DestroySync, ClientWaitSync, GetSyncAttrib, CreateImage, DestroyImage, GetPlatformDisplay, - CreatePlatformWindowSurface, CreatePlatformPixmapSurface, WaitSync, - NUMBER_OF_EGL_FUNCTIONS -}; -} - -inline void* getEglFunction(egl::internal::EglFuncName::EglFunctionName funcname) -{ - static void* FunctionTable[EglFuncName::NUMBER_OF_EGL_FUNCTIONS]; - - // GET FUNCTION POINTERS --- ONCE!!!! /// - if (!FunctionTable[0]) - { - pvr::lib::LIBTYPE lib = pvr::lib::openlib(egl::internal::libName); - if (!lib) - { - Log_Error("EGL Bindings: Failed to open library %s\n", egl::internal::libName); - } - else - { - Log_Info("EGL Bindings: Successfully loaded library %s\n", egl::internal::libName); - } - FunctionTable[EglFuncName::ChooseConfig] = pvr::lib::getLibFunctionChecked(lib, "eglChooseConfig"); - FunctionTable[EglFuncName::CopyBuffers] = pvr::lib::getLibFunctionChecked(lib, "eglCopyBuffers"); - FunctionTable[EglFuncName::CreateContext] = pvr::lib::getLibFunctionChecked(lib, "eglCreateContext"); - FunctionTable[EglFuncName::CreatePbufferSurface] = pvr::lib::getLibFunctionChecked(lib, "eglCreatePbufferSurface"); - FunctionTable[EglFuncName::CreatePixmapSurface] = pvr::lib::getLibFunctionChecked(lib, "eglCreatePixmapSurface"); - FunctionTable[EglFuncName::CreateWindowSurface] = pvr::lib::getLibFunctionChecked(lib, "eglCreateWindowSurface"); - FunctionTable[EglFuncName::DestroyContext] = pvr::lib::getLibFunctionChecked(lib, "eglDestroyContext"); - FunctionTable[EglFuncName::DestroySurface] = pvr::lib::getLibFunctionChecked(lib, "eglDestroySurface"); - FunctionTable[EglFuncName::GetConfigAttrib] = pvr::lib::getLibFunctionChecked(lib, "eglGetConfigAttrib"); - FunctionTable[EglFuncName::GetConfigs] = pvr::lib::getLibFunctionChecked(lib, "eglGetConfigs"); - FunctionTable[EglFuncName::GetCurrentDisplay] = pvr::lib::getLibFunctionChecked(lib, "eglGetCurrentDisplay"); - FunctionTable[EglFuncName::GetCurrentSurface] = pvr::lib::getLibFunctionChecked(lib, "eglGetCurrentSurface"); - FunctionTable[EglFuncName::GetDisplay] = pvr::lib::getLibFunctionChecked(lib, "eglGetDisplay"); - FunctionTable[EglFuncName::GetError] = pvr::lib::getLibFunctionChecked(lib, "eglGetError"); - FunctionTable[EglFuncName::GetProcAddress] = pvr::lib::getLibFunctionChecked(lib, "eglGetProcAddress"); - FunctionTable[EglFuncName::Initialize] = pvr::lib::getLibFunctionChecked(lib, "eglInitialize"); - FunctionTable[EglFuncName::MakeCurrent] = pvr::lib::getLibFunctionChecked(lib, "eglMakeCurrent"); - FunctionTable[EglFuncName::QueryContext] = pvr::lib::getLibFunctionChecked(lib, "eglQueryContext"); - FunctionTable[EglFuncName::QueryString] = pvr::lib::getLibFunctionChecked(lib, "eglQueryString"); - FunctionTable[EglFuncName::QuerySurface] = pvr::lib::getLibFunctionChecked(lib, "eglQuerySurface"); - FunctionTable[EglFuncName::SwapBuffers] = pvr::lib::getLibFunctionChecked(lib, "eglSwapBuffers"); - FunctionTable[EglFuncName::Terminate] = pvr::lib::getLibFunctionChecked(lib, "eglTerminate"); - FunctionTable[EglFuncName::WaitGL] = pvr::lib::getLibFunctionChecked(lib, "eglWaitGL"); - FunctionTable[EglFuncName::WaitNative] = pvr::lib::getLibFunctionChecked(lib, "eglWaitNative"); - FunctionTable[EglFuncName::BindTexImage] = pvr::lib::getLibFunctionChecked(lib, "eglBindTexImage"); - FunctionTable[EglFuncName::ReleaseTexImage] = pvr::lib::getLibFunctionChecked(lib, "eglReleaseTexImage"); - FunctionTable[EglFuncName::SurfaceAttrib] = pvr::lib::getLibFunctionChecked(lib, "eglSurfaceAttrib"); - FunctionTable[EglFuncName::SwapInterval] = pvr::lib::getLibFunctionChecked(lib, "eglSwapInterval"); - FunctionTable[EglFuncName::BindAPI] = pvr::lib::getLibFunctionChecked(lib, "eglBindAPI"); - FunctionTable[EglFuncName::QueryAPI] = pvr::lib::getLibFunctionChecked(lib, "eglQueryAPI"); - FunctionTable[EglFuncName::CreatePbufferFromClientBuffer] = pvr::lib::getLibFunctionChecked(lib, "eglCreatePbufferFromClientBuffer"); - FunctionTable[EglFuncName::ReleaseThread] = pvr::lib::getLibFunctionChecked(lib, "eglReleaseThread"); - FunctionTable[EglFuncName::WaitClient] = pvr::lib::getLibFunctionChecked(lib, "eglWaitClient"); - FunctionTable[EglFuncName::GetCurrentContext] = pvr::lib::getLibFunctionChecked(lib, "eglGetCurrentContext"); - FunctionTable[EglFuncName::CreateSync] = pvr::lib::getLibFunctionChecked(lib, "eglCreateSync"); - FunctionTable[EglFuncName::DestroySync] = pvr::lib::getLibFunctionChecked(lib, "eglDestroySync"); - FunctionTable[EglFuncName::ClientWaitSync] = pvr::lib::getLibFunctionChecked(lib, "eglClientWaitSync"); - FunctionTable[EglFuncName::GetSyncAttrib] = pvr::lib::getLibFunctionChecked(lib, "eglGetSyncAttrib"); - FunctionTable[EglFuncName::CreateImage] = pvr::lib::getLibFunctionChecked(lib, "eglCreateImage"); - FunctionTable[EglFuncName::DestroyImage] = pvr::lib::getLibFunctionChecked(lib, "eglDestroyImage"); - FunctionTable[EglFuncName::GetPlatformDisplay] = pvr::lib::getLibFunctionChecked(lib, "eglGetPlatformDisplay"); - FunctionTable[EglFuncName::CreatePlatformWindowSurface] = pvr::lib::getLibFunctionChecked(lib, "eglCreatePlatformWindowSurface"); - FunctionTable[EglFuncName::CreatePlatformPixmapSurface] = pvr::lib::getLibFunctionChecked(lib, "eglCreatePlatformPixmapSurface"); - FunctionTable[EglFuncName::WaitSync] = pvr::lib::getLibFunctionChecked(lib, "eglWaitSync"); - } - return FunctionTable[funcname]; -} -} -} - -#ifndef DYNAMICEGL_NO_NAMESPACE -#define DYNAMICEGL_FUNCTION(name) EGLAPIENTRY name -#define DYNAMICEGL_CALL_FUNCTION(name) egl::name -#else -#define DYNAMICEGL_FUNCTION(name) EGLAPIENTRY egl##name -#define DYNAMICEGL_CALL_FUNCTION(name) egl##name -#endif - - -#ifndef DYNAMICEGL_NO_NAMESPACE -namespace egl { -#endif - -#if defined(__QNXNTO__) -EGLBoolean DYNAMICEGL_FUNCTION(GetConfigAttrib)(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint* value); -#endif - -inline EGLBoolean DYNAMICEGL_FUNCTION(ChooseConfig)(EGLDisplay dpy, const EGLint* attrib_list, EGLConfig* configs, EGLint config_size, EGLint* num_config) -{ - typedef EGLBoolean(EGLAPIENTRY * PROC_EGL_ChooseConfig)(EGLDisplay dpy, const EGLint * attrib_list, EGLConfig * configs, EGLint config_size, EGLint * num_config); - static PROC_EGL_ChooseConfig _ChooseConfig = (PROC_EGL_ChooseConfig)egl::internal::getEglFunction(egl::internal::EglFuncName::ChooseConfig); - return _ChooseConfig(dpy, attrib_list, configs, config_size, num_config); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(CopyBuffers)(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target) -{ - typedef EGLBoolean(EGLAPIENTRY * PROC_EGL_CopyBuffers)(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target); - static PROC_EGL_CopyBuffers _CopyBuffers = (PROC_EGL_CopyBuffers)egl::internal::getEglFunction(egl::internal::EglFuncName::CopyBuffers); - return _CopyBuffers(dpy, surface, target); -} -inline EGLContext DYNAMICEGL_FUNCTION(CreateContext)(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint* attrib_list) -{ - typedef EGLContext(EGLAPIENTRY * PROC_EGL_CreateContext)(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint * attrib_list); - static PROC_EGL_CreateContext _CreateContext = (PROC_EGL_CreateContext)egl::internal::getEglFunction(egl::internal::EglFuncName::CreateContext); - - EGLContext context = _CreateContext(dpy, config, share_context, attrib_list); - -#if defined(__QNXNTO__) - /* - On QNX NTO the libGLESv2 library needs to be loaded before the first eglMakeCurrent call - */ - static bool once = false; - if (!once) - { - if (context != EGL_NO_CONTEXT) - { - EGLint type = 0; -#ifdef DYNAMICEGL_NO_NAMESPACE - eglGetConfigAttrib(dpy, config, EGL_RENDERABLE_TYPE, &type); -#else - GetConfigAttrib(dpy, config, EGL_RENDERABLE_TYPE, &type); -#endif - - if ((type & EGL_OPENGL_ES2_BIT) == EGL_OPENGL_ES2_BIT) - { - Log_Info("EGL Bindings: Preloading libGLESv2.so\n"); - pvr::lib::openlib("libGLESv2.so"); - once = true; - } - } - } -#endif - return context; -} -inline EGLSurface DYNAMICEGL_FUNCTION(CreatePbufferSurface)(EGLDisplay dpy, EGLConfig config, const EGLint* attrib_list) -{ - typedef EGLSurface(EGLAPIENTRY * PROC_EGL_CreatePbufferSurface)(EGLDisplay dpy, EGLConfig config, const EGLint * attrib_list); - static PROC_EGL_CreatePbufferSurface _CreatePbufferSurface = (PROC_EGL_CreatePbufferSurface)egl::internal::getEglFunction(egl::internal::EglFuncName::CreatePbufferSurface); - return _CreatePbufferSurface(dpy, config, attrib_list); -} -inline EGLSurface DYNAMICEGL_FUNCTION(CreatePixmapSurface)(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint* attrib_list) -{ - typedef EGLSurface(EGLAPIENTRY * PROC_EGL_CreatePixmapSurface)(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint * attrib_list); - static PROC_EGL_CreatePixmapSurface _CreatePixmapSurface = (PROC_EGL_CreatePixmapSurface)egl::internal::getEglFunction(egl::internal::EglFuncName::CreatePixmapSurface); - return _CreatePixmapSurface(dpy, config, pixmap, attrib_list); -} -inline EGLSurface DYNAMICEGL_FUNCTION(CreateWindowSurface)(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint* attrib_list) -{ - typedef EGLSurface(EGLAPIENTRY * PROC_EGL_CreateWindowSurface)(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint * attrib_list); - static PROC_EGL_CreateWindowSurface _CreateWindowSurface = (PROC_EGL_CreateWindowSurface)egl::internal::getEglFunction(egl::internal::EglFuncName::CreateWindowSurface); - return _CreateWindowSurface(dpy, config, win, attrib_list); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(DestroyContext)(EGLDisplay dpy, EGLContext ctx) -{ - typedef EGLBoolean(EGLAPIENTRY * PROC_EGL_DestroyContext)(EGLDisplay dpy, EGLContext ctx); - static PROC_EGL_DestroyContext _DestroyContext = (PROC_EGL_DestroyContext)egl::internal::getEglFunction(egl::internal::EglFuncName::DestroyContext); - return _DestroyContext(dpy, ctx); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(DestroySurface)(EGLDisplay dpy, EGLSurface surface) -{ - typedef EGLBoolean(EGLAPIENTRY * PROC_EGL_DestroySurface)(EGLDisplay dpy, EGLSurface surface); - static PROC_EGL_DestroySurface _DestroySurface = (PROC_EGL_DestroySurface)egl::internal::getEglFunction(egl::internal::EglFuncName::DestroySurface); - return _DestroySurface(dpy, surface); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(GetConfigAttrib)(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint* value) -{ - typedef EGLBoolean(EGLAPIENTRY * PROC_EGL_GetConfigAttrib)(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint * value); - static PROC_EGL_GetConfigAttrib _GetConfigAttrib = (PROC_EGL_GetConfigAttrib)egl::internal::getEglFunction(egl::internal::EglFuncName::GetConfigAttrib); - return _GetConfigAttrib(dpy, config, attribute, value); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(GetConfigs)(EGLDisplay dpy, EGLConfig* configs, EGLint config_size, EGLint* num_config) -{ - typedef EGLBoolean(EGLAPIENTRY * PROC_EGL_GetConfigs)(EGLDisplay dpy, EGLConfig * configs, EGLint config_size, EGLint * num_config); - static PROC_EGL_GetConfigs _GetConfigs = (PROC_EGL_GetConfigs)egl::internal::getEglFunction(egl::internal::EglFuncName::GetConfigs); - return _GetConfigs(dpy, configs, config_size, num_config); -} -inline EGLDisplay DYNAMICEGL_FUNCTION(GetCurrentDisplay)(void) -{ - typedef EGLDisplay(EGLAPIENTRY * PROC_EGL_GetCurrentDisplay)(void); - static PROC_EGL_GetCurrentDisplay _GetCurrentDisplay = (PROC_EGL_GetCurrentDisplay)egl::internal::getEglFunction(egl::internal::EglFuncName::GetCurrentDisplay); - return _GetCurrentDisplay(); -} -inline EGLSurface DYNAMICEGL_FUNCTION(GetCurrentSurface)(EGLint readdraw) -{ - typedef EGLSurface(EGLAPIENTRY * PROC_EGL_GetCurrentSurface)(EGLint readdraw); - static PROC_EGL_GetCurrentSurface _GetCurrentSurface = (PROC_EGL_GetCurrentSurface)egl::internal::getEglFunction(egl::internal::EglFuncName::GetCurrentSurface); - return _GetCurrentSurface(readdraw); -} -inline EGLDisplay DYNAMICEGL_FUNCTION(GetDisplay)(EGLNativeDisplayType display_id) -{ - typedef EGLDisplay(EGLAPIENTRY * PROC_EGL_GetDisplay)(EGLNativeDisplayType display_id); - static PROC_EGL_GetDisplay _GetDisplay = (PROC_EGL_GetDisplay)egl::internal::getEglFunction(egl::internal::EglFuncName::GetDisplay); - return _GetDisplay(display_id); -} -inline EGLint DYNAMICEGL_FUNCTION(GetError)(void) -{ - typedef EGLint(EGLAPIENTRY * PROC_EGL_GetError)(void); - static PROC_EGL_GetError _GetError = (PROC_EGL_GetError)egl::internal::getEglFunction(egl::internal::EglFuncName::GetError); - return _GetError(); -} -inline __eglMustCastToProperFunctionPointerType DYNAMICEGL_FUNCTION(GetProcAddress)(const char* procname) -{ - typedef __eglMustCastToProperFunctionPointerType(EGLAPIENTRY * PROC_EGL_GetProcAddress)(const char* procname); - static PROC_EGL_GetProcAddress _GetProcAddress = (PROC_EGL_GetProcAddress)egl::internal::getEglFunction(egl::internal::EglFuncName::GetProcAddress); - return _GetProcAddress(procname); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(Initialize)(EGLDisplay dpy, EGLint* major, EGLint* minor) -{ - typedef EGLBoolean(EGLAPIENTRY * PROC_EGL_Initialize)(EGLDisplay dpy, EGLint * major, EGLint * minor); - static PROC_EGL_Initialize _Initialize = (PROC_EGL_Initialize)egl::internal::getEglFunction(egl::internal::EglFuncName::Initialize); - return _Initialize(dpy, major, minor); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(MakeCurrent)(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx) -{ - typedef EGLBoolean(EGLAPIENTRY * PROC_EGL_MakeCurrent)(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx); - static PROC_EGL_MakeCurrent _MakeCurrent = (PROC_EGL_MakeCurrent)egl::internal::getEglFunction(egl::internal::EglFuncName::MakeCurrent); - return _MakeCurrent(dpy, draw, read, ctx); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(QueryContext)(EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint* value) -{ - typedef EGLBoolean(EGLAPIENTRY * PROC_EGL_QueryContext)(EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint * value); - static PROC_EGL_QueryContext _QueryContext = (PROC_EGL_QueryContext)egl::internal::getEglFunction(egl::internal::EglFuncName::QueryContext); - return _QueryContext(dpy, ctx, attribute, value); -} -inline const char* DYNAMICEGL_FUNCTION(QueryString)(EGLDisplay dpy, EGLint name) -{ - typedef const char* (EGLAPIENTRY * PROC_EGL_QueryString)(EGLDisplay dpy, EGLint name); - static PROC_EGL_QueryString _QueryString = (PROC_EGL_QueryString)egl::internal::getEglFunction(egl::internal::EglFuncName::QueryString); - return _QueryString(dpy, name); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(QuerySurface)(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint* value) -{ - typedef EGLBoolean(EGLAPIENTRY * PROC_EGL_QuerySurface)(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint * value); - static PROC_EGL_QuerySurface _QuerySurface = (PROC_EGL_QuerySurface)egl::internal::getEglFunction(egl::internal::EglFuncName::QuerySurface); - return _QuerySurface(dpy, surface, attribute, value); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(SwapBuffers)(EGLDisplay dpy, EGLSurface surface) -{ - typedef EGLBoolean(EGLAPIENTRY * PROC_EGL_SwapBuffers)(EGLDisplay dpy, EGLSurface surface); - static PROC_EGL_SwapBuffers _SwapBuffers = (PROC_EGL_SwapBuffers)egl::internal::getEglFunction(egl::internal::EglFuncName::SwapBuffers); - return _SwapBuffers(dpy, surface); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(Terminate)(EGLDisplay dpy) -{ - typedef EGLBoolean(EGLAPIENTRY * PROC_EGL_Terminate)(EGLDisplay dpy); - static PROC_EGL_Terminate _Terminate = (PROC_EGL_Terminate)egl::internal::getEglFunction(egl::internal::EglFuncName::Terminate); - return _Terminate(dpy); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(WaitGL)(void) -{ - typedef EGLBoolean(EGLAPIENTRY * PROC_EGL_WaitGL)(void); - static PROC_EGL_WaitGL _WaitGL = (PROC_EGL_WaitGL)egl::internal::getEglFunction(egl::internal::EglFuncName::WaitGL); - return _WaitGL(); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(WaitNative)(EGLint engine) -{ - typedef EGLBoolean(EGLAPIENTRY * PROC_EGL_WaitNative)(EGLint engine); - static PROC_EGL_WaitNative _WaitNative = (PROC_EGL_WaitNative)egl::internal::getEglFunction(egl::internal::EglFuncName::WaitNative); - return _WaitNative(engine); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(BindTexImage)(EGLDisplay dpy, EGLSurface surface, EGLint buffer) -{ - typedef EGLBoolean(EGLAPIENTRY * PROC_EGL_BindTexImage)(EGLDisplay dpy, EGLSurface surface, EGLint buffer); - static PROC_EGL_BindTexImage _BindTexImage = (PROC_EGL_BindTexImage)egl::internal::getEglFunction(egl::internal::EglFuncName::BindTexImage); - return _BindTexImage(dpy, surface, buffer); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(ReleaseTexImage)(EGLDisplay dpy, EGLSurface surface, EGLint buffer) -{ - typedef EGLBoolean(EGLAPIENTRY * PROC_EGL_ReleaseTexImage)(EGLDisplay dpy, EGLSurface surface, EGLint buffer); - static PROC_EGL_ReleaseTexImage _ReleaseTexImage = (PROC_EGL_ReleaseTexImage)egl::internal::getEglFunction(egl::internal::EglFuncName::ReleaseTexImage); - return _ReleaseTexImage(dpy, surface, buffer); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(SurfaceAttrib)(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value) -{ - typedef EGLBoolean(EGLAPIENTRY * PROC_EGL_SurfaceAttrib)(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value); - static PROC_EGL_SurfaceAttrib _SurfaceAttrib = (PROC_EGL_SurfaceAttrib)egl::internal::getEglFunction(egl::internal::EglFuncName::SurfaceAttrib); - return _SurfaceAttrib(dpy, surface, attribute, value); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(SwapInterval)(EGLDisplay dpy, EGLint interval) -{ - typedef EGLBoolean(EGLAPIENTRY * PROC_EGL_SwapInterval)(EGLDisplay dpy, EGLint interval); - static PROC_EGL_SwapInterval _SwapInterval = (PROC_EGL_SwapInterval)egl::internal::getEglFunction(egl::internal::EglFuncName::SwapInterval); - return _SwapInterval(dpy, interval); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(BindAPI)(EGLenum api) -{ - typedef EGLBoolean(EGLAPIENTRY * PROC_EGL_BindAPI)(EGLenum api); - static PROC_EGL_BindAPI _BindAPI = (PROC_EGL_BindAPI)egl::internal::getEglFunction(egl::internal::EglFuncName::BindAPI); - return _BindAPI(api); -} -inline EGLenum DYNAMICEGL_FUNCTION(QueryAPI)(void) -{ - typedef EGLenum(EGLAPIENTRY * PROC_EGL_QueryAPI)(void); - static PROC_EGL_QueryAPI _QueryAPI = (PROC_EGL_QueryAPI)egl::internal::getEglFunction(egl::internal::EglFuncName::QueryAPI); - return _QueryAPI(); -} -inline EGLSurface DYNAMICEGL_FUNCTION(CreatePbufferFromClientBuffer)(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint* attrib_list) -{ - typedef EGLSurface(EGLAPIENTRY * PROC_EGL_CreatePbufferFromClientBuffer)(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint * attrib_list); - static PROC_EGL_CreatePbufferFromClientBuffer _CreatePbufferFromClientBuffer = (PROC_EGL_CreatePbufferFromClientBuffer)egl::internal::getEglFunction(egl::internal::EglFuncName::CreatePbufferFromClientBuffer); - return _CreatePbufferFromClientBuffer(dpy, buftype, buffer, config, attrib_list); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(ReleaseThread)(void) -{ - typedef EGLBoolean(EGLAPIENTRY * PROC_EGL_ReleaseThread)(void); - static PROC_EGL_ReleaseThread _ReleaseThread = (PROC_EGL_ReleaseThread)egl::internal::getEglFunction(egl::internal::EglFuncName::ReleaseThread); - return _ReleaseThread(); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(WaitClient)(void) -{ - typedef EGLBoolean(EGLAPIENTRY * PROC_EGL_WaitClient)(void); - static PROC_EGL_WaitClient _WaitClient = (PROC_EGL_WaitClient)egl::internal::getEglFunction(egl::internal::EglFuncName::WaitClient); - return _WaitClient(); -} -inline EGLContext DYNAMICEGL_FUNCTION(GetCurrentContext)(void) -{ - typedef EGLContext(EGLAPIENTRY * PROC_EGL_GetCurrentContext)(void); - static PROC_EGL_GetCurrentContext _GetCurrentContext = (PROC_EGL_GetCurrentContext)egl::internal::getEglFunction(egl::internal::EglFuncName::GetCurrentContext); - return _GetCurrentContext(); -} -inline EGLSync DYNAMICEGL_FUNCTION(CreateSync)(EGLDisplay dpy, EGLenum type, const EGLAttrib* attrib_list) -{ - typedef EGLSync(EGLAPIENTRY * PROC_EGL_CreateSync)(EGLDisplay dpy, EGLenum type, const EGLAttrib * attrib_list); - static PROC_EGL_CreateSync _CreateSync = (PROC_EGL_CreateSync)egl::internal::getEglFunction(egl::internal::EglFuncName::CreateSync); - return _CreateSync(dpy, type, attrib_list); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(DestroySync)(EGLDisplay dpy, EGLSync sync) -{ - typedef EGLBoolean(EGLAPIENTRY * PROC_EGL_DestroySync)(EGLDisplay dpy, EGLSync sync); - static PROC_EGL_DestroySync _DestroySync = (PROC_EGL_DestroySync)egl::internal::getEglFunction(egl::internal::EglFuncName::DestroySync); - return _DestroySync(dpy, sync); -} -inline EGLint DYNAMICEGL_FUNCTION(ClientWaitSync)(EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout) -{ - typedef EGLint(EGLAPIENTRY * PROC_EGL_ClientWaitSync)(EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout); - static PROC_EGL_ClientWaitSync _ClientWaitSync = (PROC_EGL_ClientWaitSync)egl::internal::getEglFunction(egl::internal::EglFuncName::ClientWaitSync); - return _ClientWaitSync(dpy, sync, flags, timeout); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(GetSyncAttrib)(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib* value) -{ - typedef EGLBoolean(EGLAPIENTRY * PROC_EGL_GetSyncAttrib)(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib * value); - static PROC_EGL_GetSyncAttrib _GetSyncAttrib = (PROC_EGL_GetSyncAttrib)egl::internal::getEglFunction(egl::internal::EglFuncName::GetSyncAttrib); - return _GetSyncAttrib(dpy, sync, attribute, value); -} -inline EGLImage DYNAMICEGL_FUNCTION(CreateImage)(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib* attrib_list) -{ - typedef EGLImage(EGLAPIENTRY * PROC_EGL_CreateImage)(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib * attrib_list); - static PROC_EGL_CreateImage _CreateImage = (PROC_EGL_CreateImage)egl::internal::getEglFunction(egl::internal::EglFuncName::CreateImage); - return _CreateImage(dpy, ctx, target, buffer, attrib_list); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(DestroyImage)(EGLDisplay dpy, EGLImage image) -{ - typedef EGLBoolean(EGLAPIENTRY * PROC_EGL_DestroyImage)(EGLDisplay dpy, EGLImage image); - static PROC_EGL_DestroyImage _DestroyImage = (PROC_EGL_DestroyImage)egl::internal::getEglFunction(egl::internal::EglFuncName::DestroyImage); - return _DestroyImage(dpy, image); -} -inline EGLDisplay DYNAMICEGL_FUNCTION(GetPlatformDisplay)(EGLenum platform, void* native_display, const EGLAttrib* attrib_list) -{ - typedef EGLDisplay(EGLAPIENTRY * PROC_EGL_GetPlatformDisplay)(EGLenum platform, void* native_display, const EGLAttrib * attrib_list); - static PROC_EGL_GetPlatformDisplay _GetPlatformDisplay = (PROC_EGL_GetPlatformDisplay)egl::internal::getEglFunction(egl::internal::EglFuncName::GetPlatformDisplay); - return _GetPlatformDisplay(platform, native_display, attrib_list); -} -inline EGLSurface DYNAMICEGL_FUNCTION(CreatePlatformWindowSurface)(EGLDisplay dpy, EGLConfig config, void* native_window, const EGLAttrib* attrib_list) -{ - typedef EGLSurface(EGLAPIENTRY * PROC_EGL_CreatePlatformWindowSurface)(EGLDisplay dpy, EGLConfig config, void* native_window, const EGLAttrib * attrib_list); - static PROC_EGL_CreatePlatformWindowSurface _CreatePlatformWindowSurface = (PROC_EGL_CreatePlatformWindowSurface)egl::internal::getEglFunction(egl::internal::EglFuncName::CreatePlatformWindowSurface); - return _CreatePlatformWindowSurface(dpy, config, native_window, attrib_list); -} -inline EGLSurface DYNAMICEGL_FUNCTION(CreatePlatformPixmapSurface)(EGLDisplay dpy, EGLConfig config, void* native_pixmap, const EGLAttrib* attrib_list) -{ - typedef EGLSurface(EGLAPIENTRY * PROC_EGL_CreatePlatformPixmapSurface)(EGLDisplay dpy, EGLConfig config, void* native_pixmap, const EGLAttrib * attrib_list); - static PROC_EGL_CreatePlatformPixmapSurface _CreatePlatformPixmapSurface = (PROC_EGL_CreatePlatformPixmapSurface)egl::internal::getEglFunction(egl::internal::EglFuncName::CreatePlatformPixmapSurface); - return _CreatePlatformPixmapSurface(dpy, config, native_pixmap, attrib_list); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(WaitSync)(EGLDisplay dpy, EGLSync sync, EGLint flags) -{ - typedef EGLBoolean(EGLAPIENTRY * PROC_EGL_WaitSync)(EGLDisplay dpy, EGLSync sync, EGLint flags); - static PROC_EGL_WaitSync _WaitSync = (PROC_EGL_WaitSync)egl::internal::getEglFunction(egl::internal::EglFuncName::WaitSync); - return _WaitSync(dpy, sync, flags); -} -#ifndef DYNAMICEGL_NO_NAMESPACE -} -#endif -#ifndef __GNUC__ -#pragma endregion -#endif - -#ifndef __GNUC__ -#pragma region EGL_EXT -#endif - -namespace egl { -namespace internal { -namespace EglExtFuncName { -enum EglExtFunctionName -{ - CreateSync64KHR, DebugMessageControlKHR, QueryDebugKHR, LabelObjectKHR, QueryDisplayAttribKHR, CreateSyncKHR, DestroySyncKHR, - ClientWaitSyncKHR, GetSyncAttribKHR, CreateImageKHR, DestroyImageKHR, LockSurfaceKHR, UnlockSurfaceKHR, QuerySurface64KHR, - SetDamageRegionKHR, SignalSyncKHR, CreateStreamKHR, DestroyStreamKHR, StreamAttribKHR, QueryStreamKHR, QueryStreamu64KHR, - CreateStreamAttribKHR, SetStreamAttribKHR, QueryStreamAttribKHR, StreamConsumerAcquireAttribKHR, StreamConsumerReleaseAttribKHR, - StreamConsumerGLTextureExternalKHR, StreamConsumerAcquireKHR, StreamConsumerReleaseKHR, GetStreamFileDescriptorKHR, - CreateStreamFromFileDescriptorKHR, QueryStreamTimeKHR, CreateStreamProducerSurfaceKHR, SwapBuffersWithDamageKHR, WaitSyncKHR, - SetBlobCacheFuncsANDROID, CreateNativeClientBufferANDROID, DupNativeFenceFDANDROID, PresentationTimeANDROID, QuerySurfacePointerANGLE, - CompositorSetContextListEXT, CompositorSetContextAttributesEXT, CompositorSetWindowListEXT, CompositorSetWindowAttributesEXT, - CompositorBindTexWindowEXT, CompositorSetSizeEXT, CompositorSwapPolicyEXT, QueryDeviceAttribEXT, QueryDeviceStringEXT, - QueryDevicesEXT, QueryDisplayAttribEXT, QueryDmaBufFormatsEXT, QueryDmaBufModifiersEXT, GetOutputLayersEXT, GetOutputPortsEXT, - OutputLayerAttribEXT, QueryOutputLayerAttribEXT, QueryOutputLayerStringEXT, OutputPortAttribEXT, QueryOutputPortAttribEXT, - QueryOutputPortStringEXT, GetPlatformDisplayEXT, CreatePlatformWindowSurfaceEXT, CreatePlatformPixmapSurfaceEXT, StreamConsumerOutputEXT, - SwapBuffersWithDamageEXT, CreatePixmapSurfaceHI, CreateDRMImageMESA, ExportDRMImageMESA, ExportDMABUFImageQueryMESA, - ExportDMABUFImageMESA, SwapBuffersRegionNOK, SwapBuffersRegion2NOK, QueryNativeDisplayNV, QueryNativeWindowNV, QueryNativePixmapNV, - PostSubBufferNV, StreamConsumerGLTextureExternalAttribsNV, QueryDisplayAttribNV, SetStreamMetadataNV, QueryStreamMetadataNV, - ResetStreamNV, CreateStreamSyncNV, CreateFenceSyncNV, DestroySyncNV, FenceNV, ClientWaitSyncNV, SignalSyncNV, GetSyncAttribNV, - GetSystemTimeFrequencyNV, GetSystemTimeNV, - NUMBER_OF_EGL_EXT_FUNCTIONS -}; -} - -static inline void* getEglExtensionFunction(const char* funcName) -{ - return (void*)DYNAMICEGL_CALL_FUNCTION(GetProcAddress)(funcName); -} - -static inline bool isExtensionSupported(const char* const extensionString, const char* const extension) -{ - if (!extensionString) - { - return false; - } - - // The recommended technique for querying OpenGL extensions; - // from http://opengl.org/resources/features/OGLextensions/ - const char* start = extensionString; - char* position, *terminator; - - // Extension names should not have spaces. - position = (char*)strchr(extension, ' '); - - if (position || *extension == '\0') - { - return 0; - } - - /* It takes a bit of care to be fool-proof about parsing the - OpenGL extensions string. Don't be fooled by sub-strings, etc. */ - for (;;) - { - position = (char*)strstr((char*)start, extension); - - if (!position) - { - break; - } - - terminator = position + strlen(extension); - - if (position == start || *(position - 1) == ' ') - { - if (*terminator == ' ' || *terminator == '\0') - { - return true; - } - } - - start = terminator; - } - - return false; -} - -inline void* getEglExtFunction(egl::internal::EglExtFuncName::EglExtFunctionName funcname, bool reset = false) -{ - static void* FunctionTable[EglExtFuncName::NUMBER_OF_EGL_EXT_FUNCTIONS]; - - // GET FUNCTION POINTERS --- ONCE!!!! /// - if (!FunctionTable[0] || reset) - { - FunctionTable[EglExtFuncName::CreateSync64KHR] = egl::internal::getEglExtensionFunction("eglCreateSync64KHR"); - FunctionTable[EglExtFuncName::DebugMessageControlKHR] = egl::internal::getEglExtensionFunction("eglDebugMessageControlKHR"); - FunctionTable[EglExtFuncName::QueryDebugKHR] = egl::internal::getEglExtensionFunction("eglQueryDebugKHR"); - FunctionTable[EglExtFuncName::LabelObjectKHR] = egl::internal::getEglExtensionFunction("eglLabelObjectKHR"); - FunctionTable[EglExtFuncName::QueryDisplayAttribKHR] = egl::internal::getEglExtensionFunction("eglQueryDisplayAttribKHR"); - FunctionTable[EglExtFuncName::CreateSyncKHR] = egl::internal::getEglExtensionFunction("eglCreateSyncKHR"); - FunctionTable[EglExtFuncName::DestroySyncKHR] = egl::internal::getEglExtensionFunction("eglDestroySyncKHR"); - FunctionTable[EglExtFuncName::ClientWaitSyncKHR] = egl::internal::getEglExtensionFunction("eglClientWaitSyncKHR"); - FunctionTable[EglExtFuncName::GetSyncAttribKHR] = egl::internal::getEglExtensionFunction("eglGetSyncAttribKHR"); - FunctionTable[EglExtFuncName::CreateImageKHR] = egl::internal::getEglExtensionFunction("eglCreateImageKHR"); - FunctionTable[EglExtFuncName::DestroyImageKHR] = egl::internal::getEglExtensionFunction("eglDestroyImageKHR"); - FunctionTable[EglExtFuncName::LockSurfaceKHR] = egl::internal::getEglExtensionFunction("eglLockSurfaceKHR"); - FunctionTable[EglExtFuncName::UnlockSurfaceKHR] = egl::internal::getEglExtensionFunction("eglUnlockSurfaceKHR"); - FunctionTable[EglExtFuncName::QuerySurface64KHR] = egl::internal::getEglExtensionFunction("eglQuerySurface64KHR"); - FunctionTable[EglExtFuncName::SetDamageRegionKHR] = egl::internal::getEglExtensionFunction("eglSetDamageRegionKHR"); - FunctionTable[EglExtFuncName::SignalSyncKHR] = egl::internal::getEglExtensionFunction("eglSignalSyncKHR"); - FunctionTable[EglExtFuncName::CreateStreamKHR] = egl::internal::getEglExtensionFunction("eglCreateStreamKHR"); - FunctionTable[EglExtFuncName::DestroyStreamKHR] = egl::internal::getEglExtensionFunction("eglDestroyStreamKHR"); - FunctionTable[EglExtFuncName::StreamAttribKHR] = egl::internal::getEglExtensionFunction("eglStreamAttribKHR"); - FunctionTable[EglExtFuncName::QueryStreamKHR] = egl::internal::getEglExtensionFunction("eglQueryStreamKHR"); - FunctionTable[EglExtFuncName::QueryStreamu64KHR] = egl::internal::getEglExtensionFunction("eglQueryStreamu64KHR"); - FunctionTable[EglExtFuncName::CreateStreamAttribKHR] = egl::internal::getEglExtensionFunction("eglCreateStreamAttribKHR"); - FunctionTable[EglExtFuncName::SetStreamAttribKHR] = egl::internal::getEglExtensionFunction("eglSetStreamAttribKHR"); - FunctionTable[EglExtFuncName::QueryStreamAttribKHR] = egl::internal::getEglExtensionFunction("eglQueryStreamAttribKHR"); - FunctionTable[EglExtFuncName::StreamConsumerAcquireAttribKHR] = egl::internal::getEglExtensionFunction("eglStreamConsumerAcquireAttribKHR"); - FunctionTable[EglExtFuncName::StreamConsumerReleaseAttribKHR] = egl::internal::getEglExtensionFunction("eglStreamConsumerReleaseAttribKHR"); - FunctionTable[EglExtFuncName::StreamConsumerGLTextureExternalKHR] = egl::internal::getEglExtensionFunction("eglStreamConsumerGLTextureExternalKHR"); - FunctionTable[EglExtFuncName::StreamConsumerAcquireKHR] = egl::internal::getEglExtensionFunction("eglStreamConsumerAcquireKHR"); - FunctionTable[EglExtFuncName::StreamConsumerReleaseKHR] = egl::internal::getEglExtensionFunction("eglStreamConsumerReleaseKHR"); - FunctionTable[EglExtFuncName::GetStreamFileDescriptorKHR] = egl::internal::getEglExtensionFunction("eglGetStreamFileDescriptorKHR"); - FunctionTable[EglExtFuncName::CreateStreamFromFileDescriptorKHR] = egl::internal::getEglExtensionFunction("eglCreateStreamFromFileDescriptorKHR"); - FunctionTable[EglExtFuncName::QueryStreamTimeKHR] = egl::internal::getEglExtensionFunction("eglQueryStreamTimeKHR"); - FunctionTable[EglExtFuncName::CreateStreamProducerSurfaceKHR] = egl::internal::getEglExtensionFunction("eglCreateStreamProducerSurfaceKHR"); - FunctionTable[EglExtFuncName::SwapBuffersWithDamageKHR] = egl::internal::getEglExtensionFunction("eglSwapBuffersWithDamageKHR"); - FunctionTable[EglExtFuncName::WaitSyncKHR] = egl::internal::getEglExtensionFunction("eglWaitSyncKHR"); - FunctionTable[EglExtFuncName::SetBlobCacheFuncsANDROID] = egl::internal::getEglExtensionFunction("eglSetBlobCacheFuncsANDROID"); - FunctionTable[EglExtFuncName::CreateNativeClientBufferANDROID] = egl::internal::getEglExtensionFunction("eglCreateNativeClientBufferANDROID"); - FunctionTable[EglExtFuncName::DupNativeFenceFDANDROID] = egl::internal::getEglExtensionFunction("eglDupNativeFenceFDANDROID"); - FunctionTable[EglExtFuncName::PresentationTimeANDROID] = egl::internal::getEglExtensionFunction("eglPresentationTimeANDROID"); - FunctionTable[EglExtFuncName::QuerySurfacePointerANGLE] = egl::internal::getEglExtensionFunction("eglQuerySurfacePointerANGLE"); - FunctionTable[EglExtFuncName::CompositorSetContextListEXT] = egl::internal::getEglExtensionFunction("eglCompositorSetContextListEXT"); - FunctionTable[EglExtFuncName::CompositorSetContextAttributesEXT] = egl::internal::getEglExtensionFunction("eglCompositorSetContextAttributesEXT"); - FunctionTable[EglExtFuncName::CompositorSetWindowListEXT] = egl::internal::getEglExtensionFunction("eglCompositorSetWindowListEXT"); - FunctionTable[EglExtFuncName::CompositorSetWindowAttributesEXT] = egl::internal::getEglExtensionFunction("eglCompositorSetWindowAttributesEXT"); - FunctionTable[EglExtFuncName::CompositorBindTexWindowEXT] = egl::internal::getEglExtensionFunction("eglCompositorBindTexWindowEXT"); - FunctionTable[EglExtFuncName::CompositorSetSizeEXT] = egl::internal::getEglExtensionFunction("eglCompositorSetSizeEXT"); - FunctionTable[EglExtFuncName::CompositorSwapPolicyEXT] = egl::internal::getEglExtensionFunction("eglCompositorSwapPolicyEXT"); - FunctionTable[EglExtFuncName::QueryDeviceAttribEXT] = egl::internal::getEglExtensionFunction("eglQueryDeviceAttribEXT"); - FunctionTable[EglExtFuncName::QueryDeviceStringEXT] = egl::internal::getEglExtensionFunction("eglQueryDeviceStringEXT"); - FunctionTable[EglExtFuncName::QueryDevicesEXT] = egl::internal::getEglExtensionFunction("eglQueryDevicesEXT"); - FunctionTable[EglExtFuncName::QueryDisplayAttribEXT] = egl::internal::getEglExtensionFunction("eglQueryDisplayAttribEXT"); - FunctionTable[EglExtFuncName::QueryDmaBufFormatsEXT] = egl::internal::getEglExtensionFunction("eglQueryDmaBufFormatsEXT"); - FunctionTable[EglExtFuncName::QueryDmaBufModifiersEXT] = egl::internal::getEglExtensionFunction("eglQueryDmaBufModifiersEXT"); - FunctionTable[EglExtFuncName::GetOutputLayersEXT] = egl::internal::getEglExtensionFunction("eglGetOutputLayersEXT"); - FunctionTable[EglExtFuncName::GetOutputPortsEXT] = egl::internal::getEglExtensionFunction("eglGetOutputPortsEXT"); - FunctionTable[EglExtFuncName::OutputLayerAttribEXT] = egl::internal::getEglExtensionFunction("eglOutputLayerAttribEXT"); - FunctionTable[EglExtFuncName::QueryOutputLayerAttribEXT] = egl::internal::getEglExtensionFunction("eglQueryOutputLayerAttribEXT"); - FunctionTable[EglExtFuncName::QueryOutputLayerStringEXT] = egl::internal::getEglExtensionFunction("eglQueryOutputLayerStringEXT"); - FunctionTable[EglExtFuncName::OutputPortAttribEXT] = egl::internal::getEglExtensionFunction("eglOutputPortAttribEXT"); - FunctionTable[EglExtFuncName::QueryOutputPortAttribEXT] = egl::internal::getEglExtensionFunction("eglQueryOutputPortAttribEXT"); - FunctionTable[EglExtFuncName::QueryOutputPortStringEXT] = egl::internal::getEglExtensionFunction("eglQueryOutputPortStringEXT"); - FunctionTable[EglExtFuncName::GetPlatformDisplayEXT] = egl::internal::getEglExtensionFunction("eglGetPlatformDisplayEXT"); - FunctionTable[EglExtFuncName::CreatePlatformWindowSurfaceEXT] = egl::internal::getEglExtensionFunction("eglCreatePlatformWindowSurfaceEXT"); - FunctionTable[EglExtFuncName::CreatePlatformPixmapSurfaceEXT] = egl::internal::getEglExtensionFunction("eglCreatePlatformPixmapSurfaceEXT"); - FunctionTable[EglExtFuncName::StreamConsumerOutputEXT] = egl::internal::getEglExtensionFunction("eglStreamConsumerOutputEXT"); - FunctionTable[EglExtFuncName::SwapBuffersWithDamageEXT] = egl::internal::getEglExtensionFunction("eglSwapBuffersWithDamageEXT"); - FunctionTable[EglExtFuncName::CreatePixmapSurfaceHI] = egl::internal::getEglExtensionFunction("eglCreatePixmapSurfaceHI"); - FunctionTable[EglExtFuncName::CreateDRMImageMESA] = egl::internal::getEglExtensionFunction("eglCreateDRMImageMESA"); - FunctionTable[EglExtFuncName::ExportDRMImageMESA] = egl::internal::getEglExtensionFunction("eglExportDRMImageMESA"); - FunctionTable[EglExtFuncName::ExportDMABUFImageQueryMESA] = egl::internal::getEglExtensionFunction("eglExportDMABUFImageQueryMESA"); - FunctionTable[EglExtFuncName::ExportDMABUFImageMESA] = egl::internal::getEglExtensionFunction("eglExportDMABUFImageMESA"); - FunctionTable[EglExtFuncName::SwapBuffersRegionNOK] = egl::internal::getEglExtensionFunction("eglSwapBuffersRegionNOK"); - FunctionTable[EglExtFuncName::SwapBuffersRegion2NOK] = egl::internal::getEglExtensionFunction("eglSwapBuffersRegion2NOK"); - FunctionTable[EglExtFuncName::QueryNativeDisplayNV] = egl::internal::getEglExtensionFunction("eglQueryNativeDisplayNV"); - FunctionTable[EglExtFuncName::QueryNativeWindowNV] = egl::internal::getEglExtensionFunction("eglQueryNativeWindowNV"); - FunctionTable[EglExtFuncName::QueryNativePixmapNV] = egl::internal::getEglExtensionFunction("eglQueryNativePixmapNV"); - FunctionTable[EglExtFuncName::PostSubBufferNV] = egl::internal::getEglExtensionFunction("eglPostSubBufferNV"); - FunctionTable[EglExtFuncName::StreamConsumerGLTextureExternalAttribsNV] = egl::internal::getEglExtensionFunction("eglStreamConsumerGLTextureExternalAttribsNV"); - FunctionTable[EglExtFuncName::QueryDisplayAttribNV] = egl::internal::getEglExtensionFunction("eglQueryDisplayAttribNV"); - FunctionTable[EglExtFuncName::SetStreamMetadataNV] = egl::internal::getEglExtensionFunction("eglSetStreamMetadataNV"); - FunctionTable[EglExtFuncName::QueryStreamMetadataNV] = egl::internal::getEglExtensionFunction("eglQueryStreamMetadataNV"); - FunctionTable[EglExtFuncName::ResetStreamNV] = egl::internal::getEglExtensionFunction("eglResetStreamNV"); - FunctionTable[EglExtFuncName::CreateStreamSyncNV] = egl::internal::getEglExtensionFunction("eglCreateStreamSyncNV"); - FunctionTable[EglExtFuncName::CreateFenceSyncNV] = egl::internal::getEglExtensionFunction("eglCreateFenceSyncNV"); - FunctionTable[EglExtFuncName::DestroySyncNV] = egl::internal::getEglExtensionFunction("eglDestroySyncNV"); - FunctionTable[EglExtFuncName::FenceNV] = egl::internal::getEglExtensionFunction("eglFenceNV"); - FunctionTable[EglExtFuncName::ClientWaitSyncNV] = egl::internal::getEglExtensionFunction("eglClientWaitSyncNV"); - FunctionTable[EglExtFuncName::SignalSyncNV] = egl::internal::getEglExtensionFunction("eglSignalSyncNV"); - FunctionTable[EglExtFuncName::GetSyncAttribNV] = egl::internal::getEglExtensionFunction("eglGetSyncAttribNV"); - FunctionTable[EglExtFuncName::GetSystemTimeFrequencyNV] = egl::internal::getEglExtensionFunction("eglGetSystemTimeFrequencyNV"); - FunctionTable[EglExtFuncName::GetSystemTimeNV] = egl::internal::getEglExtensionFunction("eglGetSystemTimeNV"); - - } - return FunctionTable[funcname]; -} -} -} -#ifndef __GNUC__ -#pragma endregion -#endif - -#ifndef DYNAMICEGL_NO_NAMESPACE -namespace egl { -namespace ext { -#endif -inline EGLSyncKHR DYNAMICEGL_FUNCTION(CreateSync64KHR)(EGLDisplay dpy, EGLenum type, const EGLAttribKHR* attrib_list) -{ - typedef EGLSyncKHR(EGLAPIENTRY * PFNEGLCreateSync64KHRPROC)(EGLDisplay dpy, EGLenum type, const EGLAttribKHR * attrib_list); - static PFNEGLCreateSync64KHRPROC _CreateSync64KHR = (PFNEGLCreateSync64KHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::CreateSync64KHR); - return _CreateSync64KHR(dpy, type, attrib_list); -} -inline EGLint DYNAMICEGL_FUNCTION(DebugMessageControlKHR)(EGLDEBUGPROCKHR callback, const EGLAttrib* attrib_list) -{ - typedef EGLint(EGLAPIENTRY * PFNEGLDebugMessageControlKHRPROC)(EGLDEBUGPROCKHR callback, const EGLAttrib * attrib_list); - static PFNEGLDebugMessageControlKHRPROC _DebugMessageControlKHR = (PFNEGLDebugMessageControlKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::DebugMessageControlKHR); - return _DebugMessageControlKHR(callback, attrib_list); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(QueryDebugKHR)(EGLint attribute, EGLAttrib* value) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLQueryDebugKHRPROC)(EGLint attribute, EGLAttrib * value); - static PFNEGLQueryDebugKHRPROC _QueryDebugKHR = (PFNEGLQueryDebugKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::QueryDebugKHR); - return _QueryDebugKHR(attribute, value); -} -inline EGLint DYNAMICEGL_FUNCTION(LabelObjectKHR)(EGLDisplay display, EGLenum objectType, EGLObjectKHR object, EGLLabelKHR label) -{ - typedef EGLint(EGLAPIENTRY * PFNEGLLabelObjectKHRPROC)(EGLDisplay display, EGLenum objectType, EGLObjectKHR object, EGLLabelKHR label); - static PFNEGLLabelObjectKHRPROC _LabelObjectKHR = (PFNEGLLabelObjectKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::LabelObjectKHR); - return _LabelObjectKHR(display, objectType, object, label); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(QueryDisplayAttribKHR)(EGLDisplay dpy, EGLint name, EGLAttrib* value) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLQueryDisplayAttribKHRPROC)(EGLDisplay dpy, EGLint name, EGLAttrib * value); - static PFNEGLQueryDisplayAttribKHRPROC _QueryDisplayAttribKHR = (PFNEGLQueryDisplayAttribKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::QueryDisplayAttribKHR); - return _QueryDisplayAttribKHR(dpy, name, value); -} -inline EGLSyncKHR DYNAMICEGL_FUNCTION(CreateSyncKHR)(EGLDisplay dpy, EGLenum type, const EGLint* attrib_list) -{ - typedef EGLSyncKHR(EGLAPIENTRY * PFNEGLCreateSyncKHRPROC)(EGLDisplay dpy, EGLenum type, const EGLint * attrib_list); - static PFNEGLCreateSyncKHRPROC _CreateSyncKHR = (PFNEGLCreateSyncKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::CreateSyncKHR); - return _CreateSyncKHR(dpy, type, attrib_list); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(DestroySyncKHR)(EGLDisplay dpy, EGLSyncKHR sync) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLDestroySyncKHRPROC)(EGLDisplay dpy, EGLSyncKHR sync); - static PFNEGLDestroySyncKHRPROC _DestroySyncKHR = (PFNEGLDestroySyncKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::DestroySyncKHR); - return _DestroySyncKHR(dpy, sync); -} -inline EGLint DYNAMICEGL_FUNCTION(ClientWaitSyncKHR)(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout) -{ - typedef EGLint(EGLAPIENTRY * PFNEGLClientWaitSyncKHRPROC)(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); - static PFNEGLClientWaitSyncKHRPROC _ClientWaitSyncKHR = (PFNEGLClientWaitSyncKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::ClientWaitSyncKHR); - return _ClientWaitSyncKHR(dpy, sync, flags, timeout); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(GetSyncAttribKHR)(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint* value) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLGetSyncAttribKHRPROC)(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint * value); - static PFNEGLGetSyncAttribKHRPROC _GetSyncAttribKHR = (PFNEGLGetSyncAttribKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::GetSyncAttribKHR); - return _GetSyncAttribKHR(dpy, sync, attribute, value); -} -inline EGLImageKHR DYNAMICEGL_FUNCTION(CreateImageKHR)(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint* attrib_list) -{ - typedef EGLImageKHR(EGLAPIENTRY * PFNEGLCreateImageKHRPROC)(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint * attrib_list); - static PFNEGLCreateImageKHRPROC _CreateImageKHR = (PFNEGLCreateImageKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::CreateImageKHR); - return _CreateImageKHR(dpy, ctx, target, buffer, attrib_list); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(DestroyImageKHR)(EGLDisplay dpy, EGLImageKHR image) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLDestroyImageKHRPROC)(EGLDisplay dpy, EGLImageKHR image); - static PFNEGLDestroyImageKHRPROC _DestroyImageKHR = (PFNEGLDestroyImageKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::DestroyImageKHR); - return _DestroyImageKHR(dpy, image); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(LockSurfaceKHR)(EGLDisplay dpy, EGLSurface surface, const EGLint* attrib_list) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLLockSurfaceKHRPROC)(EGLDisplay dpy, EGLSurface surface, const EGLint * attrib_list); - static PFNEGLLockSurfaceKHRPROC _LockSurfaceKHR = (PFNEGLLockSurfaceKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::LockSurfaceKHR); - return _LockSurfaceKHR(dpy, surface, attrib_list); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(UnlockSurfaceKHR)(EGLDisplay dpy, EGLSurface surface) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLUnlockSurfaceKHRPROC)(EGLDisplay dpy, EGLSurface surface); - static PFNEGLUnlockSurfaceKHRPROC _UnlockSurfaceKHR = (PFNEGLUnlockSurfaceKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::UnlockSurfaceKHR); - return _UnlockSurfaceKHR(dpy, surface); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(QuerySurface64KHR)(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLAttribKHR* value) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLQuerySurface64KHRPROC)(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLAttribKHR * value); - static PFNEGLQuerySurface64KHRPROC _QuerySurface64KHR = (PFNEGLQuerySurface64KHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::QuerySurface64KHR); - return _QuerySurface64KHR(dpy, surface, attribute, value); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(SetDamageRegionKHR)(EGLDisplay dpy, EGLSurface surface, EGLint* rects, EGLint n_rects) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLSetDamageRegionKHRPROC)(EGLDisplay dpy, EGLSurface surface, EGLint * rects, EGLint n_rects); - static PFNEGLSetDamageRegionKHRPROC _SetDamageRegionKHR = (PFNEGLSetDamageRegionKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::SetDamageRegionKHR); - return _SetDamageRegionKHR(dpy, surface, rects, n_rects); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(SignalSyncKHR)(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLSignalSyncKHRPROC)(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); - static PFNEGLSignalSyncKHRPROC _SignalSyncKHR = (PFNEGLSignalSyncKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::SignalSyncKHR); - return _SignalSyncKHR(dpy, sync, mode); -} inline EGLStreamKHR DYNAMICEGL_FUNCTION(CreateStreamKHR)(EGLDisplay dpy, const EGLint* attrib_list) -{ - typedef EGLStreamKHR(EGLAPIENTRY * PFNEGLCreateStreamKHRPROC)(EGLDisplay dpy, const EGLint * attrib_list); - static PFNEGLCreateStreamKHRPROC _CreateStreamKHR = (PFNEGLCreateStreamKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::CreateStreamKHR); - return _CreateStreamKHR(dpy, attrib_list); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(DestroyStreamKHR)(EGLDisplay dpy, EGLStreamKHR stream) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLDestroyStreamKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream); - static PFNEGLDestroyStreamKHRPROC _DestroyStreamKHR = (PFNEGLDestroyStreamKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::DestroyStreamKHR); - return _DestroyStreamKHR(dpy, stream); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(StreamAttribKHR)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLStreamAttribKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value); - static PFNEGLStreamAttribKHRPROC _StreamAttribKHR = (PFNEGLStreamAttribKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::StreamAttribKHR); - return _StreamAttribKHR(dpy, stream, attribute, value); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(QueryStreamKHR)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint* value) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLQueryStreamKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint * value); - static PFNEGLQueryStreamKHRPROC _QueryStreamKHR = (PFNEGLQueryStreamKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::QueryStreamKHR); - return _QueryStreamKHR(dpy, stream, attribute, value); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(QueryStreamu64KHR)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR* value) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLQueryStreamu64KHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR * value); - static PFNEGLQueryStreamu64KHRPROC _QueryStreamu64KHR = (PFNEGLQueryStreamu64KHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::QueryStreamu64KHR); - return _QueryStreamu64KHR(dpy, stream, attribute, value); -} inline EGLStreamKHR DYNAMICEGL_FUNCTION(CreateStreamAttribKHR)(EGLDisplay dpy, const EGLAttrib* attrib_list) -{ - typedef EGLStreamKHR(EGLAPIENTRY * PFNEGLCreateStreamAttribKHRPROC)(EGLDisplay dpy, const EGLAttrib * attrib_list); - static PFNEGLCreateStreamAttribKHRPROC _CreateStreamAttribKHR = (PFNEGLCreateStreamAttribKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::CreateStreamAttribKHR); - return _CreateStreamAttribKHR(dpy, attrib_list); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(SetStreamAttribKHR)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib value) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLSetStreamAttribKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib value); - static PFNEGLSetStreamAttribKHRPROC _SetStreamAttribKHR = (PFNEGLSetStreamAttribKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::SetStreamAttribKHR); - return _SetStreamAttribKHR(dpy, stream, attribute, value); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(QueryStreamAttribKHR)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib* value) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLQueryStreamAttribKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib * value); - static PFNEGLQueryStreamAttribKHRPROC _QueryStreamAttribKHR = (PFNEGLQueryStreamAttribKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::QueryStreamAttribKHR); - return _QueryStreamAttribKHR(dpy, stream, attribute, value); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(StreamConsumerAcquireAttribKHR)(EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib* attrib_list) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLStreamConsumerAcquireAttribKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib * attrib_list); - static PFNEGLStreamConsumerAcquireAttribKHRPROC _StreamConsumerAcquireAttribKHR = (PFNEGLStreamConsumerAcquireAttribKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::StreamConsumerAcquireAttribKHR); - return _StreamConsumerAcquireAttribKHR(dpy, stream, attrib_list); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(StreamConsumerReleaseAttribKHR)(EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib* attrib_list) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLStreamConsumerReleaseAttribKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib * attrib_list); - static PFNEGLStreamConsumerReleaseAttribKHRPROC _StreamConsumerReleaseAttribKHR = (PFNEGLStreamConsumerReleaseAttribKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::StreamConsumerReleaseAttribKHR); - return _StreamConsumerReleaseAttribKHR(dpy, stream, attrib_list); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(StreamConsumerGLTextureExternalKHR)(EGLDisplay dpy, EGLStreamKHR stream) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLStreamConsumerGLTextureExternalKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream); - static PFNEGLStreamConsumerGLTextureExternalKHRPROC _StreamConsumerGLTextureExternalKHR = (PFNEGLStreamConsumerGLTextureExternalKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::StreamConsumerGLTextureExternalKHR); - return _StreamConsumerGLTextureExternalKHR(dpy, stream); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(StreamConsumerAcquireKHR)(EGLDisplay dpy, EGLStreamKHR stream) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLStreamConsumerAcquireKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream); - static PFNEGLStreamConsumerAcquireKHRPROC _StreamConsumerAcquireKHR = (PFNEGLStreamConsumerAcquireKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::StreamConsumerAcquireKHR); - return _StreamConsumerAcquireKHR(dpy, stream); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(StreamConsumerReleaseKHR)(EGLDisplay dpy, EGLStreamKHR stream) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLStreamConsumerReleaseKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream); - static PFNEGLStreamConsumerReleaseKHRPROC _StreamConsumerReleaseKHR = (PFNEGLStreamConsumerReleaseKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::StreamConsumerReleaseKHR); - return _StreamConsumerReleaseKHR(dpy, stream); -} -inline EGLNativeFileDescriptorKHR DYNAMICEGL_FUNCTION(GetStreamFileDescriptorKHR)(EGLDisplay dpy, EGLStreamKHR stream) -{ - typedef EGLNativeFileDescriptorKHR(EGLAPIENTRY * PFNEGLGetStreamFileDescriptorKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream); - static PFNEGLGetStreamFileDescriptorKHRPROC _GetStreamFileDescriptorKHR = (PFNEGLGetStreamFileDescriptorKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::GetStreamFileDescriptorKHR); - return _GetStreamFileDescriptorKHR(dpy, stream); -} -inline EGLStreamKHR DYNAMICEGL_FUNCTION(CreateStreamFromFileDescriptorKHR)(EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor) -{ - typedef EGLStreamKHR(EGLAPIENTRY * PFNEGLCreateStreamFromFileDescriptorKHRPROC)(EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor); - static PFNEGLCreateStreamFromFileDescriptorKHRPROC _CreateStreamFromFileDescriptorKHR = (PFNEGLCreateStreamFromFileDescriptorKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::CreateStreamFromFileDescriptorKHR); - return _CreateStreamFromFileDescriptorKHR(dpy, file_descriptor); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(QueryStreamTimeKHR)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR* value) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLQueryStreamTimeKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR * value); - static PFNEGLQueryStreamTimeKHRPROC _QueryStreamTimeKHR = (PFNEGLQueryStreamTimeKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::QueryStreamTimeKHR); - return _QueryStreamTimeKHR(dpy, stream, attribute, value); -} inline EGLSurface DYNAMICEGL_FUNCTION(CreateStreamProducerSurfaceKHR)(EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint* attrib_list) -{ - typedef EGLSurface(EGLAPIENTRY * PFNEGLCreateStreamProducerSurfaceKHRPROC)(EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint * attrib_list); - static PFNEGLCreateStreamProducerSurfaceKHRPROC _CreateStreamProducerSurfaceKHR = (PFNEGLCreateStreamProducerSurfaceKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::CreateStreamProducerSurfaceKHR); - return _CreateStreamProducerSurfaceKHR(dpy, config, stream, attrib_list); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(SwapBuffersWithDamageKHR)(EGLDisplay dpy, EGLSurface surface, EGLint* rects, EGLint n_rects) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLSwapBuffersWithDamageKHRPROC)(EGLDisplay dpy, EGLSurface surface, EGLint * rects, EGLint n_rects); - static PFNEGLSwapBuffersWithDamageKHRPROC _SwapBuffersWithDamageKHR = (PFNEGLSwapBuffersWithDamageKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::SwapBuffersWithDamageKHR); - return _SwapBuffersWithDamageKHR(dpy, surface, rects, n_rects); -} -inline EGLint DYNAMICEGL_FUNCTION(WaitSyncKHR)(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags) -{ - typedef EGLint(EGLAPIENTRY * PFNEGLWaitSyncKHRPROC)(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags); - static PFNEGLWaitSyncKHRPROC _WaitSyncKHR = (PFNEGLWaitSyncKHRPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::WaitSyncKHR); - return _WaitSyncKHR(dpy, sync, flags); -} -inline void DYNAMICEGL_FUNCTION(SetBlobCacheFuncsANDROID)(EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get) -{ - typedef void (EGLAPIENTRY * PFNEGLSetBlobCacheFuncsANDROIDPROC)(EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get); - static PFNEGLSetBlobCacheFuncsANDROIDPROC _SetBlobCacheFuncsANDROID = (PFNEGLSetBlobCacheFuncsANDROIDPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::SetBlobCacheFuncsANDROID); - return _SetBlobCacheFuncsANDROID(dpy, set, get); -} -inline EGLClientBuffer DYNAMICEGL_FUNCTION(CreateNativeClientBufferANDROID)(const EGLint* attrib_list) -{ - typedef EGLClientBuffer(EGLAPIENTRY * PFNEGLCreateNativeClientBufferANDROIDPROC)(const EGLint * attrib_list); - static PFNEGLCreateNativeClientBufferANDROIDPROC _CreateNativeClientBufferANDROID = (PFNEGLCreateNativeClientBufferANDROIDPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::CreateNativeClientBufferANDROID); - return _CreateNativeClientBufferANDROID(attrib_list); -} -inline EGLint DYNAMICEGL_FUNCTION(DupNativeFenceFDANDROID)(EGLDisplay dpy, EGLSyncKHR sync) -{ - typedef EGLint(EGLAPIENTRY * PFNEGLDupNativeFenceFDANDROIDPROC)(EGLDisplay dpy, EGLSyncKHR sync); - static PFNEGLDupNativeFenceFDANDROIDPROC _DupNativeFenceFDANDROID = (PFNEGLDupNativeFenceFDANDROIDPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::DupNativeFenceFDANDROID); - return _DupNativeFenceFDANDROID(dpy, sync); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(PresentationTimeANDROID)(EGLDisplay dpy, EGLSurface surface, EGLnsecsANDROID time) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLPresentationTimeANDROIDPROC)(EGLDisplay dpy, EGLSurface surface, EGLnsecsANDROID time); - static PFNEGLPresentationTimeANDROIDPROC _PresentationTimeANDROID = (PFNEGLPresentationTimeANDROIDPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::PresentationTimeANDROID); - return _PresentationTimeANDROID(dpy, surface, time); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(QuerySurfacePointerANGLE)(EGLDisplay dpy, EGLSurface surface, EGLint attribute, void** value) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLQuerySurfacePointerANGLEPROC)(EGLDisplay dpy, EGLSurface surface, EGLint attribute, void** value); - static PFNEGLQuerySurfacePointerANGLEPROC _QuerySurfacePointerANGLE = (PFNEGLQuerySurfacePointerANGLEPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::QuerySurfacePointerANGLE); - return _QuerySurfacePointerANGLE(dpy, surface, attribute, value); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(CompositorSetContextListEXT)(const EGLint* external_ref_ids, EGLint num_entries) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLCompositorSetContextListEXTPROC)(const EGLint * external_ref_ids, EGLint num_entries); - static PFNEGLCompositorSetContextListEXTPROC _CompositorSetContextListEXT = (PFNEGLCompositorSetContextListEXTPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::CompositorSetContextListEXT); - return _CompositorSetContextListEXT(external_ref_ids, num_entries); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(CompositorSetContextAttributesEXT)(EGLint external_ref_id, const EGLint* context_attributes, EGLint num_entries) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLCompositorSetContextAttributesEXTPROC)(EGLint external_ref_id, const EGLint * context_attributes, EGLint num_entries); - static PFNEGLCompositorSetContextAttributesEXTPROC _CompositorSetContextAttributesEXT = (PFNEGLCompositorSetContextAttributesEXTPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::CompositorSetContextAttributesEXT); - return _CompositorSetContextAttributesEXT(external_ref_id, context_attributes, num_entries); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(CompositorSetWindowListEXT)(EGLint external_ref_id, const EGLint* external_win_ids, EGLint num_entries) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLCompositorSetWindowListEXTPROC)(EGLint external_ref_id, const EGLint * external_win_ids, EGLint num_entries); - static PFNEGLCompositorSetWindowListEXTPROC _CompositorSetWindowListEXT = (PFNEGLCompositorSetWindowListEXTPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::CompositorSetWindowListEXT); - return _CompositorSetWindowListEXT(external_ref_id, external_win_ids, num_entries); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(CompositorSetWindowAttributesEXT)(EGLint external_win_id, const EGLint* window_attributes, EGLint num_entries) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLCompositorSetWindowAttributesEXTPROC)(EGLint external_win_id, const EGLint * window_attributes, EGLint num_entries); - static PFNEGLCompositorSetWindowAttributesEXTPROC _CompositorSetWindowAttributesEXT = (PFNEGLCompositorSetWindowAttributesEXTPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::CompositorSetWindowAttributesEXT); - return _CompositorSetWindowAttributesEXT(external_win_id, window_attributes, num_entries); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(CompositorBindTexWindowEXT)(EGLint external_win_id) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLCompositorBindTexWindowEXTPROC)(EGLint external_win_id); - static PFNEGLCompositorBindTexWindowEXTPROC _CompositorBindTexWindowEXT = (PFNEGLCompositorBindTexWindowEXTPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::CompositorBindTexWindowEXT); - return _CompositorBindTexWindowEXT(external_win_id); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(CompositorSetSizeEXT)(EGLint external_win_id, EGLint width, EGLint height) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLCompositorSetSizeEXTPROC)(EGLint external_win_id, EGLint width, EGLint height); - static PFNEGLCompositorSetSizeEXTPROC _CompositorSetSizeEXT = (PFNEGLCompositorSetSizeEXTPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::CompositorSetSizeEXT); - return _CompositorSetSizeEXT(external_win_id, width, height); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(CompositorSwapPolicyEXT)(EGLint external_win_id, EGLint policy) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLCompositorSwapPolicyEXTPROC)(EGLint external_win_id, EGLint policy); - static PFNEGLCompositorSwapPolicyEXTPROC _CompositorSwapPolicyEXT = (PFNEGLCompositorSwapPolicyEXTPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::CompositorSwapPolicyEXT); - return _CompositorSwapPolicyEXT(external_win_id, policy); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(QueryDeviceAttribEXT)(EGLDeviceEXT device, EGLint attribute, EGLAttrib* value) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLQueryDeviceAttribEXTPROC)(EGLDeviceEXT device, EGLint attribute, EGLAttrib * value); - static PFNEGLQueryDeviceAttribEXTPROC _QueryDeviceAttribEXT = (PFNEGLQueryDeviceAttribEXTPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::QueryDeviceAttribEXT); - return _QueryDeviceAttribEXT(device, attribute, value); -} -inline const char* DYNAMICEGL_FUNCTION(QueryDeviceStringEXT)(EGLDeviceEXT device, EGLint name) -{ - typedef const char* (EGLAPIENTRY * PFNEGLQueryDeviceStringEXTPROC)(EGLDeviceEXT device, EGLint name); - static PFNEGLQueryDeviceStringEXTPROC _QueryDeviceStringEXT = (PFNEGLQueryDeviceStringEXTPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::QueryDeviceStringEXT); - return _QueryDeviceStringEXT(device, name); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(QueryDevicesEXT)(EGLint max_devices, EGLDeviceEXT* devices, EGLint* num_devices) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLQueryDevicesEXTPROC)(EGLint max_devices, EGLDeviceEXT * devices, EGLint * num_devices); - static PFNEGLQueryDevicesEXTPROC _QueryDevicesEXT = (PFNEGLQueryDevicesEXTPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::QueryDevicesEXT); - return _QueryDevicesEXT(max_devices, devices, num_devices); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(QueryDisplayAttribEXT)(EGLDisplay dpy, EGLint attribute, EGLAttrib* value) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLQueryDisplayAttribEXTPROC)(EGLDisplay dpy, EGLint attribute, EGLAttrib * value); - static PFNEGLQueryDisplayAttribEXTPROC _QueryDisplayAttribEXT = (PFNEGLQueryDisplayAttribEXTPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::QueryDisplayAttribEXT); - return _QueryDisplayAttribEXT(dpy, attribute, value); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(QueryDmaBufFormatsEXT)(EGLDisplay dpy, EGLint max_formats, EGLint* formats, EGLint* num_formats) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLQueryDmaBufFormatsEXTPROC)(EGLDisplay dpy, EGLint max_formats, EGLint * formats, EGLint * num_formats); - static PFNEGLQueryDmaBufFormatsEXTPROC _QueryDmaBufFormatsEXT = (PFNEGLQueryDmaBufFormatsEXTPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::QueryDmaBufFormatsEXT); - return _QueryDmaBufFormatsEXT(dpy, max_formats, formats, num_formats); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(QueryDmaBufModifiersEXT)(EGLDisplay dpy, EGLint format, EGLint max_modifiers, EGLuint64KHR* modifiers, EGLBoolean* external_only, EGLint* num_modifiers) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLQueryDmaBufModifiersEXTPROC)(EGLDisplay dpy, EGLint format, EGLint max_modifiers, EGLuint64KHR * modifiers, EGLBoolean * external_only, EGLint * num_modifiers); - static PFNEGLQueryDmaBufModifiersEXTPROC _QueryDmaBufModifiersEXT = (PFNEGLQueryDmaBufModifiersEXTPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::QueryDmaBufModifiersEXT); - return _QueryDmaBufModifiersEXT(dpy, format, max_modifiers, modifiers, external_only, num_modifiers); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(GetOutputLayersEXT)(EGLDisplay dpy, const EGLAttrib* attrib_list, EGLOutputLayerEXT* layers, EGLint max_layers, EGLint* num_layers) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLGetOutputLayersEXTPROC)(EGLDisplay dpy, const EGLAttrib * attrib_list, EGLOutputLayerEXT * layers, EGLint max_layers, EGLint * num_layers); - static PFNEGLGetOutputLayersEXTPROC _GetOutputLayersEXT = (PFNEGLGetOutputLayersEXTPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::GetOutputLayersEXT); - return _GetOutputLayersEXT(dpy, attrib_list, layers, max_layers, num_layers); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(GetOutputPortsEXT)(EGLDisplay dpy, const EGLAttrib* attrib_list, EGLOutputPortEXT* ports, EGLint max_ports, EGLint* num_ports) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLGetOutputPortsEXTPROC)(EGLDisplay dpy, const EGLAttrib * attrib_list, EGLOutputPortEXT * ports, EGLint max_ports, EGLint * num_ports); - static PFNEGLGetOutputPortsEXTPROC _GetOutputPortsEXT = (PFNEGLGetOutputPortsEXTPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::GetOutputPortsEXT); - return _GetOutputPortsEXT(dpy, attrib_list, ports, max_ports, num_ports); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(OutputLayerAttribEXT)(EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLOutputLayerAttribEXTPROC)(EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value); - static PFNEGLOutputLayerAttribEXTPROC _OutputLayerAttribEXT = (PFNEGLOutputLayerAttribEXTPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::OutputLayerAttribEXT); - return _OutputLayerAttribEXT(dpy, layer, attribute, value); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(QueryOutputLayerAttribEXT)(EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib* value) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLQueryOutputLayerAttribEXTPROC)(EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib * value); - static PFNEGLQueryOutputLayerAttribEXTPROC _QueryOutputLayerAttribEXT = (PFNEGLQueryOutputLayerAttribEXTPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::QueryOutputLayerAttribEXT); - return _QueryOutputLayerAttribEXT(dpy, layer, attribute, value); -} -inline const char* DYNAMICEGL_FUNCTION(QueryOutputLayerStringEXT)(EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name) -{ - typedef const char* (EGLAPIENTRY * PFNEGLQueryOutputLayerStringEXTPROC)(EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name); - static PFNEGLQueryOutputLayerStringEXTPROC _QueryOutputLayerStringEXT = (PFNEGLQueryOutputLayerStringEXTPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::QueryOutputLayerStringEXT); - return _QueryOutputLayerStringEXT(dpy, layer, name); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(OutputPortAttribEXT)(EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib value) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLOutputPortAttribEXTPROC)(EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib value); - static PFNEGLOutputPortAttribEXTPROC _OutputPortAttribEXT = (PFNEGLOutputPortAttribEXTPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::OutputPortAttribEXT); - return _OutputPortAttribEXT(dpy, port, attribute, value); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(QueryOutputPortAttribEXT)(EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib* value) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLQueryOutputPortAttribEXTPROC)(EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib * value); - static PFNEGLQueryOutputPortAttribEXTPROC _QueryOutputPortAttribEXT = (PFNEGLQueryOutputPortAttribEXTPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::QueryOutputPortAttribEXT); - return _QueryOutputPortAttribEXT(dpy, port, attribute, value); -} -inline const char* DYNAMICEGL_FUNCTION(QueryOutputPortStringEXT)(EGLDisplay dpy, EGLOutputPortEXT port, EGLint name) -{ - typedef const char* (EGLAPIENTRY * PFNEGLQueryOutputPortStringEXTPROC)(EGLDisplay dpy, EGLOutputPortEXT port, EGLint name); - static PFNEGLQueryOutputPortStringEXTPROC _QueryOutputPortStringEXT = (PFNEGLQueryOutputPortStringEXTPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::QueryOutputPortStringEXT); - return _QueryOutputPortStringEXT(dpy, port, name); -} -inline EGLDisplay DYNAMICEGL_FUNCTION(GetPlatformDisplayEXT)(EGLenum platform, void* native_display, const EGLint* attrib_list) -{ - typedef EGLDisplay(EGLAPIENTRY * PFNEGLGetPlatformDisplayEXTPROC)(EGLenum platform, void* native_display, const EGLint * attrib_list); - static PFNEGLGetPlatformDisplayEXTPROC _GetPlatformDisplayEXT = (PFNEGLGetPlatformDisplayEXTPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::GetPlatformDisplayEXT); - return _GetPlatformDisplayEXT(platform, native_display, attrib_list); -} -inline EGLSurface DYNAMICEGL_FUNCTION(CreatePlatformWindowSurfaceEXT)(EGLDisplay dpy, EGLConfig config, void* native_window, const EGLint* attrib_list) -{ - typedef EGLSurface(EGLAPIENTRY * PFNEGLCreatePlatformWindowSurfaceEXTPROC)(EGLDisplay dpy, EGLConfig config, void* native_window, const EGLint * attrib_list); - static PFNEGLCreatePlatformWindowSurfaceEXTPROC _CreatePlatformWindowSurfaceEXT = (PFNEGLCreatePlatformWindowSurfaceEXTPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::CreatePlatformWindowSurfaceEXT); - return _CreatePlatformWindowSurfaceEXT(dpy, config, native_window, attrib_list); -} -inline EGLSurface DYNAMICEGL_FUNCTION(CreatePlatformPixmapSurfaceEXT)(EGLDisplay dpy, EGLConfig config, void* native_pixmap, const EGLint* attrib_list) -{ - typedef EGLSurface(EGLAPIENTRY * PFNEGLCreatePlatformPixmapSurfaceEXTPROC)(EGLDisplay dpy, EGLConfig config, void* native_pixmap, const EGLint * attrib_list); - static PFNEGLCreatePlatformPixmapSurfaceEXTPROC _CreatePlatformPixmapSurfaceEXT = (PFNEGLCreatePlatformPixmapSurfaceEXTPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::CreatePlatformPixmapSurfaceEXT); - return _CreatePlatformPixmapSurfaceEXT(dpy, config, native_pixmap, attrib_list); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(StreamConsumerOutputEXT)(EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLStreamConsumerOutputEXTPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer); - static PFNEGLStreamConsumerOutputEXTPROC _StreamConsumerOutputEXT = (PFNEGLStreamConsumerOutputEXTPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::StreamConsumerOutputEXT); - return _StreamConsumerOutputEXT(dpy, stream, layer); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(SwapBuffersWithDamageEXT)(EGLDisplay dpy, EGLSurface surface, EGLint* rects, EGLint n_rects) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLSwapBuffersWithDamageEXTPROC)(EGLDisplay dpy, EGLSurface surface, EGLint * rects, EGLint n_rects); - static PFNEGLSwapBuffersWithDamageEXTPROC _SwapBuffersWithDamageEXT = (PFNEGLSwapBuffersWithDamageEXTPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::SwapBuffersWithDamageEXT); - return _SwapBuffersWithDamageEXT(dpy, surface, rects, n_rects); -} -inline EGLSurface DYNAMICEGL_FUNCTION(CreatePixmapSurfaceHI)(EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI* pixmap) -{ - typedef EGLSurface(EGLAPIENTRY * PFNEGLCreatePixmapSurfaceHIPROC)(EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI * pixmap); - static PFNEGLCreatePixmapSurfaceHIPROC _CreatePixmapSurfaceHI = (PFNEGLCreatePixmapSurfaceHIPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::CreatePixmapSurfaceHI); - return _CreatePixmapSurfaceHI(dpy, config, pixmap); -} -inline EGLImageKHR DYNAMICEGL_FUNCTION(CreateDRMImageMESA)(EGLDisplay dpy, const EGLint* attrib_list) -{ - typedef EGLImageKHR(EGLAPIENTRY * PFNEGLCreateDRMImageMESAPROC)(EGLDisplay dpy, const EGLint * attrib_list); - static PFNEGLCreateDRMImageMESAPROC _CreateDRMImageMESA = (PFNEGLCreateDRMImageMESAPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::CreateDRMImageMESA); - return _CreateDRMImageMESA(dpy, attrib_list); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(ExportDRMImageMESA)(EGLDisplay dpy, EGLImageKHR image, EGLint* name, EGLint* handle, EGLint* stride) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLExportDRMImageMESAPROC)(EGLDisplay dpy, EGLImageKHR image, EGLint * name, EGLint * handle, EGLint * stride); - static PFNEGLExportDRMImageMESAPROC _ExportDRMImageMESA = (PFNEGLExportDRMImageMESAPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::ExportDRMImageMESA); - return _ExportDRMImageMESA(dpy, image, name, handle, stride); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(ExportDMABUFImageQueryMESA)(EGLDisplay dpy, EGLImageKHR image, int* fourcc, int* num_planes, EGLuint64KHR* modifiers) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLExportDMABUFImageQueryMESAPROC)(EGLDisplay dpy, EGLImageKHR image, int* fourcc, int* num_planes, EGLuint64KHR * modifiers); - static PFNEGLExportDMABUFImageQueryMESAPROC _ExportDMABUFImageQueryMESA = (PFNEGLExportDMABUFImageQueryMESAPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::ExportDMABUFImageQueryMESA); - return _ExportDMABUFImageQueryMESA(dpy, image, fourcc, num_planes, modifiers); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(ExportDMABUFImageMESA)(EGLDisplay dpy, EGLImageKHR image, int* fds, EGLint* strides, EGLint* offsets) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLExportDMABUFImageMESAPROC)(EGLDisplay dpy, EGLImageKHR image, int* fds, EGLint * strides, EGLint * offsets); - static PFNEGLExportDMABUFImageMESAPROC _ExportDMABUFImageMESA = (PFNEGLExportDMABUFImageMESAPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::ExportDMABUFImageMESA); - return _ExportDMABUFImageMESA(dpy, image, fds, strides, offsets); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(SwapBuffersRegionNOK)(EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint* rects) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLSwapBuffersRegionNOKPROC)(EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint * rects); - static PFNEGLSwapBuffersRegionNOKPROC _SwapBuffersRegionNOK = (PFNEGLSwapBuffersRegionNOKPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::SwapBuffersRegionNOK); - return _SwapBuffersRegionNOK(dpy, surface, numRects, rects); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(SwapBuffersRegion2NOK)(EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint* rects) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLSwapBuffersRegion2NOKPROC)(EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint * rects); - static PFNEGLSwapBuffersRegion2NOKPROC _SwapBuffersRegion2NOK = (PFNEGLSwapBuffersRegion2NOKPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::SwapBuffersRegion2NOK); - return _SwapBuffersRegion2NOK(dpy, surface, numRects, rects); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(QueryNativeDisplayNV)(EGLDisplay dpy, EGLNativeDisplayType* display_id) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLQueryNativeDisplayNVPROC)(EGLDisplay dpy, EGLNativeDisplayType * display_id); - static PFNEGLQueryNativeDisplayNVPROC _QueryNativeDisplayNV = (PFNEGLQueryNativeDisplayNVPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::QueryNativeDisplayNV); - return _QueryNativeDisplayNV(dpy, display_id); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(QueryNativeWindowNV)(EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType* window) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLQueryNativeWindowNVPROC)(EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType * window); - static PFNEGLQueryNativeWindowNVPROC _QueryNativeWindowNV = (PFNEGLQueryNativeWindowNVPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::QueryNativeWindowNV); - return _QueryNativeWindowNV(dpy, surf, window); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(QueryNativePixmapNV)(EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType* pixmap) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLQueryNativePixmapNVPROC)(EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType * pixmap); - static PFNEGLQueryNativePixmapNVPROC _QueryNativePixmapNV = (PFNEGLQueryNativePixmapNVPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::QueryNativePixmapNV); - return _QueryNativePixmapNV(dpy, surf, pixmap); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(PostSubBufferNV)(EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLPostSubBufferNVPROC)(EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height); - static PFNEGLPostSubBufferNVPROC _PostSubBufferNV = (PFNEGLPostSubBufferNVPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::PostSubBufferNV); - return _PostSubBufferNV(dpy, surface, x, y, width, height); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(StreamConsumerGLTextureExternalAttribsNV)(EGLDisplay dpy, EGLStreamKHR stream, EGLAttrib* attrib_list) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLStreamConsumerGLTextureExternalAttribsNVPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLAttrib * attrib_list); - static PFNEGLStreamConsumerGLTextureExternalAttribsNVPROC _StreamConsumerGLTextureExternalAttribsNV = (PFNEGLStreamConsumerGLTextureExternalAttribsNVPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::StreamConsumerGLTextureExternalAttribsNV); - return _StreamConsumerGLTextureExternalAttribsNV(dpy, stream, attrib_list); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(QueryDisplayAttribNV)(EGLDisplay dpy, EGLint attribute, EGLAttrib* value) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLQueryDisplayAttribNVPROC)(EGLDisplay dpy, EGLint attribute, EGLAttrib * value); - static PFNEGLQueryDisplayAttribNVPROC _QueryDisplayAttribNV = (PFNEGLQueryDisplayAttribNVPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::QueryDisplayAttribNV); - return _QueryDisplayAttribNV(dpy, attribute, value); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(SetStreamMetadataNV)(EGLDisplay dpy, EGLStreamKHR stream, EGLint n, EGLint offset, EGLint size, const void* data) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLSetStreamMetadataNVPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLint n, EGLint offset, EGLint size, const void* data); - static PFNEGLSetStreamMetadataNVPROC _SetStreamMetadataNV = (PFNEGLSetStreamMetadataNVPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::SetStreamMetadataNV); - return _SetStreamMetadataNV(dpy, stream, n, offset, size, data); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(QueryStreamMetadataNV)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum name, EGLint n, EGLint offset, EGLint size, void* data) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLQueryStreamMetadataNVPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum name, EGLint n, EGLint offset, EGLint size, void* data); - static PFNEGLQueryStreamMetadataNVPROC _QueryStreamMetadataNV = (PFNEGLQueryStreamMetadataNVPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::QueryStreamMetadataNV); - return _QueryStreamMetadataNV(dpy, stream, name, n, offset, size, data); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(ResetStreamNV)(EGLDisplay dpy, EGLStreamKHR stream) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLResetStreamNVPROC)(EGLDisplay dpy, EGLStreamKHR stream); - static PFNEGLResetStreamNVPROC _ResetStreamNV = (PFNEGLResetStreamNVPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::ResetStreamNV); - return _ResetStreamNV(dpy, stream); -} -inline EGLSyncKHR DYNAMICEGL_FUNCTION(CreateStreamSyncNV)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum type, const EGLint* attrib_list) -{ - typedef EGLSyncKHR(EGLAPIENTRY * PFNEGLCreateStreamSyncNVPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum type, const EGLint * attrib_list); - static PFNEGLCreateStreamSyncNVPROC _CreateStreamSyncNV = (PFNEGLCreateStreamSyncNVPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::CreateStreamSyncNV); - return _CreateStreamSyncNV(dpy, stream, type, attrib_list); -} -inline EGLSyncNV DYNAMICEGL_FUNCTION(CreateFenceSyncNV)(EGLDisplay dpy, EGLenum condition, const EGLint* attrib_list) -{ - typedef EGLSyncNV(EGLAPIENTRY * PFNEGLCreateFenceSyncNVPROC)(EGLDisplay dpy, EGLenum condition, const EGLint * attrib_list); - static PFNEGLCreateFenceSyncNVPROC _CreateFenceSyncNV = (PFNEGLCreateFenceSyncNVPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::CreateFenceSyncNV); - return _CreateFenceSyncNV(dpy, condition, attrib_list); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(DestroySyncNV)(EGLSyncNV sync) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLDestroySyncNVPROC)(EGLSyncNV sync); - static PFNEGLDestroySyncNVPROC _DestroySyncNV = (PFNEGLDestroySyncNVPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::DestroySyncNV); - return _DestroySyncNV(sync); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(FenceNV)(EGLSyncNV sync) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLFenceNVPROC)(EGLSyncNV sync); - static PFNEGLFenceNVPROC _FenceNV = (PFNEGLFenceNVPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::FenceNV); - return _FenceNV(sync); -} -inline EGLint DYNAMICEGL_FUNCTION(ClientWaitSyncNV)(EGLSyncNV sync, EGLint flags, EGLTimeNV timeout) -{ - typedef EGLint(EGLAPIENTRY * PFNEGLClientWaitSyncNVPROC)(EGLSyncNV sync, EGLint flags, EGLTimeNV timeout); - static PFNEGLClientWaitSyncNVPROC _ClientWaitSyncNV = (PFNEGLClientWaitSyncNVPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::ClientWaitSyncNV); - return _ClientWaitSyncNV(sync, flags, timeout); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(SignalSyncNV)(EGLSyncNV sync, EGLenum mode) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLSignalSyncNVPROC)(EGLSyncNV sync, EGLenum mode); - static PFNEGLSignalSyncNVPROC _SignalSyncNV = (PFNEGLSignalSyncNVPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::SignalSyncNV); - return _SignalSyncNV(sync, mode); -} -inline EGLBoolean DYNAMICEGL_FUNCTION(GetSyncAttribNV)(EGLSyncNV sync, EGLint attribute, EGLint* value) -{ - typedef EGLBoolean(EGLAPIENTRY * PFNEGLGetSyncAttribNVPROC)(EGLSyncNV sync, EGLint attribute, EGLint * value); - static PFNEGLGetSyncAttribNVPROC _GetSyncAttribNV = (PFNEGLGetSyncAttribNVPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::GetSyncAttribNV); - return _GetSyncAttribNV(sync, attribute, value); -} -inline EGLuint64NV DYNAMICEGL_FUNCTION(GetSystemTimeFrequencyNV)(void) -{ - typedef EGLuint64NV(EGLAPIENTRY * PFNEGLGetSystemTimeFrequencyNVPROC)(void); - static PFNEGLGetSystemTimeFrequencyNVPROC _GetSystemTimeFrequencyNV = (PFNEGLGetSystemTimeFrequencyNVPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::GetSystemTimeFrequencyNV); - return _GetSystemTimeFrequencyNV(); -} -inline EGLuint64NV DYNAMICEGL_FUNCTION(GetSystemTimeNV)(void) -{ - typedef EGLuint64NV(EGLAPIENTRY * PFNEGLGetSystemTimeNVPROC)(void); - static PFNEGLGetSystemTimeNVPROC _GetSystemTimeNV = (PFNEGLGetSystemTimeNVPROC)egl::internal::getEglExtFunction(egl::internal::EglExtFuncName::GetSystemTimeNV); - return _GetSystemTimeNV(); -} -#ifndef DYNAMICEGL_NO_NAMESPACE -} -#endif - -inline bool isEglExtensionSupported(const char* extensionName, bool resetExtensionCache = false) -{ - static const char* extensionString = DYNAMICEGL_CALL_FUNCTION(QueryString)(DYNAMICEGL_CALL_FUNCTION(GetCurrentDisplay)(), EGL_EXTENSIONS); - - if (resetExtensionCache) { extensionString = DYNAMICEGL_CALL_FUNCTION(QueryString)(DYNAMICEGL_CALL_FUNCTION(GetCurrentDisplay)(), EGL_EXTENSIONS); } - return egl::internal::isExtensionSupported(extensionString, extensionName); -} -inline bool isEglExtensionSupported(EGLDisplay display, const char* extensionName) -{ - const char* extensionString = DYNAMICEGL_CALL_FUNCTION(QueryString)(display, EGL_EXTENSIONS); - return egl::internal::isExtensionSupported(extensionString, extensionName); -} -#ifndef DYNAMICEGL_NO_NAMESPACE -} -#endif -#undef _Log -#endif diff --git a/emscripten/include/pvrsdk/DynamicGles.h b/emscripten/include/pvrsdk/DynamicGles.h deleted file mode 100644 index 5841c3d8..00000000 --- a/emscripten/include/pvrsdk/DynamicGles.h +++ /dev/null @@ -1,5498 +0,0 @@ -#pragma once -#include "DynamicEgl.h" -#include "pvr_openlib.h" - -#ifdef GL_PROTOTYPES -#undef GL_PROTOTYPES -#endif -#define GL_NO_PROTOTYPES -#define EGL_NO_PROTOTYPES -#if defined( _WIN32 ) -#define WIN32_LEAN_AND_MEAN -#define NOMINMAX -#include -#endif -#include -#include -#include - -// DETERMINE FEATURE LEVEL -#if defined(DYNAMICGLES_GLES31) -#define DYNAMICGLES_ENABLE_GLES31 -#define DYNAMICGLES_ENABLE_GLES3 -#define DYNAMICGLES_ENABLE_GLES2 -#elif defined(DYNAMICGLES_GLES30) -#define DYNAMICGLES_ENABLE_GLES30 -#define DYNAMICGLES_ENABLE_GLES2 -#elif defined(DYNAMICGLES_GLES20) -#define DYNAMICGLES_ENABLE_GLES2 -#else -#if !defined(DYNAMICGLES_GLES32) -#define DYNAMICGLES_GLES32 -#endif -#define DYNAMICGLES_ENABLE_GLES32 -#define DYNAMICGLES_ENABLE_GLES31 -#define DYNAMICGLES_ENABLE_GLES3 -#define DYNAMICGLES_ENABLE_GLES2 -#endif - -// DETERMINE IF FUNCTIONS SHOULD BE PREPENDED WITH gl OR PUT IN gl:: NAMESPACE (DEFAULT IS NAMESPACE) -#ifndef DYNAMICGLES_NO_NAMESPACE -#define DYNAMICGLES_FUNCTION(name) GL_APIENTRY name -#else -#if TARGET_OS_IPHONE -#define DYNAMICGLES_FUNCTION(name) GL_APIENTRY name -#else -#define DYNAMICGLES_FUNCTION(name) GL_APIENTRY gl##name -#endif -#endif - -// DYNAMICGLES_FUNCTION THE PLATFORM SPECIFIC LIBRARY NAME -namespace gl { -namespace internals { -#ifdef _WIN32 -static const char* libName = "libGLESv2.dll"; -#elif defined(__APPLE__) -static const char* libName = "libGLESv2.dylib"; -#else -static const char* libName = "libGLESv2.so"; -#endif -} -} - -// LOAD HEADER FILES DEPENDING ON FEATURE LEVEL -#if !TARGET_OS_IPHONE -#include "GLES3/gl32.h" -#include "GLES2/gl2ext.h" -#else -#include -#include -#include -#endif - -namespace gl { -namespace internals { -namespace Gl31FuncName { -// KEEP A LIST USED TO REFERENCE THE FUNCTIONS -enum OpenGLES31FunctionName -{ - //// OPENGL ES 31 //// - - DispatchCompute, DispatchComputeIndirect, DrawArraysIndirect, DrawElementsIndirect, FramebufferParameteri, GetFramebufferParameteriv, GetProgramInterfaceiv, - GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, GetProgramResourceLocation, UseProgramStages, ActiveShaderProgram, CreateShaderProgramv, - BindProgramPipeline, DeleteProgramPipelines, GenProgramPipelines, IsProgramPipeline, GetProgramPipelineiv, ProgramUniform1i, ProgramUniform2i, ProgramUniform3i, - ProgramUniform4i, ProgramUniform1ui, ProgramUniform2ui, ProgramUniform3ui, ProgramUniform4ui, ProgramUniform1f, ProgramUniform2f, ProgramUniform3f, - ProgramUniform4f, ProgramUniform1iv, ProgramUniform2iv, ProgramUniform3iv, ProgramUniform4iv, ProgramUniform1uiv, ProgramUniform2uiv, ProgramUniform3uiv, - ProgramUniform4uiv, ProgramUniform1fv, ProgramUniform2fv, ProgramUniform3fv, ProgramUniform4fv, ProgramUniformMatrix2fv, ProgramUniformMatrix3fv, - ProgramUniformMatrix4fv, ProgramUniformMatrix2x3fv, ProgramUniformMatrix3x2fv, ProgramUniformMatrix2x4fv, ProgramUniformMatrix4x2fv, ProgramUniformMatrix3x4fv, - ProgramUniformMatrix4x3fv, ValidateProgramPipeline, GetProgramPipelineInfoLog, BindImageTexture, GetBooleani_v, MemoryBarrier, MemoryBarrierByRegion, - TexStorage2DMultisample, GetMultisamplefv, SampleMaski, GetTexLevelParameteriv, GetTexLevelParameterfv, BindVertexBuffer, VertexAttribFormat, VertexAttribIFormat, - VertexAttribBinding, VertexBindingDivisor, - NUMBER_OF_OPENGLES3_FUNCTIONS -}; -} - -// THIS FUNCTION PRELOADS ALL ES POINTERS ON FIRST CALL -inline void* getEs31Function(gl::internals::Gl31FuncName::OpenGLES31FunctionName funcname) -{ - static void* FunctionTable[Gl31FuncName::NUMBER_OF_OPENGLES3_FUNCTIONS]; - - // GET FUNCTION POINTERS --- ONCE!!!! /// -#if !TARGET_OS_IPHONE - if (!FunctionTable[0]) - { - pvr::lib::LIBTYPE lib = pvr::lib::openlib(libName); - if (!lib) - { - Log_Error("OpenGL ES Bindings: Failed to open library %s\n", libName); - } - else - { - Log_Info("OpenGL ES Bindings: Successfully loaded library %s for OpenGL ES 3.1\n", libName); - } - - FunctionTable[Gl31FuncName::DispatchCompute] = pvr::lib::getLibFunctionChecked(lib, "glDispatchCompute"); - FunctionTable[Gl31FuncName::DispatchComputeIndirect] = pvr::lib::getLibFunctionChecked(lib, "glDispatchComputeIndirect"); - FunctionTable[Gl31FuncName::DrawArraysIndirect] = pvr::lib::getLibFunctionChecked(lib, "glDrawArraysIndirect"); - FunctionTable[Gl31FuncName::DrawElementsIndirect] = pvr::lib::getLibFunctionChecked(lib, "glDrawElementsIndirect"); - FunctionTable[Gl31FuncName::FramebufferParameteri] = pvr::lib::getLibFunctionChecked(lib, "glFramebufferParameteri"); - FunctionTable[Gl31FuncName::GetFramebufferParameteriv] = pvr::lib::getLibFunctionChecked(lib, "glGetFramebufferParameteriv"); - FunctionTable[Gl31FuncName::GetProgramInterfaceiv] = pvr::lib::getLibFunctionChecked(lib, "glGetProgramInterfaceiv"); - FunctionTable[Gl31FuncName::GetProgramResourceIndex] = pvr::lib::getLibFunctionChecked(lib, "glGetProgramResourceIndex"); - FunctionTable[Gl31FuncName::GetProgramResourceName] = pvr::lib::getLibFunctionChecked(lib, "glGetProgramResourceName"); - FunctionTable[Gl31FuncName::GetProgramResourceiv] = pvr::lib::getLibFunctionChecked(lib, "glGetProgramResourceiv"); - FunctionTable[Gl31FuncName::GetProgramResourceLocation] = pvr::lib::getLibFunctionChecked(lib, "glGetProgramResourceLocation"); - FunctionTable[Gl31FuncName::UseProgramStages] = pvr::lib::getLibFunctionChecked(lib, "glUseProgramStages"); - FunctionTable[Gl31FuncName::ActiveShaderProgram] = pvr::lib::getLibFunctionChecked(lib, "glActiveShaderProgram"); - FunctionTable[Gl31FuncName::CreateShaderProgramv] = pvr::lib::getLibFunctionChecked(lib, "glCreateShaderProgramv"); - FunctionTable[Gl31FuncName::BindProgramPipeline] = pvr::lib::getLibFunctionChecked(lib, "glBindProgramPipeline"); - FunctionTable[Gl31FuncName::DeleteProgramPipelines] = pvr::lib::getLibFunctionChecked(lib, "glDeleteProgramPipelines"); - FunctionTable[Gl31FuncName::GenProgramPipelines] = pvr::lib::getLibFunctionChecked(lib, "glGenProgramPipelines"); - FunctionTable[Gl31FuncName::IsProgramPipeline] = pvr::lib::getLibFunctionChecked(lib, "glIsProgramPipeline"); - FunctionTable[Gl31FuncName::GetProgramPipelineiv] = pvr::lib::getLibFunctionChecked(lib, "glGetProgramPipelineiv"); - FunctionTable[Gl31FuncName::ProgramUniform1i] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniform1i"); - FunctionTable[Gl31FuncName::ProgramUniform2i] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniform2i"); - FunctionTable[Gl31FuncName::ProgramUniform3i] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniform3i"); - FunctionTable[Gl31FuncName::ProgramUniform4i] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniform4i"); - FunctionTable[Gl31FuncName::ProgramUniform1ui] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniform1ui"); - FunctionTable[Gl31FuncName::ProgramUniform2ui] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniform2ui"); - FunctionTable[Gl31FuncName::ProgramUniform3ui] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniform3ui"); - FunctionTable[Gl31FuncName::ProgramUniform4ui] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniform4ui"); - FunctionTable[Gl31FuncName::ProgramUniform1f] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniform1f"); - FunctionTable[Gl31FuncName::ProgramUniform2f] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniform2f"); - FunctionTable[Gl31FuncName::ProgramUniform3f] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniform3f"); - FunctionTable[Gl31FuncName::ProgramUniform4f] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniform4f"); - FunctionTable[Gl31FuncName::ProgramUniform1iv] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniform1iv"); - FunctionTable[Gl31FuncName::ProgramUniform2iv] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniform2iv"); - FunctionTable[Gl31FuncName::ProgramUniform3iv] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniform3iv"); - FunctionTable[Gl31FuncName::ProgramUniform4iv] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniform4iv"); - FunctionTable[Gl31FuncName::ProgramUniform1uiv] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniform1uiv"); - FunctionTable[Gl31FuncName::ProgramUniform2uiv] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniform2uiv"); - FunctionTable[Gl31FuncName::ProgramUniform3uiv] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniform3uiv"); - FunctionTable[Gl31FuncName::ProgramUniform4uiv] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniform4uiv"); - FunctionTable[Gl31FuncName::ProgramUniform1fv] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniform1fv"); - FunctionTable[Gl31FuncName::ProgramUniform2fv] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniform2fv"); - FunctionTable[Gl31FuncName::ProgramUniform3fv] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniform3fv"); - FunctionTable[Gl31FuncName::ProgramUniform4fv] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniform4fv"); - FunctionTable[Gl31FuncName::ProgramUniformMatrix2fv] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniformMatrix2fv"); - FunctionTable[Gl31FuncName::ProgramUniformMatrix3fv] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniformMatrix3fv"); - FunctionTable[Gl31FuncName::ProgramUniformMatrix4fv] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniformMatrix4fv"); - FunctionTable[Gl31FuncName::ProgramUniformMatrix2x3fv] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniformMatrix2x3fv"); - FunctionTable[Gl31FuncName::ProgramUniformMatrix3x2fv] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniformMatrix3x2fv"); - FunctionTable[Gl31FuncName::ProgramUniformMatrix2x4fv] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniformMatrix2x4fv"); - FunctionTable[Gl31FuncName::ProgramUniformMatrix4x2fv] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniformMatrix4x2fv"); - FunctionTable[Gl31FuncName::ProgramUniformMatrix3x4fv] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniformMatrix3x4fv"); - FunctionTable[Gl31FuncName::ProgramUniformMatrix4x3fv] = pvr::lib::getLibFunctionChecked(lib, "glProgramUniformMatrix4x3fv"); - FunctionTable[Gl31FuncName::ValidateProgramPipeline] = pvr::lib::getLibFunctionChecked(lib, "glValidateProgramPipeline"); - FunctionTable[Gl31FuncName::GetProgramPipelineInfoLog] = pvr::lib::getLibFunctionChecked(lib, "glGetProgramPipelineInfoLog"); - FunctionTable[Gl31FuncName::BindImageTexture] = pvr::lib::getLibFunctionChecked(lib, "glBindImageTexture"); - FunctionTable[Gl31FuncName::GetBooleani_v] = pvr::lib::getLibFunctionChecked(lib, "glGetBooleani_v"); - FunctionTable[Gl31FuncName::MemoryBarrier] = pvr::lib::getLibFunctionChecked(lib, "glMemoryBarrier"); - FunctionTable[Gl31FuncName::MemoryBarrierByRegion] = pvr::lib::getLibFunctionChecked(lib, "glMemoryBarrierByRegion"); - FunctionTable[Gl31FuncName::TexStorage2DMultisample] = pvr::lib::getLibFunctionChecked(lib, "glTexStorage2DMultisample"); - FunctionTable[Gl31FuncName::GetMultisamplefv] = pvr::lib::getLibFunctionChecked(lib, "glGetMultisamplefv"); - FunctionTable[Gl31FuncName::SampleMaski] = pvr::lib::getLibFunctionChecked(lib, "glSampleMaski"); - FunctionTable[Gl31FuncName::GetTexLevelParameteriv] = pvr::lib::getLibFunctionChecked(lib, "glGetTexLevelParameteriv"); - FunctionTable[Gl31FuncName::GetTexLevelParameterfv] = pvr::lib::getLibFunctionChecked(lib, "glGetTexLevelParameterfv"); - FunctionTable[Gl31FuncName::BindVertexBuffer] = pvr::lib::getLibFunctionChecked(lib, "glBindVertexBuffer"); - FunctionTable[Gl31FuncName::VertexAttribFormat] = pvr::lib::getLibFunctionChecked(lib, "glVertexAttribFormat"); - FunctionTable[Gl31FuncName::VertexAttribIFormat] = pvr::lib::getLibFunctionChecked(lib, "glVertexAttribIFormat"); - FunctionTable[Gl31FuncName::VertexAttribBinding] = pvr::lib::getLibFunctionChecked(lib, "glVertexAttribBinding"); - FunctionTable[Gl31FuncName::VertexBindingDivisor] = pvr::lib::getLibFunctionChecked(lib, "glVertexBindingDivisor"); - } -#endif - return FunctionTable[funcname]; -} -} -} - -/************ OPENGL ES API ************/ -#ifndef DYNAMICGLES_NO_NAMESPACE -namespace gl { -#elif TARGET_OS_IPHONE -namespace gl { -namespace internals { -#endif -inline void DYNAMICGLES_FUNCTION(DispatchCompute)(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLDISPATCHCOMPUTEPROC _DispatchCompute = (PFNGLDISPATCHCOMPUTEPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::DispatchCompute); - return _DispatchCompute(num_groups_x, num_groups_y, num_groups_z); -#endif -} -inline void DYNAMICGLES_FUNCTION(DispatchComputeIndirect)(GLintptr indirect) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLDISPATCHCOMPUTEINDIRECTPROC _DispatchComputeIndirect = (PFNGLDISPATCHCOMPUTEINDIRECTPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::DispatchComputeIndirect); - return _DispatchComputeIndirect(indirect); -#endif -} -inline void DYNAMICGLES_FUNCTION(DrawArraysIndirect)(GLenum mode, const void* indirect) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLDRAWARRAYSINDIRECTPROC _DrawArraysIndirect = (PFNGLDRAWARRAYSINDIRECTPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::DrawArraysIndirect); - return _DrawArraysIndirect(mode, indirect); -#endif -} -inline void DYNAMICGLES_FUNCTION(DrawElementsIndirect)(GLenum mode, GLenum type, const void* indirect) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLDRAWELEMENTSINDIRECTPROC _DrawElementsIndirect = (PFNGLDRAWELEMENTSINDIRECTPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::DrawElementsIndirect); - return _DrawElementsIndirect(mode, type, indirect); -#endif -} -inline void DYNAMICGLES_FUNCTION(FramebufferParameteri)(GLenum target, GLenum pname, GLint param) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLFRAMEBUFFERPARAMETERIPROC _FramebufferParameteri = (PFNGLFRAMEBUFFERPARAMETERIPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::FramebufferParameteri); - return _FramebufferParameteri(target, pname, param); -#endif -} -inline void DYNAMICGLES_FUNCTION(GetFramebufferParameteriv)(GLenum target, GLenum pname, GLint* params) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETFRAMEBUFFERPARAMETERIVPROC _GetFramebufferParameteriv = (PFNGLGETFRAMEBUFFERPARAMETERIVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::GetFramebufferParameteriv); - return _GetFramebufferParameteriv(target, pname, params); -#endif -} -inline void DYNAMICGLES_FUNCTION(GetProgramInterfaceiv)(GLuint program, GLenum programInterface, GLenum pname, GLint* params) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETPROGRAMINTERFACEIVPROC _GetProgramInterfaceiv = (PFNGLGETPROGRAMINTERFACEIVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::GetProgramInterfaceiv); - return _GetProgramInterfaceiv(program, programInterface, pname, params); -#endif -} -inline GLuint DYNAMICGLES_FUNCTION(GetProgramResourceIndex)(GLuint program, GLenum programInterface, const GLchar* name) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETPROGRAMRESOURCEINDEXPROC _GetProgramResourceIndex = (PFNGLGETPROGRAMRESOURCEINDEXPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::GetProgramResourceIndex); - return _GetProgramResourceIndex(program, programInterface, name); -#endif -} -inline void DYNAMICGLES_FUNCTION(GetProgramResourceName)(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei* length, GLchar* name) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETPROGRAMRESOURCENAMEPROC _GetProgramResourceName = (PFNGLGETPROGRAMRESOURCENAMEPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::GetProgramResourceName); - return _GetProgramResourceName(program, programInterface, index, bufSize, length, name); -#endif - -} -inline void DYNAMICGLES_FUNCTION(GetProgramResourceiv)(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum* props, GLsizei bufSize, GLsizei* length, GLint* params) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETPROGRAMRESOURCEIVPROC _GetProgramResourceiv = (PFNGLGETPROGRAMRESOURCEIVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::GetProgramResourceiv); - return _GetProgramResourceiv(program, programInterface, index, propCount, props, bufSize, length, params); -#endif -} -inline GLint DYNAMICGLES_FUNCTION(GetProgramResourceLocation)(GLuint program, GLenum programInterface, const GLchar* name) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETPROGRAMRESOURCELOCATIONPROC _GetProgramResourceLocation = (PFNGLGETPROGRAMRESOURCELOCATIONPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::GetProgramResourceLocation); - return _GetProgramResourceLocation(program, programInterface, name); -#endif -} -inline void DYNAMICGLES_FUNCTION(UseProgramStages)(GLuint pipeline, GLbitfield stages, GLuint program) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLUSEPROGRAMSTAGESPROC _UseProgramStages = (PFNGLUSEPROGRAMSTAGESPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::UseProgramStages); - return _UseProgramStages(pipeline, stages, program); -#endif -} -inline void DYNAMICGLES_FUNCTION(ActiveShaderProgram)(GLuint pipeline, GLuint program) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLACTIVESHADERPROGRAMPROC _ActiveShaderProgram = (PFNGLACTIVESHADERPROGRAMPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ActiveShaderProgram); - return _ActiveShaderProgram(pipeline, program); -#endif -} -inline GLuint DYNAMICGLES_FUNCTION(CreateShaderProgramv)(GLenum type, GLsizei count, const GLchar* const* strings) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLCREATESHADERPROGRAMVPROC _CreateShaderProgramv = (PFNGLCREATESHADERPROGRAMVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::CreateShaderProgramv); - return _CreateShaderProgramv(type, count, strings); -#endif -} -inline void DYNAMICGLES_FUNCTION(BindProgramPipeline)(GLuint pipeline) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLBINDPROGRAMPIPELINEPROC _BindProgramPipeline = (PFNGLBINDPROGRAMPIPELINEPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::BindProgramPipeline); - return _BindProgramPipeline(pipeline); -#endif -} -inline void DYNAMICGLES_FUNCTION(DeleteProgramPipelines)(GLsizei n, const GLuint* pipelines) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLDELETEPROGRAMPIPELINESPROC _DeleteProgramPipelines = (PFNGLDELETEPROGRAMPIPELINESPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::DeleteProgramPipelines); - return _DeleteProgramPipelines(n, pipelines); -#endif -} -inline void DYNAMICGLES_FUNCTION(GenProgramPipelines)(GLsizei n, GLuint* pipelines) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGENPROGRAMPIPELINESPROC _GenProgramPipelines = (PFNGLGENPROGRAMPIPELINESPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::GenProgramPipelines); - return _GenProgramPipelines(n, pipelines); -#endif -} -inline GLboolean DYNAMICGLES_FUNCTION(IsProgramPipeline)(GLuint pipeline) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLISPROGRAMPIPELINEPROC _IsProgramPipeline = (PFNGLISPROGRAMPIPELINEPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::IsProgramPipeline); - return _IsProgramPipeline(pipeline); -#endif -} -inline void DYNAMICGLES_FUNCTION(GetProgramPipelineiv)(GLuint pipeline, GLenum pname, GLint* params) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETPROGRAMPIPELINEIVPROC _GetProgramPipelineiv = (PFNGLGETPROGRAMPIPELINEIVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::GetProgramPipelineiv); - return _GetProgramPipelineiv(pipeline, pname, params); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform1i)(GLuint program, GLint location, GLint v0) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM1IPROC _ProgramUniform1i = (PFNGLPROGRAMUNIFORM1IPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniform1i); - return _ProgramUniform1i(program, location, v0); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform2i)(GLuint program, GLint location, GLint v0, GLint v1) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM2IPROC _ProgramUniform2i = (PFNGLPROGRAMUNIFORM2IPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniform2i); - return _ProgramUniform2i(program, location, v0, v1); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform3i)(GLuint program, GLint location, GLint v0, GLint v1, GLint v2) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM3IPROC _ProgramUniform3i = (PFNGLPROGRAMUNIFORM3IPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniform3i); - return _ProgramUniform3i(program, location, v0, v1, v2); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform4i)(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM4IPROC _ProgramUniform4i = (PFNGLPROGRAMUNIFORM4IPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniform4i); - return _ProgramUniform4i(program, location, v0, v1, v2, v3); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform1ui)(GLuint program, GLint location, GLuint v0) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM1UIPROC _ProgramUniform1ui = (PFNGLPROGRAMUNIFORM1UIPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniform1ui); - return _ProgramUniform1ui(program, location, v0); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform2ui)(GLuint program, GLint location, GLuint v0, GLuint v1) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM2UIPROC _ProgramUniform2ui = (PFNGLPROGRAMUNIFORM2UIPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniform2ui); - return _ProgramUniform2ui(program, location, v0, v1); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform3ui)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM3UIPROC _ProgramUniform3ui = (PFNGLPROGRAMUNIFORM3UIPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniform3ui); - return _ProgramUniform3ui(program, location, v0, v1, v2); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform4ui)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM4UIPROC _ProgramUniform4ui = (PFNGLPROGRAMUNIFORM4UIPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniform4ui); - return _ProgramUniform4ui(program, location, v0, v1, v2, v3); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform1f)(GLuint program, GLint location, GLfloat v0) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM1FPROC _ProgramUniform1f = (PFNGLPROGRAMUNIFORM1FPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniform1f); - return _ProgramUniform1f(program, location, v0); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform2f)(GLuint program, GLint location, GLfloat v0, GLfloat v1) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM2FPROC _ProgramUniform2f = (PFNGLPROGRAMUNIFORM2FPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniform2f); - return _ProgramUniform2f(program, location, v0, v1); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform3f)(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM3FPROC _ProgramUniform3f = (PFNGLPROGRAMUNIFORM3FPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniform3f); - return _ProgramUniform3f(program, location, v0, v1, v2); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform4f)(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM4FPROC _ProgramUniform4f = (PFNGLPROGRAMUNIFORM4FPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniform4f); - return _ProgramUniform4f(program, location, v0, v1, v2, v3); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform1iv)(GLuint program, GLint location, GLsizei count, const GLint* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM1IVPROC _ProgramUniform1iv = (PFNGLPROGRAMUNIFORM1IVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniform1iv); - return _ProgramUniform1iv(program, location, count, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform2iv)(GLuint program, GLint location, GLsizei count, const GLint* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM2IVPROC _ProgramUniform2iv = (PFNGLPROGRAMUNIFORM2IVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniform2iv); - return _ProgramUniform2iv(program, location, count, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform3iv)(GLuint program, GLint location, GLsizei count, const GLint* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM3IVPROC _ProgramUniform3iv = (PFNGLPROGRAMUNIFORM3IVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniform3iv); - return _ProgramUniform3iv(program, location, count, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform4iv)(GLuint program, GLint location, GLsizei count, const GLint* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM4IVPROC _ProgramUniform4iv = (PFNGLPROGRAMUNIFORM4IVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniform4iv); - return _ProgramUniform4iv(program, location, count, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform1uiv)(GLuint program, GLint location, GLsizei count, const GLuint* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM1UIVPROC _ProgramUniform1uiv = (PFNGLPROGRAMUNIFORM1UIVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniform1uiv); - return _ProgramUniform1uiv(program, location, count, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform2uiv)(GLuint program, GLint location, GLsizei count, const GLuint* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM2UIVPROC _ProgramUniform2uiv = (PFNGLPROGRAMUNIFORM2UIVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniform2uiv); - return _ProgramUniform2uiv(program, location, count, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform3uiv)(GLuint program, GLint location, GLsizei count, const GLuint* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM3UIVPROC _ProgramUniform3uiv = (PFNGLPROGRAMUNIFORM3UIVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniform3uiv); - return _ProgramUniform3uiv(program, location, count, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform4uiv)(GLuint program, GLint location, GLsizei count, const GLuint* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM4UIVPROC _ProgramUniform4uiv = (PFNGLPROGRAMUNIFORM4UIVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniform4uiv); - return _ProgramUniform4uiv(program, location, count, value); - -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform1fv)(GLuint program, GLint location, GLsizei count, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM1FVPROC _ProgramUniform1fv = (PFNGLPROGRAMUNIFORM1FVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniform1fv); - return _ProgramUniform1fv(program, location, count, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform2fv)(GLuint program, GLint location, GLsizei count, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM2FVPROC _ProgramUniform2fv = (PFNGLPROGRAMUNIFORM2FVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniform2fv); - return _ProgramUniform2fv(program, location, count, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform3fv)(GLuint program, GLint location, GLsizei count, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM3FVPROC _ProgramUniform3fv = (PFNGLPROGRAMUNIFORM3FVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniform3fv); - return _ProgramUniform3fv(program, location, count, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform4fv)(GLuint program, GLint location, GLsizei count, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM4FVPROC _ProgramUniform4fv = (PFNGLPROGRAMUNIFORM4FVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniform4fv); - return _ProgramUniform4fv(program, location, count, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniformMatrix2fv)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORMMATRIX2FVPROC _ProgramUniformMatrix2fv = (PFNGLPROGRAMUNIFORMMATRIX2FVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniformMatrix2fv); - return _ProgramUniformMatrix2fv(program, location, count, transpose, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniformMatrix3fv)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORMMATRIX3FVPROC _ProgramUniformMatrix3fv = (PFNGLPROGRAMUNIFORMMATRIX3FVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniformMatrix3fv); - return _ProgramUniformMatrix3fv(program, location, count, transpose, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniformMatrix4fv)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORMMATRIX4FVPROC _ProgramUniformMatrix4fv = (PFNGLPROGRAMUNIFORMMATRIX4FVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniformMatrix4fv); - return _ProgramUniformMatrix4fv(program, location, count, transpose, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniformMatrix2x3fv)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC _ProgramUniformMatrix2x3fv = (PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniformMatrix2x3fv); - return _ProgramUniformMatrix2x3fv(program, location, count, transpose, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniformMatrix3x2fv)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC _ProgramUniformMatrix3x2fv = (PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniformMatrix3x2fv); - return _ProgramUniformMatrix3x2fv(program, location, count, transpose, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniformMatrix2x4fv)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC _ProgramUniformMatrix2x4fv = (PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniformMatrix2x4fv); - return _ProgramUniformMatrix2x4fv(program, location, count, transpose, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniformMatrix4x2fv)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC _ProgramUniformMatrix4x2fv = (PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniformMatrix4x2fv); - return _ProgramUniformMatrix4x2fv(program, location, count, transpose, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniformMatrix3x4fv)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC _ProgramUniformMatrix3x4fv = (PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniformMatrix3x4fv); - return _ProgramUniformMatrix3x4fv(program, location, count, transpose, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniformMatrix4x3fv)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC _ProgramUniformMatrix4x3fv = (PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ProgramUniformMatrix4x3fv); - return _ProgramUniformMatrix4x3fv(program, location, count, transpose, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ValidateProgramPipeline)(GLuint pipeline) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLVALIDATEPROGRAMPIPELINEPROC _ValidateProgramPipeline = (PFNGLVALIDATEPROGRAMPIPELINEPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::ValidateProgramPipeline); - return _ValidateProgramPipeline(pipeline); -#endif -} -inline void DYNAMICGLES_FUNCTION(GetProgramPipelineInfoLog)(GLuint pipeline, GLsizei bufSize, GLsizei* length, GLchar* infoLog) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETPROGRAMPIPELINEINFOLOGPROC _GetProgramPipelineInfoLog = (PFNGLGETPROGRAMPIPELINEINFOLOGPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::GetProgramPipelineInfoLog); - return _GetProgramPipelineInfoLog(pipeline, bufSize, length, infoLog); -#endif - -} -inline void DYNAMICGLES_FUNCTION(BindImageTexture)(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLBINDIMAGETEXTUREPROC _BindImageTexture = (PFNGLBINDIMAGETEXTUREPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::BindImageTexture); - return _BindImageTexture(unit, texture, level, layered, layer, access, format); -#endif -} -inline void DYNAMICGLES_FUNCTION(GetBooleani_v)(GLenum target, GLuint index, GLboolean* data) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETBOOLEANI_VPROC _GetBooleani_v = (PFNGLGETBOOLEANI_VPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::GetBooleani_v); - return _GetBooleani_v(target, index, data); -#endif -} -inline void DYNAMICGLES_FUNCTION(MemoryBarrier)(GLbitfield barriers) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLMEMORYBARRIERPROC _MemoryBarrier = (PFNGLMEMORYBARRIERPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::MemoryBarrier); - return _MemoryBarrier(barriers); -#endif -} -inline void DYNAMICGLES_FUNCTION(MemoryBarrierByRegion)(GLbitfield barriers) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLMEMORYBARRIERBYREGIONPROC _MemoryBarrierByRegion = (PFNGLMEMORYBARRIERBYREGIONPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::MemoryBarrierByRegion); - return _MemoryBarrierByRegion(barriers); -#endif -} -inline void DYNAMICGLES_FUNCTION(TexStorage2DMultisample)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLTEXSTORAGE2DMULTISAMPLEPROC _TexStorage2DMultisample = (PFNGLTEXSTORAGE2DMULTISAMPLEPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::TexStorage2DMultisample); - return _TexStorage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); -#endif -} -inline void DYNAMICGLES_FUNCTION(GetMultisamplefv)(GLenum pname, GLuint index, GLfloat* val) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETMULTISAMPLEFVPROC _GetMultisamplefv = (PFNGLGETMULTISAMPLEFVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::GetMultisamplefv); - return _GetMultisamplefv(pname, index, val); -#endif -} -inline void DYNAMICGLES_FUNCTION(SampleMaski)(GLuint maskNumber, GLbitfield mask) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLSAMPLEMASKIPROC _SampleMaski = (PFNGLSAMPLEMASKIPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::SampleMaski); - return _SampleMaski(maskNumber, mask); -#endif -} -inline void DYNAMICGLES_FUNCTION(GetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint* params) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETTEXLEVELPARAMETERIVPROC _GetTexLevelParameteriv = (PFNGLGETTEXLEVELPARAMETERIVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::GetTexLevelParameteriv); - return _GetTexLevelParameteriv(target, level, pname, params); -#endif -} -inline void DYNAMICGLES_FUNCTION(GetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat* params) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETTEXLEVELPARAMETERFVPROC _GetTexLevelParameterfv = (PFNGLGETTEXLEVELPARAMETERFVPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::GetTexLevelParameterfv); - return _GetTexLevelParameterfv(target, level, pname, params); -#endif -} -inline void DYNAMICGLES_FUNCTION(BindVertexBuffer)(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLBINDVERTEXBUFFERPROC _BindVertexBuffer = (PFNGLBINDVERTEXBUFFERPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::BindVertexBuffer); - return _BindVertexBuffer(bindingindex, buffer, offset, stride); -#endif -} -inline void DYNAMICGLES_FUNCTION(VertexAttribFormat)(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLVERTEXATTRIBFORMATPROC _VertexAttribFormat = (PFNGLVERTEXATTRIBFORMATPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::VertexAttribFormat); - return _VertexAttribFormat(attribindex, size, type, normalized, relativeoffset); -#endif -} -inline void DYNAMICGLES_FUNCTION(VertexAttribIFormat)(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLVERTEXATTRIBIFORMATPROC _VertexAttribIFormat = (PFNGLVERTEXATTRIBIFORMATPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::VertexAttribIFormat); - return _VertexAttribIFormat(attribindex, size, type, relativeoffset); -#endif -} -inline void DYNAMICGLES_FUNCTION(VertexAttribBinding)(GLuint attribindex, GLuint bindingindex) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLVERTEXATTRIBBINDINGPROC _VertexAttribBinding = (PFNGLVERTEXATTRIBBINDINGPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::VertexAttribBinding); - return _VertexAttribBinding(attribindex, bindingindex); -#endif -} -inline void DYNAMICGLES_FUNCTION(VertexBindingDivisor)(GLuint bindingindex, GLuint divisor) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLVERTEXBINDINGDIVISORPROC _VertexBindingDivisor = (PFNGLVERTEXBINDINGDIVISORPROC)gl::internals::getEs31Function(gl::internals::Gl31FuncName::VertexBindingDivisor); - return _VertexBindingDivisor(bindingindex, divisor); -#endif -} -#ifndef DYNAMICGLES_NO_NAMESPACE -} -#elif TARGET_OS_IPHONE -} -} -#endif - - -namespace gl { -namespace internals { -namespace Gl3FuncName { -enum OpenGLES3FunctionName -{ - //// OPENGL ES 3 //// - - ReadBuffer, DrawRangeElements, TexImage3D, TexSubImage3D, CopyTexSubImage3D, CompressedTexImage3D, CompressedTexSubImage3D, GenQueries, DeleteQueries, IsQuery, - BeginQuery, EndQuery, GetQueryiv, GetQueryObjectuiv, UnmapBuffer, GetBufferPointerv, DrawBuffers, UniformMatrix2x3fv, UniformMatrix3x2fv, UniformMatrix2x4fv, - UniformMatrix4x2fv, UniformMatrix3x4fv, UniformMatrix4x3fv, BlitFramebuffer, RenderbufferStorageMultisample, FramebufferTextureLayer, MapBufferRange, - FlushMappedBufferRange, BindVertexArray, DeleteVertexArrays, GenVertexArrays, IsVertexArray, GetIntegeri_v, BeginTransformFeedback, EndTransformFeedback, - BindBufferRange, BindBufferBase, TransformFeedbackVaryings, GetTransformFeedbackVarying, VertexAttribIPointer, GetVertexAttribIiv, GetVertexAttribIuiv, - VertexAttribI4i, VertexAttribI4ui, VertexAttribI4iv, VertexAttribI4uiv, GetUniformuiv, GetFragDataLocation, Uniform1ui, Uniform2ui, Uniform3ui, Uniform4ui, - Uniform1uiv, Uniform2uiv, Uniform3uiv, Uniform4uiv, ClearBufferiv, ClearBufferuiv, ClearBufferfv, ClearBufferfi, GetStringi, CopyBufferSubData, GetUniformIndices, - GetActiveUniformsiv, GetUniformBlockIndex, GetActiveUniformBlockiv, GetActiveUniformBlockName, UniformBlockBinding, DrawArraysInstanced, DrawElementsInstanced, - FenceSync, IsSync, DeleteSync, ClientWaitSync, WaitSync, GetInteger64v, GetSynciv, GetInteger64i_v, GetBufferParameteri64v, GenSamplers, DeleteSamplers, IsSampler, - BindSampler, SamplerParameteri, SamplerParameteriv, SamplerParameterf, SamplerParameterfv, GetSamplerParameteriv, GetSamplerParameterfv, VertexAttribDivisor, - BindTransformFeedback, DeleteTransformFeedbacks, GenTransformFeedbacks, IsTransformFeedback, PauseTransformFeedback, ResumeTransformFeedback, GetProgramBinary, - ProgramBinary, ProgramParameteri, InvalidateFramebuffer, InvalidateSubFramebuffer, TexStorage2D, TexStorage3D, GetInternalformativ, - NUMBER_OF_OPENGLES3_FUNCTIONS -}; -} - -inline void* getEs3Function(gl::internals::Gl3FuncName::OpenGLES3FunctionName funcname) -{ - static void* FunctionTable[Gl3FuncName::NUMBER_OF_OPENGLES3_FUNCTIONS]; - - // GET FUNCTION POINTERS --- ONCE!!!! /// - if (!FunctionTable[0]) - { -#if !TARGET_OS_IPHONE - pvr::lib::LIBTYPE lib = pvr::lib::openlib(gl::internals::libName); - if (!lib) - { - Log_Error("OpenGL ES Bindings: Failed to open library %s\n", gl::internals::libName); - } - else - { - Log_Info("OpenGL ES Bindings: Successfully loaded library %s for OpenGL ES 3.0\n", gl::internals::libName); - } - FunctionTable[Gl3FuncName::ReadBuffer] = pvr::lib::getLibFunctionChecked(lib, "glReadBuffer"); - FunctionTable[Gl3FuncName::DrawRangeElements] = pvr::lib::getLibFunctionChecked(lib, "glDrawRangeElements"); - FunctionTable[Gl3FuncName::TexImage3D] = pvr::lib::getLibFunctionChecked(lib, "glTexImage3D"); - FunctionTable[Gl3FuncName::TexSubImage3D] = pvr::lib::getLibFunctionChecked(lib, "glTexSubImage3D"); - FunctionTable[Gl3FuncName::CopyTexSubImage3D] = pvr::lib::getLibFunctionChecked(lib, "glCopyTexSubImage3D"); - FunctionTable[Gl3FuncName::CompressedTexImage3D] = pvr::lib::getLibFunctionChecked(lib, "glCompressedTexImage3D"); - FunctionTable[Gl3FuncName::CompressedTexSubImage3D] = pvr::lib::getLibFunctionChecked(lib, "glCompressedTexSubImage3D"); - FunctionTable[Gl3FuncName::GenQueries] = pvr::lib::getLibFunctionChecked(lib, "glGenQueries"); - FunctionTable[Gl3FuncName::DeleteQueries] = pvr::lib::getLibFunctionChecked(lib, "glDeleteQueries"); - FunctionTable[Gl3FuncName::IsQuery] = pvr::lib::getLibFunctionChecked(lib, "glIsQuery"); - FunctionTable[Gl3FuncName::BeginQuery] = pvr::lib::getLibFunctionChecked(lib, "glBeginQuery"); - FunctionTable[Gl3FuncName::EndQuery] = pvr::lib::getLibFunctionChecked(lib, "glEndQuery"); - FunctionTable[Gl3FuncName::GetQueryiv] = pvr::lib::getLibFunctionChecked(lib, "glGetQueryiv"); - FunctionTable[Gl3FuncName::GetQueryObjectuiv] = pvr::lib::getLibFunctionChecked(lib, "glGetQueryObjectuiv"); - FunctionTable[Gl3FuncName::UnmapBuffer] = pvr::lib::getLibFunctionChecked(lib, "glUnmapBuffer"); - FunctionTable[Gl3FuncName::GetBufferPointerv] = pvr::lib::getLibFunctionChecked(lib, "glGetBufferPointerv"); - FunctionTable[Gl3FuncName::DrawBuffers] = pvr::lib::getLibFunctionChecked(lib, "glDrawBuffers"); - FunctionTable[Gl3FuncName::UniformMatrix2x3fv] = pvr::lib::getLibFunctionChecked(lib, "glUniformMatrix2x3fv"); - FunctionTable[Gl3FuncName::UniformMatrix3x2fv] = pvr::lib::getLibFunctionChecked(lib, "glUniformMatrix3x2fv"); - FunctionTable[Gl3FuncName::UniformMatrix2x4fv] = pvr::lib::getLibFunctionChecked(lib, "glUniformMatrix2x4fv"); - FunctionTable[Gl3FuncName::UniformMatrix4x2fv] = pvr::lib::getLibFunctionChecked(lib, "glUniformMatrix4x2fv"); - FunctionTable[Gl3FuncName::UniformMatrix3x4fv] = pvr::lib::getLibFunctionChecked(lib, "glUniformMatrix3x4fv"); - FunctionTable[Gl3FuncName::UniformMatrix4x3fv] = pvr::lib::getLibFunctionChecked(lib, "glUniformMatrix4x3fv"); - FunctionTable[Gl3FuncName::BlitFramebuffer] = pvr::lib::getLibFunctionChecked(lib, "glBlitFramebuffer"); - FunctionTable[Gl3FuncName::RenderbufferStorageMultisample] = pvr::lib::getLibFunctionChecked(lib, "glRenderbufferStorageMultisample"); - FunctionTable[Gl3FuncName::FramebufferTextureLayer] = pvr::lib::getLibFunctionChecked(lib, "glFramebufferTextureLayer"); - FunctionTable[Gl3FuncName::MapBufferRange] = pvr::lib::getLibFunctionChecked(lib, "glMapBufferRange"); - FunctionTable[Gl3FuncName::FlushMappedBufferRange] = pvr::lib::getLibFunctionChecked(lib, "glFlushMappedBufferRange"); - FunctionTable[Gl3FuncName::BindVertexArray] = pvr::lib::getLibFunctionChecked(lib, "glBindVertexArray"); - FunctionTable[Gl3FuncName::DeleteVertexArrays] = pvr::lib::getLibFunctionChecked(lib, "glDeleteVertexArrays"); - FunctionTable[Gl3FuncName::GenVertexArrays] = pvr::lib::getLibFunctionChecked(lib, "glGenVertexArrays"); - FunctionTable[Gl3FuncName::IsVertexArray] = pvr::lib::getLibFunctionChecked(lib, "glIsVertexArray"); - FunctionTable[Gl3FuncName::GetIntegeri_v] = pvr::lib::getLibFunctionChecked(lib, "glGetIntegeri_v"); - FunctionTable[Gl3FuncName::BeginTransformFeedback] = pvr::lib::getLibFunctionChecked(lib, "glBeginTransformFeedback"); - FunctionTable[Gl3FuncName::EndTransformFeedback] = pvr::lib::getLibFunctionChecked(lib, "glEndTransformFeedback"); - FunctionTable[Gl3FuncName::BindBufferRange] = pvr::lib::getLibFunctionChecked(lib, "glBindBufferRange"); - FunctionTable[Gl3FuncName::BindBufferBase] = pvr::lib::getLibFunctionChecked(lib, "glBindBufferBase"); - FunctionTable[Gl3FuncName::TransformFeedbackVaryings] = pvr::lib::getLibFunctionChecked(lib, "glTransformFeedbackVaryings"); - FunctionTable[Gl3FuncName::GetTransformFeedbackVarying] = pvr::lib::getLibFunctionChecked(lib, "glGetTransformFeedbackVarying"); - FunctionTable[Gl3FuncName::VertexAttribIPointer] = pvr::lib::getLibFunctionChecked(lib, "glVertexAttribIPointer"); - FunctionTable[Gl3FuncName::GetVertexAttribIiv] = pvr::lib::getLibFunctionChecked(lib, "glGetVertexAttribIiv"); - FunctionTable[Gl3FuncName::GetVertexAttribIuiv] = pvr::lib::getLibFunctionChecked(lib, "glGetVertexAttribIuiv"); - FunctionTable[Gl3FuncName::VertexAttribI4i] = pvr::lib::getLibFunctionChecked(lib, "glVertexAttribI4i"); - FunctionTable[Gl3FuncName::VertexAttribI4ui] = pvr::lib::getLibFunctionChecked(lib, "glVertexAttribI4ui"); - FunctionTable[Gl3FuncName::VertexAttribI4iv] = pvr::lib::getLibFunctionChecked(lib, "glVertexAttribI4iv"); - FunctionTable[Gl3FuncName::VertexAttribI4uiv] = pvr::lib::getLibFunctionChecked(lib, "glVertexAttribI4uiv"); - FunctionTable[Gl3FuncName::GetUniformuiv] = pvr::lib::getLibFunctionChecked(lib, "glGetUniformuiv"); - FunctionTable[Gl3FuncName::GetFragDataLocation] = pvr::lib::getLibFunctionChecked(lib, "glGetFragDataLocation"); - FunctionTable[Gl3FuncName::Uniform1ui] = pvr::lib::getLibFunctionChecked(lib, "glUniform1ui"); - FunctionTable[Gl3FuncName::Uniform2ui] = pvr::lib::getLibFunctionChecked(lib, "glUniform2ui"); - FunctionTable[Gl3FuncName::Uniform3ui] = pvr::lib::getLibFunctionChecked(lib, "glUniform3ui"); - FunctionTable[Gl3FuncName::Uniform4ui] = pvr::lib::getLibFunctionChecked(lib, "glUniform4ui"); - FunctionTable[Gl3FuncName::Uniform1uiv] = pvr::lib::getLibFunctionChecked(lib, "glUniform1uiv"); - FunctionTable[Gl3FuncName::Uniform2uiv] = pvr::lib::getLibFunctionChecked(lib, "glUniform2uiv"); - FunctionTable[Gl3FuncName::Uniform3uiv] = pvr::lib::getLibFunctionChecked(lib, "glUniform3uiv"); - FunctionTable[Gl3FuncName::Uniform4uiv] = pvr::lib::getLibFunctionChecked(lib, "glUniform4uiv"); - FunctionTable[Gl3FuncName::ClearBufferiv] = pvr::lib::getLibFunctionChecked(lib, "glClearBufferiv"); - FunctionTable[Gl3FuncName::ClearBufferuiv] = pvr::lib::getLibFunctionChecked(lib, "glClearBufferuiv"); - FunctionTable[Gl3FuncName::ClearBufferfv] = pvr::lib::getLibFunctionChecked(lib, "glClearBufferfv"); - FunctionTable[Gl3FuncName::ClearBufferfi] = pvr::lib::getLibFunctionChecked(lib, "glClearBufferfi"); - FunctionTable[Gl3FuncName::GetStringi] = pvr::lib::getLibFunctionChecked(lib, "glGetStringi"); - FunctionTable[Gl3FuncName::CopyBufferSubData] = pvr::lib::getLibFunctionChecked(lib, "glCopyBufferSubData"); - FunctionTable[Gl3FuncName::GetUniformIndices] = pvr::lib::getLibFunctionChecked(lib, "glGetUniformIndices"); - FunctionTable[Gl3FuncName::GetActiveUniformsiv] = pvr::lib::getLibFunctionChecked(lib, "glGetActiveUniformsiv"); - FunctionTable[Gl3FuncName::GetUniformBlockIndex] = pvr::lib::getLibFunctionChecked(lib, "glGetUniformBlockIndex"); - FunctionTable[Gl3FuncName::GetActiveUniformBlockiv] = pvr::lib::getLibFunctionChecked(lib, "glGetActiveUniformBlockiv"); - FunctionTable[Gl3FuncName::GetActiveUniformBlockName] = pvr::lib::getLibFunctionChecked(lib, "glGetActiveUniformBlockName"); - FunctionTable[Gl3FuncName::UniformBlockBinding] = pvr::lib::getLibFunctionChecked(lib, "glUniformBlockBinding"); - FunctionTable[Gl3FuncName::DrawArraysInstanced] = pvr::lib::getLibFunctionChecked(lib, "glDrawArraysInstanced"); - FunctionTable[Gl3FuncName::DrawElementsInstanced] = pvr::lib::getLibFunctionChecked(lib, "glDrawElementsInstanced"); - FunctionTable[Gl3FuncName::FenceSync] = pvr::lib::getLibFunctionChecked(lib, "glFenceSync"); - FunctionTable[Gl3FuncName::IsSync] = pvr::lib::getLibFunctionChecked(lib, "glIsSync"); - FunctionTable[Gl3FuncName::DeleteSync] = pvr::lib::getLibFunctionChecked(lib, "glDeleteSync"); - FunctionTable[Gl3FuncName::ClientWaitSync] = pvr::lib::getLibFunctionChecked(lib, "glClientWaitSync"); - FunctionTable[Gl3FuncName::WaitSync] = pvr::lib::getLibFunctionChecked(lib, "glWaitSync"); - FunctionTable[Gl3FuncName::GetInteger64v] = pvr::lib::getLibFunctionChecked(lib, "glGetInteger64v"); - FunctionTable[Gl3FuncName::GetSynciv] = pvr::lib::getLibFunctionChecked(lib, "glGetSynciv"); - FunctionTable[Gl3FuncName::GetInteger64i_v] = pvr::lib::getLibFunctionChecked(lib, "glGetInteger64i_v"); - FunctionTable[Gl3FuncName::GetBufferParameteri64v] = pvr::lib::getLibFunctionChecked(lib, "glGetBufferParameteri64v"); - FunctionTable[Gl3FuncName::GenSamplers] = pvr::lib::getLibFunctionChecked(lib, "glGenSamplers"); - FunctionTable[Gl3FuncName::DeleteSamplers] = pvr::lib::getLibFunctionChecked(lib, "glDeleteSamplers"); - FunctionTable[Gl3FuncName::IsSampler] = pvr::lib::getLibFunctionChecked(lib, "glIsSampler"); - FunctionTable[Gl3FuncName::BindSampler] = pvr::lib::getLibFunctionChecked(lib, "glBindSampler"); - FunctionTable[Gl3FuncName::SamplerParameteri] = pvr::lib::getLibFunctionChecked(lib, "glSamplerParameteri"); - FunctionTable[Gl3FuncName::SamplerParameteriv] = pvr::lib::getLibFunctionChecked(lib, "glSamplerParameteriv"); - FunctionTable[Gl3FuncName::SamplerParameterf] = pvr::lib::getLibFunctionChecked(lib, "glSamplerParameterf"); - FunctionTable[Gl3FuncName::SamplerParameterfv] = pvr::lib::getLibFunctionChecked(lib, "glSamplerParameterfv"); - FunctionTable[Gl3FuncName::GetSamplerParameteriv] = pvr::lib::getLibFunctionChecked(lib, "glGetSamplerParameteriv"); - FunctionTable[Gl3FuncName::GetSamplerParameterfv] = pvr::lib::getLibFunctionChecked(lib, "glGetSamplerParameterfv"); - FunctionTable[Gl3FuncName::VertexAttribDivisor] = pvr::lib::getLibFunctionChecked(lib, "glVertexAttribDivisor"); - FunctionTable[Gl3FuncName::BindTransformFeedback] = pvr::lib::getLibFunctionChecked(lib, "glBindTransformFeedback"); - FunctionTable[Gl3FuncName::DeleteTransformFeedbacks] = pvr::lib::getLibFunctionChecked(lib, "glDeleteTransformFeedbacks"); - FunctionTable[Gl3FuncName::GenTransformFeedbacks] = pvr::lib::getLibFunctionChecked(lib, "glGenTransformFeedbacks"); - FunctionTable[Gl3FuncName::IsTransformFeedback] = pvr::lib::getLibFunctionChecked(lib, "glIsTransformFeedback"); - FunctionTable[Gl3FuncName::PauseTransformFeedback] = pvr::lib::getLibFunctionChecked(lib, "glPauseTransformFeedback"); - FunctionTable[Gl3FuncName::ResumeTransformFeedback] = pvr::lib::getLibFunctionChecked(lib, "glResumeTransformFeedback"); - FunctionTable[Gl3FuncName::GetProgramBinary] = pvr::lib::getLibFunctionChecked(lib, "glGetProgramBinary"); - FunctionTable[Gl3FuncName::ProgramBinary] = pvr::lib::getLibFunctionChecked(lib, "glProgramBinary"); - FunctionTable[Gl3FuncName::ProgramParameteri] = pvr::lib::getLibFunctionChecked(lib, "glProgramParameteri"); - FunctionTable[Gl3FuncName::InvalidateFramebuffer] = pvr::lib::getLibFunctionChecked(lib, "glInvalidateFramebuffer"); - FunctionTable[Gl3FuncName::InvalidateSubFramebuffer] = pvr::lib::getLibFunctionChecked(lib, "glInvalidateSubFramebuffer"); - FunctionTable[Gl3FuncName::TexStorage2D] = pvr::lib::getLibFunctionChecked(lib, "glTexStorage2D"); - FunctionTable[Gl3FuncName::TexStorage3D] = pvr::lib::getLibFunctionChecked(lib, "glTexStorage3D"); - FunctionTable[Gl3FuncName::GetInternalformativ] = pvr::lib::getLibFunctionChecked(lib, "glGetInternalformativ"); -#else - FunctionTable[Gl3FuncName::ReadBuffer] = (void*)&glReadBuffer; - FunctionTable[Gl3FuncName::DrawRangeElements] = (void*)&glDrawRangeElements; - FunctionTable[Gl3FuncName::TexImage3D] = (void*)&glTexImage3D; - FunctionTable[Gl3FuncName::TexSubImage3D] = (void*)&glTexSubImage3D; - FunctionTable[Gl3FuncName::CopyTexSubImage3D] = (void*)&glCopyTexSubImage3D; - FunctionTable[Gl3FuncName::CompressedTexImage3D] = (void*)&glCompressedTexImage3D; - FunctionTable[Gl3FuncName::CompressedTexSubImage3D] = (void*)&glCompressedTexSubImage3D; - FunctionTable[Gl3FuncName::GenQueries] = (void*)&glGenQueries; - FunctionTable[Gl3FuncName::DeleteQueries] = (void*)&glDeleteQueries; - FunctionTable[Gl3FuncName::IsQuery] = (void*)&glIsQuery; - FunctionTable[Gl3FuncName::BeginQuery] = (void*)&glBeginQuery; - FunctionTable[Gl3FuncName::EndQuery] = (void*)&glEndQuery; - FunctionTable[Gl3FuncName::GetQueryiv] = (void*)&glGetQueryiv; - FunctionTable[Gl3FuncName::GetQueryObjectuiv] = (void*)&glGetQueryObjectuiv; - FunctionTable[Gl3FuncName::UnmapBuffer] = (void*)&glUnmapBuffer; - FunctionTable[Gl3FuncName::GetBufferPointerv] = (void*)&glGetBufferPointerv; - FunctionTable[Gl3FuncName::DrawBuffers] = (void*)&glDrawBuffers; - FunctionTable[Gl3FuncName::UniformMatrix2x3fv] = (void*)&glUniformMatrix2x3fv; - FunctionTable[Gl3FuncName::UniformMatrix3x2fv] = (void*)&glUniformMatrix3x2fv; - FunctionTable[Gl3FuncName::UniformMatrix2x4fv] = (void*)&glUniformMatrix2x4fv; - FunctionTable[Gl3FuncName::UniformMatrix4x2fv] = (void*)&glUniformMatrix4x2fv; - FunctionTable[Gl3FuncName::UniformMatrix3x4fv] = (void*)&glUniformMatrix3x4fv; - FunctionTable[Gl3FuncName::UniformMatrix4x3fv] = (void*)&glUniformMatrix4x3fv; - FunctionTable[Gl3FuncName::BlitFramebuffer] = (void*)&glBlitFramebuffer; - FunctionTable[Gl3FuncName::RenderbufferStorageMultisample] = (void*)&glRenderbufferStorageMultisample; - FunctionTable[Gl3FuncName::FramebufferTextureLayer] = (void*)&glFramebufferTextureLayer; - FunctionTable[Gl3FuncName::MapBufferRange] = (void*)&glMapBufferRange; - FunctionTable[Gl3FuncName::FlushMappedBufferRange] = (void*)&glFlushMappedBufferRange; - FunctionTable[Gl3FuncName::BindVertexArray] = (void*)&glBindVertexArray; - FunctionTable[Gl3FuncName::DeleteVertexArrays] = (void*)&glDeleteVertexArrays; - FunctionTable[Gl3FuncName::GenVertexArrays] = (void*)&glGenVertexArrays; - FunctionTable[Gl3FuncName::IsVertexArray] = (void*)&glIsVertexArray; - FunctionTable[Gl3FuncName::GetIntegeri_v] = (void*)&glGetIntegeri_v; - FunctionTable[Gl3FuncName::BeginTransformFeedback] = (void*)&glBeginTransformFeedback; - FunctionTable[Gl3FuncName::EndTransformFeedback] = (void*)&glEndTransformFeedback; - FunctionTable[Gl3FuncName::BindBufferRange] = (void*)&glBindBufferRange; - FunctionTable[Gl3FuncName::BindBufferBase] = (void*)&glBindBufferBase; - FunctionTable[Gl3FuncName::TransformFeedbackVaryings] = (void*)&glTransformFeedbackVaryings; - FunctionTable[Gl3FuncName::GetTransformFeedbackVarying] = (void*)&glGetTransformFeedbackVarying; - FunctionTable[Gl3FuncName::VertexAttribIPointer] = (void*)&glVertexAttribIPointer; - FunctionTable[Gl3FuncName::GetVertexAttribIiv] = (void*)&glGetVertexAttribIiv; - FunctionTable[Gl3FuncName::GetVertexAttribIuiv] = (void*)&glGetVertexAttribIuiv; - FunctionTable[Gl3FuncName::VertexAttribI4i] = (void*)&glVertexAttribI4i; - FunctionTable[Gl3FuncName::VertexAttribI4ui] = (void*)&glVertexAttribI4ui; - FunctionTable[Gl3FuncName::VertexAttribI4iv] = (void*)&glVertexAttribI4iv; - FunctionTable[Gl3FuncName::VertexAttribI4uiv] = (void*)&glVertexAttribI4uiv; - FunctionTable[Gl3FuncName::GetUniformuiv] = (void*)&glGetUniformuiv; - FunctionTable[Gl3FuncName::GetFragDataLocation] = (void*)&glGetFragDataLocation; - FunctionTable[Gl3FuncName::Uniform1ui] = (void*)&glUniform1ui; - FunctionTable[Gl3FuncName::Uniform2ui] = (void*)&glUniform2ui; - FunctionTable[Gl3FuncName::Uniform3ui] = (void*)&glUniform3ui; - FunctionTable[Gl3FuncName::Uniform4ui] = (void*)&glUniform4ui; - FunctionTable[Gl3FuncName::Uniform1uiv] = (void*)&glUniform1uiv; - FunctionTable[Gl3FuncName::Uniform2uiv] = (void*)&glUniform2uiv; - FunctionTable[Gl3FuncName::Uniform3uiv] = (void*)&glUniform3uiv; - FunctionTable[Gl3FuncName::Uniform4uiv] = (void*)&glUniform4uiv; - FunctionTable[Gl3FuncName::ClearBufferiv] = (void*)&glClearBufferiv; - FunctionTable[Gl3FuncName::ClearBufferuiv] = (void*)&glClearBufferuiv; - FunctionTable[Gl3FuncName::ClearBufferfv] = (void*)&glClearBufferfv; - FunctionTable[Gl3FuncName::ClearBufferfi] = (void*)&glClearBufferfi; - FunctionTable[Gl3FuncName::GetStringi] = (void*)&glGetStringi; - FunctionTable[Gl3FuncName::CopyBufferSubData] = (void*)&glCopyBufferSubData; - FunctionTable[Gl3FuncName::GetUniformIndices] = (void*)&glGetUniformIndices; - FunctionTable[Gl3FuncName::GetActiveUniformsiv] = (void*)&glGetActiveUniformsiv; - FunctionTable[Gl3FuncName::GetUniformBlockIndex] = (void*)&glGetUniformBlockIndex; - FunctionTable[Gl3FuncName::GetActiveUniformBlockiv] = (void*)&glGetActiveUniformBlockiv; - FunctionTable[Gl3FuncName::GetActiveUniformBlockName] = (void*)&glGetActiveUniformBlockName; - FunctionTable[Gl3FuncName::UniformBlockBinding] = (void*)&glUniformBlockBinding; - FunctionTable[Gl3FuncName::DrawArraysInstanced] = (void*)&glDrawArraysInstanced; - FunctionTable[Gl3FuncName::DrawElementsInstanced] = (void*)&glDrawElementsInstanced; - FunctionTable[Gl3FuncName::FenceSync] = (void*)&glFenceSync; - FunctionTable[Gl3FuncName::IsSync] = (void*)&glIsSync; - FunctionTable[Gl3FuncName::DeleteSync] = (void*)&glDeleteSync; - FunctionTable[Gl3FuncName::ClientWaitSync] = (void*)&glClientWaitSync; - FunctionTable[Gl3FuncName::WaitSync] = (void*)&glWaitSync; - FunctionTable[Gl3FuncName::GetInteger64v] = (void*)&glGetInteger64v; - FunctionTable[Gl3FuncName::GetSynciv] = (void*)&glGetSynciv; - FunctionTable[Gl3FuncName::GetInteger64i_v] = (void*)&glGetInteger64i_v; - FunctionTable[Gl3FuncName::GetBufferParameteri64v] = (void*)&glGetBufferParameteri64v; - FunctionTable[Gl3FuncName::GenSamplers] = (void*)&glGenSamplers; - FunctionTable[Gl3FuncName::DeleteSamplers] = (void*)&glDeleteSamplers; - FunctionTable[Gl3FuncName::IsSampler] = (void*)&glIsSampler; - FunctionTable[Gl3FuncName::BindSampler] = (void*)&glBindSampler; - FunctionTable[Gl3FuncName::SamplerParameteri] = (void*)&glSamplerParameteri; - FunctionTable[Gl3FuncName::SamplerParameteriv] = (void*)&glSamplerParameteriv; - FunctionTable[Gl3FuncName::SamplerParameterf] = (void*)&glSamplerParameterf; - FunctionTable[Gl3FuncName::SamplerParameterfv] = (void*)&glSamplerParameterfv; - FunctionTable[Gl3FuncName::GetSamplerParameteriv] = (void*)&glGetSamplerParameteriv; - FunctionTable[Gl3FuncName::GetSamplerParameterfv] = (void*)&glGetSamplerParameterfv; - FunctionTable[Gl3FuncName::VertexAttribDivisor] = (void*)&glVertexAttribDivisor; - FunctionTable[Gl3FuncName::BindTransformFeedback] = (void*)&glBindTransformFeedback; - FunctionTable[Gl3FuncName::DeleteTransformFeedbacks] = (void*)&glDeleteTransformFeedbacks; - FunctionTable[Gl3FuncName::GenTransformFeedbacks] = (void*)&glGenTransformFeedbacks; - FunctionTable[Gl3FuncName::IsTransformFeedback] = (void*)&glIsTransformFeedback; - FunctionTable[Gl3FuncName::PauseTransformFeedback] = (void*)&glPauseTransformFeedback; - FunctionTable[Gl3FuncName::ResumeTransformFeedback] = (void*)&glResumeTransformFeedback; - FunctionTable[Gl3FuncName::GetProgramBinary] = (void*)&glGetProgramBinary; - FunctionTable[Gl3FuncName::ProgramBinary] = (void*)&glProgramBinary; - FunctionTable[Gl3FuncName::ProgramParameteri] = (void*)&glProgramParameteri; - FunctionTable[Gl3FuncName::InvalidateFramebuffer] = (void*)&glInvalidateFramebuffer; - FunctionTable[Gl3FuncName::InvalidateSubFramebuffer] = (void*)&glInvalidateSubFramebuffer; - FunctionTable[Gl3FuncName::TexStorage2D] = (void*)&glTexStorage2D; - FunctionTable[Gl3FuncName::TexStorage3D] = (void*)&glTexStorage3D; - FunctionTable[Gl3FuncName::GetInternalformativ] = (void*)&glGetInternalformativ; -#endif - } - return FunctionTable[funcname]; -} -} -} -#ifndef DYNAMICGLES_NO_NAMESPACE -namespace gl { -#elif TARGET_OS_IPHONE -namespace gl { -namespace internals { -#endif -inline void DYNAMICGLES_FUNCTION(ReadBuffer)(GLenum src) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glReadBuffer) PFNGLREADBUFFERPROC; -#endif - PFNGLREADBUFFERPROC _ReadBuffer = (PFNGLREADBUFFERPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::ReadBuffer); - return _ReadBuffer(src); -} -inline void DYNAMICGLES_FUNCTION(DrawRangeElements)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void* indices) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glDrawRangeElements) PFNGLDRAWRANGEELEMENTSPROC; -#endif - PFNGLDRAWRANGEELEMENTSPROC _DrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::DrawRangeElements); - return _DrawRangeElements(mode, start, end, count, type, indices); -} -inline void DYNAMICGLES_FUNCTION(TexImage3D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glTexImage3D) PFNGLTEXIMAGE3DPROC; -#endif - PFNGLTEXIMAGE3DPROC _TexImage3D = (PFNGLTEXIMAGE3DPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::TexImage3D); - return _TexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels); -} -inline void DYNAMICGLES_FUNCTION(TexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* pixels) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glTexSubImage3D) PFNGLTEXSUBIMAGE3DPROC; -#endif - PFNGLTEXSUBIMAGE3DPROC _TexSubImage3D = (PFNGLTEXSUBIMAGE3DPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::TexSubImage3D); - return _TexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); -} -inline void DYNAMICGLES_FUNCTION(CopyTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glCopyTexSubImage3D) PFNGLCOPYTEXSUBIMAGE3DPROC; -#endif - PFNGLCOPYTEXSUBIMAGE3DPROC _CopyTexSubImage3D = (PFNGLCOPYTEXSUBIMAGE3DPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::CopyTexSubImage3D); - return _CopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height); -} -inline void DYNAMICGLES_FUNCTION(CompressedTexImage3D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glCompressedTexImage3D) PFNGLCOMPRESSEDTEXIMAGE3DPROC; -#endif - PFNGLCOMPRESSEDTEXIMAGE3DPROC _CompressedTexImage3D = (PFNGLCOMPRESSEDTEXIMAGE3DPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::CompressedTexImage3D); - return _CompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data); -} -inline void DYNAMICGLES_FUNCTION(CompressedTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glCompressedTexSubImage3D) PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC; -#endif - PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC _CompressedTexSubImage3D = (PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::CompressedTexSubImage3D); - return _CompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); -} -inline void DYNAMICGLES_FUNCTION(GenQueries)(GLsizei n, GLuint* ids) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGenQueries) PFNGLGENQUERIESPROC; -#endif - PFNGLGENQUERIESPROC _GenQueries = (PFNGLGENQUERIESPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::GenQueries); - return _GenQueries(n, ids); -} -inline void DYNAMICGLES_FUNCTION(DeleteQueries)(GLsizei n, const GLuint* ids) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glDeleteQueries) PFNGLDELETEQUERIESPROC; -#endif - PFNGLDELETEQUERIESPROC _DeleteQueries = (PFNGLDELETEQUERIESPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::DeleteQueries); - return _DeleteQueries(n, ids); -} -inline GLboolean DYNAMICGLES_FUNCTION(IsQuery)(GLuint id) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glIsQuery) PFNGLISQUERYPROC; -#endif - PFNGLISQUERYPROC _IsQuery = (PFNGLISQUERYPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::IsQuery); - return _IsQuery(id); -} -inline void DYNAMICGLES_FUNCTION(BeginQuery)(GLenum target, GLuint id) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glBeginQuery) PFNGLBEGINQUERYPROC; -#endif - PFNGLBEGINQUERYPROC _BeginQuery = (PFNGLBEGINQUERYPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::BeginQuery); - return _BeginQuery(target, id); -} -inline void DYNAMICGLES_FUNCTION(EndQuery)(GLenum target) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glEndQuery) PFNGLENDQUERYPROC; -#endif - PFNGLENDQUERYPROC _EndQuery = (PFNGLENDQUERYPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::EndQuery); - return _EndQuery(target); -} -inline void DYNAMICGLES_FUNCTION(GetQueryiv)(GLenum target, GLenum pname, GLint* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetQueryiv) PFNGLGETQUERYIVPROC; -#endif - PFNGLGETQUERYIVPROC _GetQueryiv = (PFNGLGETQUERYIVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::GetQueryiv); - return _GetQueryiv(target, pname, params); -} -inline void DYNAMICGLES_FUNCTION(GetQueryObjectuiv)(GLuint id, GLenum pname, GLuint* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetQueryObjectuiv) PFNGLGETQUERYOBJECTUIVPROC; -#endif - PFNGLGETQUERYOBJECTUIVPROC _GetQueryObjectuiv = (PFNGLGETQUERYOBJECTUIVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::GetQueryObjectuiv); - return _GetQueryObjectuiv(id, pname, params); -} -inline GLboolean DYNAMICGLES_FUNCTION(UnmapBuffer)(GLenum target) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUnmapBuffer) PFNGLUNMAPBUFFERPROC; -#endif - PFNGLUNMAPBUFFERPROC _UnmapBuffer = (PFNGLUNMAPBUFFERPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::UnmapBuffer); - return _UnmapBuffer(target); -} -inline void DYNAMICGLES_FUNCTION(GetBufferPointerv)(GLenum target, GLenum pname, void** params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetBufferPointerv) PFNGLGETBUFFERPOINTERVPROC; -#endif - PFNGLGETBUFFERPOINTERVPROC _GetBufferPointerv = (PFNGLGETBUFFERPOINTERVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::GetBufferPointerv); - return _GetBufferPointerv(target, pname, params); -} -inline void DYNAMICGLES_FUNCTION(DrawBuffers)(GLsizei n, const GLenum* bufs) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glDrawBuffers) PFNGLDRAWBUFFERSPROC; -#endif - PFNGLDRAWBUFFERSPROC _DrawBuffers = (PFNGLDRAWBUFFERSPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::DrawBuffers); - return _DrawBuffers(n, bufs); -} -inline void DYNAMICGLES_FUNCTION(UniformMatrix2x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniformMatrix2x3fv) PFNGLUNIFORMMATRIX2X3FVPROC; -#endif - PFNGLUNIFORMMATRIX2X3FVPROC _UniformMatrix2x3fv = (PFNGLUNIFORMMATRIX2X3FVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::UniformMatrix2x3fv); - return _UniformMatrix2x3fv(location, count, transpose, value); -} -inline void DYNAMICGLES_FUNCTION(UniformMatrix3x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniformMatrix3x2fv) PFNGLUNIFORMMATRIX3X2FVPROC; -#endif - PFNGLUNIFORMMATRIX3X2FVPROC _UniformMatrix3x2fv = (PFNGLUNIFORMMATRIX3X2FVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::UniformMatrix3x2fv); - return _UniformMatrix3x2fv(location, count, transpose, value); -} -inline void DYNAMICGLES_FUNCTION(UniformMatrix2x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniformMatrix2x4fv) PFNGLUNIFORMMATRIX2X4FVPROC; -#endif - PFNGLUNIFORMMATRIX2X4FVPROC _UniformMatrix2x4fv = (PFNGLUNIFORMMATRIX2X4FVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::UniformMatrix2x4fv); - return _UniformMatrix2x4fv(location, count, transpose, value); -} -inline void DYNAMICGLES_FUNCTION(UniformMatrix4x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniformMatrix4x2fv) PFNGLUNIFORMMATRIX4X2FVPROC; -#endif - PFNGLUNIFORMMATRIX4X2FVPROC _UniformMatrix4x2fv = (PFNGLUNIFORMMATRIX4X2FVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::UniformMatrix4x2fv); - return _UniformMatrix4x2fv(location, count, transpose, value); -} -inline void DYNAMICGLES_FUNCTION(UniformMatrix3x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniformMatrix3x4fv) PFNGLUNIFORMMATRIX3X4FVPROC; -#endif - PFNGLUNIFORMMATRIX3X4FVPROC _UniformMatrix3x4fv = (PFNGLUNIFORMMATRIX3X4FVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::UniformMatrix3x4fv); - return _UniformMatrix3x4fv(location, count, transpose, value); -} -inline void DYNAMICGLES_FUNCTION(UniformMatrix4x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniformMatrix4x3fv) PFNGLUNIFORMMATRIX4X3FVPROC; -#endif - PFNGLUNIFORMMATRIX4X3FVPROC _UniformMatrix4x3fv = (PFNGLUNIFORMMATRIX4X3FVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::UniformMatrix4x3fv); - return _UniformMatrix4x3fv(location, count, transpose, value); -} -inline void DYNAMICGLES_FUNCTION(BlitFramebuffer)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glBlitFramebuffer) PFNGLBLITFRAMEBUFFERPROC; -#endif - PFNGLBLITFRAMEBUFFERPROC _BlitFramebuffer = (PFNGLBLITFRAMEBUFFERPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::BlitFramebuffer); - return _BlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); -} -inline void DYNAMICGLES_FUNCTION(RenderbufferStorageMultisample)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glRenderbufferStorageMultisample) PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC; -#endif - PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC _RenderbufferStorageMultisample = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::RenderbufferStorageMultisample); - return _RenderbufferStorageMultisample(target, samples, internalformat, width, height); -} -inline void DYNAMICGLES_FUNCTION(FramebufferTextureLayer)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glFramebufferTextureLayer) PFNGLFRAMEBUFFERTEXTURELAYERPROC; -#endif - PFNGLFRAMEBUFFERTEXTURELAYERPROC _FramebufferTextureLayer = (PFNGLFRAMEBUFFERTEXTURELAYERPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::FramebufferTextureLayer); - return _FramebufferTextureLayer(target, attachment, texture, level, layer); -} -inline void* DYNAMICGLES_FUNCTION(MapBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glMapBufferRange) PFNGLMAPBUFFERRANGEPROC; -#endif - PFNGLMAPBUFFERRANGEPROC _MapBufferRange = (PFNGLMAPBUFFERRANGEPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::MapBufferRange); - return _MapBufferRange(target, offset, length, access); -} -inline void DYNAMICGLES_FUNCTION(FlushMappedBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glFlushMappedBufferRange) PFNGLFLUSHMAPPEDBUFFERRANGEPROC; -#endif - PFNGLFLUSHMAPPEDBUFFERRANGEPROC _FlushMappedBufferRange = (PFNGLFLUSHMAPPEDBUFFERRANGEPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::FlushMappedBufferRange); - return _FlushMappedBufferRange(target, offset, length); -} -inline void DYNAMICGLES_FUNCTION(BindVertexArray)(GLuint array) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glBindVertexArray) PFNGLBINDVERTEXARRAYPROC; -#endif - PFNGLBINDVERTEXARRAYPROC _BindVertexArray = (PFNGLBINDVERTEXARRAYPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::BindVertexArray); - return _BindVertexArray(array); -} -inline void DYNAMICGLES_FUNCTION(DeleteVertexArrays)(GLsizei n, const GLuint* arrays) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glDeleteVertexArrays) PFNGLDELETEVERTEXARRAYSPROC; -#endif - PFNGLDELETEVERTEXARRAYSPROC _DeleteVertexArrays = (PFNGLDELETEVERTEXARRAYSPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::DeleteVertexArrays); - return _DeleteVertexArrays(n, arrays); -} -inline void DYNAMICGLES_FUNCTION(GenVertexArrays)(GLsizei n, GLuint* arrays) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGenVertexArrays) PFNGLGENVERTEXARRAYSPROC; -#endif - PFNGLGENVERTEXARRAYSPROC _GenVertexArrays = (PFNGLGENVERTEXARRAYSPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::GenVertexArrays); - return _GenVertexArrays(n, arrays); -} -inline GLboolean DYNAMICGLES_FUNCTION(IsVertexArray)(GLuint array) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glIsVertexArray) PFNGLISVERTEXARRAYPROC; -#endif - PFNGLISVERTEXARRAYPROC _IsVertexArray = (PFNGLISVERTEXARRAYPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::IsVertexArray); - return _IsVertexArray(array); -} -inline void DYNAMICGLES_FUNCTION(GetIntegeri_v)(GLenum target, GLuint index, GLint* data) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetIntegeri_v) PFNGLGETINTEGERI_VPROC; -#endif - PFNGLGETINTEGERI_VPROC _GetIntegeri_v = (PFNGLGETINTEGERI_VPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::GetIntegeri_v); - return _GetIntegeri_v(target, index, data); -} -inline void DYNAMICGLES_FUNCTION(BeginTransformFeedback)(GLenum primitiveMode) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glBeginTransformFeedback) PFNGLBEGINTRANSFORMFEEDBACKPROC; -#endif - PFNGLBEGINTRANSFORMFEEDBACKPROC _BeginTransformFeedback = (PFNGLBEGINTRANSFORMFEEDBACKPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::BeginTransformFeedback); - return _BeginTransformFeedback(primitiveMode); -} -inline void DYNAMICGLES_FUNCTION(EndTransformFeedback)(void) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glEndTransformFeedback) PFNGLENDTRANSFORMFEEDBACKPROC; -#endif - PFNGLENDTRANSFORMFEEDBACKPROC _EndTransformFeedback = (PFNGLENDTRANSFORMFEEDBACKPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::EndTransformFeedback); - return _EndTransformFeedback(); -} -inline void DYNAMICGLES_FUNCTION(BindBufferRange)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glBindBufferRange) PFNGLBINDBUFFERRANGEPROC; -#endif - PFNGLBINDBUFFERRANGEPROC _BindBufferRange = (PFNGLBINDBUFFERRANGEPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::BindBufferRange); - return _BindBufferRange(target, index, buffer, offset, size); -} -inline void DYNAMICGLES_FUNCTION(BindBufferBase)(GLenum target, GLuint index, GLuint buffer) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glBindBufferBase) PFNGLBINDBUFFERBASEPROC; -#endif - PFNGLBINDBUFFERBASEPROC _BindBufferBase = (PFNGLBINDBUFFERBASEPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::BindBufferBase); - return _BindBufferBase(target, index, buffer); -} -inline void DYNAMICGLES_FUNCTION(TransformFeedbackVaryings)(GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glTransformFeedbackVaryings) PFNGLTRANSFORMFEEDBACKVARYINGSPROC; -#endif - PFNGLTRANSFORMFEEDBACKVARYINGSPROC _TransformFeedbackVaryings = (PFNGLTRANSFORMFEEDBACKVARYINGSPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::TransformFeedbackVaryings); - return _TransformFeedbackVaryings(program, count, varyings, bufferMode); - -} -inline void DYNAMICGLES_FUNCTION(GetTransformFeedbackVarying)(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetTransformFeedbackVarying) PFNGLGETTRANSFORMFEEDBACKVARYINGPROC; -#endif - PFNGLGETTRANSFORMFEEDBACKVARYINGPROC _GetTransformFeedbackVarying = (PFNGLGETTRANSFORMFEEDBACKVARYINGPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::GetTransformFeedbackVarying); - return _GetTransformFeedbackVarying(program, index, bufSize, length, size, type, name); - -} -inline void DYNAMICGLES_FUNCTION(VertexAttribIPointer)(GLuint index, GLint size, GLenum type, GLsizei stride, const void* pointer) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glVertexAttribIPointer) PFNGLVERTEXATTRIBIPOINTERPROC; -#endif - PFNGLVERTEXATTRIBIPOINTERPROC _VertexAttribIPointer = (PFNGLVERTEXATTRIBIPOINTERPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::VertexAttribIPointer); - return _VertexAttribIPointer(index, size, type, stride, pointer); -} -inline void DYNAMICGLES_FUNCTION(GetVertexAttribIiv)(GLuint index, GLenum pname, GLint* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetVertexAttribIiv) PFNGLGETVERTEXATTRIBIIVPROC; -#endif - PFNGLGETVERTEXATTRIBIIVPROC _GetVertexAttribIiv = (PFNGLGETVERTEXATTRIBIIVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::GetVertexAttribIiv); - return _GetVertexAttribIiv(index, pname, params); -} -inline void DYNAMICGLES_FUNCTION(GetVertexAttribIuiv)(GLuint index, GLenum pname, GLuint* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetVertexAttribIuiv) PFNGLGETVERTEXATTRIBIUIVPROC; -#endif - PFNGLGETVERTEXATTRIBIUIVPROC _GetVertexAttribIuiv = (PFNGLGETVERTEXATTRIBIUIVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::GetVertexAttribIuiv); - return _GetVertexAttribIuiv(index, pname, params); -} -inline void DYNAMICGLES_FUNCTION(VertexAttribI4i)(GLuint index, GLint x, GLint y, GLint z, GLint w) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glVertexAttribI4i) PFNGLVERTEXATTRIBI4IPROC; -#endif - PFNGLVERTEXATTRIBI4IPROC _VertexAttribI4i = (PFNGLVERTEXATTRIBI4IPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::VertexAttribI4i); - return _VertexAttribI4i(index, x, y, z, w); -} -inline void DYNAMICGLES_FUNCTION(VertexAttribI4ui)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glVertexAttribI4ui) PFNGLVERTEXATTRIBI4UIPROC; -#endif - PFNGLVERTEXATTRIBI4UIPROC _VertexAttribI4ui = (PFNGLVERTEXATTRIBI4UIPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::VertexAttribI4ui); - return _VertexAttribI4ui(index, x, y, z, w); -} -inline void DYNAMICGLES_FUNCTION(VertexAttribI4iv)(GLuint index, const GLint* v) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glVertexAttribI4iv) PFNGLVERTEXATTRIBI4IVPROC; -#endif - PFNGLVERTEXATTRIBI4IVPROC _VertexAttribI4iv = (PFNGLVERTEXATTRIBI4IVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::VertexAttribI4iv); - return _VertexAttribI4iv(index, v); -} -inline void DYNAMICGLES_FUNCTION(VertexAttribI4uiv)(GLuint index, const GLuint* v) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glVertexAttribI4uiv) PFNGLVERTEXATTRIBI4UIVPROC; -#endif - PFNGLVERTEXATTRIBI4UIVPROC _VertexAttribI4uiv = (PFNGLVERTEXATTRIBI4UIVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::VertexAttribI4uiv); - return _VertexAttribI4uiv(index, v); -} -inline void DYNAMICGLES_FUNCTION(GetUniformuiv)(GLuint program, GLint location, GLuint* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetUniformuiv) PFNGLGETUNIFORMUIVPROC; -#endif - PFNGLGETUNIFORMUIVPROC _GetUniformuiv = (PFNGLGETUNIFORMUIVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::GetUniformuiv); - return _GetUniformuiv(program, location, params); -} -inline GLint DYNAMICGLES_FUNCTION(GetFragDataLocation)(GLuint program, const GLchar* name) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetFragDataLocation) PFNGLGETFRAGDATALOCATIONPROC; -#endif - PFNGLGETFRAGDATALOCATIONPROC _GetFragDataLocation = (PFNGLGETFRAGDATALOCATIONPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::GetFragDataLocation); - return _GetFragDataLocation(program, name); -} -inline void DYNAMICGLES_FUNCTION(Uniform1ui)(GLint location, GLuint v0) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniform1ui) PFNGLUNIFORM1UIPROC; -#endif - PFNGLUNIFORM1UIPROC _Uniform1ui = (PFNGLUNIFORM1UIPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::Uniform1ui); - return _Uniform1ui(location, v0); -} -inline void DYNAMICGLES_FUNCTION(Uniform2ui)(GLint location, GLuint v0, GLuint v1) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniform2ui) PFNGLUNIFORM2UIPROC; -#endif - PFNGLUNIFORM2UIPROC _Uniform2ui = (PFNGLUNIFORM2UIPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::Uniform2ui); - return _Uniform2ui(location, v0, v1); -} -inline void DYNAMICGLES_FUNCTION(Uniform3ui)(GLint location, GLuint v0, GLuint v1, GLuint v2) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniform3ui) PFNGLUNIFORM3UIPROC; -#endif - PFNGLUNIFORM3UIPROC _Uniform3ui = (PFNGLUNIFORM3UIPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::Uniform3ui); - return _Uniform3ui(location, v0, v1, v2); -} -inline void DYNAMICGLES_FUNCTION(Uniform4ui)(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniform4ui) PFNGLUNIFORM4UIPROC; -#endif - PFNGLUNIFORM4UIPROC _Uniform4ui = (PFNGLUNIFORM4UIPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::Uniform4ui); - return _Uniform4ui(location, v0, v1, v2, v3); -} -inline void DYNAMICGLES_FUNCTION(Uniform1uiv)(GLint location, GLsizei count, const GLuint* value) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniform1uiv) PFNGLUNIFORM1UIVPROC; -#endif - PFNGLUNIFORM1UIVPROC _Uniform1uiv = (PFNGLUNIFORM1UIVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::Uniform1uiv); - return _Uniform1uiv(location, count, value); -} -inline void DYNAMICGLES_FUNCTION(Uniform2uiv)(GLint location, GLsizei count, const GLuint* value) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniform2uiv) PFNGLUNIFORM2UIVPROC; -#endif - PFNGLUNIFORM2UIVPROC _Uniform2uiv = (PFNGLUNIFORM2UIVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::Uniform2uiv); - return _Uniform2uiv(location, count, value); -} -inline void DYNAMICGLES_FUNCTION(Uniform3uiv)(GLint location, GLsizei count, const GLuint* value) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniform3uiv) PFNGLUNIFORM3UIVPROC; -#endif - PFNGLUNIFORM3UIVPROC _Uniform3uiv = (PFNGLUNIFORM3UIVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::Uniform3uiv); - return _Uniform3uiv(location, count, value); -} -inline void DYNAMICGLES_FUNCTION(Uniform4uiv)(GLint location, GLsizei count, const GLuint* value) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniform4uiv) PFNGLUNIFORM4UIVPROC; -#endif - PFNGLUNIFORM4UIVPROC _Uniform4uiv = (PFNGLUNIFORM4UIVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::Uniform4uiv); - return _Uniform4uiv(location, count, value); -} -inline void DYNAMICGLES_FUNCTION(ClearBufferiv)(GLenum buffer, GLint drawbuffer, const GLint* value) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glClearBufferiv) PFNGLCLEARBUFFERIVPROC; -#endif - PFNGLCLEARBUFFERIVPROC _ClearBufferiv = (PFNGLCLEARBUFFERIVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::ClearBufferiv); - return _ClearBufferiv(buffer, drawbuffer, value); -} -inline void DYNAMICGLES_FUNCTION(ClearBufferuiv)(GLenum buffer, GLint drawbuffer, const GLuint* value) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glClearBufferuiv) PFNGLCLEARBUFFERUIVPROC; -#endif - PFNGLCLEARBUFFERUIVPROC _ClearBufferuiv = (PFNGLCLEARBUFFERUIVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::ClearBufferuiv); - return _ClearBufferuiv(buffer, drawbuffer, value); -} -inline void DYNAMICGLES_FUNCTION(ClearBufferfv)(GLenum buffer, GLint drawbuffer, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glClearBufferfv) PFNGLCLEARBUFFERFVPROC; -#endif - PFNGLCLEARBUFFERFVPROC _ClearBufferfv = (PFNGLCLEARBUFFERFVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::ClearBufferfv); - return _ClearBufferfv(buffer, drawbuffer, value); -} -inline void DYNAMICGLES_FUNCTION(ClearBufferfi)(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glClearBufferfi) PFNGLCLEARBUFFERFIPROC; -#endif - PFNGLCLEARBUFFERFIPROC _ClearBufferfi = (PFNGLCLEARBUFFERFIPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::ClearBufferfi); - return _ClearBufferfi(buffer, drawbuffer, depth, stencil); -} -inline const GLubyte* DYNAMICGLES_FUNCTION(GetStringi)(GLenum name, GLuint index) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetStringi) PFNGLGETSTRINGIPROC; -#endif - PFNGLGETSTRINGIPROC _GetStringi = (PFNGLGETSTRINGIPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::GetStringi); - return _GetStringi(name, index); -} -inline void DYNAMICGLES_FUNCTION(CopyBufferSubData)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glCopyBufferSubData) PFNGLCOPYBUFFERSUBDATAPROC; -#endif - PFNGLCOPYBUFFERSUBDATAPROC _CopyBufferSubData = (PFNGLCOPYBUFFERSUBDATAPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::CopyBufferSubData); - return _CopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size); -} -inline void DYNAMICGLES_FUNCTION(GetUniformIndices)(GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetUniformIndices) PFNGLGETUNIFORMINDICESPROC; -#endif - PFNGLGETUNIFORMINDICESPROC _GetUniformIndices = (PFNGLGETUNIFORMINDICESPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::GetUniformIndices); - return _GetUniformIndices(program, uniformCount, uniformNames, uniformIndices); - -} -inline void DYNAMICGLES_FUNCTION(GetActiveUniformsiv)(GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetActiveUniformsiv) PFNGLGETACTIVEUNIFORMSIVPROC; -#endif - PFNGLGETACTIVEUNIFORMSIVPROC _GetActiveUniformsiv = (PFNGLGETACTIVEUNIFORMSIVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::GetActiveUniformsiv); - return _GetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params); -} -inline GLuint DYNAMICGLES_FUNCTION(GetUniformBlockIndex)(GLuint program, const GLchar* uniformBlockName) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetUniformBlockIndex) PFNGLGETUNIFORMBLOCKINDEXPROC; -#endif - PFNGLGETUNIFORMBLOCKINDEXPROC _GetUniformBlockIndex = (PFNGLGETUNIFORMBLOCKINDEXPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::GetUniformBlockIndex); - return _GetUniformBlockIndex(program, uniformBlockName); -} -inline void DYNAMICGLES_FUNCTION(GetActiveUniformBlockiv)(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetActiveUniformBlockiv) PFNGLGETACTIVEUNIFORMBLOCKIVPROC; -#endif - PFNGLGETACTIVEUNIFORMBLOCKIVPROC _GetActiveUniformBlockiv = (PFNGLGETACTIVEUNIFORMBLOCKIVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::GetActiveUniformBlockiv); - return _GetActiveUniformBlockiv(program, uniformBlockIndex, pname, params); -} -inline void DYNAMICGLES_FUNCTION(GetActiveUniformBlockName)(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetActiveUniformBlockName) PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC; -#endif - PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC _GetActiveUniformBlockName = (PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::GetActiveUniformBlockName); - return _GetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName); - -} -inline void DYNAMICGLES_FUNCTION(UniformBlockBinding)(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniformBlockBinding) PFNGLUNIFORMBLOCKBINDINGPROC; -#endif - PFNGLUNIFORMBLOCKBINDINGPROC _UniformBlockBinding = (PFNGLUNIFORMBLOCKBINDINGPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::UniformBlockBinding); - return _UniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding); -} -inline void DYNAMICGLES_FUNCTION(DrawArraysInstanced)(GLenum mode, GLint first, GLsizei count, GLsizei instancecount) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glDrawArraysInstanced) PFNGLDRAWARRAYSINSTANCEDPROC; -#endif - PFNGLDRAWARRAYSINSTANCEDPROC _DrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::DrawArraysInstanced); - return _DrawArraysInstanced(mode, first, count, instancecount); -} -inline void DYNAMICGLES_FUNCTION(DrawElementsInstanced)(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei instancecount) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glDrawElementsInstanced) PFNGLDRAWELEMENTSINSTANCEDPROC; -#endif - PFNGLDRAWELEMENTSINSTANCEDPROC _DrawElementsInstanced = (PFNGLDRAWELEMENTSINSTANCEDPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::DrawElementsInstanced); - return _DrawElementsInstanced(mode, count, type, indices, instancecount); -} -inline GLsync DYNAMICGLES_FUNCTION(FenceSync)(GLenum condition, GLbitfield flags) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glFenceSync) PFNGLFENCESYNCPROC; -#endif - PFNGLFENCESYNCPROC _FenceSync = (PFNGLFENCESYNCPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::FenceSync); - return _FenceSync(condition, flags); -} -inline GLboolean DYNAMICGLES_FUNCTION(IsSync)(GLsync sync) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glIsSync) PFNGLISSYNCPROC; -#endif - PFNGLISSYNCPROC _IsSync = (PFNGLISSYNCPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::IsSync); - return _IsSync(sync); -} -inline void DYNAMICGLES_FUNCTION(DeleteSync)(GLsync sync) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glDeleteSync) PFNGLDELETESYNCPROC; -#endif - PFNGLDELETESYNCPROC _DeleteSync = (PFNGLDELETESYNCPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::DeleteSync); - return _DeleteSync(sync); -} -inline GLenum DYNAMICGLES_FUNCTION(ClientWaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glClientWaitSync) PFNGLCLIENTWAITSYNCPROC; -#endif - PFNGLCLIENTWAITSYNCPROC _ClientWaitSync = (PFNGLCLIENTWAITSYNCPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::ClientWaitSync); - return _ClientWaitSync(sync, flags, timeout); -} -inline void DYNAMICGLES_FUNCTION(WaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glWaitSync) PFNGLWAITSYNCPROC; -#endif - PFNGLWAITSYNCPROC _WaitSync = (PFNGLWAITSYNCPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::WaitSync); - return _WaitSync(sync, flags, timeout); -} -inline void DYNAMICGLES_FUNCTION(GetInteger64v)(GLenum pname, GLint64* data) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetInteger64v) PFNGLGETINTEGER64VPROC; -#endif - PFNGLGETINTEGER64VPROC _GetInteger64v = (PFNGLGETINTEGER64VPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::GetInteger64v); - return _GetInteger64v(pname, data); -} -inline void DYNAMICGLES_FUNCTION(GetSynciv)(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetSynciv) PFNGLGETSYNCIVPROC; -#endif - PFNGLGETSYNCIVPROC _GetSynciv = (PFNGLGETSYNCIVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::GetSynciv); - return _GetSynciv(sync, pname, bufSize, length, values); -} -inline void DYNAMICGLES_FUNCTION(GetInteger64i_v)(GLenum target, GLuint index, GLint64* data) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetInteger64i_v) PFNGLGETINTEGER64I_VPROC; -#endif - PFNGLGETINTEGER64I_VPROC _GetInteger64i_v = (PFNGLGETINTEGER64I_VPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::GetInteger64i_v); - return _GetInteger64i_v(target, index, data); -} -inline void DYNAMICGLES_FUNCTION(GetBufferParameteri64v)(GLenum target, GLenum pname, GLint64* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetBufferParameteri64v) PFNGLGETBUFFERPARAMETERI64VPROC; -#endif - PFNGLGETBUFFERPARAMETERI64VPROC _GetBufferParameteri64v = (PFNGLGETBUFFERPARAMETERI64VPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::GetBufferParameteri64v); - return _GetBufferParameteri64v(target, pname, params); -} -inline void DYNAMICGLES_FUNCTION(GenSamplers)(GLsizei count, GLuint* samplers) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGenSamplers) PFNGLGENSAMPLERSPROC; -#endif - PFNGLGENSAMPLERSPROC _GenSamplers = (PFNGLGENSAMPLERSPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::GenSamplers); - return _GenSamplers(count, samplers); -} -inline void DYNAMICGLES_FUNCTION(DeleteSamplers)(GLsizei count, const GLuint* samplers) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glDeleteSamplers) PFNGLDELETESAMPLERSPROC; -#endif - PFNGLDELETESAMPLERSPROC _DeleteSamplers = (PFNGLDELETESAMPLERSPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::DeleteSamplers); - return _DeleteSamplers(count, samplers); -} -inline GLboolean DYNAMICGLES_FUNCTION(IsSampler)(GLuint sampler) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glIsSampler) PFNGLISSAMPLERPROC; -#endif - PFNGLISSAMPLERPROC _IsSampler = (PFNGLISSAMPLERPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::IsSampler); - return _IsSampler(sampler); -} -inline void DYNAMICGLES_FUNCTION(BindSampler)(GLuint unit, GLuint sampler) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glBindSampler) PFNGLBINDSAMPLERPROC; -#endif - PFNGLBINDSAMPLERPROC _BindSampler = (PFNGLBINDSAMPLERPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::BindSampler); - return _BindSampler(unit, sampler); -} -inline void DYNAMICGLES_FUNCTION(SamplerParameteri)(GLuint sampler, GLenum pname, GLint param) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glSamplerParameteri) PFNGLSAMPLERPARAMETERIPROC; -#endif - PFNGLSAMPLERPARAMETERIPROC _SamplerParameteri = (PFNGLSAMPLERPARAMETERIPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::SamplerParameteri); - return _SamplerParameteri(sampler, pname, param); -} -inline void DYNAMICGLES_FUNCTION(SamplerParameteriv)(GLuint sampler, GLenum pname, const GLint* param) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glSamplerParameteriv) PFNGLSAMPLERPARAMETERIVPROC; -#endif - PFNGLSAMPLERPARAMETERIVPROC _SamplerParameteriv = (PFNGLSAMPLERPARAMETERIVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::SamplerParameteriv); - return _SamplerParameteriv(sampler, pname, param); -} -inline void DYNAMICGLES_FUNCTION(SamplerParameterf)(GLuint sampler, GLenum pname, GLfloat param) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glSamplerParameterf) PFNGLSAMPLERPARAMETERFPROC; -#endif - PFNGLSAMPLERPARAMETERFPROC _SamplerParameterf = (PFNGLSAMPLERPARAMETERFPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::SamplerParameterf); - return _SamplerParameterf(sampler, pname, param); -} -inline void DYNAMICGLES_FUNCTION(SamplerParameterfv)(GLuint sampler, GLenum pname, const GLfloat* param) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glSamplerParameterfv) PFNGLSAMPLERPARAMETERFVPROC; -#endif - PFNGLSAMPLERPARAMETERFVPROC _SamplerParameterfv = (PFNGLSAMPLERPARAMETERFVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::SamplerParameterfv); - return _SamplerParameterfv(sampler, pname, param); -} -inline void DYNAMICGLES_FUNCTION(GetSamplerParameteriv)(GLuint sampler, GLenum pname, GLint* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetSamplerParameteriv) PFNGLGETSAMPLERPARAMETERIVPROC; -#endif - PFNGLGETSAMPLERPARAMETERIVPROC _GetSamplerParameteriv = (PFNGLGETSAMPLERPARAMETERIVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::GetSamplerParameteriv); - return _GetSamplerParameteriv(sampler, pname, params); -} -inline void DYNAMICGLES_FUNCTION(GetSamplerParameterfv)(GLuint sampler, GLenum pname, GLfloat* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetSamplerParameterfv) PFNGLGETSAMPLERPARAMETERFVPROC; -#endif - PFNGLGETSAMPLERPARAMETERFVPROC _GetSamplerParameterfv = (PFNGLGETSAMPLERPARAMETERFVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::GetSamplerParameterfv); - return _GetSamplerParameterfv(sampler, pname, params); -} -inline void DYNAMICGLES_FUNCTION(VertexAttribDivisor)(GLuint index, GLuint divisor) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glVertexAttribDivisor) PFNGLVERTEXATTRIBDIVISORPROC; -#endif - PFNGLVERTEXATTRIBDIVISORPROC _VertexAttribDivisor = (PFNGLVERTEXATTRIBDIVISORPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::VertexAttribDivisor); - return _VertexAttribDivisor(index, divisor); -} -inline void DYNAMICGLES_FUNCTION(BindTransformFeedback)(GLenum target, GLuint id) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glBindTransformFeedback) PFNGLBINDTRANSFORMFEEDBACKPROC; -#endif - PFNGLBINDTRANSFORMFEEDBACKPROC _BindTransformFeedback = (PFNGLBINDTRANSFORMFEEDBACKPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::BindTransformFeedback); - return _BindTransformFeedback(target, id); -} -inline void DYNAMICGLES_FUNCTION(DeleteTransformFeedbacks)(GLsizei n, const GLuint* ids) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glDeleteTransformFeedbacks) PFNGLDELETETRANSFORMFEEDBACKSPROC; -#endif - PFNGLDELETETRANSFORMFEEDBACKSPROC _DeleteTransformFeedbacks = (PFNGLDELETETRANSFORMFEEDBACKSPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::DeleteTransformFeedbacks); - return _DeleteTransformFeedbacks(n, ids); -} -inline void DYNAMICGLES_FUNCTION(GenTransformFeedbacks)(GLsizei n, GLuint* ids) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGenTransformFeedbacks) PFNGLGENTRANSFORMFEEDBACKSPROC; -#endif - PFNGLGENTRANSFORMFEEDBACKSPROC _GenTransformFeedbacks = (PFNGLGENTRANSFORMFEEDBACKSPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::GenTransformFeedbacks); - return _GenTransformFeedbacks(n, ids); -} -inline GLboolean DYNAMICGLES_FUNCTION(IsTransformFeedback)(GLuint id) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glIsTransformFeedback) PFNGLISTRANSFORMFEEDBACKPROC; -#endif - PFNGLISTRANSFORMFEEDBACKPROC _IsTransformFeedback = (PFNGLISTRANSFORMFEEDBACKPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::IsTransformFeedback); - return _IsTransformFeedback(id); -} -inline void DYNAMICGLES_FUNCTION(PauseTransformFeedback)(void) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glPauseTransformFeedback) PFNGLPAUSETRANSFORMFEEDBACKPROC; -#endif - PFNGLPAUSETRANSFORMFEEDBACKPROC _PauseTransformFeedback = (PFNGLPAUSETRANSFORMFEEDBACKPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::PauseTransformFeedback); - return _PauseTransformFeedback(); -} -inline void DYNAMICGLES_FUNCTION(ResumeTransformFeedback)(void) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glResumeTransformFeedback) PFNGLRESUMETRANSFORMFEEDBACKPROC; -#endif - PFNGLRESUMETRANSFORMFEEDBACKPROC _ResumeTransformFeedback = (PFNGLRESUMETRANSFORMFEEDBACKPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::ResumeTransformFeedback); - return _ResumeTransformFeedback(); -} -inline void DYNAMICGLES_FUNCTION(GetProgramBinary)(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, void* binary) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetProgramBinary) PFNGLGETPROGRAMBINARYPROC; -#endif - PFNGLGETPROGRAMBINARYPROC _GetProgramBinary = (PFNGLGETPROGRAMBINARYPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::GetProgramBinary); - return _GetProgramBinary(program, bufSize, length, binaryFormat, binary); -} -inline void DYNAMICGLES_FUNCTION(ProgramBinary)(GLuint program, GLenum binaryFormat, const void* binary, GLsizei length) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glProgramBinary) PFNGLPROGRAMBINARYPROC; -#endif - PFNGLPROGRAMBINARYPROC _ProgramBinary = (PFNGLPROGRAMBINARYPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::ProgramBinary); - return _ProgramBinary(program, binaryFormat, binary, length); -} -inline void DYNAMICGLES_FUNCTION(ProgramParameteri)(GLuint program, GLenum pname, GLint value) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glProgramParameteri) PFNGLPROGRAMPARAMETERIPROC; -#endif - PFNGLPROGRAMPARAMETERIPROC _ProgramParameteri = (PFNGLPROGRAMPARAMETERIPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::ProgramParameteri); - return _ProgramParameteri(program, pname, value); -} -inline void DYNAMICGLES_FUNCTION(InvalidateFramebuffer)(GLenum target, GLsizei numAttachments, const GLenum* attachments) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glInvalidateFramebuffer) PFNGLINVALIDATEFRAMEBUFFERPROC; -#endif - PFNGLINVALIDATEFRAMEBUFFERPROC _InvalidateFramebuffer = (PFNGLINVALIDATEFRAMEBUFFERPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::InvalidateFramebuffer); - return _InvalidateFramebuffer(target, numAttachments, attachments); -} -inline void DYNAMICGLES_FUNCTION(InvalidateSubFramebuffer)(GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glInvalidateSubFramebuffer) PFNGLINVALIDATESUBFRAMEBUFFERPROC; -#endif - PFNGLINVALIDATESUBFRAMEBUFFERPROC _InvalidateSubFramebuffer = (PFNGLINVALIDATESUBFRAMEBUFFERPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::InvalidateSubFramebuffer); - return _InvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height); -} -inline void DYNAMICGLES_FUNCTION(TexStorage2D)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glTexStorage2D) PFNGLTEXSTORAGE2DPROC; -#endif - PFNGLTEXSTORAGE2DPROC _TexStorage2D = (PFNGLTEXSTORAGE2DPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::TexStorage2D); - return _TexStorage2D(target, levels, internalformat, width, height); -} -inline void DYNAMICGLES_FUNCTION(TexStorage3D)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glTexStorage3D) PFNGLTEXSTORAGE3DPROC; -#endif - PFNGLTEXSTORAGE3DPROC _TexStorage3D = (PFNGLTEXSTORAGE3DPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::TexStorage3D); - return _TexStorage3D(target, levels, internalformat, width, height, depth); -} -inline void DYNAMICGLES_FUNCTION(GetInternalformativ)(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetInternalformativ) PFNGLGETINTERNALFORMATIVPROC; -#endif - PFNGLGETINTERNALFORMATIVPROC _GetInternalformativ = (PFNGLGETINTERNALFORMATIVPROC)gl::internals::getEs3Function(gl::internals::Gl3FuncName::GetInternalformativ); - return _GetInternalformativ(target, internalformat, pname, bufSize, params); -} -#ifndef DYNAMICGLES_NO_NAMESPACE -} -#elif TARGET_OS_IPHONE -} -} -#endif - -namespace gl { -namespace internals { -namespace Gl2FuncName { -enum OpenGLES2FunctionName -{ - ActiveTexture, AttachShader, BindAttribLocation, BindBuffer, BindFramebuffer, BindRenderbuffer, BindTexture, BlendColor, BlendEquation, BlendEquationSeparate, - BlendFunc, BlendFuncSeparate, BufferData, BufferSubData, CheckFramebufferStatus, Clear, ClearColor, ClearDepthf, ClearStencil, ColorMask, CompileShader, - CompressedTexImage2D, CompressedTexSubImage2D, CopyTexImage2D, CopyTexSubImage2D, CreateProgram, CreateShader, CullFace, DeleteBuffers, DeleteFramebuffers, - DeleteProgram, DeleteRenderbuffers, DeleteShader, DeleteTextures, DepthFunc, DepthMask, DepthRangef, DetachShader, Disable, DisableVertexAttribArray, - DrawArrays, DrawElements, Enable, EnableVertexAttribArray, Finish, Flush, FramebufferRenderbuffer, FramebufferTexture2D, FrontFace, GenBuffers, GenerateMipmap, - GenFramebuffers, GenRenderbuffers, GenTextures, GetActiveAttrib, GetActiveUniform, GetAttachedShaders, GetAttribLocation, GetBooleanv, GetBufferParameteriv, - GetError, GetFloatv, GetFramebufferAttachmentParameteriv, GetIntegerv, GetProgramiv, GetProgramInfoLog, GetRenderbufferParameteriv, GetShaderiv, GetShaderInfoLog, - GetShaderPrecisionFormat, GetShaderSource, GetString, GetTexParameterfv, GetTexParameteriv, GetUniformfv, GetUniformiv, GetUniformLocation, GetVertexAttribfv, - GetVertexAttribiv, GetVertexAttribPointerv, Hint, IsBuffer, IsEnabled, IsFramebuffer, IsProgram, IsRenderbuffer, IsShader, IsTexture, LineWidth, LinkProgram, - PixelStorei, PolygonOffset, ReadPixels, ReleaseShaderCompiler, RenderbufferStorage, SampleCoverage, Scissor, ShaderBinary, ShaderSource, StencilFunc, - StencilFuncSeparate, StencilMask, StencilMaskSeparate, StencilOp, StencilOpSeparate, TexImage2D, TexParameterf, TexParameterfv, TexParameteri, TexParameteriv, - TexSubImage2D, Uniform1f, Uniform1fv, Uniform1i, Uniform1iv, Uniform2f, Uniform2fv, Uniform2i, Uniform2iv, Uniform3f, Uniform3fv, Uniform3i, Uniform3iv, Uniform4f, - Uniform4fv, Uniform4i, Uniform4iv, UniformMatrix2fv, UniformMatrix3fv, UniformMatrix4fv, UseProgram, ValidateProgram, VertexAttrib1f, VertexAttrib1fv, - VertexAttrib2f, VertexAttrib2fv, VertexAttrib3f, VertexAttrib3fv, VertexAttrib4f, VertexAttrib4fv, VertexAttribPointer, Viewport, - NUMBER_OF_OPENGLES2_FUNCTIONS -}; -} - -inline void* getEs2Function(gl::internals::Gl2FuncName::OpenGLES2FunctionName funcname) -{ - static void* FunctionTable[Gl2FuncName::NUMBER_OF_OPENGLES2_FUNCTIONS]; - - // GET FUNCTION POINTERS --- ONCE!!!! /// - if (!FunctionTable[0]) - { -#if !TARGET_OS_IPHONE - pvr::lib::LIBTYPE lib = pvr::lib::openlib(gl::internals::libName); - if (!lib) - { - Log_Error("OpenGL ES Bindings: Failed to open library %s\n", internals::libName); - } - else - { - Log_Info("OpenGL ES Bindings: Successfully loaded library %s for OpenGL ES 2.0\n", libName); - } - - FunctionTable[Gl2FuncName::ActiveTexture] = pvr::lib::getLibFunctionChecked(lib, "glActiveTexture"); - FunctionTable[Gl2FuncName::AttachShader] = pvr::lib::getLibFunctionChecked(lib, "glAttachShader"); - FunctionTable[Gl2FuncName::BindAttribLocation] = pvr::lib::getLibFunctionChecked(lib, "glBindAttribLocation"); - FunctionTable[Gl2FuncName::BindBuffer] = pvr::lib::getLibFunctionChecked(lib, "glBindBuffer"); - FunctionTable[Gl2FuncName::BindFramebuffer] = pvr::lib::getLibFunctionChecked(lib, "glBindFramebuffer"); - FunctionTable[Gl2FuncName::BindRenderbuffer] = pvr::lib::getLibFunctionChecked(lib, "glBindRenderbuffer"); - FunctionTable[Gl2FuncName::BindTexture] = pvr::lib::getLibFunctionChecked(lib, "glBindTexture"); - FunctionTable[Gl2FuncName::BlendColor] = pvr::lib::getLibFunctionChecked(lib, "glBlendColor"); - FunctionTable[Gl2FuncName::BlendEquation] = pvr::lib::getLibFunctionChecked(lib, "glBlendEquation"); - FunctionTable[Gl2FuncName::BlendEquationSeparate] = pvr::lib::getLibFunctionChecked(lib, "glBlendEquationSeparate"); - FunctionTable[Gl2FuncName::BlendFunc] = pvr::lib::getLibFunctionChecked(lib, "glBlendFunc"); - FunctionTable[Gl2FuncName::BlendFuncSeparate] = pvr::lib::getLibFunctionChecked(lib, "glBlendFuncSeparate"); - FunctionTable[Gl2FuncName::BufferData] = pvr::lib::getLibFunctionChecked(lib, "glBufferData"); - FunctionTable[Gl2FuncName::BufferSubData] = pvr::lib::getLibFunctionChecked(lib, "glBufferSubData"); - FunctionTable[Gl2FuncName::CheckFramebufferStatus] = pvr::lib::getLibFunctionChecked(lib, "glCheckFramebufferStatus"); - FunctionTable[Gl2FuncName::Clear] = pvr::lib::getLibFunctionChecked(lib, "glClear"); - FunctionTable[Gl2FuncName::ClearColor] = pvr::lib::getLibFunctionChecked(lib, "glClearColor"); - FunctionTable[Gl2FuncName::ClearDepthf] = pvr::lib::getLibFunctionChecked(lib, "glClearDepthf"); - FunctionTable[Gl2FuncName::ClearStencil] = pvr::lib::getLibFunctionChecked(lib, "glClearStencil"); - FunctionTable[Gl2FuncName::ColorMask] = pvr::lib::getLibFunctionChecked(lib, "glColorMask"); - FunctionTable[Gl2FuncName::CompileShader] = pvr::lib::getLibFunctionChecked(lib, "glCompileShader"); - FunctionTable[Gl2FuncName::CompressedTexImage2D] = pvr::lib::getLibFunctionChecked(lib, "glCompressedTexImage2D"); - FunctionTable[Gl2FuncName::CompressedTexSubImage2D] = pvr::lib::getLibFunctionChecked(lib, "glCompressedTexSubImage2D"); - FunctionTable[Gl2FuncName::CopyTexImage2D] = pvr::lib::getLibFunctionChecked(lib, "glCopyTexImage2D"); - FunctionTable[Gl2FuncName::CopyTexSubImage2D] = pvr::lib::getLibFunctionChecked(lib, "glCopyTexSubImage2D"); - FunctionTable[Gl2FuncName::CreateProgram] = pvr::lib::getLibFunctionChecked(lib, "glCreateProgram"); - FunctionTable[Gl2FuncName::CreateShader] = pvr::lib::getLibFunctionChecked(lib, "glCreateShader"); - FunctionTable[Gl2FuncName::CullFace] = pvr::lib::getLibFunctionChecked(lib, "glCullFace"); - FunctionTable[Gl2FuncName::DeleteBuffers] = pvr::lib::getLibFunctionChecked(lib, "glDeleteBuffers"); - FunctionTable[Gl2FuncName::DeleteFramebuffers] = pvr::lib::getLibFunctionChecked(lib, "glDeleteFramebuffers"); - FunctionTable[Gl2FuncName::DeleteProgram] = pvr::lib::getLibFunctionChecked(lib, "glDeleteProgram"); - FunctionTable[Gl2FuncName::DeleteRenderbuffers] = pvr::lib::getLibFunctionChecked(lib, "glDeleteRenderbuffers"); - FunctionTable[Gl2FuncName::DeleteShader] = pvr::lib::getLibFunctionChecked(lib, "glDeleteShader"); - FunctionTable[Gl2FuncName::DeleteTextures] = pvr::lib::getLibFunctionChecked(lib, "glDeleteTextures"); - FunctionTable[Gl2FuncName::DepthFunc] = pvr::lib::getLibFunctionChecked(lib, "glDepthFunc"); - FunctionTable[Gl2FuncName::DepthMask] = pvr::lib::getLibFunctionChecked(lib, "glDepthMask"); - FunctionTable[Gl2FuncName::DepthRangef] = pvr::lib::getLibFunctionChecked(lib, "glDepthRangef"); - FunctionTable[Gl2FuncName::DetachShader] = pvr::lib::getLibFunctionChecked(lib, "glDetachShader"); - FunctionTable[Gl2FuncName::Disable] = pvr::lib::getLibFunctionChecked(lib, "glDisable"); - FunctionTable[Gl2FuncName::DisableVertexAttribArray] = pvr::lib::getLibFunctionChecked(lib, "glDisableVertexAttribArray"); - FunctionTable[Gl2FuncName::DrawArrays] = pvr::lib::getLibFunctionChecked(lib, "glDrawArrays"); - FunctionTable[Gl2FuncName::DrawElements] = pvr::lib::getLibFunctionChecked(lib, "glDrawElements"); - FunctionTable[Gl2FuncName::Enable] = pvr::lib::getLibFunctionChecked(lib, "glEnable"); - FunctionTable[Gl2FuncName::EnableVertexAttribArray] = pvr::lib::getLibFunctionChecked(lib, "glEnableVertexAttribArray"); - FunctionTable[Gl2FuncName::Finish] = pvr::lib::getLibFunctionChecked(lib, "glFinish"); - FunctionTable[Gl2FuncName::Flush] = pvr::lib::getLibFunctionChecked(lib, "glFlush"); - FunctionTable[Gl2FuncName::FramebufferRenderbuffer] = pvr::lib::getLibFunctionChecked(lib, "glFramebufferRenderbuffer"); - FunctionTable[Gl2FuncName::FramebufferTexture2D] = pvr::lib::getLibFunctionChecked(lib, "glFramebufferTexture2D"); - FunctionTable[Gl2FuncName::FrontFace] = pvr::lib::getLibFunctionChecked(lib, "glFrontFace"); - FunctionTable[Gl2FuncName::GenBuffers] = pvr::lib::getLibFunctionChecked(lib, "glGenBuffers"); - FunctionTable[Gl2FuncName::GenerateMipmap] = pvr::lib::getLibFunctionChecked(lib, "glGenerateMipmap"); - FunctionTable[Gl2FuncName::GenFramebuffers] = pvr::lib::getLibFunctionChecked(lib, "glGenFramebuffers"); - FunctionTable[Gl2FuncName::GenRenderbuffers] = pvr::lib::getLibFunctionChecked(lib, "glGenRenderbuffers"); - FunctionTable[Gl2FuncName::GenTextures] = pvr::lib::getLibFunctionChecked(lib, "glGenTextures"); - FunctionTable[Gl2FuncName::GetActiveAttrib] = pvr::lib::getLibFunctionChecked(lib, "glGetActiveAttrib"); - FunctionTable[Gl2FuncName::GetActiveUniform] = pvr::lib::getLibFunctionChecked(lib, "glGetActiveUniform"); - FunctionTable[Gl2FuncName::GetAttachedShaders] = pvr::lib::getLibFunctionChecked(lib, "glGetAttachedShaders"); - FunctionTable[Gl2FuncName::GetAttribLocation] = pvr::lib::getLibFunctionChecked(lib, "glGetAttribLocation"); - FunctionTable[Gl2FuncName::GetBooleanv] = pvr::lib::getLibFunctionChecked(lib, "glGetBooleanv"); - FunctionTable[Gl2FuncName::GetBufferParameteriv] = pvr::lib::getLibFunctionChecked(lib, "glGetBufferParameteriv"); - FunctionTable[Gl2FuncName::GetError] = pvr::lib::getLibFunctionChecked(lib, "glGetError"); - FunctionTable[Gl2FuncName::GetFloatv] = pvr::lib::getLibFunctionChecked(lib, "glGetFloatv"); - FunctionTable[Gl2FuncName::GetFramebufferAttachmentParameteriv] = pvr::lib::getLibFunctionChecked(lib, "glGetFramebufferAttachmentParameteriv"); - FunctionTable[Gl2FuncName::GetIntegerv] = pvr::lib::getLibFunctionChecked(lib, "glGetIntegerv"); - FunctionTable[Gl2FuncName::GetProgramiv] = pvr::lib::getLibFunctionChecked(lib, "glGetProgramiv"); - FunctionTable[Gl2FuncName::GetProgramInfoLog] = pvr::lib::getLibFunctionChecked(lib, "glGetProgramInfoLog"); - FunctionTable[Gl2FuncName::GetRenderbufferParameteriv] = pvr::lib::getLibFunctionChecked(lib, "glGetRenderbufferParameteriv"); - FunctionTable[Gl2FuncName::GetShaderiv] = pvr::lib::getLibFunctionChecked(lib, "glGetShaderiv"); - FunctionTable[Gl2FuncName::GetShaderInfoLog] = pvr::lib::getLibFunctionChecked(lib, "glGetShaderInfoLog"); - FunctionTable[Gl2FuncName::GetShaderPrecisionFormat] = pvr::lib::getLibFunctionChecked(lib, "glGetShaderPrecisionFormat"); - FunctionTable[Gl2FuncName::GetShaderSource] = pvr::lib::getLibFunctionChecked(lib, "glGetShaderSource"); - FunctionTable[Gl2FuncName::GetString] = pvr::lib::getLibFunctionChecked(lib, "glGetString"); - FunctionTable[Gl2FuncName::GetTexParameterfv] = pvr::lib::getLibFunctionChecked(lib, "glGetTexParameterfv"); - FunctionTable[Gl2FuncName::GetTexParameteriv] = pvr::lib::getLibFunctionChecked(lib, "glGetTexParameteriv"); - FunctionTable[Gl2FuncName::GetUniformfv] = pvr::lib::getLibFunctionChecked(lib, "glGetUniformfv"); - FunctionTable[Gl2FuncName::GetUniformiv] = pvr::lib::getLibFunctionChecked(lib, "glGetUniformiv"); - FunctionTable[Gl2FuncName::GetUniformLocation] = pvr::lib::getLibFunctionChecked(lib, "glGetUniformLocation"); - FunctionTable[Gl2FuncName::GetVertexAttribfv] = pvr::lib::getLibFunctionChecked(lib, "glGetVertexAttribfv"); - FunctionTable[Gl2FuncName::GetVertexAttribiv] = pvr::lib::getLibFunctionChecked(lib, "glGetVertexAttribiv"); - FunctionTable[Gl2FuncName::GetVertexAttribPointerv] = pvr::lib::getLibFunctionChecked(lib, "glGetVertexAttribPointerv"); - FunctionTable[Gl2FuncName::Hint] = pvr::lib::getLibFunctionChecked(lib, "glHint"); - FunctionTable[Gl2FuncName::IsBuffer] = pvr::lib::getLibFunctionChecked(lib, "glIsBuffer"); - FunctionTable[Gl2FuncName::IsEnabled] = pvr::lib::getLibFunctionChecked(lib, "glIsEnabled"); - FunctionTable[Gl2FuncName::IsFramebuffer] = pvr::lib::getLibFunctionChecked(lib, "glIsFramebuffer"); - FunctionTable[Gl2FuncName::IsProgram] = pvr::lib::getLibFunctionChecked(lib, "glIsProgram"); - FunctionTable[Gl2FuncName::IsRenderbuffer] = pvr::lib::getLibFunctionChecked(lib, "glIsRenderbuffer"); - FunctionTable[Gl2FuncName::IsShader] = pvr::lib::getLibFunctionChecked(lib, "glIsShader"); - FunctionTable[Gl2FuncName::IsTexture] = pvr::lib::getLibFunctionChecked(lib, "glIsTexture"); - FunctionTable[Gl2FuncName::LineWidth] = pvr::lib::getLibFunctionChecked(lib, "glLineWidth"); - FunctionTable[Gl2FuncName::LinkProgram] = pvr::lib::getLibFunctionChecked(lib, "glLinkProgram"); - FunctionTable[Gl2FuncName::PixelStorei] = pvr::lib::getLibFunctionChecked(lib, "glPixelStorei"); - FunctionTable[Gl2FuncName::PolygonOffset] = pvr::lib::getLibFunctionChecked(lib, "glPolygonOffset"); - FunctionTable[Gl2FuncName::ReadPixels] = pvr::lib::getLibFunctionChecked(lib, "glReadPixels"); - FunctionTable[Gl2FuncName::ReleaseShaderCompiler] = pvr::lib::getLibFunctionChecked(lib, "glReleaseShaderCompiler"); - FunctionTable[Gl2FuncName::RenderbufferStorage] = pvr::lib::getLibFunctionChecked(lib, "glRenderbufferStorage"); - FunctionTable[Gl2FuncName::SampleCoverage] = pvr::lib::getLibFunctionChecked(lib, "glSampleCoverage"); - FunctionTable[Gl2FuncName::Scissor] = pvr::lib::getLibFunctionChecked(lib, "glScissor"); - FunctionTable[Gl2FuncName::ShaderBinary] = pvr::lib::getLibFunctionChecked(lib, "glShaderBinary"); - FunctionTable[Gl2FuncName::ShaderSource] = pvr::lib::getLibFunctionChecked(lib, "glShaderSource"); - FunctionTable[Gl2FuncName::StencilFunc] = pvr::lib::getLibFunctionChecked(lib, "glStencilFunc"); - FunctionTable[Gl2FuncName::StencilFuncSeparate] = pvr::lib::getLibFunctionChecked(lib, "glStencilFuncSeparate"); - FunctionTable[Gl2FuncName::StencilMask] = pvr::lib::getLibFunctionChecked(lib, "glStencilMask"); - FunctionTable[Gl2FuncName::StencilMaskSeparate] = pvr::lib::getLibFunctionChecked(lib, "glStencilMaskSeparate"); - FunctionTable[Gl2FuncName::StencilOp] = pvr::lib::getLibFunctionChecked(lib, "glStencilOp"); - FunctionTable[Gl2FuncName::StencilOpSeparate] = pvr::lib::getLibFunctionChecked(lib, "glStencilOpSeparate"); - FunctionTable[Gl2FuncName::TexImage2D] = pvr::lib::getLibFunctionChecked(lib, "glTexImage2D"); - FunctionTable[Gl2FuncName::TexParameterf] = pvr::lib::getLibFunctionChecked(lib, "glTexParameterf"); - FunctionTable[Gl2FuncName::TexParameterfv] = pvr::lib::getLibFunctionChecked(lib, "glTexParameterfv"); - FunctionTable[Gl2FuncName::TexParameteri] = pvr::lib::getLibFunctionChecked(lib, "glTexParameteri"); - FunctionTable[Gl2FuncName::TexParameteriv] = pvr::lib::getLibFunctionChecked(lib, "glTexParameteriv"); - FunctionTable[Gl2FuncName::TexSubImage2D] = pvr::lib::getLibFunctionChecked(lib, "glTexSubImage2D"); - FunctionTable[Gl2FuncName::Uniform1f] = pvr::lib::getLibFunctionChecked(lib, "glUniform1f"); - FunctionTable[Gl2FuncName::Uniform1fv] = pvr::lib::getLibFunctionChecked(lib, "glUniform1fv"); - FunctionTable[Gl2FuncName::Uniform1i] = pvr::lib::getLibFunctionChecked(lib, "glUniform1i"); - FunctionTable[Gl2FuncName::Uniform1iv] = pvr::lib::getLibFunctionChecked(lib, "glUniform1iv"); - FunctionTable[Gl2FuncName::Uniform2f] = pvr::lib::getLibFunctionChecked(lib, "glUniform2f"); - FunctionTable[Gl2FuncName::Uniform2fv] = pvr::lib::getLibFunctionChecked(lib, "glUniform2fv"); - FunctionTable[Gl2FuncName::Uniform2i] = pvr::lib::getLibFunctionChecked(lib, "glUniform2i"); - FunctionTable[Gl2FuncName::Uniform2iv] = pvr::lib::getLibFunctionChecked(lib, "glUniform2iv"); - FunctionTable[Gl2FuncName::Uniform3f] = pvr::lib::getLibFunctionChecked(lib, "glUniform3f"); - FunctionTable[Gl2FuncName::Uniform3fv] = pvr::lib::getLibFunctionChecked(lib, "glUniform3fv"); - FunctionTable[Gl2FuncName::Uniform3i] = pvr::lib::getLibFunctionChecked(lib, "glUniform3i"); - FunctionTable[Gl2FuncName::Uniform3iv] = pvr::lib::getLibFunctionChecked(lib, "glUniform3iv"); - FunctionTable[Gl2FuncName::Uniform4f] = pvr::lib::getLibFunctionChecked(lib, "glUniform4f"); - FunctionTable[Gl2FuncName::Uniform4fv] = pvr::lib::getLibFunctionChecked(lib, "glUniform4fv"); - FunctionTable[Gl2FuncName::Uniform4i] = pvr::lib::getLibFunctionChecked(lib, "glUniform4i"); - FunctionTable[Gl2FuncName::Uniform4iv] = pvr::lib::getLibFunctionChecked(lib, "glUniform4iv"); - FunctionTable[Gl2FuncName::UniformMatrix2fv] = pvr::lib::getLibFunctionChecked(lib, "glUniformMatrix2fv"); - FunctionTable[Gl2FuncName::UniformMatrix3fv] = pvr::lib::getLibFunctionChecked(lib, "glUniformMatrix3fv"); - FunctionTable[Gl2FuncName::UniformMatrix4fv] = pvr::lib::getLibFunctionChecked(lib, "glUniformMatrix4fv"); - FunctionTable[Gl2FuncName::UseProgram] = pvr::lib::getLibFunctionChecked(lib, "glUseProgram"); - FunctionTable[Gl2FuncName::ValidateProgram] = pvr::lib::getLibFunctionChecked(lib, "glValidateProgram"); - FunctionTable[Gl2FuncName::VertexAttrib1f] = pvr::lib::getLibFunctionChecked(lib, "glVertexAttrib1f"); - FunctionTable[Gl2FuncName::VertexAttrib1fv] = pvr::lib::getLibFunctionChecked(lib, "glVertexAttrib1fv"); - FunctionTable[Gl2FuncName::VertexAttrib2f] = pvr::lib::getLibFunctionChecked(lib, "glVertexAttrib2f"); - FunctionTable[Gl2FuncName::VertexAttrib2fv] = pvr::lib::getLibFunctionChecked(lib, "glVertexAttrib2fv"); - FunctionTable[Gl2FuncName::VertexAttrib3f] = pvr::lib::getLibFunctionChecked(lib, "glVertexAttrib3f"); - FunctionTable[Gl2FuncName::VertexAttrib3fv] = pvr::lib::getLibFunctionChecked(lib, "glVertexAttrib3fv"); - FunctionTable[Gl2FuncName::VertexAttrib4f] = pvr::lib::getLibFunctionChecked(lib, "glVertexAttrib4f"); - FunctionTable[Gl2FuncName::VertexAttrib4fv] = pvr::lib::getLibFunctionChecked(lib, "glVertexAttrib4fv"); - FunctionTable[Gl2FuncName::VertexAttribPointer] = pvr::lib::getLibFunctionChecked(lib, "glVertexAttribPointer"); - FunctionTable[Gl2FuncName::Viewport] = pvr::lib::getLibFunctionChecked(lib, "glViewport"); -#else - FunctionTable[Gl2FuncName::ActiveTexture] = (void*)&glActiveTexture; - FunctionTable[Gl2FuncName::AttachShader] = (void*)&glAttachShader; - FunctionTable[Gl2FuncName::BindAttribLocation] = (void*)&glBindAttribLocation; - FunctionTable[Gl2FuncName::BindBuffer] = (void*)&glBindBuffer; - FunctionTable[Gl2FuncName::BindFramebuffer] = (void*)&glBindFramebuffer; - FunctionTable[Gl2FuncName::BindRenderbuffer] = (void*)&glBindRenderbuffer; - FunctionTable[Gl2FuncName::BindTexture] = (void*)&glBindTexture; - FunctionTable[Gl2FuncName::BlendColor] = (void*)&glBlendColor; - FunctionTable[Gl2FuncName::BlendEquation] = (void*)&glBlendEquation; - FunctionTable[Gl2FuncName::BlendEquationSeparate] = (void*)&glBlendEquationSeparate; - FunctionTable[Gl2FuncName::BlendFunc] = (void*)&glBlendFunc; - FunctionTable[Gl2FuncName::BlendFuncSeparate] = (void*)&glBlendFuncSeparate; - FunctionTable[Gl2FuncName::BufferData] = (void*)&glBufferData; - FunctionTable[Gl2FuncName::BufferSubData] = (void*)&glBufferSubData; - FunctionTable[Gl2FuncName::CheckFramebufferStatus] = (void*)&glCheckFramebufferStatus; - FunctionTable[Gl2FuncName::Clear] = (void*)&glClear; - FunctionTable[Gl2FuncName::ClearColor] = (void*)&glClearColor; - FunctionTable[Gl2FuncName::ClearDepthf] = (void*)&glClearDepthf; - FunctionTable[Gl2FuncName::ClearStencil] = (void*)&glClearStencil; - FunctionTable[Gl2FuncName::ColorMask] = (void*)&glColorMask; - FunctionTable[Gl2FuncName::CompileShader] = (void*)&glCompileShader; - FunctionTable[Gl2FuncName::CompressedTexImage2D] = (void*)&glCompressedTexImage2D; - FunctionTable[Gl2FuncName::CompressedTexSubImage2D] = (void*)&glCompressedTexSubImage2D; - FunctionTable[Gl2FuncName::CopyTexImage2D] = (void*)&glCopyTexImage2D; - FunctionTable[Gl2FuncName::CopyTexSubImage2D] = (void*)&glCopyTexSubImage2D; - FunctionTable[Gl2FuncName::CreateProgram] = (void*)&glCreateProgram; - FunctionTable[Gl2FuncName::CreateShader] = (void*)&glCreateShader; - FunctionTable[Gl2FuncName::CullFace] = (void*)&glCullFace; - FunctionTable[Gl2FuncName::DeleteBuffers] = (void*)&glDeleteBuffers; - FunctionTable[Gl2FuncName::DeleteFramebuffers] = (void*)&glDeleteFramebuffers; - FunctionTable[Gl2FuncName::DeleteProgram] = (void*)&glDeleteProgram; - FunctionTable[Gl2FuncName::DeleteRenderbuffers] = (void*)&glDeleteRenderbuffers; - FunctionTable[Gl2FuncName::DeleteShader] = (void*)&glDeleteShader; - FunctionTable[Gl2FuncName::DeleteTextures] = (void*)&glDeleteTextures; - FunctionTable[Gl2FuncName::DepthFunc] = (void*)&glDepthFunc; - FunctionTable[Gl2FuncName::DepthMask] = (void*)&glDepthMask; - FunctionTable[Gl2FuncName::DepthRangef] = (void*)&glDepthRangef; - FunctionTable[Gl2FuncName::DetachShader] = (void*)&glDetachShader; - FunctionTable[Gl2FuncName::Disable] = (void*)&glDisable; - FunctionTable[Gl2FuncName::DisableVertexAttribArray] = (void*)&glDisableVertexAttribArray; - FunctionTable[Gl2FuncName::DrawArrays] = (void*)&glDrawArrays; - FunctionTable[Gl2FuncName::DrawElements] = (void*)&glDrawElements; - FunctionTable[Gl2FuncName::Enable] = (void*)&glEnable; - FunctionTable[Gl2FuncName::EnableVertexAttribArray] = (void*)&glEnableVertexAttribArray; - FunctionTable[Gl2FuncName::Finish] = (void*)&glFinish; - FunctionTable[Gl2FuncName::Flush] = (void*)&glFlush; - FunctionTable[Gl2FuncName::FramebufferRenderbuffer] = (void*)&glFramebufferRenderbuffer; - FunctionTable[Gl2FuncName::FramebufferTexture2D] = (void*)&glFramebufferTexture2D; - FunctionTable[Gl2FuncName::FrontFace] = (void*)&glFrontFace; - FunctionTable[Gl2FuncName::GenBuffers] = (void*)&glGenBuffers; - FunctionTable[Gl2FuncName::GenerateMipmap] = (void*)&glGenerateMipmap; - FunctionTable[Gl2FuncName::GenFramebuffers] = (void*)&glGenFramebuffers; - FunctionTable[Gl2FuncName::GenRenderbuffers] = (void*)&glGenRenderbuffers; - FunctionTable[Gl2FuncName::GenTextures] = (void*)&glGenTextures; - FunctionTable[Gl2FuncName::GetActiveAttrib] = (void*)&glGetActiveAttrib; - FunctionTable[Gl2FuncName::GetActiveUniform] = (void*)&glGetActiveUniform; - FunctionTable[Gl2FuncName::GetAttachedShaders] = (void*)&glGetAttachedShaders; - FunctionTable[Gl2FuncName::GetAttribLocation] = (void*)&glGetAttribLocation; - FunctionTable[Gl2FuncName::GetBooleanv] = (void*)&glGetBooleanv; - FunctionTable[Gl2FuncName::GetBufferParameteriv] = (void*)&glGetBufferParameteriv; - FunctionTable[Gl2FuncName::GetError] = (void*)&glGetError; - FunctionTable[Gl2FuncName::GetFloatv] = (void*)&glGetFloatv; - FunctionTable[Gl2FuncName::GetFramebufferAttachmentParameteriv] = (void*)&glGetFramebufferAttachmentParameteriv; - FunctionTable[Gl2FuncName::GetIntegerv] = (void*)&glGetIntegerv; - FunctionTable[Gl2FuncName::GetProgramiv] = (void*)&glGetProgramiv; - FunctionTable[Gl2FuncName::GetProgramInfoLog] = (void*)&glGetProgramInfoLog; - FunctionTable[Gl2FuncName::GetRenderbufferParameteriv] = (void*)&glGetRenderbufferParameteriv; - FunctionTable[Gl2FuncName::GetShaderiv] = (void*)&glGetShaderiv; - FunctionTable[Gl2FuncName::GetShaderInfoLog] = (void*)&glGetShaderInfoLog; - FunctionTable[Gl2FuncName::GetShaderPrecisionFormat] = (void*)&glGetShaderPrecisionFormat; - FunctionTable[Gl2FuncName::GetShaderSource] = (void*)&glGetShaderSource; - FunctionTable[Gl2FuncName::GetString] = (void*)&glGetString; - FunctionTable[Gl2FuncName::GetTexParameterfv] = (void*)&glGetTexParameterfv; - FunctionTable[Gl2FuncName::GetTexParameteriv] = (void*)&glGetTexParameteriv; - FunctionTable[Gl2FuncName::GetUniformfv] = (void*)&glGetUniformfv; - FunctionTable[Gl2FuncName::GetUniformiv] = (void*)&glGetUniformiv; - FunctionTable[Gl2FuncName::GetUniformLocation] = (void*)&glGetUniformLocation; - FunctionTable[Gl2FuncName::GetVertexAttribfv] = (void*)&glGetVertexAttribfv; - FunctionTable[Gl2FuncName::GetVertexAttribiv] = (void*)&glGetVertexAttribiv; - FunctionTable[Gl2FuncName::GetVertexAttribPointerv] = (void*)&glGetVertexAttribPointerv; - FunctionTable[Gl2FuncName::Hint] = (void*)&glHint; - FunctionTable[Gl2FuncName::IsBuffer] = (void*)&glIsBuffer; - FunctionTable[Gl2FuncName::IsEnabled] = (void*)&glIsEnabled; - FunctionTable[Gl2FuncName::IsFramebuffer] = (void*)&glIsFramebuffer; - FunctionTable[Gl2FuncName::IsProgram] = (void*)&glIsProgram; - FunctionTable[Gl2FuncName::IsRenderbuffer] = (void*)&glIsRenderbuffer; - FunctionTable[Gl2FuncName::IsShader] = (void*)&glIsShader; - FunctionTable[Gl2FuncName::IsTexture] = (void*)&glIsTexture; - FunctionTable[Gl2FuncName::LineWidth] = (void*)&glLineWidth; - FunctionTable[Gl2FuncName::LinkProgram] = (void*)&glLinkProgram; - FunctionTable[Gl2FuncName::PixelStorei] = (void*)&glPixelStorei; - FunctionTable[Gl2FuncName::PolygonOffset] = (void*)&glPolygonOffset; - FunctionTable[Gl2FuncName::ReadPixels] = (void*)&glReadPixels; - FunctionTable[Gl2FuncName::ReleaseShaderCompiler] = (void*)&glReleaseShaderCompiler; - FunctionTable[Gl2FuncName::RenderbufferStorage] = (void*)&glRenderbufferStorage; - FunctionTable[Gl2FuncName::SampleCoverage] = (void*)&glSampleCoverage; - FunctionTable[Gl2FuncName::Scissor] = (void*)&glScissor; - FunctionTable[Gl2FuncName::ShaderBinary] = (void*)&glShaderBinary; - FunctionTable[Gl2FuncName::ShaderSource] = (void*)&glShaderSource; - FunctionTable[Gl2FuncName::StencilFunc] = (void*)&glStencilFunc; - FunctionTable[Gl2FuncName::StencilFuncSeparate] = (void*)&glStencilFuncSeparate; - FunctionTable[Gl2FuncName::StencilMask] = (void*)&glStencilMask; - FunctionTable[Gl2FuncName::StencilMaskSeparate] = (void*)&glStencilMaskSeparate; - FunctionTable[Gl2FuncName::StencilOp] = (void*)&glStencilOp; - FunctionTable[Gl2FuncName::StencilOpSeparate] = (void*)&glStencilOpSeparate; - FunctionTable[Gl2FuncName::TexImage2D] = (void*)&glTexImage2D; - FunctionTable[Gl2FuncName::TexParameterf] = (void*)&glTexParameterf; - FunctionTable[Gl2FuncName::TexParameterfv] = (void*)&glTexParameterfv; - FunctionTable[Gl2FuncName::TexParameteri] = (void*)&glTexParameteri; - FunctionTable[Gl2FuncName::TexParameteriv] = (void*)&glTexParameteriv; - FunctionTable[Gl2FuncName::TexSubImage2D] = (void*)&glTexSubImage2D; - FunctionTable[Gl2FuncName::Uniform1f] = (void*)&glUniform1f; - FunctionTable[Gl2FuncName::Uniform1fv] = (void*)&glUniform1fv; - FunctionTable[Gl2FuncName::Uniform1i] = (void*)&glUniform1i; - FunctionTable[Gl2FuncName::Uniform1iv] = (void*)&glUniform1iv; - FunctionTable[Gl2FuncName::Uniform2f] = (void*)&glUniform2f; - FunctionTable[Gl2FuncName::Uniform2fv] = (void*)&glUniform2fv; - FunctionTable[Gl2FuncName::Uniform2i] = (void*)&glUniform2i; - FunctionTable[Gl2FuncName::Uniform2iv] = (void*)&glUniform2iv; - FunctionTable[Gl2FuncName::Uniform3f] = (void*)&glUniform3f; - FunctionTable[Gl2FuncName::Uniform3fv] = (void*)&glUniform3fv; - FunctionTable[Gl2FuncName::Uniform3i] = (void*)&glUniform3i; - FunctionTable[Gl2FuncName::Uniform3iv] = (void*)&glUniform3iv; - FunctionTable[Gl2FuncName::Uniform4f] = (void*)&glUniform4f; - FunctionTable[Gl2FuncName::Uniform4fv] = (void*)&glUniform4fv; - FunctionTable[Gl2FuncName::Uniform4i] = (void*)&glUniform4i; - FunctionTable[Gl2FuncName::Uniform4iv] = (void*)&glUniform4iv; - FunctionTable[Gl2FuncName::UniformMatrix2fv] = (void*)&glUniformMatrix2fv; - FunctionTable[Gl2FuncName::UniformMatrix3fv] = (void*)&glUniformMatrix3fv; - FunctionTable[Gl2FuncName::UniformMatrix4fv] = (void*)&glUniformMatrix4fv; - FunctionTable[Gl2FuncName::UseProgram] = (void*)&glUseProgram; - FunctionTable[Gl2FuncName::ValidateProgram] = (void*)&glValidateProgram; - FunctionTable[Gl2FuncName::VertexAttrib1f] = (void*)&glVertexAttrib1f; - FunctionTable[Gl2FuncName::VertexAttrib1fv] = (void*)&glVertexAttrib1fv; - FunctionTable[Gl2FuncName::VertexAttrib2f] = (void*)&glVertexAttrib2f; - FunctionTable[Gl2FuncName::VertexAttrib2fv] = (void*)&glVertexAttrib2fv; - FunctionTable[Gl2FuncName::VertexAttrib3f] = (void*)&glVertexAttrib3f; - FunctionTable[Gl2FuncName::VertexAttrib3fv] = (void*)&glVertexAttrib3fv; - FunctionTable[Gl2FuncName::VertexAttrib4f] = (void*)&glVertexAttrib4f; - FunctionTable[Gl2FuncName::VertexAttrib4fv] = (void*)&glVertexAttrib4fv; - FunctionTable[Gl2FuncName::VertexAttribPointer] = (void*)&glVertexAttribPointer; - FunctionTable[Gl2FuncName::Viewport] = (void*)&glViewport; - -#endif - } - return FunctionTable[funcname]; -} -} -} - - -#ifndef DYNAMICGLES_NO_NAMESPACE -namespace gl { -#elif TARGET_OS_IPHONE -namespace gl { -namespace internals { -#endif - -inline void DYNAMICGLES_FUNCTION(ActiveTexture)(GLenum texture) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glActiveTexture) PFNGLACTIVETEXTUREPROC; -#endif - PFNGLACTIVETEXTUREPROC _ActiveTexture = (PFNGLACTIVETEXTUREPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::ActiveTexture); - return _ActiveTexture(texture); -} - -inline void DYNAMICGLES_FUNCTION(AttachShader)(GLuint program, GLuint shader) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glAttachShader) PFNGLATTACHSHADERPROC; -#endif - PFNGLATTACHSHADERPROC _AttachShader = (PFNGLATTACHSHADERPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::AttachShader); - return _AttachShader(program, shader); -} -inline void DYNAMICGLES_FUNCTION(BindAttribLocation)(GLuint program, GLuint index, const GLchar* name) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glBindAttribLocation) PFNGLBINDATTRIBLOCATIONPROC; -#endif - PFNGLBINDATTRIBLOCATIONPROC _BindAttribLocation = (PFNGLBINDATTRIBLOCATIONPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::BindAttribLocation); - return _BindAttribLocation(program, index, name); -} -inline void DYNAMICGLES_FUNCTION(BindBuffer)(GLenum target, GLuint buffer) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glBindBuffer) PFNGLBINDBUFFERPROC; -#endif - PFNGLBINDBUFFERPROC _BindBuffer = (PFNGLBINDBUFFERPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::BindBuffer); - return _BindBuffer(target, buffer); -} -inline void DYNAMICGLES_FUNCTION(BindFramebuffer)(GLenum target, GLuint framebuffer) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glBindFramebuffer) PFNGLBINDFRAMEBUFFERPROC; -#endif - PFNGLBINDFRAMEBUFFERPROC _BindFramebuffer = (PFNGLBINDFRAMEBUFFERPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::BindFramebuffer); - return _BindFramebuffer(target, framebuffer); -} -inline void DYNAMICGLES_FUNCTION(BindRenderbuffer)(GLenum target, GLuint renderbuffer) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glBindRenderbuffer) PFNGLBINDRENDERBUFFERPROC; -#endif - PFNGLBINDRENDERBUFFERPROC _BindRenderbuffer = (PFNGLBINDRENDERBUFFERPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::BindRenderbuffer); - return _BindRenderbuffer(target, renderbuffer); -} -inline void DYNAMICGLES_FUNCTION(BindTexture)(GLenum target, GLuint texture) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glBindTexture) PFNGLBINDTEXTUREPROC; -#endif - PFNGLBINDTEXTUREPROC _BindTexture = (PFNGLBINDTEXTUREPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::BindTexture); - return _BindTexture(target, texture); -} -inline void DYNAMICGLES_FUNCTION(BlendColor)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glBlendColor) PFNGLBLENDCOLORPROC; -#endif - PFNGLBLENDCOLORPROC _BlendColor = (PFNGLBLENDCOLORPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::BlendColor); - return _BlendColor(red, green, blue, alpha); -} -inline void DYNAMICGLES_FUNCTION(BlendEquation)(GLenum mode) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glBlendEquation) PFNGLBLENDEQUATIONPROC; -#endif - PFNGLBLENDEQUATIONPROC _BlendEquation = (PFNGLBLENDEQUATIONPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::BlendEquation); - return _BlendEquation(mode); -} -inline void DYNAMICGLES_FUNCTION(BlendEquationSeparate)(GLenum modeRGB, GLenum modeAlpha) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glBlendEquationSeparate) PFNGLBLENDEQUATIONSEPARATEPROC; -#endif - PFNGLBLENDEQUATIONSEPARATEPROC _BlendEquationSeparate = (PFNGLBLENDEQUATIONSEPARATEPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::BlendEquationSeparate); - return _BlendEquationSeparate(modeRGB, modeAlpha); -} -inline void DYNAMICGLES_FUNCTION(BlendFunc)(GLenum sfactor, GLenum dfactor) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glBlendFunc) PFNGLBLENDFUNCPROC; -#endif - PFNGLBLENDFUNCPROC _BlendFunc = (PFNGLBLENDFUNCPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::BlendFunc); - return _BlendFunc(sfactor, dfactor); -} -inline void DYNAMICGLES_FUNCTION(BlendFuncSeparate)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glBlendFuncSeparate) PFNGLBLENDFUNCSEPARATEPROC; -#endif - PFNGLBLENDFUNCSEPARATEPROC _BlendFuncSeparate = (PFNGLBLENDFUNCSEPARATEPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::BlendFuncSeparate); - return _BlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); -} -inline void DYNAMICGLES_FUNCTION(BufferData)(GLenum target, GLsizeiptr size, const void* data, GLenum usage) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glBufferData) PFNGLBUFFERDATAPROC; -#endif - PFNGLBUFFERDATAPROC _BufferData = (PFNGLBUFFERDATAPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::BufferData); - return _BufferData(target, size, data, usage); -} -inline void DYNAMICGLES_FUNCTION(BufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const void* data) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glBufferSubData) PFNGLBUFFERSUBDATAPROC; -#endif - PFNGLBUFFERSUBDATAPROC _BufferSubData = (PFNGLBUFFERSUBDATAPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::BufferSubData); - return _BufferSubData(target, offset, size, data); -} -inline GLenum DYNAMICGLES_FUNCTION(CheckFramebufferStatus)(GLenum target) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glCheckFramebufferStatus) PFNGLCHECKFRAMEBUFFERSTATUSPROC; -#endif - PFNGLCHECKFRAMEBUFFERSTATUSPROC _CheckFramebufferStatus = (PFNGLCHECKFRAMEBUFFERSTATUSPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::CheckFramebufferStatus); - return _CheckFramebufferStatus(target); -} -inline void DYNAMICGLES_FUNCTION(Clear)(GLbitfield mask) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glClear) PFNGLCLEARPROC; -#endif - PFNGLCLEARPROC _Clear = (PFNGLCLEARPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::Clear); - return _Clear(mask); -} -inline void DYNAMICGLES_FUNCTION(ClearColor)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glClearColor) PFNGLCLEARCOLORPROC; -#endif - PFNGLCLEARCOLORPROC _ClearColor = (PFNGLCLEARCOLORPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::ClearColor); - return _ClearColor(red, green, blue, alpha); -} -inline void DYNAMICGLES_FUNCTION(ClearDepthf)(GLfloat d) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glClearDepthf) PFNGLCLEARDEPTHFPROC; -#endif - PFNGLCLEARDEPTHFPROC _ClearDepthf = (PFNGLCLEARDEPTHFPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::ClearDepthf); - return _ClearDepthf(d); -} -inline void DYNAMICGLES_FUNCTION(ClearStencil)(GLint s) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glClearStencil) PFNGLCLEARSTENCILPROC; -#endif - PFNGLCLEARSTENCILPROC _ClearStencil = (PFNGLCLEARSTENCILPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::ClearStencil); - return _ClearStencil(s); -} -inline void DYNAMICGLES_FUNCTION(ColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glColorMask) PFNGLCOLORMASKPROC; -#endif - PFNGLCOLORMASKPROC _ColorMask = (PFNGLCOLORMASKPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::ColorMask); - return _ColorMask(red, green, blue, alpha); -} -inline void DYNAMICGLES_FUNCTION(CompileShader)(GLuint shader) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glCompileShader) PFNGLCOMPILESHADERPROC; -#endif - PFNGLCOMPILESHADERPROC _CompileShader = (PFNGLCOMPILESHADERPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::CompileShader); - return _CompileShader(shader); -} -inline void DYNAMICGLES_FUNCTION(CompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glCompressedTexImage2D) PFNGLCOMPRESSEDTEXIMAGE2DPROC; -#endif - PFNGLCOMPRESSEDTEXIMAGE2DPROC _CompressedTexImage2D = (PFNGLCOMPRESSEDTEXIMAGE2DPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::CompressedTexImage2D); - return _CompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data); -} -inline void DYNAMICGLES_FUNCTION(CompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glCompressedTexSubImage2D) PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC; -#endif - PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC _CompressedTexSubImage2D = (PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::CompressedTexSubImage2D); - return _CompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data); -} -inline void DYNAMICGLES_FUNCTION(CopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glCopyTexImage2D) PFNGLCOPYTEXIMAGE2DPROC; -#endif - PFNGLCOPYTEXIMAGE2DPROC _CopyTexImage2D = (PFNGLCOPYTEXIMAGE2DPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::CopyTexImage2D); - return _CopyTexImage2D(target, level, internalformat, x, y, width, height, border); -} -inline void DYNAMICGLES_FUNCTION(CopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glCopyTexSubImage2D) PFNGLCOPYTEXSUBIMAGE2DPROC; -#endif - PFNGLCOPYTEXSUBIMAGE2DPROC _CopyTexSubImage2D = (PFNGLCOPYTEXSUBIMAGE2DPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::CopyTexSubImage2D); - return _CopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); -} -inline GLenum DYNAMICGLES_FUNCTION(CreateProgram)() -{ -#if TARGET_OS_IPHONE - typedef decltype(&glCreateProgram) PFNGLCREATEPROGRAMPROC; -#endif - PFNGLCREATEPROGRAMPROC _CreateProgram = (PFNGLCREATEPROGRAMPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::CreateProgram); - return _CreateProgram(); -} -inline GLenum DYNAMICGLES_FUNCTION(CreateShader)(GLenum target) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glCreateShader) PFNGLCREATESHADERPROC; -#endif - PFNGLCREATESHADERPROC _CreateShader = (PFNGLCREATESHADERPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::CreateShader); - return _CreateShader(target); -} -inline void DYNAMICGLES_FUNCTION(CullFace)(GLenum mode) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glCullFace) PFNGLCULLFACEPROC; -#endif - PFNGLCULLFACEPROC _CullFace = (PFNGLCULLFACEPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::CullFace); - return _CullFace(mode); -} -inline void DYNAMICGLES_FUNCTION(DeleteBuffers)(GLsizei n, const GLuint* buffers) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glDeleteBuffers) PFNGLDELETEBUFFERSPROC; -#endif - PFNGLDELETEBUFFERSPROC _DeleteBuffers = (PFNGLDELETEBUFFERSPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::DeleteBuffers); - return _DeleteBuffers(n, buffers); -} -inline void DYNAMICGLES_FUNCTION(DeleteFramebuffers)(GLsizei n, const GLuint* framebuffers) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glDeleteFramebuffers) PFNGLDELETEFRAMEBUFFERSPROC; -#endif - PFNGLDELETEFRAMEBUFFERSPROC _DeleteFramebuffers = (PFNGLDELETEFRAMEBUFFERSPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::DeleteFramebuffers); - return _DeleteFramebuffers(n, framebuffers); -} -inline void DYNAMICGLES_FUNCTION(DeleteProgram)(GLuint program) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glDeleteProgram) PFNGLDELETEPROGRAMPROC; -#endif - PFNGLDELETEPROGRAMPROC _DeleteProgram = (PFNGLDELETEPROGRAMPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::DeleteProgram); - return _DeleteProgram(program); -} -inline void DYNAMICGLES_FUNCTION(DeleteRenderbuffers)(GLsizei n, const GLuint* renderbuffers) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glDeleteRenderbuffers) PFNGLDELETERENDERBUFFERSPROC; -#endif - PFNGLDELETERENDERBUFFERSPROC _DeleteRenderbuffers = (PFNGLDELETERENDERBUFFERSPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::DeleteRenderbuffers); - return _DeleteRenderbuffers(n, renderbuffers); -} -inline void DYNAMICGLES_FUNCTION(DeleteShader)(GLuint shader) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glDeleteShader) PFNGLDELETESHADERPROC; -#endif - PFNGLDELETESHADERPROC _DeleteShader = (PFNGLDELETESHADERPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::DeleteShader); - return _DeleteShader(shader); -} -inline void DYNAMICGLES_FUNCTION(DeleteTextures)(GLsizei n, const GLuint* textures) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glDeleteTextures) PFNGLDELETETEXTURESPROC; -#endif - PFNGLDELETETEXTURESPROC _DeleteTextures = (PFNGLDELETETEXTURESPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::DeleteTextures); - return _DeleteTextures(n, textures); -} -inline void DYNAMICGLES_FUNCTION(DepthFunc)(GLenum func) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glDepthFunc) PFNGLDEPTHFUNCPROC; -#endif - PFNGLDEPTHFUNCPROC _DepthFunc = (PFNGLDEPTHFUNCPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::DepthFunc); - return _DepthFunc(func); -} -inline void DYNAMICGLES_FUNCTION(DepthMask)(GLboolean flag) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glDepthMask) PFNGLDEPTHMASKPROC; -#endif - PFNGLDEPTHMASKPROC _DepthMask = (PFNGLDEPTHMASKPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::DepthMask); - return _DepthMask(flag); -} -inline void DYNAMICGLES_FUNCTION(DepthRangef)(GLfloat n, GLfloat f) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glDepthRangef) PFNGLDEPTHRANGEFPROC; -#endif - PFNGLDEPTHRANGEFPROC _DepthRangef = (PFNGLDEPTHRANGEFPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::DepthRangef); - return _DepthRangef(n, f); -} -inline void DYNAMICGLES_FUNCTION(DetachShader)(GLuint program, GLuint shader) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glDetachShader) PFNGLDETACHSHADERPROC; -#endif - PFNGLDETACHSHADERPROC _DetachShader = (PFNGLDETACHSHADERPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::DetachShader); - return _DetachShader(program, shader); -} -inline void DYNAMICGLES_FUNCTION(Disable)(GLenum cap) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glDisable) PFNGLDISABLEPROC; -#endif - PFNGLDISABLEPROC _Disable = (PFNGLDISABLEPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::Disable); - return _Disable(cap); -} -inline void DYNAMICGLES_FUNCTION(DisableVertexAttribArray)(GLuint index) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glDisableVertexAttribArray) PFNGLDISABLEVERTEXATTRIBARRAYPROC; -#endif - PFNGLDISABLEVERTEXATTRIBARRAYPROC _DisableVertexAttribArray = (PFNGLDISABLEVERTEXATTRIBARRAYPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::DisableVertexAttribArray); - return _DisableVertexAttribArray(index); -} -inline void DYNAMICGLES_FUNCTION(DrawArrays)(GLenum mode, GLint first, GLsizei count) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glDrawArrays) PFNGLDRAWARRAYSPROC; -#endif - PFNGLDRAWARRAYSPROC _DrawArrays = (PFNGLDRAWARRAYSPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::DrawArrays); - return _DrawArrays(mode, first, count); -} -inline void DYNAMICGLES_FUNCTION(DrawElements)(GLenum mode, GLsizei count, GLenum type, const void* indices) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glDrawElements) PFNGLDRAWELEMENTSPROC; -#endif - PFNGLDRAWELEMENTSPROC _DrawElements = (PFNGLDRAWELEMENTSPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::DrawElements); - return _DrawElements(mode, count, type, indices); -} -inline void DYNAMICGLES_FUNCTION(Enable)(GLenum cap) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glEnable) PFNGLENABLEPROC; -#endif - PFNGLENABLEPROC _Enable = (PFNGLENABLEPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::Enable); - return _Enable(cap); -} -inline void DYNAMICGLES_FUNCTION(EnableVertexAttribArray)(GLuint index) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glEnableVertexAttribArray) PFNGLENABLEVERTEXATTRIBARRAYPROC; -#endif - PFNGLENABLEVERTEXATTRIBARRAYPROC _EnableVertexAttribArray = (PFNGLENABLEVERTEXATTRIBARRAYPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::EnableVertexAttribArray); - return _EnableVertexAttribArray(index); -} -inline void DYNAMICGLES_FUNCTION(Finish)(void) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glFinish) PFNGLFINISHPROC; -#endif - PFNGLFINISHPROC _Finish = (PFNGLFINISHPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::Finish); - return _Finish(); -} -inline void DYNAMICGLES_FUNCTION(Flush)(void) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glFlush) PFNGLFLUSHPROC; -#endif - PFNGLFLUSHPROC _Flush = (PFNGLFLUSHPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::Flush); - return _Flush(); -} -inline void DYNAMICGLES_FUNCTION(FramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glFramebufferRenderbuffer) PFNGLFRAMEBUFFERRENDERBUFFERPROC; -#endif - PFNGLFRAMEBUFFERRENDERBUFFERPROC _FramebufferRenderbuffer = (PFNGLFRAMEBUFFERRENDERBUFFERPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::FramebufferRenderbuffer); - return _FramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); -} -inline void DYNAMICGLES_FUNCTION(FramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glFramebufferTexture2D) PFNGLFRAMEBUFFERTEXTURE2DPROC; -#endif - PFNGLFRAMEBUFFERTEXTURE2DPROC _FramebufferTexture2D = (PFNGLFRAMEBUFFERTEXTURE2DPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::FramebufferTexture2D); - return _FramebufferTexture2D(target, attachment, textarget, texture, level); -} -inline void DYNAMICGLES_FUNCTION(FrontFace)(GLenum mode) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glFrontFace) PFNGLFRONTFACEPROC; -#endif - PFNGLFRONTFACEPROC _FrontFace = (PFNGLFRONTFACEPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::FrontFace); - return _FrontFace(mode); -} -inline void DYNAMICGLES_FUNCTION(GenBuffers)(GLsizei n, GLuint* buffers) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGenBuffers) PFNGLGENBUFFERSPROC; -#endif - PFNGLGENBUFFERSPROC _GenBuffers = (PFNGLGENBUFFERSPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GenBuffers); - return _GenBuffers(n, buffers); -} -inline void DYNAMICGLES_FUNCTION(GenerateMipmap)(GLenum target) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGenerateMipmap) PFNGLGENERATEMIPMAPPROC; -#endif - PFNGLGENERATEMIPMAPPROC _GenerateMipmap = (PFNGLGENERATEMIPMAPPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GenerateMipmap); - return _GenerateMipmap(target); -} -inline void DYNAMICGLES_FUNCTION(GenFramebuffers)(GLsizei n, GLuint* framebuffers) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGenFramebuffers) PFNGLGENFRAMEBUFFERSPROC; -#endif - PFNGLGENFRAMEBUFFERSPROC _GenFramebuffers = (PFNGLGENFRAMEBUFFERSPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GenFramebuffers); - return _GenFramebuffers(n, framebuffers); -} -inline void DYNAMICGLES_FUNCTION(GenRenderbuffers)(GLsizei n, GLuint* renderbuffers) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGenRenderbuffers) PFNGLGENRENDERBUFFERSPROC; -#endif - PFNGLGENRENDERBUFFERSPROC _GenRenderbuffers = (PFNGLGENRENDERBUFFERSPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GenRenderbuffers); - return _GenRenderbuffers(n, renderbuffers); -} -inline void DYNAMICGLES_FUNCTION(GenTextures)(GLsizei n, GLuint* textures) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGenTextures) PFNGLGENTEXTURESPROC; -#endif - PFNGLGENTEXTURESPROC _GenTextures = (PFNGLGENTEXTURESPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GenTextures); - return _GenTextures(n, textures); -} -inline void DYNAMICGLES_FUNCTION(GetActiveAttrib)(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetActiveAttrib) PFNGLGETACTIVEATTRIBPROC; -#endif - PFNGLGETACTIVEATTRIBPROC _GetActiveAttrib = (PFNGLGETACTIVEATTRIBPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GetActiveAttrib); - return _GetActiveAttrib(program, index, bufSize, length, size, type, name); - -} -inline void DYNAMICGLES_FUNCTION(GetActiveUniform)(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetActiveUniform) PFNGLGETACTIVEUNIFORMPROC; -#endif - PFNGLGETACTIVEUNIFORMPROC _GetActiveUniform = (PFNGLGETACTIVEUNIFORMPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GetActiveUniform); - return _GetActiveUniform(program, index, bufSize, length, size, type, name); - -} -inline void DYNAMICGLES_FUNCTION(GetAttachedShaders)(GLuint program, GLsizei maxCount, GLsizei* count, GLuint* shaders) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetAttachedShaders) PFNGLGETATTACHEDSHADERSPROC; -#endif - PFNGLGETATTACHEDSHADERSPROC _GetAttachedShaders = (PFNGLGETATTACHEDSHADERSPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GetAttachedShaders); - return _GetAttachedShaders(program, maxCount, count, shaders); -} -inline GLint DYNAMICGLES_FUNCTION(GetAttribLocation)(GLuint program, const GLchar* name) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetAttribLocation) PFNGLGETATTRIBLOCATIONPROC; -#endif - PFNGLGETATTRIBLOCATIONPROC _GetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GetAttribLocation); - return _GetAttribLocation(program, name); -} -inline void DYNAMICGLES_FUNCTION(GetBooleanv)(GLenum pname, GLboolean* data) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetBooleanv) PFNGLGETBOOLEANVPROC; -#endif - PFNGLGETBOOLEANVPROC _GetBooleanv = (PFNGLGETBOOLEANVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GetBooleanv); - return _GetBooleanv(pname, data); -} -inline void DYNAMICGLES_FUNCTION(GetBufferParameteriv)(GLenum target, GLenum pname, GLint* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetBufferParameteriv) PFNGLGETBUFFERPARAMETERIVPROC; -#endif - PFNGLGETBUFFERPARAMETERIVPROC _GetBufferParameteriv = (PFNGLGETBUFFERPARAMETERIVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GetBufferParameteriv); - return _GetBufferParameteriv(target, pname, params); -} -inline GLenum DYNAMICGLES_FUNCTION(GetError)(void) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetError) PFNGLGETERRORPROC; -#endif - PFNGLGETERRORPROC _GetError = (PFNGLGETERRORPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GetError); - return _GetError(); -} -inline void DYNAMICGLES_FUNCTION(GetFloatv)(GLenum pname, GLfloat* data) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetFloatv) PFNGLGETFLOATVPROC; -#endif - PFNGLGETFLOATVPROC _GetFloatv = (PFNGLGETFLOATVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GetFloatv); - return _GetFloatv(pname, data); -} -inline void DYNAMICGLES_FUNCTION(GetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetFramebufferAttachmentParameteriv) PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC; -#endif - PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC _GetFramebufferAttachmentParameteriv = (PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GetFramebufferAttachmentParameteriv); - return _GetFramebufferAttachmentParameteriv(target, attachment, pname, params); -} -inline void DYNAMICGLES_FUNCTION(GetIntegerv)(GLenum pname, GLint* data) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetIntegerv) PFNGLGETINTEGERVPROC; -#endif - PFNGLGETINTEGERVPROC _GetIntegerv = (PFNGLGETINTEGERVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GetIntegerv); - return _GetIntegerv(pname, data); -} -inline void DYNAMICGLES_FUNCTION(GetProgramiv)(GLuint program, GLenum pname, GLint* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetProgramiv) PFNGLGETPROGRAMIVPROC; -#endif - PFNGLGETPROGRAMIVPROC _GetProgramiv = (PFNGLGETPROGRAMIVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GetProgramiv); - return _GetProgramiv(program, pname, params); -} -inline void DYNAMICGLES_FUNCTION(GetProgramInfoLog)(GLuint program, GLsizei bufSize, GLsizei* length, GLchar* infoLog) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetProgramInfoLog) PFNGLGETPROGRAMINFOLOGPROC; -#endif - PFNGLGETPROGRAMINFOLOGPROC _GetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GetProgramInfoLog); - return _GetProgramInfoLog(program, bufSize, length, infoLog); - -} -inline void DYNAMICGLES_FUNCTION(GetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetRenderbufferParameteriv) PFNGLGETRENDERBUFFERPARAMETERIVPROC; -#endif - PFNGLGETRENDERBUFFERPARAMETERIVPROC _GetRenderbufferParameteriv = (PFNGLGETRENDERBUFFERPARAMETERIVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GetRenderbufferParameteriv); - return _GetRenderbufferParameteriv(target, pname, params); -} -inline void DYNAMICGLES_FUNCTION(GetShaderiv)(GLuint shader, GLenum pname, GLint* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetShaderiv) PFNGLGETSHADERIVPROC; -#endif - PFNGLGETSHADERIVPROC _GetShaderiv = (PFNGLGETSHADERIVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GetShaderiv); - return _GetShaderiv(shader, pname, params); -} -inline void DYNAMICGLES_FUNCTION(GetShaderInfoLog)(GLuint shader, GLsizei bufSize, GLsizei* length, GLchar* infoLog) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetShaderInfoLog) PFNGLGETSHADERINFOLOGPROC; -#endif - PFNGLGETSHADERINFOLOGPROC _GetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GetShaderInfoLog); - return _GetShaderInfoLog(shader, bufSize, length, infoLog); - -} -inline void DYNAMICGLES_FUNCTION(GetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetShaderPrecisionFormat) PFNGLGETSHADERPRECISIONFORMATPROC; -#endif - PFNGLGETSHADERPRECISIONFORMATPROC _GetShaderPrecisionFormat = (PFNGLGETSHADERPRECISIONFORMATPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GetShaderPrecisionFormat); - return _GetShaderPrecisionFormat(shadertype, precisiontype, range, precision); -} -inline void DYNAMICGLES_FUNCTION(GetShaderSource)(GLuint shader, GLsizei bufSize, GLsizei* length, GLchar* source) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetShaderSource) PFNGLGETSHADERSOURCEPROC; -#endif - PFNGLGETSHADERSOURCEPROC _GetShaderSource = (PFNGLGETSHADERSOURCEPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GetShaderSource); - return _GetShaderSource(shader, bufSize, length, source); - -} -inline const GLubyte* DYNAMICGLES_FUNCTION(GetString)(GLenum name) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetString) PFNGLGETSTRINGPROC; -#endif - PFNGLGETSTRINGPROC _GetString = (PFNGLGETSTRINGPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GetString); - return _GetString(name); -} -inline void DYNAMICGLES_FUNCTION(GetTexParameterfv)(GLenum target, GLenum pname, GLfloat* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetTexParameterfv) PFNGLGETTEXPARAMETERFVPROC; -#endif - PFNGLGETTEXPARAMETERFVPROC _GetTexParameterfv = (PFNGLGETTEXPARAMETERFVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GetTexParameterfv); - return _GetTexParameterfv(target, pname, params); -} -inline void DYNAMICGLES_FUNCTION(GetTexParameteriv)(GLenum target, GLenum pname, GLint* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetTexParameteriv) PFNGLGETTEXPARAMETERIVPROC; -#endif - PFNGLGETTEXPARAMETERIVPROC _GetTexParameteriv = (PFNGLGETTEXPARAMETERIVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GetTexParameteriv); - return _GetTexParameteriv(target, pname, params); -} -inline void DYNAMICGLES_FUNCTION(GetUniformfv)(GLuint program, GLint location, GLfloat* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetUniformfv) PFNGLGETUNIFORMFVPROC; -#endif - PFNGLGETUNIFORMFVPROC _GetUniformfv = (PFNGLGETUNIFORMFVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GetUniformfv); - return _GetUniformfv(program, location, params); -} -inline void DYNAMICGLES_FUNCTION(GetUniformiv)(GLuint program, GLint location, GLint* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetUniformiv) PFNGLGETUNIFORMIVPROC; -#endif - PFNGLGETUNIFORMIVPROC _GetUniformiv = (PFNGLGETUNIFORMIVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GetUniformiv); - return _GetUniformiv(program, location, params); -} -inline GLint DYNAMICGLES_FUNCTION(GetUniformLocation)(GLuint program, const GLchar* name) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetUniformLocation) PFNGLGETUNIFORMLOCATIONPROC; -#endif - PFNGLGETUNIFORMLOCATIONPROC _GetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GetUniformLocation); - return _GetUniformLocation(program, name); -} -inline void DYNAMICGLES_FUNCTION(GetVertexAttribfv)(GLuint index, GLenum pname, GLfloat* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetVertexAttribfv) PFNGLGETVERTEXATTRIBFVPROC; -#endif - PFNGLGETVERTEXATTRIBFVPROC _GetVertexAttribfv = (PFNGLGETVERTEXATTRIBFVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GetVertexAttribfv); - return _GetVertexAttribfv(index, pname, params); -} -inline void DYNAMICGLES_FUNCTION(GetVertexAttribiv)(GLuint index, GLenum pname, GLint* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetVertexAttribiv) PFNGLGETVERTEXATTRIBIVPROC; -#endif - PFNGLGETVERTEXATTRIBIVPROC _GetVertexAttribiv = (PFNGLGETVERTEXATTRIBIVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GetVertexAttribiv); - return _GetVertexAttribiv(index, pname, params); -} -inline void DYNAMICGLES_FUNCTION(GetVertexAttribPointerv)(GLuint index, GLenum pname, void** pointer) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetVertexAttribPointerv) PFNGLGETVERTEXATTRIBPOINTERVPROC; -#endif - PFNGLGETVERTEXATTRIBPOINTERVPROC _GetVertexAttribPointerv = (PFNGLGETVERTEXATTRIBPOINTERVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::GetVertexAttribPointerv); - return _GetVertexAttribPointerv(index, pname, pointer); -} -inline void DYNAMICGLES_FUNCTION(Hint)(GLenum target, GLenum mode) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glHint) PFNGLHINTPROC; -#endif - PFNGLHINTPROC _Hint = (PFNGLHINTPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::Hint); - return _Hint(target, mode); -} -inline GLboolean DYNAMICGLES_FUNCTION(IsBuffer)(GLuint buffer) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glIsBuffer) PFNGLISBUFFERPROC; -#endif - PFNGLISBUFFERPROC _IsBuffer = (PFNGLISBUFFERPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::IsBuffer); - return _IsBuffer(buffer); -} -inline GLboolean DYNAMICGLES_FUNCTION(IsEnabled)(GLenum cap) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glIsEnabled) PFNGLISENABLEDPROC; -#endif - PFNGLISENABLEDPROC _IsEnabled = (PFNGLISENABLEDPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::IsEnabled); - return _IsEnabled(cap); -} -inline GLboolean DYNAMICGLES_FUNCTION(IsFramebuffer)(GLuint framebuffer) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glIsFramebuffer) PFNGLISFRAMEBUFFERPROC; -#endif - PFNGLISFRAMEBUFFERPROC _IsFramebuffer = (PFNGLISFRAMEBUFFERPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::IsFramebuffer); - return _IsFramebuffer(framebuffer); -} -inline GLboolean DYNAMICGLES_FUNCTION(IsProgram)(GLuint program) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glIsProgram) PFNGLISPROGRAMPROC; -#endif - PFNGLISPROGRAMPROC _IsProgram = (PFNGLISPROGRAMPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::IsProgram); - return _IsProgram(program); -} -inline GLboolean DYNAMICGLES_FUNCTION(IsRenderbuffer)(GLuint renderbuffer) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glIsRenderbuffer) PFNGLISRENDERBUFFERPROC; -#endif - PFNGLISRENDERBUFFERPROC _IsRenderbuffer = (PFNGLISRENDERBUFFERPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::IsRenderbuffer); - return _IsRenderbuffer(renderbuffer); -} -inline GLboolean DYNAMICGLES_FUNCTION(IsShader)(GLuint shader) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glIsShader) PFNGLISSHADERPROC; -#endif - PFNGLISSHADERPROC _IsShader = (PFNGLISSHADERPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::IsShader); - return _IsShader(shader); - -} -inline GLboolean DYNAMICGLES_FUNCTION(IsTexture)(GLuint texture) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glIsTexture) PFNGLISTEXTUREPROC; -#endif - PFNGLISTEXTUREPROC _IsTexture = (PFNGLISTEXTUREPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::IsTexture); - return _IsTexture(texture); -} -inline void DYNAMICGLES_FUNCTION(LineWidth)(GLfloat width) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glLineWidth) PFNGLLINEWIDTHPROC; -#endif - PFNGLLINEWIDTHPROC _LineWidth = (PFNGLLINEWIDTHPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::LineWidth); - return _LineWidth(width); -} -inline void DYNAMICGLES_FUNCTION(LinkProgram)(GLuint program) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glLinkProgram) PFNGLLINKPROGRAMPROC; -#endif - PFNGLLINKPROGRAMPROC _LinkProgram = (PFNGLLINKPROGRAMPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::LinkProgram); - return _LinkProgram(program); -} -inline void DYNAMICGLES_FUNCTION(PixelStorei)(GLenum pname, GLint param) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glPixelStorei) PFNGLPIXELSTOREIPROC; -#endif - PFNGLPIXELSTOREIPROC _PixelStorei = (PFNGLPIXELSTOREIPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::PixelStorei); - return _PixelStorei(pname, param); -} -inline void DYNAMICGLES_FUNCTION(PolygonOffset)(GLfloat factor, GLfloat units) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glPolygonOffset) PFNGLPOLYGONOFFSETPROC; -#endif - PFNGLPOLYGONOFFSETPROC _PolygonOffset = (PFNGLPOLYGONOFFSETPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::PolygonOffset); - return _PolygonOffset(factor, units); -} -inline void DYNAMICGLES_FUNCTION(ReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glReadPixels) PFNGLREADPIXELSPROC; -#endif - PFNGLREADPIXELSPROC _ReadPixels = (PFNGLREADPIXELSPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::ReadPixels); - return _ReadPixels(x, y, width, height, format, type, pixels); -} -inline void DYNAMICGLES_FUNCTION(ReleaseShaderCompiler)(void) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glReleaseShaderCompiler) PFNGLRELEASESHADERCOMPILERPROC; -#endif - PFNGLRELEASESHADERCOMPILERPROC _ReleaseShaderCompiler = (PFNGLRELEASESHADERCOMPILERPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::ReleaseShaderCompiler); - return _ReleaseShaderCompiler(); -} -inline void DYNAMICGLES_FUNCTION(RenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glRenderbufferStorage) PFNGLRENDERBUFFERSTORAGEPROC; -#endif - PFNGLRENDERBUFFERSTORAGEPROC _RenderbufferStorage = (PFNGLRENDERBUFFERSTORAGEPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::RenderbufferStorage); - return _RenderbufferStorage(target, internalformat, width, height); -} -inline void DYNAMICGLES_FUNCTION(SampleCoverage)(GLfloat value, GLboolean invert) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glSampleCoverage) PFNGLSAMPLECOVERAGEPROC; -#endif - PFNGLSAMPLECOVERAGEPROC _SampleCoverage = (PFNGLSAMPLECOVERAGEPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::SampleCoverage); - return _SampleCoverage(value, invert); -} -inline void DYNAMICGLES_FUNCTION(Scissor)(GLint x, GLint y, GLsizei width, GLsizei height) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glScissor) PFNGLSCISSORPROC; -#endif - PFNGLSCISSORPROC _Scissor = (PFNGLSCISSORPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::Scissor); - return _Scissor(x, y, width, height); -} -inline void DYNAMICGLES_FUNCTION(ShaderBinary)(GLsizei count, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glShaderBinary) PFNGLSHADERBINARYPROC; -#endif - PFNGLSHADERBINARYPROC _ShaderBinary = (PFNGLSHADERBINARYPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::ShaderBinary); - return _ShaderBinary(count, shaders, binaryformat, binary, length); -} -inline void DYNAMICGLES_FUNCTION(ShaderSource)(GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glShaderSource) PFNGLSHADERSOURCEPROC; -#endif - PFNGLSHADERSOURCEPROC _ShaderSource = (PFNGLSHADERSOURCEPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::ShaderSource); - return _ShaderSource(shader, count, string, length); - -} -inline void DYNAMICGLES_FUNCTION(StencilFunc)(GLenum func, GLint ref, GLuint mask) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glStencilFunc) PFNGLSTENCILFUNCPROC; -#endif - PFNGLSTENCILFUNCPROC _StencilFunc = (PFNGLSTENCILFUNCPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::StencilFunc); - return _StencilFunc(func, ref, mask); -} -inline void DYNAMICGLES_FUNCTION(StencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glStencilFuncSeparate) PFNGLSTENCILFUNCSEPARATEPROC; -#endif - PFNGLSTENCILFUNCSEPARATEPROC _StencilFuncSeparate = (PFNGLSTENCILFUNCSEPARATEPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::StencilFuncSeparate); - return _StencilFuncSeparate(face, func, ref, mask); -} -inline void DYNAMICGLES_FUNCTION(StencilMask)(GLuint mask) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glStencilMask) PFNGLSTENCILMASKPROC; -#endif - PFNGLSTENCILMASKPROC _StencilMask = (PFNGLSTENCILMASKPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::StencilMask); - return _StencilMask(mask); -} -inline void DYNAMICGLES_FUNCTION(StencilMaskSeparate)(GLenum face, GLuint mask) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glStencilMaskSeparate) PFNGLSTENCILMASKSEPARATEPROC; -#endif - PFNGLSTENCILMASKSEPARATEPROC _StencilMaskSeparate = (PFNGLSTENCILMASKSEPARATEPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::StencilMaskSeparate); - return _StencilMaskSeparate(face, mask); -} -inline void DYNAMICGLES_FUNCTION(StencilOp)(GLenum fail, GLenum zfail, GLenum zpass) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glStencilOp) PFNGLSTENCILOPPROC; -#endif - PFNGLSTENCILOPPROC _StencilOp = (PFNGLSTENCILOPPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::StencilOp); - return _StencilOp(fail, zfail, zpass); -} -inline void DYNAMICGLES_FUNCTION(StencilOpSeparate)(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glStencilOpSeparate) PFNGLSTENCILOPSEPARATEPROC; -#endif - PFNGLSTENCILOPSEPARATEPROC _StencilOpSeparate = (PFNGLSTENCILOPSEPARATEPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::StencilOpSeparate); - return _StencilOpSeparate(face, sfail, dpfail, dppass); -} -inline void DYNAMICGLES_FUNCTION(TexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glTexImage2D) PFNGLTEXIMAGE2DPROC; -#endif - PFNGLTEXIMAGE2DPROC _TexImage2D = (PFNGLTEXIMAGE2DPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::TexImage2D); - return _TexImage2D(target, level, internalformat, width, height, border, format, type, pixels); -} -inline void DYNAMICGLES_FUNCTION(TexParameterf)(GLenum target, GLenum pname, GLfloat param) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glTexParameterf) PFNGLTEXPARAMETERFPROC; -#endif - PFNGLTEXPARAMETERFPROC _TexParameterf = (PFNGLTEXPARAMETERFPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::TexParameterf); - return _TexParameterf(target, pname, param); -} -inline void DYNAMICGLES_FUNCTION(TexParameterfv)(GLenum target, GLenum pname, const GLfloat* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glTexParameterfv) PFNGLTEXPARAMETERFVPROC; -#endif - PFNGLTEXPARAMETERFVPROC _TexParameterfv = (PFNGLTEXPARAMETERFVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::TexParameterfv); - return _TexParameterfv(target, pname, params); -} -inline void DYNAMICGLES_FUNCTION(TexParameteri)(GLenum target, GLenum pname, GLint param) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glTexParameteri) PFNGLTEXPARAMETERIPROC; -#endif - PFNGLTEXPARAMETERIPROC _TexParameteri = (PFNGLTEXPARAMETERIPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::TexParameteri); - return _TexParameteri(target, pname, param); -} -inline void DYNAMICGLES_FUNCTION(TexParameteriv)(GLenum target, GLenum pname, const GLint* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glTexParameteriv) PFNGLTEXPARAMETERIVPROC; -#endif - PFNGLTEXPARAMETERIVPROC _TexParameteriv = (PFNGLTEXPARAMETERIVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::TexParameteriv); - return _TexParameteriv(target, pname, params); -} -inline void DYNAMICGLES_FUNCTION(TexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glTexSubImage2D) PFNGLTEXSUBIMAGE2DPROC; -#endif - PFNGLTEXSUBIMAGE2DPROC _TexSubImage2D = (PFNGLTEXSUBIMAGE2DPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::TexSubImage2D); - return _TexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); -} -inline void DYNAMICGLES_FUNCTION(Uniform1f)(GLint location, GLfloat v0) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniform1f) PFNGLUNIFORM1FPROC; -#endif - PFNGLUNIFORM1FPROC _Uniform1f = (PFNGLUNIFORM1FPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::Uniform1f); - return _Uniform1f(location, v0); -} -inline void DYNAMICGLES_FUNCTION(Uniform1fv)(GLint location, GLsizei count, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniform1fv) PFNGLUNIFORM1FVPROC; -#endif - PFNGLUNIFORM1FVPROC _Uniform1fv = (PFNGLUNIFORM1FVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::Uniform1fv); - return _Uniform1fv(location, count, value); -} -inline void DYNAMICGLES_FUNCTION(Uniform1i)(GLint location, GLint v0) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniform1i) PFNGLUNIFORM1IPROC; -#endif - PFNGLUNIFORM1IPROC _Uniform1i = (PFNGLUNIFORM1IPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::Uniform1i); - return _Uniform1i(location, v0); -} -inline void DYNAMICGLES_FUNCTION(Uniform1iv)(GLint location, GLsizei count, const GLint* value) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniform1iv) PFNGLUNIFORM1IVPROC; -#endif - PFNGLUNIFORM1IVPROC _Uniform1iv = (PFNGLUNIFORM1IVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::Uniform1iv); - return _Uniform1iv(location, count, value); -} -inline void DYNAMICGLES_FUNCTION(Uniform2f)(GLint location, GLfloat v0, GLfloat v1) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniform2f) PFNGLUNIFORM2FPROC; -#endif - PFNGLUNIFORM2FPROC _Uniform2f = (PFNGLUNIFORM2FPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::Uniform2f); - return _Uniform2f(location, v0, v1); -} -inline void DYNAMICGLES_FUNCTION(Uniform2fv)(GLint location, GLsizei count, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniform2fv) PFNGLUNIFORM2FVPROC; -#endif - PFNGLUNIFORM2FVPROC _Uniform2fv = (PFNGLUNIFORM2FVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::Uniform2fv); - return _Uniform2fv(location, count, value); -} -inline void DYNAMICGLES_FUNCTION(Uniform2i)(GLint location, GLint v0, GLint v1) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniform2i) PFNGLUNIFORM2IPROC; -#endif - PFNGLUNIFORM2IPROC _Uniform2i = (PFNGLUNIFORM2IPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::Uniform2i); - return _Uniform2i(location, v0, v1); -} -inline void DYNAMICGLES_FUNCTION(Uniform2iv)(GLint location, GLsizei count, const GLint* value) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniform2iv) PFNGLUNIFORM2IVPROC; -#endif - PFNGLUNIFORM2IVPROC _Uniform2iv = (PFNGLUNIFORM2IVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::Uniform2iv); - return _Uniform2iv(location, count, value); -} -inline void DYNAMICGLES_FUNCTION(Uniform3f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniform3f) PFNGLUNIFORM3FPROC; -#endif - PFNGLUNIFORM3FPROC _Uniform3f = (PFNGLUNIFORM3FPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::Uniform3f); - return _Uniform3f(location, v0, v1, v2); -} -inline void DYNAMICGLES_FUNCTION(Uniform3fv)(GLint location, GLsizei count, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniform3fv) PFNGLUNIFORM3FVPROC; -#endif - PFNGLUNIFORM3FVPROC _Uniform3fv = (PFNGLUNIFORM3FVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::Uniform3fv); - return _Uniform3fv(location, count, value); -} -inline void DYNAMICGLES_FUNCTION(Uniform3i)(GLint location, GLint v0, GLint v1, GLint v2) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniform3i) PFNGLUNIFORM3IPROC; -#endif - PFNGLUNIFORM3IPROC _Uniform3i = (PFNGLUNIFORM3IPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::Uniform3i); - return _Uniform3i(location, v0, v1, v2); -} -inline void DYNAMICGLES_FUNCTION(Uniform3iv)(GLint location, GLsizei count, const GLint* value) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniform3iv) PFNGLUNIFORM3IVPROC; -#endif - PFNGLUNIFORM3IVPROC _Uniform3iv = (PFNGLUNIFORM3IVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::Uniform3iv); - return _Uniform3iv(location, count, value); -} -inline void DYNAMICGLES_FUNCTION(Uniform4f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniform4f) PFNGLUNIFORM4FPROC; -#endif - PFNGLUNIFORM4FPROC _Uniform4f = (PFNGLUNIFORM4FPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::Uniform4f); - return _Uniform4f(location, v0, v1, v2, v3); -} -inline void DYNAMICGLES_FUNCTION(Uniform4fv)(GLint location, GLsizei count, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniform4fv) PFNGLUNIFORM4FVPROC; -#endif - PFNGLUNIFORM4FVPROC _Uniform4fv = (PFNGLUNIFORM4FVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::Uniform4fv); - return _Uniform4fv(location, count, value); -} -inline void DYNAMICGLES_FUNCTION(Uniform4i)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniform4i) PFNGLUNIFORM4IPROC; -#endif - PFNGLUNIFORM4IPROC _Uniform4i = (PFNGLUNIFORM4IPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::Uniform4i); - return _Uniform4i(location, v0, v1, v2, v3); -} -inline void DYNAMICGLES_FUNCTION(Uniform4iv)(GLint location, GLsizei count, const GLint* value) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniform4iv) PFNGLUNIFORM4IVPROC; -#endif - PFNGLUNIFORM4IVPROC _Uniform4iv = (PFNGLUNIFORM4IVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::Uniform4iv); - return _Uniform4iv(location, count, value); -} -inline void DYNAMICGLES_FUNCTION(UniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniformMatrix2fv) PFNGLUNIFORMMATRIX2FVPROC; -#endif - PFNGLUNIFORMMATRIX2FVPROC _UniformMatrix2fv = (PFNGLUNIFORMMATRIX2FVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::UniformMatrix2fv); - return _UniformMatrix2fv(location, count, transpose, value); -} -inline void DYNAMICGLES_FUNCTION(UniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniformMatrix3fv) PFNGLUNIFORMMATRIX3FVPROC; -#endif - PFNGLUNIFORMMATRIX3FVPROC _UniformMatrix3fv = (PFNGLUNIFORMMATRIX3FVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::UniformMatrix3fv); - return _UniformMatrix3fv(location, count, transpose, value); -} -inline void DYNAMICGLES_FUNCTION(UniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUniformMatrix4fv) PFNGLUNIFORMMATRIX4FVPROC; -#endif - PFNGLUNIFORMMATRIX4FVPROC _UniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::UniformMatrix4fv); - return _UniformMatrix4fv(location, count, transpose, value); -} -inline void DYNAMICGLES_FUNCTION(UseProgram)(GLuint program) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUseProgram) PFNGLUSEPROGRAMPROC; -#endif - PFNGLUSEPROGRAMPROC _UseProgram = (PFNGLUSEPROGRAMPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::UseProgram); - return _UseProgram(program); -} -inline void DYNAMICGLES_FUNCTION(ValidateProgram)(GLuint program) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glValidateProgram) PFNGLVALIDATEPROGRAMPROC; -#endif - PFNGLVALIDATEPROGRAMPROC _ValidateProgram = (PFNGLVALIDATEPROGRAMPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::ValidateProgram); - return _ValidateProgram(program); -} -inline void DYNAMICGLES_FUNCTION(VertexAttrib1f)(GLuint index, GLfloat x) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glVertexAttrib1f) PFNGLVERTEXATTRIB1FPROC; -#endif - PFNGLVERTEXATTRIB1FPROC _VertexAttrib1f = (PFNGLVERTEXATTRIB1FPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::VertexAttrib1f); - return _VertexAttrib1f(index, x); -} -inline void DYNAMICGLES_FUNCTION(VertexAttrib1fv)(GLuint index, const GLfloat* v) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glVertexAttrib1fv) PFNGLVERTEXATTRIB1FVPROC; -#endif - PFNGLVERTEXATTRIB1FVPROC _VertexAttrib1fv = (PFNGLVERTEXATTRIB1FVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::VertexAttrib1fv); - return _VertexAttrib1fv(index, v); -} -inline void DYNAMICGLES_FUNCTION(VertexAttrib2f)(GLuint index, GLfloat x, GLfloat y) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glVertexAttrib2f) PFNGLVERTEXATTRIB2FPROC; -#endif - PFNGLVERTEXATTRIB2FPROC _VertexAttrib2f = (PFNGLVERTEXATTRIB2FPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::VertexAttrib2f); - return _VertexAttrib2f(index, x, y); -} -inline void DYNAMICGLES_FUNCTION(VertexAttrib2fv)(GLuint index, const GLfloat* v) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glVertexAttrib2fv) PFNGLVERTEXATTRIB2FVPROC; -#endif - PFNGLVERTEXATTRIB2FVPROC _VertexAttrib2fv = (PFNGLVERTEXATTRIB2FVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::VertexAttrib2fv); - return _VertexAttrib2fv(index, v); -} -inline void DYNAMICGLES_FUNCTION(VertexAttrib3f)(GLuint index, GLfloat x, GLfloat y, GLfloat z) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glVertexAttrib3f) PFNGLVERTEXATTRIB3FPROC; -#endif - PFNGLVERTEXATTRIB3FPROC _VertexAttrib3f = (PFNGLVERTEXATTRIB3FPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::VertexAttrib3f); - return _VertexAttrib3f(index, x, y, z); -} -inline void DYNAMICGLES_FUNCTION(VertexAttrib3fv)(GLuint index, const GLfloat* v) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glVertexAttrib3fv) PFNGLVERTEXATTRIB3FVPROC; -#endif - PFNGLVERTEXATTRIB3FVPROC _VertexAttrib3fv = (PFNGLVERTEXATTRIB3FVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::VertexAttrib3fv); - return _VertexAttrib3fv(index, v); -} -inline void DYNAMICGLES_FUNCTION(VertexAttrib4f)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glVertexAttrib4f) PFNGLVERTEXATTRIB4FPROC; -#endif - PFNGLVERTEXATTRIB4FPROC _VertexAttrib4f = (PFNGLVERTEXATTRIB4FPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::VertexAttrib4f); - return _VertexAttrib4f(index, x, y, z, w); -} -inline void DYNAMICGLES_FUNCTION(VertexAttrib4fv)(GLuint index, const GLfloat* v) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glVertexAttrib4fv) PFNGLVERTEXATTRIB4FVPROC; -#endif - PFNGLVERTEXATTRIB4FVPROC _VertexAttrib4fv = (PFNGLVERTEXATTRIB4FVPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::VertexAttrib4fv); - return _VertexAttrib4fv(index, v); -} -inline void DYNAMICGLES_FUNCTION(VertexAttribPointer)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* pointer) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glVertexAttribPointer) PFNGLVERTEXATTRIBPOINTERPROC; -#endif - PFNGLVERTEXATTRIBPOINTERPROC _VertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::VertexAttribPointer); - return _VertexAttribPointer(index, size, type, normalized, stride, pointer); -} -inline void DYNAMICGLES_FUNCTION(Viewport)(GLint x, GLint y, GLsizei width, GLsizei height) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glViewport) PFNGLVIEWPORTPROC; -#endif - PFNGLVIEWPORTPROC _Viewport = (PFNGLVIEWPORTPROC)gl::internals::getEs2Function(gl::internals::Gl2FuncName::Viewport); - return _Viewport(x, y, width, height); -} -#ifndef DYNAMICGLES_NO_NAMESPACE -} -#elif TARGET_OS_IPHONE -} -} -#endif - -namespace gl { -namespace internals { -namespace GlExtFuncName { -enum OpenGLESExtFunctionName -{ - //EXTENSIONS // - MultiDrawArraysEXT, MultiDrawElementsEXT, DiscardFramebufferEXT, MapBufferOES, UnmapBufferOES, GetBufferPointervOES, BindVertexArrayOES, DeleteVertexArraysOES, - GenVertexArraysOES, IsVertexArrayOES, DeleteFencesNV, GenFencesNV, IsFenceNV, TestFenceNV, GetFenceivNV, FinishFenceNV, SetFenceNV, -#if !TARGET_OS_IPHONE - EGLImageTargetTexture2DOES, EGLImageTargetRenderbufferStorageOES, -#endif - RenderbufferStorageMultisampleIMG, FramebufferTexture2DMultisampleIMG, GetPerfMonitorGroupsAMD, GetPerfMonitorCountersAMD, GetPerfMonitorGroupStringAMD, - GetPerfMonitorCounterStringAMD, GetPerfMonitorCounterInfoAMD, GenPerfMonitorsAMD, DeletePerfMonitorsAMD, SelectPerfMonitorCountersAMD, BeginPerfMonitorAMD, - EndPerfMonitorAMD, GetPerfMonitorCounterDataAMD, BlitFramebufferANGLE, RenderbufferStorageMultisampleANGLE, - CoverageMaskNV, CoverageOperationNV, GetDriverControlsQCOM, GetDriverControlStringQCOM, EnableDriverControlQCOM, - DisableDriverControlQCOM, ExtGetTexturesQCOM, ExtGetBuffersQCOM, ExtGetRenderbuffersQCOM, ExtGetFramebuffersQCOM, ExtGetTexLevelParameterivQCOM, - ExtTexObjectStateOverrideiQCOM, ExtGetTexSubImageQCOM, ExtGetBufferPointervQCOM, ExtGetShadersQCOM, ExtGetProgramsQCOM, ExtIsProgramBinaryQCOM, - ExtGetProgramBinarySourceQCOM, StartTilingQCOM, EndTilingQCOM, GetProgramBinaryOES, ProgramBinaryOES, TexImage3DOES, TexSubImage3DOES, CopyTexSubImage3DOES, - CompressedTexImage3DOES, CompressedTexSubImage3DOES, FramebufferTexture3DOES, BlendEquationSeparateOES, BlendFuncSeparateOES, BlendEquationOES, QueryMatrixxOES, - CopyTextureLevelsAPPLE, RenderbufferStorageMultisampleAPPLE, ResolveMultisampleFramebufferAPPLE, FenceSyncAPPLE, IsSyncAPPLE, DeleteSyncAPPLE, - ClientWaitSyncAPPLE, WaitSyncAPPLE, GetInteger64vAPPLE, GetSyncivAPPLE, MapBufferRangeEXT, FlushMappedBufferRangeEXT, RenderbufferStorageMultisampleEXT, - FramebufferTexture2DMultisampleEXT, GetGraphicsResetStatusEXT, ReadnPixelsEXT, GetnUniformfvEXT, GetnUniformivEXT, TexStorage1DEXT, TexStorage2DEXT, - TexStorage3DEXT, TextureStorage1DEXT, TextureStorage2DEXT, TextureStorage3DEXT, -#if !defined(GL_KHR_debug) - GLDEBUGPROCKHR, -#endif - DebugMessageControlKHR, DebugMessageInsertKHR, DebugMessageCallbackKHR, GetDebugMessageLogKHR, PushDebugGroupKHR, PopDebugGroupKHR, ObjectLabelKHR, - GetObjectLabelKHR, ObjectPtrLabelKHR, GetObjectPtrLabelKHR, GetPointervKHR, DrawArraysInstancedANGLE, DrawElementsInstancedANGLE, VertexAttribDivisorANGLE, - GetTranslatedShaderSourceANGLE, LabelObjectEXT, GetObjectLabelEXT, InsertEventMarkerEXT, PushGroupMarkerEXT, PopGroupMarkerEXT, - GenQueriesEXT, DeleteQueriesEXT, IsQueryEXT, BeginQueryEXT, EndQueryEXT, GetQueryivEXT, GetQueryObjectuivEXT, UseProgramStagesEXT, ActiveShaderProgramEXT, - CreateShaderProgramvEXT, BindProgramPipelineEXT, DeleteProgramPipelinesEXT, GenProgramPipelinesEXT, IsProgramPipelineEXT, ProgramParameteriEXT, - GetProgramPipelineivEXT, ProgramUniform1iEXT, ProgramUniform2iEXT, ProgramUniform3iEXT, ProgramUniform4iEXT, ProgramUniform1fEXT, ProgramUniform2fEXT, - ProgramUniform3fEXT, ProgramUniform4fEXT, ProgramUniform1ivEXT, ProgramUniform2ivEXT, ProgramUniform3ivEXT, ProgramUniform4ivEXT, ProgramUniform1fvEXT, - ProgramUniform2fvEXT, ProgramUniform3fvEXT, ProgramUniform4fvEXT, ProgramUniformMatrix2fvEXT, ProgramUniformMatrix3fvEXT, ProgramUniformMatrix4fvEXT, - ValidateProgramPipelineEXT, GetProgramPipelineInfoLogEXT, ProgramUniform1uiEXT, ProgramUniform2uiEXT, ProgramUniform3uiEXT, ProgramUniform4uiEXT, - ProgramUniform1uivEXT, ProgramUniform2uivEXT, ProgramUniform3uivEXT, ProgramUniform4uivEXT, ProgramUniformMatrix2x3fvEXT, ProgramUniformMatrix3x2fvEXT, - ProgramUniformMatrix2x4fvEXT, ProgramUniformMatrix4x2fvEXT, ProgramUniformMatrix3x4fvEXT, ProgramUniformMatrix4x3fvEXT, AlphaFuncQCOM, ReadBufferNV, - DrawBuffersNV, ReadBufferIndexedEXT, DrawBuffersIndexedEXT, GetIntegeri_vEXT, DrawBuffersEXT, BlendEquationEXT, BlendBarrierKHR, TexStorage3DMultisampleOES, - FramebufferTextureMultiviewOVR, FramebufferPixelLocalStorageSizeEXT, ClearPixelLocalStorageuiEXT, GetFramebufferPixelLocalStorageSizeEXT, BufferStorageEXT, - ClearTexImageIMG, ClearTexSubImageIMG, ClearTexImageEXT, ClearTexSubImageEXT, FramebufferTexture2DDownsampleIMG, FramebufferTextureLayerDownsampleIMG, - PatchParameteriEXT, - -#ifdef GL_IMG_bindless_texture - GetTextureHandleIMG, GetTextureSamplerHandleIMG, UniformHandleui64IMG, UniformHandleui64vIMG, ProgramUniformHandleui64IMG, ProgramUniformHandleui64vIMG, -#endif - - NUMBER_OF_OPENGLEXT_FUNCTIONS -}; -} - -namespace GlExtFuncName { - -static const std::pair OpenGLESExtFunctionNamePairs[] = -{ - { MultiDrawArraysEXT, "glMultiDrawArraysEXT"}, - { MultiDrawElementsEXT, "glMultiDrawElementsEXT" }, - { DiscardFramebufferEXT, "glDiscardFramebufferEXT" }, - { MapBufferOES, "glMapBufferOES" }, - { UnmapBufferOES, "glUnmapBufferOES" }, - { GetBufferPointervOES, "glGetBufferPointervOES" }, - { BindVertexArrayOES, "glBindVertexArrayOES" }, - { DeleteVertexArraysOES, "glDeleteVertexArraysOES" }, - { GenVertexArraysOES, "glGenVertexArraysOES" }, - { IsVertexArrayOES, "glIsVertexArrayOES" }, - { DeleteFencesNV, "glDeleteFencesNV" }, - { GenFencesNV, "glGenFencesNV" }, - { IsFenceNV, "glIsFenceNV" }, - { TestFenceNV, "glTestFenceNV" }, - { GetFenceivNV, "glGetFenceivNV" }, - { FinishFenceNV, "glFinishFenceNV" }, - { SetFenceNV, "glSetFenceNV" }, -#if !TARGET_OS_IPHONE - { EGLImageTargetTexture2DOES, "glEGLImageTargetTexture2DOES"}, - { EGLImageTargetRenderbufferStorageOES, "glEGLImageTargetRenderbufferStorageOES"}, -#endif - { RenderbufferStorageMultisampleIMG, "glRenderbufferStorageMultisampleIMG" }, - { FramebufferTexture2DMultisampleIMG, "glFramebufferTexture2DMultisampleIMG" }, - { GetPerfMonitorGroupsAMD, "glGetPerfMonitorGroupsAMD" }, - { GetPerfMonitorCountersAMD, "glGetPerfMonitorCountersAMD" }, - { GetPerfMonitorGroupStringAMD, "glGetPerfMonitorGroupStringAMD"}, - { GetPerfMonitorCounterStringAMD, "glGetPerfMonitorCounterStringAMD" }, - { GetPerfMonitorCounterInfoAMD, "glGetPerfMonitorCounterInfoAMD" }, - { GenPerfMonitorsAMD, "glGenPerfMonitorsAMD" }, - { DeletePerfMonitorsAMD, "glDeletePerfMonitorsAMD" }, - { SelectPerfMonitorCountersAMD, "glSelectPerfMonitorCountersAMD" }, - { BeginPerfMonitorAMD, "glBeginPerfMonitorAMD" }, - { EndPerfMonitorAMD, "glEndPerfMonitorAMD" }, - { GetPerfMonitorCounterDataAMD, "glGetPerfMonitorCounterDataAMD" }, - { BlitFramebufferANGLE, "glBlitFramebufferANGLE" }, - { RenderbufferStorageMultisampleANGLE, "glRenderbufferStorageMultisampleANGLE" }, - { CoverageMaskNV, "glCoverageMaskNV" }, - { CoverageOperationNV, "glCoverageOperationNV" }, - { GetDriverControlsQCOM, "glGetDriverControlsQCOM" }, - { GetDriverControlStringQCOM, "glGetDriverControlStringQCOM" }, - { EnableDriverControlQCOM, "glEnableDriverControlQCOM" }, - { DisableDriverControlQCOM, "glDisableDriverControlQCOM" }, - { ExtGetTexturesQCOM, "glExtGetTexturesQCOM" }, - { ExtGetBuffersQCOM, "glExtGetBuffersQCOM" }, - { ExtGetRenderbuffersQCOM, "glExtGetRenderbuffersQCOM" }, - { ExtGetFramebuffersQCOM, "glExtGetFramebuffersQCOM" }, - { ExtGetTexLevelParameterivQCOM, "glExtGetTexLevelParameterivQCOM" }, - { ExtTexObjectStateOverrideiQCOM, "glExtTexObjectStateOverrideiQCOM" }, - { ExtGetTexSubImageQCOM, "glExtGetTexSubImageQCOM" }, - { ExtGetBufferPointervQCOM, "glExtGetBufferPointervQCOM" }, - { ExtGetShadersQCOM, "glExtGetShadersQCOM" }, - { ExtGetProgramsQCOM, "glExtGetProgramsQCOM" }, - { ExtIsProgramBinaryQCOM, "glExtIsProgramBinaryQCOM" }, - { ExtGetProgramBinarySourceQCOM, "glExtGetProgramBinarySourceQCOM" }, - { StartTilingQCOM, "glStartTilingQCOM" }, - { EndTilingQCOM, "glEndTilingQCOM" }, - { GetProgramBinaryOES, "glGetProgramBinaryOES" }, - { ProgramBinaryOES, "glProgramBinaryOES" }, - { TexImage3DOES, "glTexImage3DOES" }, - { TexSubImage3DOES, "glTexSubImage3DOES" }, - { CopyTexSubImage3DOES, "glCopyTexSubImage3DOES" }, - { CompressedTexImage3DOES, "glCompressedTexImage3DOES" }, - { CompressedTexSubImage3DOES, "glCompressedTexSubImage3DOES" }, - { FramebufferTexture3DOES, "glFramebufferTexture3DOES" }, - { BlendEquationSeparateOES, "glBlendEquationSeparateOES" }, - { BlendFuncSeparateOES, "glBlendFuncSeparateOES" }, - { BlendEquationOES, "glBlendEquationOES" }, - { QueryMatrixxOES, "glQueryMatrixxOES" }, - { CopyTextureLevelsAPPLE, "glCopyTextureLevelsAPPLE" }, - { RenderbufferStorageMultisampleAPPLE, "glRenderbufferStorageMultisampleAPPLE" }, - { ResolveMultisampleFramebufferAPPLE, "glResolveMultisampleFramebufferAPPLE" }, - { FenceSyncAPPLE, "glFenceSyncAPPLE" }, - { IsSyncAPPLE, "glIsSyncAPPLE" }, - { DeleteSyncAPPLE, "glDeleteSyncAPPLE" }, - { ClientWaitSyncAPPLE, "glClientWaitSyncAPPLE" }, - { WaitSyncAPPLE, "glWaitSyncAPPLE" }, - { GetInteger64vAPPLE, "glGetInteger64vAPPLE" }, - { GetSyncivAPPLE, "glGetSyncivAPPLE" }, - { MapBufferRangeEXT, "glMapBufferRangeEXT" }, - { FlushMappedBufferRangeEXT, "glFlushMappedBufferRangeEXT" }, - { RenderbufferStorageMultisampleEXT, "glRenderbufferStorageMultisampleEXT" }, - { FramebufferTexture2DMultisampleEXT, "glFramebufferTexture2DMultisampleEXT" }, - { GetGraphicsResetStatusEXT, "glGetGraphicsResetStatusEXT" }, - { ReadnPixelsEXT, "glReadnPixelsEXT" }, - { GetnUniformfvEXT, "glGetnUniformfvEXT" }, - { GetnUniformivEXT, "glGetnUniformivEXT" }, - { TexStorage1DEXT, "glTexStorage1DEXT" }, - { TexStorage2DEXT, "glTexStorage2DEXT" }, - { TexStorage3DEXT, "glTexStorage3DEXT" }, - { TextureStorage1DEXT, "glTextureStorage1DEXT" }, - { TextureStorage2DEXT, "glTextureStorage2DEXT" }, - { TextureStorage3DEXT, "glTextureStorage3DEXT" }, -#if !defined(GL_KHR_debug) - { GLDEBUGPROCKHR, "glGLDEBUGPROCKHR" }, -#endif - { DebugMessageControlKHR, "glDebugMessageControlKHR" }, - { DebugMessageInsertKHR, "glDebugMessageInsertKHR" }, - { DebugMessageCallbackKHR, "glDebugMessageCallbackKHR" }, - { GetDebugMessageLogKHR, "glGetDebugMessageLogKHR" }, - { PushDebugGroupKHR, "glPushDebugGroupKHR" }, - { PopDebugGroupKHR, "glPopDebugGroupKHR" }, - { ObjectLabelKHR, "glObjectLabelKHR" }, - { GetObjectLabelKHR, "glGetObjectLabelKHR" }, - { ObjectPtrLabelKHR, "glObjectPtrLabelKHR" }, - { GetObjectPtrLabelKHR, "glGetObjectPtrLabelKHR" }, - { GetPointervKHR, "glGetPointervKHR" }, - { DrawArraysInstancedANGLE, "glDrawArraysInstancedANGLE" }, - { DrawElementsInstancedANGLE, "glDrawElementsInstancedANGLE" }, - { VertexAttribDivisorANGLE, "glVertexAttribDivisorANGLE" }, - { GetTranslatedShaderSourceANGLE, "glGetTranslatedShaderSourceANGLE" }, - { LabelObjectEXT, "glLabelObjectEXT" }, - { GetObjectLabelEXT, "glGetObjectLabelEXT" }, - { InsertEventMarkerEXT, "glInsertEventMarkerEXT" }, - { PushGroupMarkerEXT, "glPushGroupMarkerEXT" }, - { PopGroupMarkerEXT, "glPopGroupMarkerEXT" }, - { GenQueriesEXT, "glGenQueriesEXT" }, - { DeleteQueriesEXT, "glDeleteQueriesEXT" }, - { IsQueryEXT, "glIsQueryEXT" }, - { BeginQueryEXT, "glBeginQueryEXT" }, - { EndQueryEXT, "glEndQueryEXT" }, - { GetQueryivEXT, "glGetQueryivEXT" }, - { GetQueryObjectuivEXT, "glGetQueryObjectuivEXT" }, - { UseProgramStagesEXT, "glUseProgramStagesEXT" }, - { ActiveShaderProgramEXT, "glActiveShaderProgramEXT" }, - { CreateShaderProgramvEXT, "glCreateShaderProgramvEXT" }, - { BindProgramPipelineEXT, "glBindProgramPipelineEXT" }, - { DeleteProgramPipelinesEXT, "glDeleteProgramPipelinesEXT" }, - { GenProgramPipelinesEXT, "glGenProgramPipelinesEXT" }, - { IsProgramPipelineEXT, "glIsProgramPipelineEXT" }, - { ProgramParameteriEXT, "glProgramParameteriEXT" }, - { GetProgramPipelineivEXT, "glGetProgramPipelineivEXT" }, - { ProgramUniform1iEXT, "glProgramUniform1iEXT" }, - { ProgramUniform2iEXT, "glProgramUniform2iEXT" }, - { ProgramUniform3iEXT, "glProgramUniform3iEXT" }, - { ProgramUniform4iEXT, "glProgramUniform4iEXT" }, - { ProgramUniform1fEXT, "glProgramUniform1fEXT" }, - { ProgramUniform2fEXT, "glProgramUniform2fEXT" }, - { ProgramUniform3fEXT, "glProgramUniform3fEXT" }, - { ProgramUniform4fEXT, "glProgramUniform4fEXT" }, - { ProgramUniform1ivEXT, "glProgramUniform1ivEXT" }, - { ProgramUniform2ivEXT, "glProgramUniform2ivEXT" }, - { ProgramUniform3ivEXT, "glProgramUniform3ivEXT" }, - { ProgramUniform4ivEXT, "glProgramUniform4ivEXT" }, - { ProgramUniform1fvEXT, "glProgramUniform1fvEXT" }, - { ProgramUniform2fvEXT, "glProgramUniform2fvEXT" }, - { ProgramUniform3fvEXT, "glProgramUniform3fvEXT" }, - { ProgramUniform4fvEXT, "glProgramUniform4fvEXT" }, - { ProgramUniformMatrix2fvEXT, "glProgramUniformMatrix2fvEXT" }, - { ProgramUniformMatrix3fvEXT, "glProgramUniformMatrix3fvEXT" }, - { ProgramUniformMatrix4fvEXT, "glProgramUniformMatrix4fvEXT" }, - { ValidateProgramPipelineEXT, "glValidateProgramPipelineEXT" }, - { GetProgramPipelineInfoLogEXT, "glGetProgramPipelineInfoLogEXT" }, - { ProgramUniform1uiEXT, "glProgramUniform1uiEXT" }, - { ProgramUniform2uiEXT, "glProgramUniform2uiEXT" }, - { ProgramUniform3uiEXT, "glProgramUniform3uiEXT" }, - { ProgramUniform4uiEXT, "glProgramUniform4uiEXT" }, - { ProgramUniform1uivEXT, "glProgramUniform1uivEXT" }, - { ProgramUniform2uivEXT, "glProgramUniform2uivEXT" }, - { ProgramUniform3uivEXT, "glProgramUniform3uivEXT" }, - { ProgramUniform4uivEXT, "glProgramUniform4uivEXT" }, - { ProgramUniformMatrix2x3fvEXT, "glProgramUniformMatrix2x3fvEXT" }, - { ProgramUniformMatrix3x2fvEXT, "glProgramUniformMatrix3x2fvEXT" }, - { ProgramUniformMatrix2x4fvEXT, "glProgramUniformMatrix2x4fvEXT" }, - { ProgramUniformMatrix4x2fvEXT, "glProgramUniformMatrix4x2fvEXT" }, - { ProgramUniformMatrix3x4fvEXT, "glProgramUniformMatrix3x4fvEXT" }, - { ProgramUniformMatrix4x3fvEXT, "glProgramUniformMatrix4x3fvEXT" }, - { AlphaFuncQCOM, "glAlphaFuncQCOM" }, - { ReadBufferNV, "glReadBufferNV" }, - { DrawBuffersNV, "glDrawBuffersNV" }, - { ReadBufferIndexedEXT, "glReadBufferIndexedEXT" }, - { DrawBuffersIndexedEXT, "glDrawBuffersIndexedEXT" }, - { GetIntegeri_vEXT, "glGetIntegeri_vEXT" }, - { DrawBuffersEXT, "glDrawBuffersEXT" }, - { BlendEquationEXT, "glBlendEquationEXT" }, - { BlendBarrierKHR, "glBlendBarrierKHR" }, - { TexStorage3DMultisampleOES, "glTexStorage3DMultisampleOES" }, - { FramebufferTextureMultiviewOVR, "glFramebufferTextureMultiviewOVR" }, - { FramebufferPixelLocalStorageSizeEXT, "glFramebufferPixelLocalStorageSizeEXT" }, - { ClearPixelLocalStorageuiEXT, "glClearPixelLocalStorageuiEXT" }, - { GetFramebufferPixelLocalStorageSizeEXT, "glGetFramebufferPixelLocalStorageSize" }, - { BufferStorageEXT, "glBufferStorageEXT" }, - { ClearTexImageIMG, "glClearTexImageIMG" }, - { ClearTexSubImageIMG, "glClearTexSubImageIMG" }, - { ClearTexImageEXT, "glClearTexImageEXT" }, - { ClearTexSubImageEXT, "glClearTexSubImageEXT" }, - { FramebufferTexture2DDownsampleIMG, "glFramebufferTexture2DDownsampleIMG" }, - { FramebufferTextureLayerDownsampleIMG, "glFramebufferTextureLayerDownsampleIMG" }, - { PatchParameteriEXT, "glPatchParameteriEXT" }, - -#ifdef GL_IMG_bindless_texture - { GetTextureHandleIMG, "glGetTextureHandleIMG" }, - { GetTextureSamplerHandleIMG, "glGetTextureSamplerHandleIMG" }, - { UniformHandleui64IMG, "glUniformHandleui64IMG" }, - { UniformHandleui64vIMG, "glUniformHandleui64vIMG" }, - { ProgramUniformHandleui64IMG, "glProgramUniformHandleui64IMG" }, - { ProgramUniformHandleui64vIMG, "glProgramUniformHandleui64vIMG" } -#endif - -}; -} - -#if !TARGET_OS_IPHONE -static inline void* GetGlesExtensionFunction(const char* funcName) -{ - return (void*)DYNAMICEGL_CALL_FUNCTION(GetProcAddress)(funcName); -} -#endif - -static inline bool isExtensionSupported(const unsigned char* const extensionString, const char* const extension) -{ - if (!extensionString) - { - return false; - } - - // The recommended technique for querying OpenGL extensions; - // from http://opengl.org/resources/features/OGLextensions/ - const char* start = (const char*)extensionString; - char* position, *terminator; - - // Extension names should not have spaces. - position = (char*)strchr(extension, ' '); - - if (position || *extension == '\0') - { - return 0; - } - - /* It takes a bit of care to be fool-proof about parsing the - OpenGL extensions string. Don't be fooled by sub-strings, etc. */ - for (;;) - { - position = (char*)strstr((char*)start, extension); - - if (!position) - { - break; - } - - terminator = position + strlen(extension); - - if (position == start || *(position - 1) == ' ') - { - if (*terminator == ' ' || *terminator == '\0') - { - return true; - } - } - - start = terminator; - } - - return false; -} - -inline void* getGlesExtFunction(gl::internals::GlExtFuncName::OpenGLESExtFunctionName funcname, bool reset = false) -{ - static void* FunctionTable[GlExtFuncName::NUMBER_OF_OPENGLEXT_FUNCTIONS + 1] = {0}; - -#if TARGET_OS_IPHONE - FunctionTable[GlExtFuncName::DiscardFramebufferEXT] = (void*)&glDiscardFramebufferEXT; - FunctionTable[GlExtFuncName::MapBufferOES] = (void*)&glMapBufferOES; - FunctionTable[GlExtFuncName::UnmapBufferOES] = (void*)&glUnmapBufferOES; - FunctionTable[GlExtFuncName::GetBufferPointervOES] = (void*)&glGetBufferPointervOES; - FunctionTable[GlExtFuncName::BindVertexArrayOES] = (void*)&glBindVertexArrayOES; - FunctionTable[GlExtFuncName::DeleteVertexArraysOES] = (void*)&glDeleteVertexArraysOES; - FunctionTable[GlExtFuncName::GenVertexArraysOES] = (void*)&glGenVertexArraysOES; - FunctionTable[GlExtFuncName::IsVertexArrayOES] = (void*)&glIsVertexArrayOES; - - FunctionTable[GlExtFuncName::GetProgramBinaryOES] = (void*)&glGetProgramBinary; - FunctionTable[GlExtFuncName::ProgramBinaryOES] = (void*)&glProgramBinary; - FunctionTable[GlExtFuncName::TexImage3DOES] = (void*)&glTexImage3D; - FunctionTable[GlExtFuncName::TexSubImage3DOES] = (void*)&glTexSubImage3D; - FunctionTable[GlExtFuncName::CopyTexSubImage3DOES] = (void*)&glCopyTexSubImage3D; - FunctionTable[GlExtFuncName::CompressedTexImage3DOES] = (void*)&glCompressedTexImage3D; - FunctionTable[GlExtFuncName::CompressedTexSubImage3DOES] = (void*)&glCompressedTexSubImage3D; - FunctionTable[GlExtFuncName::BlendEquationSeparateOES] = (void*)&glBlendEquationSeparate; - FunctionTable[GlExtFuncName::BlendFuncSeparateOES] = (void*)&glBlendFuncSeparate; - FunctionTable[GlExtFuncName::BlendEquationOES] = (void*)&glBlendEquation; - - FunctionTable[GlExtFuncName::CopyTextureLevelsAPPLE] = (void*)&glCopyTextureLevelsAPPLE; - FunctionTable[GlExtFuncName::RenderbufferStorageMultisampleAPPLE] = (void*)&glRenderbufferStorageMultisampleAPPLE; - FunctionTable[GlExtFuncName::ResolveMultisampleFramebufferAPPLE] = (void*)&glResolveMultisampleFramebufferAPPLE; - FunctionTable[GlExtFuncName::FenceSyncAPPLE] = (void*)&glFenceSyncAPPLE; - FunctionTable[GlExtFuncName::IsSyncAPPLE] = (void*)&glIsSyncAPPLE; - FunctionTable[GlExtFuncName::DeleteSyncAPPLE] = (void*)&glDeleteSyncAPPLE; - FunctionTable[GlExtFuncName::ClientWaitSyncAPPLE] = (void*)&glClientWaitSyncAPPLE; - FunctionTable[GlExtFuncName::WaitSyncAPPLE] = (void*)&glWaitSyncAPPLE; - FunctionTable[GlExtFuncName::GetInteger64vAPPLE] = (void*)&glGetInteger64vAPPLE; - FunctionTable[GlExtFuncName::GetSyncivAPPLE] = (void*)&glGetSyncivAPPLE; - FunctionTable[GlExtFuncName::MapBufferRangeEXT] = (void*)&glMapBufferRangeEXT; - FunctionTable[GlExtFuncName::FlushMappedBufferRangeEXT] = (void*)&glFlushMappedBufferRangeEXT; - FunctionTable[GlExtFuncName::RenderbufferStorageMultisampleEXT] = (void*)&glRenderbufferStorageMultisample; - FunctionTable[GlExtFuncName::TexStorage2DEXT] = (void*)&glTexStorage2DEXT; - FunctionTable[GlExtFuncName::TextureStorage2DEXT] = (void*)&glTexStorage2DEXT; - FunctionTable[GlExtFuncName::GetObjectLabelKHR] = (void*)&glGetObjectLabelEXT; - FunctionTable[GlExtFuncName::LabelObjectEXT] = (void*)&glLabelObjectEXT; - FunctionTable[GlExtFuncName::GetObjectLabelEXT] = (void*)&glGetObjectLabelEXT; - FunctionTable[GlExtFuncName::InsertEventMarkerEXT] = (void*)&glInsertEventMarkerEXT; - FunctionTable[GlExtFuncName::PushGroupMarkerEXT] = (void*)&glPushGroupMarkerEXT; - FunctionTable[GlExtFuncName::PopGroupMarkerEXT] = (void*)&glPopGroupMarkerEXT; - FunctionTable[GlExtFuncName::GenQueriesEXT] = (void*)&glGenQueriesEXT; - FunctionTable[GlExtFuncName::DeleteQueriesEXT] = (void*)&glDeleteQueriesEXT; - FunctionTable[GlExtFuncName::IsQueryEXT] = (void*)&glIsQueryEXT; - FunctionTable[GlExtFuncName::BeginQueryEXT] = (void*)&glBeginQueryEXT; - FunctionTable[GlExtFuncName::EndQueryEXT] = (void*)&glEndQueryEXT; - FunctionTable[GlExtFuncName::GetQueryivEXT] = (void*)&glGetQueryivEXT; - FunctionTable[GlExtFuncName::GetQueryObjectuivEXT] = (void*)&glGetQueryObjectuivEXT; - FunctionTable[GlExtFuncName::UseProgramStagesEXT] = (void*)&glUseProgramStagesEXT; - FunctionTable[GlExtFuncName::ActiveShaderProgramEXT] = (void*)&glActiveShaderProgramEXT; - FunctionTable[GlExtFuncName::CreateShaderProgramvEXT] = (void*)&glCreateShaderProgramvEXT; - FunctionTable[GlExtFuncName::BindProgramPipelineEXT] = (void*)&glBindProgramPipelineEXT; - FunctionTable[GlExtFuncName::DeleteProgramPipelinesEXT] = (void*)&glDeleteProgramPipelinesEXT; - FunctionTable[GlExtFuncName::GenProgramPipelinesEXT] = (void*)&glGenProgramPipelinesEXT; - FunctionTable[GlExtFuncName::IsProgramPipelineEXT] = (void*)&glIsProgramPipelineEXT; - FunctionTable[GlExtFuncName::ProgramParameteriEXT] = (void*)&glProgramParameteriEXT; - FunctionTable[GlExtFuncName::GetProgramPipelineivEXT] = (void*)&glGetProgramPipelineivEXT; - FunctionTable[GlExtFuncName::ProgramUniform1iEXT] = (void*)&glProgramUniform1iEXT; - FunctionTable[GlExtFuncName::ProgramUniform2iEXT] = (void*)&glProgramUniform2iEXT; - FunctionTable[GlExtFuncName::ProgramUniform3iEXT] = (void*)&glProgramUniform3iEXT; - FunctionTable[GlExtFuncName::ProgramUniform4iEXT] = (void*)&glProgramUniform4iEXT; - FunctionTable[GlExtFuncName::ProgramUniform1fEXT] = (void*)&glProgramUniform1fEXT; - FunctionTable[GlExtFuncName::ProgramUniform2fEXT] = (void*)&glProgramUniform2fEXT; - FunctionTable[GlExtFuncName::ProgramUniform3fEXT] = (void*)&glProgramUniform3fEXT; - FunctionTable[GlExtFuncName::ProgramUniform4fEXT] = (void*)&glProgramUniform4fEXT; - FunctionTable[GlExtFuncName::ProgramUniform1ivEXT] = (void*)&glProgramUniform1ivEXT; - FunctionTable[GlExtFuncName::ProgramUniform2ivEXT] = (void*)&glProgramUniform2ivEXT; - FunctionTable[GlExtFuncName::ProgramUniform3ivEXT] = (void*)&glProgramUniform3ivEXT; - FunctionTable[GlExtFuncName::ProgramUniform4ivEXT] = (void*)&glProgramUniform4ivEXT; - FunctionTable[GlExtFuncName::ProgramUniform1fvEXT] = (void*)&glProgramUniform1fvEXT; - FunctionTable[GlExtFuncName::ProgramUniform2fvEXT] = (void*)&glProgramUniform2fvEXT; - FunctionTable[GlExtFuncName::ProgramUniform3fvEXT] = (void*)&glProgramUniform3fvEXT; - FunctionTable[GlExtFuncName::ProgramUniform4fvEXT] = (void*)&glProgramUniform4fvEXT; - FunctionTable[GlExtFuncName::ProgramUniformMatrix2fvEXT] = (void*)&glProgramUniformMatrix2fvEXT; - FunctionTable[GlExtFuncName::ProgramUniformMatrix3fvEXT] = (void*)&glProgramUniformMatrix3fvEXT; - FunctionTable[GlExtFuncName::ProgramUniformMatrix4fvEXT] = (void*)&glProgramUniformMatrix4fvEXT; - FunctionTable[GlExtFuncName::ValidateProgramPipelineEXT] = (void*)&glValidateProgramPipelineEXT; - FunctionTable[GlExtFuncName::GetProgramPipelineInfoLogEXT] = (void*)&glGetProgramPipelineInfoLogEXT; - FunctionTable[GlExtFuncName::ProgramUniform1uiEXT] = (void*)&glProgramUniform1uiEXT; - FunctionTable[GlExtFuncName::ProgramUniform2uiEXT] = (void*)&glProgramUniform2uiEXT; - FunctionTable[GlExtFuncName::ProgramUniform3uiEXT] = (void*)&glProgramUniform3uiEXT; - FunctionTable[GlExtFuncName::ProgramUniform4uiEXT] = (void*)&glProgramUniform4uiEXT; - FunctionTable[GlExtFuncName::ProgramUniform1uivEXT] = (void*)&glProgramUniform1uivEXT; - FunctionTable[GlExtFuncName::ProgramUniform2uivEXT] = (void*)&glProgramUniform2uivEXT; - FunctionTable[GlExtFuncName::ProgramUniform3uivEXT] = (void*)&glProgramUniform3uivEXT; - FunctionTable[GlExtFuncName::ProgramUniform4uivEXT] = (void*)&glProgramUniform4uivEXT; - FunctionTable[GlExtFuncName::ProgramUniformMatrix2x3fvEXT] = (void*)&glProgramUniformMatrix2x3fvEXT; - FunctionTable[GlExtFuncName::ProgramUniformMatrix3x2fvEXT] = (void*)&glProgramUniformMatrix3x2fvEXT; - FunctionTable[GlExtFuncName::ProgramUniformMatrix2x4fvEXT] = (void*)&glProgramUniformMatrix2x4fvEXT; - FunctionTable[GlExtFuncName::ProgramUniformMatrix4x2fvEXT] = (void*)&glProgramUniformMatrix4x2fvEXT; - FunctionTable[GlExtFuncName::ProgramUniformMatrix3x4fvEXT] = (void*)&glProgramUniformMatrix3x4fvEXT; - FunctionTable[GlExtFuncName::ProgramUniformMatrix4x3fvEXT] = (void*)&glProgramUniformMatrix4x3fvEXT; - FunctionTable[GlExtFuncName::GetIntegeri_vEXT] = (void*)&glGetIntegeri_v; - FunctionTable[GlExtFuncName::DrawBuffersEXT] = (void*)&glDrawBuffers; - FunctionTable[GlExtFuncName::BlendEquationEXT] = (void*)&glBlendEquation; -#else - // GET FUNCTION POINTERS --- ONCE!!!! /// - if (!FunctionTable[GlExtFuncName::NUMBER_OF_OPENGLEXT_FUNCTIONS] || reset) - { - const uint32_t numExtensionStrings = sizeof(GlExtFuncName::OpenGLESExtFunctionNamePairs) / sizeof(GlExtFuncName::OpenGLESExtFunctionNamePairs[0]); - - // Set the last element of the function table to avoid issues - FunctionTable[GlExtFuncName::NUMBER_OF_OPENGLEXT_FUNCTIONS] = (void*)1; - - for (uint32_t i = 0; i < numExtensionStrings; i++) - { - FunctionTable[i] = GetGlesExtensionFunction(GlExtFuncName::OpenGLESExtFunctionNamePairs[i].second); - } - } -#endif - return FunctionTable[funcname]; -} -} -} - -#ifndef DYNAMICGLES_NO_NAMESPACE -namespace gl { -namespace ext { -#elif TARGET_OS_IPHONE -namespace gl { -namespace internals { -#endif -inline void resetExtensionFunctionPointers() -{ - gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::OpenGLESExtFunctionName(0), true); -} - -inline void DYNAMICGLES_FUNCTION(MultiDrawElementsEXT)(GLenum mode, const GLsizei* count, GLenum type, const GLvoid** indices, GLsizei primcount) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLMULTIDRAWELEMENTSEXTPROC _MultiDrawElementsEXT = (PFNGLMULTIDRAWELEMENTSEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::MultiDrawElementsEXT); - return _MultiDrawElementsEXT(mode, count, type, indices, primcount); -#endif -} -inline void DYNAMICGLES_FUNCTION(MultiDrawArraysEXT)(GLenum mode, const GLint* first, const GLsizei* count, GLsizei primcount) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLMULTIDRAWARRAYSEXTPROC _MultiDrawArraysEXT = (PFNGLMULTIDRAWARRAYSEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::MultiDrawArraysEXT); - return _MultiDrawArraysEXT(mode, first, count, primcount); -#endif -} -inline void DYNAMICGLES_FUNCTION(DiscardFramebufferEXT)(GLenum target, GLsizei numAttachments, const GLenum* attachments) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glDiscardFramebufferEXT) PFNGLDISCARDFRAMEBUFFEREXTPROC; -#endif - PFNGLDISCARDFRAMEBUFFEREXTPROC _DiscardFramebufferEXT = (PFNGLDISCARDFRAMEBUFFEREXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::DiscardFramebufferEXT); - return _DiscardFramebufferEXT(target, numAttachments, attachments); -} -inline void* DYNAMICGLES_FUNCTION(MapBufferOES)(GLenum target, GLenum access) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glMapBufferOES) PFNGLMAPBUFFEROESPROC; -#endif - PFNGLMAPBUFFEROESPROC _MapBufferOES = (PFNGLMAPBUFFEROESPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::MapBufferOES); - return _MapBufferOES(target, access); -} -inline GLboolean DYNAMICGLES_FUNCTION(UnmapBufferOES)(GLenum target) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUnmapBufferOES) PFNGLUNMAPBUFFEROESPROC; -#endif - PFNGLUNMAPBUFFEROESPROC _UnmapBufferOES = (PFNGLUNMAPBUFFEROESPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::UnmapBufferOES); - return _UnmapBufferOES(target); -} -inline void DYNAMICGLES_FUNCTION(GetBufferPointervOES)(GLenum target, GLenum pname, void** params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetBufferPointervOES) PFNGLGETBUFFERPOINTERVOESPROC; -#endif - PFNGLGETBUFFERPOINTERVOESPROC _GetBufferPointervOES = (PFNGLGETBUFFERPOINTERVOESPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetBufferPointervOES); - return _GetBufferPointervOES(target, pname, params); -} -inline void DYNAMICGLES_FUNCTION(BindVertexArrayOES)(GLuint vertexarray) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glBindVertexArrayOES) PFNGLBINDVERTEXARRAYOESPROC; -#endif - PFNGLBINDVERTEXARRAYOESPROC _BindVertexArrayOES = (PFNGLBINDVERTEXARRAYOESPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::BindVertexArrayOES); - return _BindVertexArrayOES(vertexarray); -} -inline void DYNAMICGLES_FUNCTION(DeleteVertexArraysOES)(GLsizei n, const GLuint* vertexarrays) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glDeleteVertexArraysOES) PFNGLDELETEVERTEXARRAYSOESPROC; -#endif - PFNGLDELETEVERTEXARRAYSOESPROC _DeleteVertexArraysOES = (PFNGLDELETEVERTEXARRAYSOESPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::DeleteVertexArraysOES); - return _DeleteVertexArraysOES(n, vertexarrays); -} -inline void DYNAMICGLES_FUNCTION(GenVertexArraysOES)(GLsizei n, GLuint* vertexarrays) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGenVertexArraysOES) PFNGLGENVERTEXARRAYSOESPROC; -#endif - PFNGLGENVERTEXARRAYSOESPROC _GenVertexArraysOES = (PFNGLGENVERTEXARRAYSOESPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GenVertexArraysOES); - return _GenVertexArraysOES(n, vertexarrays); -} -inline GLboolean DYNAMICGLES_FUNCTION(IsVertexArrayOES)(GLuint vertexarray) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glIsVertexArrayOES) PFNGLISVERTEXARRAYOESPROC; -#endif - PFNGLISVERTEXARRAYOESPROC _IsVertexArrayOES = (PFNGLISVERTEXARRAYOESPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::IsVertexArrayOES); - return _IsVertexArrayOES(vertexarray); -} -inline void DYNAMICGLES_FUNCTION(DeleteFencesNV)(GLsizei n, const GLuint* fences) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLDELETEFENCESNVPROC _DeleteFencesNV = (PFNGLDELETEFENCESNVPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::DeleteFencesNV); - return _DeleteFencesNV(n, fences); -#endif -} -inline void DYNAMICGLES_FUNCTION(GenFencesNV)(GLsizei n, GLuint* fences) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGENFENCESNVPROC _GenFencesNV = (PFNGLGENFENCESNVPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GenFencesNV); - return _GenFencesNV(n, fences); -#endif -} -inline GLboolean DYNAMICGLES_FUNCTION(IsFenceNV)(GLuint fence) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLISFENCENVPROC _IsFenceNV = (PFNGLISFENCENVPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::IsFenceNV); - return _IsFenceNV(fence); -#endif -} -inline GLboolean DYNAMICGLES_FUNCTION(TestFenceNV)(GLuint fence) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLTESTFENCENVPROC _TestFenceNV = (PFNGLTESTFENCENVPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::TestFenceNV); - return _TestFenceNV(fence); -#endif -} -inline void DYNAMICGLES_FUNCTION(GetFenceivNV)(GLuint fence, GLenum pname, GLint* params) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETFENCEIVNVPROC _GetFenceivNV = (PFNGLGETFENCEIVNVPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetFenceivNV); - return _GetFenceivNV(fence, pname, params); -#endif -} -inline void DYNAMICGLES_FUNCTION(FinishFenceNV)(GLuint fence) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLFINISHFENCENVPROC _FinishFenceNV = (PFNGLFINISHFENCENVPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::FinishFenceNV); - return _FinishFenceNV(fence); -#endif -} -inline void DYNAMICGLES_FUNCTION(SetFenceNV)(GLuint fence, GLenum condition) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLSETFENCENVPROC _SetFenceNV = (PFNGLSETFENCENVPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::SetFenceNV); - return _SetFenceNV(fence, condition); -#endif -} -#if !TARGET_OS_IPHONE -inline void DYNAMICGLES_FUNCTION(EGLImageTargetTexture2DOES)(GLenum target, GLeglImageOES image) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLEGLIMAGETARGETTEXTURE2DOESPROC _EGLImageTargetTexture2DOES = (PFNGLEGLIMAGETARGETTEXTURE2DOESPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::EGLImageTargetTexture2DOES); - return _EGLImageTargetTexture2DOES(target, image); -#endif -} -inline void DYNAMICGLES_FUNCTION(EGLImageTargetRenderbufferStorageOES)(GLenum target, GLeglImageOES image) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC _EGLImageTargetRenderbufferStorageOES = (PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::EGLImageTargetRenderbufferStorageOES); - return _EGLImageTargetRenderbufferStorageOES(target, image); -#endif -} -#endif -inline void DYNAMICGLES_FUNCTION(RenderbufferStorageMultisampleIMG)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC _RenderbufferStorageMultisampleIMG = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::RenderbufferStorageMultisampleIMG); - return _RenderbufferStorageMultisampleIMG(target, samples, internalformat, width, height); -#endif -} -inline void DYNAMICGLES_FUNCTION(FramebufferTexture2DMultisampleIMG)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC _FramebufferTexture2DMultisampleIMG = (PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::FramebufferTexture2DMultisampleIMG); - return _FramebufferTexture2DMultisampleIMG(target, attachment, textarget, texture, level, samples); -#endif -} -inline void DYNAMICGLES_FUNCTION(GetPerfMonitorGroupsAMD)(GLint* numGroups, GLsizei groupsSize, GLuint* groups) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETPERFMONITORGROUPSAMDPROC _GetPerfMonitorGroupsAMD = (PFNGLGETPERFMONITORGROUPSAMDPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetPerfMonitorGroupsAMD); - return _GetPerfMonitorGroupsAMD(numGroups, groupsSize, groups); -#endif -} -inline void DYNAMICGLES_FUNCTION(GetPerfMonitorCountersAMD)(GLuint group, GLint* numCounters, GLint* maxActiveCounters, GLsizei counterSize, GLuint* counters) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETPERFMONITORCOUNTERSAMDPROC _GetPerfMonitorCountersAMD = (PFNGLGETPERFMONITORCOUNTERSAMDPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetPerfMonitorCountersAMD); - return _GetPerfMonitorCountersAMD(group, numCounters, maxActiveCounters, counterSize, counters); -#endif -} -inline void DYNAMICGLES_FUNCTION(GetPerfMonitorGroupStringAMD)(GLuint group, GLsizei bufSize, GLsizei* length, char* groupString) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETPERFMONITORGROUPSTRINGAMDPROC _GetPerfMonitorGroupStringAMD = (PFNGLGETPERFMONITORGROUPSTRINGAMDPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetPerfMonitorGroupStringAMD); - return _GetPerfMonitorGroupStringAMD(group, bufSize, length, groupString); -#endif -} -inline void DYNAMICGLES_FUNCTION(GetPerfMonitorCounterStringAMD)(GLuint group, GLuint counter, GLsizei bufSize, GLsizei* length, char* counterString) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC _GetPerfMonitorCounterStringAMD = (PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetPerfMonitorCounterStringAMD); - return _GetPerfMonitorCounterStringAMD(group, counter, bufSize, length, counterString); -#endif -} -inline void DYNAMICGLES_FUNCTION(GetPerfMonitorCounterInfoAMD)(GLuint group, GLuint counter, GLenum pname, GLvoid* data) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETPERFMONITORCOUNTERINFOAMDPROC _GetPerfMonitorCounterInfoAMD = (PFNGLGETPERFMONITORCOUNTERINFOAMDPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetPerfMonitorCounterInfoAMD); - return _GetPerfMonitorCounterInfoAMD(group, counter, pname, data); -#endif -} -inline void DYNAMICGLES_FUNCTION(GenPerfMonitorsAMD)(GLsizei n, GLuint* monitors) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGENPERFMONITORSAMDPROC _GenPerfMonitorsAMD = (PFNGLGENPERFMONITORSAMDPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GenPerfMonitorsAMD); - return _GenPerfMonitorsAMD(n, monitors); -#endif -} -inline void DYNAMICGLES_FUNCTION(DeletePerfMonitorsAMD)(GLsizei n, GLuint* monitors) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLDELETEPERFMONITORSAMDPROC _DeletePerfMonitorsAMD = (PFNGLDELETEPERFMONITORSAMDPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::DeletePerfMonitorsAMD); - return _DeletePerfMonitorsAMD(n, monitors); -#endif -} -inline void DYNAMICGLES_FUNCTION(SelectPerfMonitorCountersAMD)(GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint* countersList) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLSELECTPERFMONITORCOUNTERSAMDPROC _SelectPerfMonitorCountersAMD = (PFNGLSELECTPERFMONITORCOUNTERSAMDPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::SelectPerfMonitorCountersAMD); - return _SelectPerfMonitorCountersAMD(monitor, enable, group, numCounters, countersList); -#endif -} -inline void DYNAMICGLES_FUNCTION(BeginPerfMonitorAMD)(GLuint monitor) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLBEGINPERFMONITORAMDPROC _BeginPerfMonitorAMD = (PFNGLBEGINPERFMONITORAMDPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::BeginPerfMonitorAMD); - return _BeginPerfMonitorAMD(monitor); -#endif -} -inline void DYNAMICGLES_FUNCTION(EndPerfMonitorAMD)(GLuint monitor) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLENDPERFMONITORAMDPROC _EndPerfMonitorAMD = (PFNGLENDPERFMONITORAMDPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::EndPerfMonitorAMD); - return _EndPerfMonitorAMD(monitor); -#endif -} -inline void DYNAMICGLES_FUNCTION(GetPerfMonitorCounterDataAMD)(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint* data, GLint* bytesWritten) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETPERFMONITORCOUNTERDATAAMDPROC _GetPerfMonitorCounterDataAMD = (PFNGLGETPERFMONITORCOUNTERDATAAMDPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetPerfMonitorCounterDataAMD); - return _GetPerfMonitorCounterDataAMD(monitor, pname, dataSize, data, bytesWritten); -#endif -} -inline void DYNAMICGLES_FUNCTION(BlitFramebufferANGLE)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLBLITFRAMEBUFFERANGLEPROC _BlitFramebufferANGLE = (PFNGLBLITFRAMEBUFFERANGLEPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::BlitFramebufferANGLE); - return _BlitFramebufferANGLE(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); -#endif -} -inline void DYNAMICGLES_FUNCTION(RenderbufferStorageMultisampleANGLE)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC _RenderbufferStorageMultisampleANGLE = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::RenderbufferStorageMultisampleANGLE); - return _RenderbufferStorageMultisampleANGLE(target, samples, internalformat, width, height); -#endif -} -inline void DYNAMICGLES_FUNCTION(RenderbufferStorageMultisampleAPPLE)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glRenderbufferStorageMultisampleAPPLE) PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC; -#endif - PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC _RenderbufferStorageMultisampleAPPLE = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::RenderbufferStorageMultisampleAPPLE); - return _RenderbufferStorageMultisampleAPPLE(target, samples, internalformat, width, height); -} -inline void DYNAMICGLES_FUNCTION(ResolveMultisampleFramebufferAPPLE)(void) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glResolveMultisampleFramebufferAPPLE) PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC; -#endif - PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC _ResolveMultisampleFramebufferAPPLE = (PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ResolveMultisampleFramebufferAPPLE); - return _ResolveMultisampleFramebufferAPPLE(); -} -inline void DYNAMICGLES_FUNCTION(CoverageMaskNV)(GLboolean mask) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLCOVERAGEMASKNVPROC _CoverageMaskNV = (PFNGLCOVERAGEMASKNVPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::CoverageMaskNV); - return _CoverageMaskNV(mask); -#endif -} -inline void DYNAMICGLES_FUNCTION(CoverageOperationNV)(GLenum operation) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLCOVERAGEOPERATIONNVPROC _CoverageOperationNV = (PFNGLCOVERAGEOPERATIONNVPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::CoverageOperationNV); - return _CoverageOperationNV(operation); -#endif -} -inline void DYNAMICGLES_FUNCTION(GetDriverControlsQCOM)(GLint* num, GLsizei size, GLuint* driverControls) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETDRIVERCONTROLSQCOMPROC _GetDriverControlsQCOM = (PFNGLGETDRIVERCONTROLSQCOMPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetDriverControlsQCOM); - return _GetDriverControlsQCOM(num, size, driverControls); -#endif -} -inline void DYNAMICGLES_FUNCTION(GetDriverControlStringQCOM)(GLuint driverControl, GLsizei bufSize, GLsizei* length, char* driverControlString) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETDRIVERCONTROLSTRINGQCOMPROC _GetDriverControlStringQCOM = (PFNGLGETDRIVERCONTROLSTRINGQCOMPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetDriverControlStringQCOM); - return _GetDriverControlStringQCOM(driverControl, bufSize, length, driverControlString); -#endif -} -inline void DYNAMICGLES_FUNCTION(EnableDriverControlQCOM)(GLuint driverControl) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLENABLEDRIVERCONTROLQCOMPROC _EnableDriverControlQCOM = (PFNGLENABLEDRIVERCONTROLQCOMPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::EnableDriverControlQCOM); - return _EnableDriverControlQCOM(driverControl); -#endif -} -inline void DYNAMICGLES_FUNCTION(DisableDriverControlQCOM)(GLuint driverControl) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLDISABLEDRIVERCONTROLQCOMPROC _DisableDriverControlQCOM = (PFNGLDISABLEDRIVERCONTROLQCOMPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::DisableDriverControlQCOM); - return _DisableDriverControlQCOM(driverControl); -#endif -} -inline void DYNAMICGLES_FUNCTION(ExtGetTexturesQCOM)(GLuint* textures, GLint maxTextures, GLint* numTextures) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLEXTGETTEXTURESQCOMPROC _ExtGetTexturesQCOM = (PFNGLEXTGETTEXTURESQCOMPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ExtGetTexturesQCOM); - return _ExtGetTexturesQCOM(textures, maxTextures, numTextures); -#endif -} -inline void DYNAMICGLES_FUNCTION(ExtGetBuffersQCOM)(GLuint* buffers, GLint maxBuffers, GLint* numBuffers) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLEXTGETBUFFERSQCOMPROC _ExtGetBuffersQCOM = (PFNGLEXTGETBUFFERSQCOMPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ExtGetBuffersQCOM); - return _ExtGetBuffersQCOM(buffers, maxBuffers, numBuffers); -#endif -} -inline void DYNAMICGLES_FUNCTION(ExtGetRenderbuffersQCOM)(GLuint* renderbuffers, GLint maxRenderbuffers, GLint* numRenderbuffers) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLEXTGETRENDERBUFFERSQCOMPROC _ExtGetRenderbuffersQCOM = (PFNGLEXTGETRENDERBUFFERSQCOMPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ExtGetRenderbuffersQCOM); - return _ExtGetRenderbuffersQCOM(renderbuffers, maxRenderbuffers, numRenderbuffers); -#endif -} -inline void DYNAMICGLES_FUNCTION(ExtGetFramebuffersQCOM)(GLuint* framebuffers, GLint maxFramebuffers, GLint* numFramebuffers) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLEXTGETFRAMEBUFFERSQCOMPROC _ExtGetFramebuffersQCOM = (PFNGLEXTGETFRAMEBUFFERSQCOMPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ExtGetFramebuffersQCOM); - return _ExtGetFramebuffersQCOM(framebuffers, maxFramebuffers, numFramebuffers); -#endif -} -inline void DYNAMICGLES_FUNCTION(ExtGetTexLevelParameterivQCOM)(GLuint texture, GLenum face, GLint level, GLenum pname, GLint* params) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC _ExtGetTexLevelParameterivQCOM = (PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ExtGetTexLevelParameterivQCOM); - return _ExtGetTexLevelParameterivQCOM(texture, face, level, pname, params); -#endif -} -inline void DYNAMICGLES_FUNCTION(ExtTexObjectStateOverrideiQCOM)(GLenum target, GLenum pname, GLint param) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC _ExtTexObjectStateOverrideiQCOM = (PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ExtTexObjectStateOverrideiQCOM); - return _ExtTexObjectStateOverrideiQCOM(target, pname, param); -#endif -} -inline void DYNAMICGLES_FUNCTION(ExtGetTexSubImageQCOM)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid* texels) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLEXTGETTEXSUBIMAGEQCOMPROC _ExtGetTexSubImageQCOM = (PFNGLEXTGETTEXSUBIMAGEQCOMPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ExtGetTexSubImageQCOM); - return _ExtGetTexSubImageQCOM(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, texels); -#endif -} -inline void DYNAMICGLES_FUNCTION(ExtGetBufferPointervQCOM)(GLenum target, GLvoid** params) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLEXTGETBUFFERPOINTERVQCOMPROC _ExtGetBufferPointervQCOM = (PFNGLEXTGETBUFFERPOINTERVQCOMPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ExtGetBufferPointervQCOM); - return _ExtGetBufferPointervQCOM(target, params); -#endif -} -inline void DYNAMICGLES_FUNCTION(ExtGetShadersQCOM)(GLuint* shaders, GLint maxShaders, GLint* numShaders) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLEXTGETSHADERSQCOMPROC _ExtGetShadersQCOM = (PFNGLEXTGETSHADERSQCOMPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ExtGetShadersQCOM); - return _ExtGetShadersQCOM(shaders, maxShaders, numShaders); -#endif -} -inline void DYNAMICGLES_FUNCTION(ExtGetProgramsQCOM)(GLuint* programs, GLint maxPrograms, GLint* numPrograms) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLEXTGETPROGRAMSQCOMPROC _ExtGetProgramsQCOM = (PFNGLEXTGETPROGRAMSQCOMPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ExtGetProgramsQCOM); - return _ExtGetProgramsQCOM(programs, maxPrograms, numPrograms); -#endif -} -inline GLboolean DYNAMICGLES_FUNCTION(ExtIsProgramBinaryQCOM)(GLuint program) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLEXTISPROGRAMBINARYQCOMPROC _ExtIsProgramBinaryQCOM = (PFNGLEXTISPROGRAMBINARYQCOMPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ExtIsProgramBinaryQCOM); - return _ExtIsProgramBinaryQCOM(program); -#endif -} -inline void DYNAMICGLES_FUNCTION(ExtGetProgramBinarySourceQCOM)(GLuint program, GLenum shadertype, char* source, GLint* length) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC _ExtGetProgramBinarySourceQCOM = (PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ExtGetProgramBinarySourceQCOM); - return _ExtGetProgramBinarySourceQCOM(program, shadertype, source, length); -#endif -} -inline void DYNAMICGLES_FUNCTION(StartTilingQCOM)(GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLSTARTTILINGQCOMPROC _StartTilingQCOM = (PFNGLSTARTTILINGQCOMPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::StartTilingQCOM); - return _StartTilingQCOM(x, y, width, height, preserveMask); -#endif -} -inline void DYNAMICGLES_FUNCTION(EndTilingQCOM)(GLbitfield preserveMask) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLENDTILINGQCOMPROC _EndTilingQCOM = (PFNGLENDTILINGQCOMPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::EndTilingQCOM); - return _EndTilingQCOM(preserveMask); -#endif -} -inline void DYNAMICGLES_FUNCTION(GetProgramBinaryOES)(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETPROGRAMBINARYOESPROC _GetProgramBinaryOES = (PFNGLGETPROGRAMBINARYOESPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetProgramBinaryOES); - return _GetProgramBinaryOES(program, bufSize, length, binaryFormat, binary); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramBinaryOES)(GLuint program, GLenum binaryFormat, const GLvoid* binary, GLint length) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMBINARYOESPROC _ProgramBinaryOES = (PFNGLPROGRAMBINARYOESPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramBinaryOES); - return _ProgramBinaryOES(program, binaryFormat, binary, length); -#endif -} -inline void DYNAMICGLES_FUNCTION(TexImage3DOES)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLTEXIMAGE3DOESPROC _TexImage3DOES = (PFNGLTEXIMAGE3DOESPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::TexImage3DOES); - return _TexImage3DOES(target, level, internalformat, width, height, depth, border, format, type, pixels); -#endif -} -inline void DYNAMICGLES_FUNCTION(TexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLTEXSUBIMAGE3DOESPROC _TexSubImage3DOES = (PFNGLTEXSUBIMAGE3DOESPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::TexSubImage3DOES); - return _TexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); -#endif -} -inline void DYNAMICGLES_FUNCTION(CopyTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLCOPYTEXSUBIMAGE3DOESPROC _CopyTexSubImage3DOES = (PFNGLCOPYTEXSUBIMAGE3DOESPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::CopyTexSubImage3DOES); - return _CopyTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, x, y, width, height); -#endif -} -inline void DYNAMICGLES_FUNCTION(CompressedTexImage3DOES)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLCOMPRESSEDTEXIMAGE3DOESPROC _CompressedTexImage3DOES = (PFNGLCOMPRESSEDTEXIMAGE3DOESPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::CompressedTexImage3DOES); - return _CompressedTexImage3DOES(target, level, internalformat, width, height, depth, border, imageSize, data); -#endif -} -inline void DYNAMICGLES_FUNCTION(CompressedTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC _CompressedTexSubImage3DOES = (PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::CompressedTexSubImage3DOES); - return _CompressedTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); -#endif -} -inline void DYNAMICGLES_FUNCTION(FramebufferTexture3DOES)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLFRAMEBUFFERTEXTURE3DOESPROC _FramebufferTexture3DOES = (PFNGLFRAMEBUFFERTEXTURE3DOESPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::FramebufferTexture3DOES); - return _FramebufferTexture3DOES(target, attachment, textarget, texture, level, zoffset); -#endif -} -inline void DYNAMICGLES_FUNCTION(BlendEquationSeparateOES)(GLenum modeRGB, GLenum modeAlpha) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLBLENDEQUATIONSEPARATEPROC _BlendEquationSeparateOES = (PFNGLBLENDEQUATIONSEPARATEPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::BlendEquationSeparateOES); - return _BlendEquationSeparateOES(modeRGB, modeAlpha); -#endif -} - -inline void DYNAMICGLES_FUNCTION(CopyTextureLevelsAPPLE)(GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glCopyTextureLevelsAPPLE) PFNGLCOPYTEXTURELEVELSAPPLEPROC; -#endif - PFNGLCOPYTEXTURELEVELSAPPLEPROC _CopyTextureLevelsAPPLE = (PFNGLCOPYTEXTURELEVELSAPPLEPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::CopyTextureLevelsAPPLE); - return _CopyTextureLevelsAPPLE(destinationTexture, sourceTexture, sourceBaseLevel, sourceLevelCount); -} -inline GLsync DYNAMICGLES_FUNCTION(FenceSyncAPPLE)(GLenum condition, GLbitfield flags) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glFenceSyncAPPLE) PFNGLFENCESYNCAPPLEPROC; -#endif - PFNGLFENCESYNCAPPLEPROC _FenceSyncAPPLE = (PFNGLFENCESYNCAPPLEPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::FenceSyncAPPLE); - return _FenceSyncAPPLE(condition, flags); -} -inline GLboolean DYNAMICGLES_FUNCTION(IsSyncAPPLE)(GLsync sync) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glIsSyncAPPLE) PFNGLISSYNCAPPLEPROC; -#endif - PFNGLISSYNCAPPLEPROC _IsSyncAPPLE = (PFNGLISSYNCAPPLEPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::IsSyncAPPLE); - return _IsSyncAPPLE(sync); -} -inline void DYNAMICGLES_FUNCTION(DeleteSyncAPPLE)(GLsync sync) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glDeleteSyncAPPLE) PFNGLDELETESYNCAPPLEPROC; -#endif - PFNGLDELETESYNCAPPLEPROC _DeleteSyncAPPLE = (PFNGLDELETESYNCAPPLEPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::DeleteSyncAPPLE); - return _DeleteSyncAPPLE(sync); -} -inline GLenum DYNAMICGLES_FUNCTION(ClientWaitSyncAPPLE)(GLsync sync, GLbitfield flags, GLuint64 timeout) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glClientWaitSyncAPPLE) PFNGLCLIENTWAITSYNCAPPLEPROC; -#endif - PFNGLCLIENTWAITSYNCAPPLEPROC _ClientWaitSyncAPPLE = (PFNGLCLIENTWAITSYNCAPPLEPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ClientWaitSyncAPPLE); - return _ClientWaitSyncAPPLE(sync, flags, timeout); -} -inline void DYNAMICGLES_FUNCTION(WaitSyncAPPLE)(GLsync sync, GLbitfield flags, GLuint64 timeout) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glWaitSyncAPPLE) PFNGLWAITSYNCAPPLEPROC; -#endif - PFNGLWAITSYNCAPPLEPROC _WaitSyncAPPLE = (PFNGLWAITSYNCAPPLEPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::WaitSyncAPPLE); - return _WaitSyncAPPLE(sync, flags, timeout); -} -inline void DYNAMICGLES_FUNCTION(GetInteger64vAPPLE)(GLenum pname, GLint64* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetInteger64vAPPLE) PFNGLGETINTEGER64VAPPLEPROC; -#endif - PFNGLGETINTEGER64VAPPLEPROC _GetInteger64vAPPLE = (PFNGLGETINTEGER64VAPPLEPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetInteger64vAPPLE); - return _GetInteger64vAPPLE(pname, params); -} -inline void DYNAMICGLES_FUNCTION(GetSyncivAPPLE)(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetSyncivAPPLE) PFNGLGETSYNCIVAPPLEPROC; -#endif - PFNGLGETSYNCIVAPPLEPROC _GetSyncivAPPLE = (PFNGLGETSYNCIVAPPLEPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetSyncivAPPLE); - return _GetSyncivAPPLE(sync, pname, bufSize, length, values); -} -inline void* DYNAMICGLES_FUNCTION(MapBufferRangeEXT)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glMapBufferRangeEXT) PFNGLMAPBUFFERRANGEEXTPROC; -#endif - PFNGLMAPBUFFERRANGEEXTPROC _MapBufferRangeEXT = (PFNGLMAPBUFFERRANGEEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::MapBufferRangeEXT); - return _MapBufferRangeEXT(target, offset, length, access); -} -inline void DYNAMICGLES_FUNCTION(FlushMappedBufferRangeEXT)(GLenum target, GLintptr offset, GLsizeiptr length) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glFlushMappedBufferRangeEXT) PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC; -#endif - PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC _FlushMappedBufferRangeEXT = (PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::FlushMappedBufferRangeEXT); - return _FlushMappedBufferRangeEXT(target, offset, length); -} -inline void DYNAMICGLES_FUNCTION(RenderbufferStorageMultisampleEXT)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC _RenderbufferStorageMultisampleEXT = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::RenderbufferStorageMultisampleEXT); - return _RenderbufferStorageMultisampleEXT(target, samples, internalformat, width, height); -#endif -} -inline void DYNAMICGLES_FUNCTION(FramebufferTexture2DMultisampleEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC _FramebufferTexture2DMultisampleEXT = (PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::FramebufferTexture2DMultisampleEXT); - return _FramebufferTexture2DMultisampleEXT(target, attachment, textarget, texture, level, samples); -#endif -} -inline GLenum DYNAMICGLES_FUNCTION(GetGraphicsResetStatusEXT)(void) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETGRAPHICSRESETSTATUSEXTPROC _GetGraphicsResetStatusEXT = (PFNGLGETGRAPHICSRESETSTATUSEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetGraphicsResetStatusEXT); - return _GetGraphicsResetStatusEXT(); -#endif -} -inline void DYNAMICGLES_FUNCTION(ReadnPixelsEXT)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void* data) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLREADNPIXELSEXTPROC _ReadnPixelsEXT = (PFNGLREADNPIXELSEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ReadnPixelsEXT); - return _ReadnPixelsEXT(x, y, width, height, format, type, bufSize, data); -#endif -} -inline void DYNAMICGLES_FUNCTION(GetnUniformfvEXT)(GLuint program, GLint location, GLsizei bufSize, float* params) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETNUNIFORMFVEXTPROC _GetnUniformfvEXT = (PFNGLGETNUNIFORMFVEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetnUniformfvEXT); - return _GetnUniformfvEXT(program, location, bufSize, params); -#endif -} -inline void DYNAMICGLES_FUNCTION(GetnUniformivEXT)(GLuint program, GLint location, GLsizei bufSize, GLint* params) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETNUNIFORMIVEXTPROC _GetnUniformivEXT = (PFNGLGETNUNIFORMIVEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetnUniformivEXT); - return _GetnUniformivEXT(program, location, bufSize, params); -#endif -} -inline void DYNAMICGLES_FUNCTION(TexStorage1DEXT)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLTEXSTORAGE1DEXTPROC _TexStorage1DEXT = (PFNGLTEXSTORAGE1DEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::TexStorage1DEXT); - return _TexStorage1DEXT(target, levels, internalformat, width); -#endif -} -inline void DYNAMICGLES_FUNCTION(TexStorage2DEXT)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLTEXSTORAGE2DEXTPROC _TexStorage2DEXT = (PFNGLTEXSTORAGE2DEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::TexStorage2DEXT); - return _TexStorage2DEXT(target, levels, internalformat, width, height); -#endif -} -inline void DYNAMICGLES_FUNCTION(TexStorage3DEXT)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLTEXSTORAGE3DEXTPROC _TexStorage3DEXT = (PFNGLTEXSTORAGE3DEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::TexStorage3DEXT); - return _TexStorage3DEXT(target, levels, internalformat, width, height, depth); -#endif -} -inline void DYNAMICGLES_FUNCTION(TextureStorage1DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLTEXTURESTORAGE1DEXTPROC _TextureStorage1DEXT = (PFNGLTEXTURESTORAGE1DEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::TextureStorage1DEXT); - return _TextureStorage1DEXT(texture, target, levels, internalformat, width); -#endif -} -inline void DYNAMICGLES_FUNCTION(TextureStorage2DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLTEXTURESTORAGE2DEXTPROC _TextureStorage2DEXT = (PFNGLTEXTURESTORAGE2DEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::TextureStorage2DEXT); - return _TextureStorage2DEXT(texture, target, levels, internalformat, width, height); -#endif -} -inline void DYNAMICGLES_FUNCTION(TextureStorage3DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLTEXTURESTORAGE3DEXTPROC _TextureStorage3DEXT = (PFNGLTEXTURESTORAGE3DEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::TextureStorage3DEXT); - return _TextureStorage3DEXT(texture, target, levels, internalformat, width, height, depth); -#endif -} -inline void DYNAMICGLES_FUNCTION(DebugMessageControlKHR)(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint* ids, GLboolean enabled) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLDEBUGMESSAGECONTROLKHRPROC _DebugMessageControlKHR = (PFNGLDEBUGMESSAGECONTROLKHRPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::DebugMessageControlKHR); - return _DebugMessageControlKHR(source, type, severity, count, ids, enabled); -#endif -} -inline void DYNAMICGLES_FUNCTION(DebugMessageInsertKHR)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* buf) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLDEBUGMESSAGEINSERTKHRPROC _DebugMessageInsertKHR = (PFNGLDEBUGMESSAGEINSERTKHRPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::DebugMessageInsertKHR); - return _DebugMessageInsertKHR(source, type, id, severity, length, buf); -#endif - -} -#if !TARGET_OS_IPHONE -inline void DYNAMICGLES_FUNCTION(DebugMessageCallbackKHR)(GLDEBUGPROCKHR callback, const void* userParam) -{ - - PFNGLDEBUGMESSAGECALLBACKKHRPROC _DebugMessageCallbackKHR = (PFNGLDEBUGMESSAGECALLBACKKHRPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::DebugMessageCallbackKHR); - return _DebugMessageCallbackKHR(callback, userParam); -} -#endif -inline GLuint DYNAMICGLES_FUNCTION(GetDebugMessageLogKHR)(GLuint count, GLsizei bufsize, GLenum* sources, GLenum* types, GLuint* ids, GLenum* severities, GLsizei* lengths, GLchar* messageLog) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETDEBUGMESSAGELOGKHRPROC _GetDebugMessageLogKHR = (PFNGLGETDEBUGMESSAGELOGKHRPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetDebugMessageLogKHR); - return _GetDebugMessageLogKHR(count, bufsize, sources, types, ids, severities, lengths, messageLog); -#endif -} -inline void DYNAMICGLES_FUNCTION(PushDebugGroupKHR)(GLenum source, GLuint id, GLsizei length, const GLchar* message) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPUSHDEBUGGROUPKHRPROC _PushDebugGroupKHR = (PFNGLPUSHDEBUGGROUPKHRPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::PushDebugGroupKHR); - return _PushDebugGroupKHR(source, id, length, message); -#endif - -} -inline void DYNAMICGLES_FUNCTION(PopDebugGroupKHR)(void) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPOPDEBUGGROUPKHRPROC _PopDebugGroupKHR = (PFNGLPOPDEBUGGROUPKHRPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::PopDebugGroupKHR); - return _PopDebugGroupKHR(); -#endif -} -inline void DYNAMICGLES_FUNCTION(ObjectLabelKHR)(GLenum identifier, GLuint name, GLsizei length, const GLchar* label) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLOBJECTLABELKHRPROC _ObjectLabelKHR = (PFNGLOBJECTLABELKHRPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ObjectLabelKHR); - return _ObjectLabelKHR(identifier, name, length, label); -#endif -} -inline void DYNAMICGLES_FUNCTION(GetObjectLabelKHR)(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei* length, GLchar* label) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETOBJECTLABELKHRPROC _GetObjectLabelKHR = (PFNGLGETOBJECTLABELKHRPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetObjectLabelKHR); - return _GetObjectLabelKHR(identifier, name, bufSize, length, label); -#endif -} -inline void DYNAMICGLES_FUNCTION(ObjectPtrLabelKHR)(const void* ptr, GLsizei length, const GLchar* label) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLOBJECTPTRLABELKHRPROC _ObjectPtrLabelKHR = (PFNGLOBJECTPTRLABELKHRPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ObjectPtrLabelKHR); - return _ObjectPtrLabelKHR(ptr, length, label); -#endif - -} -inline void DYNAMICGLES_FUNCTION(GetObjectPtrLabelKHR)(const void* ptr, GLsizei bufSize, GLsizei* length, GLchar* label) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETOBJECTPTRLABELKHRPROC _GetObjectPtrLabelKHR = (PFNGLGETOBJECTPTRLABELKHRPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetObjectPtrLabelKHR); - return _GetObjectPtrLabelKHR(ptr, bufSize, length, label); -#endif - -} -inline void DYNAMICGLES_FUNCTION(GetPointervKHR)(GLenum pname, void** params) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETPOINTERVKHRPROC _GetPointervKHR = (PFNGLGETPOINTERVKHRPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetPointervKHR); - return _GetPointervKHR(pname, params); -#endif -} -inline void DYNAMICGLES_FUNCTION(DrawArraysInstancedANGLE)(GLenum mode, GLint first, GLsizei count, GLsizei primcount) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLDRAWARRAYSINSTANCEDANGLEPROC _DrawArraysInstancedANGLE = (PFNGLDRAWARRAYSINSTANCEDANGLEPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::DrawArraysInstancedANGLE); - return _DrawArraysInstancedANGLE(mode, first, count, primcount); -#endif -} -inline void DYNAMICGLES_FUNCTION(DrawElementsInstancedANGLE)(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei primcount) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLDRAWELEMENTSINSTANCEDANGLEPROC _DrawElementsInstancedANGLE = (PFNGLDRAWELEMENTSINSTANCEDANGLEPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::DrawElementsInstancedANGLE); - return _DrawElementsInstancedANGLE(mode, count, type, indices, primcount); -#endif -} -inline void DYNAMICGLES_FUNCTION(VertexAttribDivisorANGLE)(GLuint index, GLuint divisor) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLVERTEXATTRIBDIVISORANGLEPROC _VertexAttribDivisorANGLE = (PFNGLVERTEXATTRIBDIVISORANGLEPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::VertexAttribDivisorANGLE); - return _VertexAttribDivisorANGLE(index, divisor); -#endif -} -inline void DYNAMICGLES_FUNCTION(GetTranslatedShaderSourceANGLE)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC _GetTranslatedShaderSourceANGLE = (PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetTranslatedShaderSourceANGLE); - return _GetTranslatedShaderSourceANGLE(shader, bufsize, length, source); -#endif - -} -inline void DYNAMICGLES_FUNCTION(LabelObjectEXT)(GLenum type, GLuint object, GLsizei length, const GLchar* label) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLLABELOBJECTEXTPROC _LabelObjectEXT = (PFNGLLABELOBJECTEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::LabelObjectEXT); - return _LabelObjectEXT(type, object, length, label); -#endif - -} -inline void DYNAMICGLES_FUNCTION(GetObjectLabelEXT)(GLenum type, GLuint object, GLsizei bufSize, GLsizei* length, GLchar* label) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETOBJECTLABELEXTPROC _GetObjectLabelEXT = (PFNGLGETOBJECTLABELEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetObjectLabelEXT); - return _GetObjectLabelEXT(type, object, bufSize, length, label); -#endif - -} -inline void DYNAMICGLES_FUNCTION(InsertEventMarkerEXT)(GLsizei length, const GLchar* marker) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLINSERTEVENTMARKEREXTPROC _InsertEventMarkerEXT = (PFNGLINSERTEVENTMARKEREXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::InsertEventMarkerEXT); - return _InsertEventMarkerEXT(length, marker); -#endif - -} -inline void DYNAMICGLES_FUNCTION(PushGroupMarkerEXT)(GLsizei length, const GLchar* marker) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPUSHGROUPMARKEREXTPROC _PushGroupMarkerEXT = (PFNGLPUSHGROUPMARKEREXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::PushGroupMarkerEXT); - return _PushGroupMarkerEXT(length, marker); -#endif - -} -inline void DYNAMICGLES_FUNCTION(PopGroupMarkerEXT)(void) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPOPGROUPMARKEREXTPROC _PopGroupMarkerEXT = (PFNGLPOPGROUPMARKEREXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::PopGroupMarkerEXT); - return _PopGroupMarkerEXT(); -#endif -} -inline void DYNAMICGLES_FUNCTION(GenQueriesEXT)(GLsizei n, GLuint* ids) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGENQUERIESEXTPROC _GenQueriesEXT = (PFNGLGENQUERIESEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GenQueriesEXT); - return _GenQueriesEXT(n, ids); -#endif -} -inline void DYNAMICGLES_FUNCTION(DeleteQueriesEXT)(GLsizei n, const GLuint* ids) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLDELETEQUERIESEXTPROC _DeleteQueriesEXT = (PFNGLDELETEQUERIESEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::DeleteQueriesEXT); - return _DeleteQueriesEXT(n, ids); -#endif -} -inline GLboolean DYNAMICGLES_FUNCTION(IsQueryEXT)(GLuint id) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLISQUERYEXTPROC _IsQueryEXT = (PFNGLISQUERYEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::IsQueryEXT); - return _IsQueryEXT(id); -#endif -} -inline void DYNAMICGLES_FUNCTION(BeginQueryEXT)(GLenum target, GLuint id) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLBEGINQUERYEXTPROC _BeginQueryEXT = (PFNGLBEGINQUERYEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::BeginQueryEXT); - return _BeginQueryEXT(target, id); -#endif -} -inline void DYNAMICGLES_FUNCTION(EndQueryEXT)(GLenum target) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glEndQueryEXT) PFNGLENDQUERYEXTPROC; -#endif - PFNGLENDQUERYEXTPROC _EndQueryEXT = (PFNGLENDQUERYEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::EndQueryEXT); - return _EndQueryEXT(target); -} -inline void DYNAMICGLES_FUNCTION(GetQueryivEXT)(GLenum target, GLenum pname, GLint* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetQueryivEXT) PFNGLGETQUERYIVEXTPROC; -#endif - PFNGLGETQUERYIVEXTPROC _GetQueryivEXT = (PFNGLGETQUERYIVEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetQueryivEXT); - return _GetQueryivEXT(target, pname, params); -} -inline void DYNAMICGLES_FUNCTION(GetQueryObjectuivEXT)(GLuint id, GLenum pname, GLuint* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetQueryObjectuivEXT) PFNGLGETQUERYOBJECTUIVEXTPROC; -#endif - PFNGLGETQUERYOBJECTUIVEXTPROC _GetQueryObjectuivEXT = (PFNGLGETQUERYOBJECTUIVEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetQueryObjectuivEXT); - return _GetQueryObjectuivEXT(id, pname, params); -} -inline void DYNAMICGLES_FUNCTION(UseProgramStagesEXT)(GLuint pipeline, GLbitfield stages, GLuint program) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glUseProgramStagesEXT) PFNGLUSEPROGRAMSTAGESEXTPROC; -#endif - PFNGLUSEPROGRAMSTAGESEXTPROC _UseProgramStagesEXT = (PFNGLUSEPROGRAMSTAGESEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::UseProgramStagesEXT); - return _UseProgramStagesEXT(pipeline, stages, program); -} -inline void DYNAMICGLES_FUNCTION(ActiveShaderProgramEXT)(GLuint pipeline, GLuint program) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glActiveShaderProgramEXT) PFNGLACTIVESHADERPROGRAMEXTPROC; -#endif - PFNGLACTIVESHADERPROGRAMEXTPROC _ActiveShaderProgramEXT = (PFNGLACTIVESHADERPROGRAMEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ActiveShaderProgramEXT); - return _ActiveShaderProgramEXT(pipeline, program); -} -inline GLuint DYNAMICGLES_FUNCTION(CreateShaderProgramvEXT)(GLenum type, GLsizei count, const GLchar** strings) -{ -#if TARGET_OS_IPHONE - assert(0); - return 0; -#else - PFNGLCREATESHADERPROGRAMVEXTPROC _CreateShaderProgramvEXT = (PFNGLCREATESHADERPROGRAMVEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::CreateShaderProgramvEXT); - return _CreateShaderProgramvEXT(type, count, strings); -#endif -} -inline void DYNAMICGLES_FUNCTION(BindProgramPipelineEXT)(GLuint pipeline) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glBindProgramPipelineEXT) PFNGLBINDPROGRAMPIPELINEEXTPROC; -#endif - PFNGLBINDPROGRAMPIPELINEEXTPROC _BindProgramPipelineEXT = (PFNGLBINDPROGRAMPIPELINEEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::BindProgramPipelineEXT); - return _BindProgramPipelineEXT(pipeline); -} -inline void DYNAMICGLES_FUNCTION(DeleteProgramPipelinesEXT)(GLsizei n, const GLuint* pipelines) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glDeleteProgramPipelinesEXT) PFNGLDELETEPROGRAMPIPELINESEXTPROC; -#endif - PFNGLDELETEPROGRAMPIPELINESEXTPROC _DeleteProgramPipelinesEXT = (PFNGLDELETEPROGRAMPIPELINESEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::DeleteProgramPipelinesEXT); - return _DeleteProgramPipelinesEXT(n, pipelines); -} -inline void DYNAMICGLES_FUNCTION(GenProgramPipelinesEXT)(GLsizei n, GLuint* pipelines) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGenProgramPipelinesEXT) PFNGLGENPROGRAMPIPELINESEXTPROC; -#endif - PFNGLGENPROGRAMPIPELINESEXTPROC _GenProgramPipelinesEXT = (PFNGLGENPROGRAMPIPELINESEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GenProgramPipelinesEXT); - return _GenProgramPipelinesEXT(n, pipelines); -} -inline GLboolean DYNAMICGLES_FUNCTION(IsProgramPipelineEXT)(GLuint pipeline) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glIsProgramPipelineEXT) PFNGLISPROGRAMPIPELINEEXTPROC; -#endif - PFNGLISPROGRAMPIPELINEEXTPROC _IsProgramPipelineEXT = (PFNGLISPROGRAMPIPELINEEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::IsProgramPipelineEXT); - return _IsProgramPipelineEXT(pipeline); -} -inline void DYNAMICGLES_FUNCTION(ProgramParameteriEXT)(GLuint program, GLenum pname, GLint value) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glProgramParameteriEXT) PFNGLPROGRAMPARAMETERIEXTPROC; -#endif - PFNGLPROGRAMPARAMETERIEXTPROC _ProgramParameteriEXT = (PFNGLPROGRAMPARAMETERIEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramParameteriEXT); - return _ProgramParameteriEXT(program, pname, value); -} -inline void DYNAMICGLES_FUNCTION(GetProgramPipelineivEXT)(GLuint pipeline, GLenum pname, GLint* params) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetProgramPipelineivEXT) PFNGLGETPROGRAMPIPELINEIVEXTPROC; -#endif - PFNGLGETPROGRAMPIPELINEIVEXTPROC _GetProgramPipelineivEXT = (PFNGLGETPROGRAMPIPELINEIVEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetProgramPipelineivEXT); - return _GetProgramPipelineivEXT(pipeline, pname, params); -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform1iEXT)(GLuint program, GLint location, GLint x) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM1IEXTPROC _ProgramUniform1iEXT = (PFNGLPROGRAMUNIFORM1IEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniform1iEXT); - return _ProgramUniform1iEXT(program, location, x); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform2iEXT)(GLuint program, GLint location, GLint x, GLint y) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM2IEXTPROC _ProgramUniform2iEXT = (PFNGLPROGRAMUNIFORM2IEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniform2iEXT); - return _ProgramUniform2iEXT(program, location, x, y); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform3iEXT)(GLuint program, GLint location, GLint x, GLint y, GLint z) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM3IEXTPROC _ProgramUniform3iEXT = (PFNGLPROGRAMUNIFORM3IEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniform3iEXT); - return _ProgramUniform3iEXT(program, location, x, y, z); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform4iEXT)(GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM4IEXTPROC _ProgramUniform4iEXT = (PFNGLPROGRAMUNIFORM4IEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniform4iEXT); - return _ProgramUniform4iEXT(program, location, x, y, z, w); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform1fEXT)(GLuint program, GLint location, GLfloat x) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM1FEXTPROC _ProgramUniform1fEXT = (PFNGLPROGRAMUNIFORM1FEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniform1fEXT); - return _ProgramUniform1fEXT(program, location, x); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform2fEXT)(GLuint program, GLint location, GLfloat x, GLfloat y) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM2FEXTPROC _ProgramUniform2fEXT = (PFNGLPROGRAMUNIFORM2FEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniform2fEXT); - return _ProgramUniform2fEXT(program, location, x, y); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform3fEXT)(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM3FEXTPROC _ProgramUniform3fEXT = (PFNGLPROGRAMUNIFORM3FEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniform3fEXT); - return _ProgramUniform3fEXT(program, location, x, y, z); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform4fEXT)(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM4FEXTPROC _ProgramUniform4fEXT = (PFNGLPROGRAMUNIFORM4FEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniform4fEXT); - return _ProgramUniform4fEXT(program, location, x, y, z, w); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform1ivEXT)(GLuint program, GLint location, GLsizei count, const GLint* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM1IVEXTPROC _ProgramUniform1ivEXT = (PFNGLPROGRAMUNIFORM1IVEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniform1ivEXT); - return _ProgramUniform1ivEXT(program, location, count, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform2ivEXT)(GLuint program, GLint location, GLsizei count, const GLint* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM2IVEXTPROC _ProgramUniform2ivEXT = (PFNGLPROGRAMUNIFORM2IVEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniform2ivEXT); - return _ProgramUniform2ivEXT(program, location, count, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform3ivEXT)(GLuint program, GLint location, GLsizei count, const GLint* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM3IVEXTPROC _ProgramUniform3ivEXT = (PFNGLPROGRAMUNIFORM3IVEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniform3ivEXT); - return _ProgramUniform3ivEXT(program, location, count, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform4ivEXT)(GLuint program, GLint location, GLsizei count, const GLint* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM4IVEXTPROC _ProgramUniform4ivEXT = (PFNGLPROGRAMUNIFORM4IVEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniform4ivEXT); - return _ProgramUniform4ivEXT(program, location, count, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform1fvEXT)(GLuint program, GLint location, GLsizei count, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM1FVEXTPROC _ProgramUniform1fvEXT = (PFNGLPROGRAMUNIFORM1FVEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniform1fvEXT); - return _ProgramUniform1fvEXT(program, location, count, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform2fvEXT)(GLuint program, GLint location, GLsizei count, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM2FVEXTPROC _ProgramUniform2fvEXT = (PFNGLPROGRAMUNIFORM2FVEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniform2fvEXT); - return _ProgramUniform2fvEXT(program, location, count, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform3fvEXT)(GLuint program, GLint location, GLsizei count, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM3FVEXTPROC _ProgramUniform3fvEXT = (PFNGLPROGRAMUNIFORM3FVEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniform3fvEXT); - return _ProgramUniform3fvEXT(program, location, count, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform4fvEXT)(GLuint program, GLint location, GLsizei count, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM4FVEXTPROC _ProgramUniform4fvEXT = (PFNGLPROGRAMUNIFORM4FVEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniform4fvEXT); - return _ProgramUniform4fvEXT(program, location, count, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniformMatrix2fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC _ProgramUniformMatrix2fvEXT = (PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniformMatrix2fvEXT); - return _ProgramUniformMatrix2fvEXT(program, location, count, transpose, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniformMatrix3fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC _ProgramUniformMatrix3fvEXT = (PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniformMatrix3fvEXT); - return _ProgramUniformMatrix3fvEXT(program, location, count, transpose, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniformMatrix4fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC _ProgramUniformMatrix4fvEXT = (PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniformMatrix4fvEXT); - return _ProgramUniformMatrix4fvEXT(program, location, count, transpose, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ValidateProgramPipelineEXT)(GLuint pipeline) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glValidateProgramPipelineEXT) PFNGLVALIDATEPROGRAMPIPELINEEXTPROC; -#endif - PFNGLVALIDATEPROGRAMPIPELINEEXTPROC _ValidateProgramPipelineEXT = (PFNGLVALIDATEPROGRAMPIPELINEEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ValidateProgramPipelineEXT); - return _ValidateProgramPipelineEXT(pipeline); -} -inline void DYNAMICGLES_FUNCTION(GetProgramPipelineInfoLogEXT)(GLuint pipeline, GLsizei bufSize, GLsizei* length, GLchar* infoLog) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetProgramPipelineInfoLogEXT) PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC; -#endif - PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC _GetProgramPipelineInfoLogEXT = (PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetProgramPipelineInfoLogEXT); - return _GetProgramPipelineInfoLogEXT(pipeline, bufSize, length, infoLog); - -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform1uiEXT)(GLuint program, GLint location, GLuint v0) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM1UIEXTPROC _ProgramUniform1uiEXT = (PFNGLPROGRAMUNIFORM1UIEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniform1uiEXT); - return _ProgramUniform1uiEXT(program, location, v0); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform2uiEXT)(GLuint program, GLint location, GLuint v0, GLuint v1) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM2UIEXTPROC _ProgramUniform2uiEXT = (PFNGLPROGRAMUNIFORM2UIEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniform2uiEXT); - return _ProgramUniform2uiEXT(program, location, v0, v1); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform3uiEXT)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM3UIEXTPROC _ProgramUniform3uiEXT = (PFNGLPROGRAMUNIFORM3UIEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniform3uiEXT); - return _ProgramUniform3uiEXT(program, location, v0, v1, v2); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform4uiEXT)(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM4UIEXTPROC _ProgramUniform4uiEXT = (PFNGLPROGRAMUNIFORM4UIEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniform4uiEXT); - return _ProgramUniform4uiEXT(program, location, v0, v1, v2, v3); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform1uivEXT)(GLuint program, GLint location, GLsizei count, const GLuint* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM1UIVEXTPROC _ProgramUniform1uivEXT = (PFNGLPROGRAMUNIFORM1UIVEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniform1uivEXT); - return _ProgramUniform1uivEXT(program, location, count, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform2uivEXT)(GLuint program, GLint location, GLsizei count, const GLuint* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM2UIVEXTPROC _ProgramUniform2uivEXT = (PFNGLPROGRAMUNIFORM2UIVEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniform2uivEXT); - return _ProgramUniform2uivEXT(program, location, count, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform3uivEXT)(GLuint program, GLint location, GLsizei count, const GLuint* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM3UIVEXTPROC _ProgramUniform3uivEXT = (PFNGLPROGRAMUNIFORM3UIVEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniform3uivEXT); - return _ProgramUniform3uivEXT(program, location, count, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniform4uivEXT)(GLuint program, GLint location, GLsizei count, const GLuint* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORM4UIVEXTPROC _ProgramUniform4uivEXT = (PFNGLPROGRAMUNIFORM4UIVEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniform4uivEXT); - return _ProgramUniform4uivEXT(program, location, count, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniformMatrix2x3fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC _ProgramUniformMatrix2x3fvEXT = (PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniformMatrix2x3fvEXT); - return _ProgramUniformMatrix2x3fvEXT(program, location, count, transpose, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniformMatrix3x2fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC _ProgramUniformMatrix3x2fvEXT = (PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniformMatrix3x2fvEXT); - return _ProgramUniformMatrix3x2fvEXT(program, location, count, transpose, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniformMatrix2x4fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC _ProgramUniformMatrix2x4fvEXT = (PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniformMatrix2x4fvEXT); - return _ProgramUniformMatrix2x4fvEXT(program, location, count, transpose, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniformMatrix4x2fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC _ProgramUniformMatrix4x2fvEXT = (PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniformMatrix4x2fvEXT); - return _ProgramUniformMatrix4x2fvEXT(program, location, count, transpose, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniformMatrix3x4fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC _ProgramUniformMatrix3x4fvEXT = (PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniformMatrix3x4fvEXT); - return _ProgramUniformMatrix3x4fvEXT(program, location, count, transpose, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(ProgramUniformMatrix4x3fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC _ProgramUniformMatrix4x3fvEXT = (PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniformMatrix4x3fvEXT); - return _ProgramUniformMatrix4x3fvEXT(program, location, count, transpose, value); -#endif -} -inline void DYNAMICGLES_FUNCTION(AlphaFuncQCOM)(GLenum func, GLclampf ref) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLALPHAFUNCQCOMPROC _AlphaFuncQCOM = (PFNGLALPHAFUNCQCOMPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::AlphaFuncQCOM); - return _AlphaFuncQCOM(func, ref); -#endif -} -inline void DYNAMICGLES_FUNCTION(ReadBufferNV)(GLenum mode) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLREADBUFFERNVPROC _ReadBufferNV = (PFNGLREADBUFFERNVPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ReadBufferNV); - return _ReadBufferNV(mode); -#endif -} -inline void DYNAMICGLES_FUNCTION(DrawBuffersNV)(GLsizei n, const GLenum* bufs) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLDRAWBUFFERSNVPROC _DrawBuffersNV = (PFNGLDRAWBUFFERSNVPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::DrawBuffersNV); - return _DrawBuffersNV(n, bufs); -#endif -} -inline void DYNAMICGLES_FUNCTION(ReadBufferIndexedEXT)(GLenum src, GLint index) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLREADBUFFERINDEXEDEXTPROC _ReadBufferIndexedEXT = (PFNGLREADBUFFERINDEXEDEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ReadBufferIndexedEXT); - return _ReadBufferIndexedEXT(src, index); -#endif -} -inline void DYNAMICGLES_FUNCTION(DrawBuffersIndexedEXT)(GLint n, const GLenum* location, const GLint* indices) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLDRAWBUFFERSINDEXEDEXTPROC _DrawBuffersIndexedEXT = (PFNGLDRAWBUFFERSINDEXEDEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::DrawBuffersIndexedEXT); - return _DrawBuffersIndexedEXT(n, location, indices); -#endif -} -inline void DYNAMICGLES_FUNCTION(GetIntegeri_vEXT)(GLenum target, GLuint index, GLint* data) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLGETINTEGERI_VEXTPROC _GetIntegeri_vEXT = (PFNGLGETINTEGERI_VEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetIntegeri_vEXT); - return _GetIntegeri_vEXT(target, index, data); -#endif -} -inline void DYNAMICGLES_FUNCTION(DrawBuffersEXT)(GLsizei n, const GLenum* bufs) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLDRAWBUFFERSEXTPROC _DrawBuffersEXT = (PFNGLDRAWBUFFERSEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::DrawBuffersEXT); - return _DrawBuffersEXT(n, bufs); -#endif -} -inline void DYNAMICGLES_FUNCTION(BlendBarrierKHR)(void) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLBLENDBARRIERKHRPROC _BlendBarrierKHR = (PFNGLBLENDBARRIERKHRPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::BlendBarrierKHR); - return _BlendBarrierKHR(); -#endif -} -inline void DYNAMICGLES_FUNCTION(TexStorage3DMultisampleOES)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLTEXSTORAGE3DMULTISAMPLEOESPROC _TexStorage3DMultisampleOES = (PFNGLTEXSTORAGE3DMULTISAMPLEOESPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::TexStorage3DMultisampleOES); - return _TexStorage3DMultisampleOES(target, samples, internalformat, width, height, depth, fixedsamplelocations); -#endif -} -inline void DYNAMICGLES_FUNCTION(FramebufferTextureMultiviewOVR)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC _FramebufferTextureMultiviewOVR = (PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::FramebufferTextureMultiviewOVR); - return _FramebufferTextureMultiviewOVR(target, attachment, texture, level, baseViewIndex, numViews); -#endif -} -inline void DYNAMICGLES_FUNCTION(FramebufferPixelLocalStorageSizeEXT)(GLuint target, GLsizei storageSize) -{ - typedef void (GL_APIENTRY * PFNGLFRAMEBUFFERPIXELLOCALSTORAGESIZEPROC)(GLuint target, GLsizei storageSize); - PFNGLFRAMEBUFFERPIXELLOCALSTORAGESIZEPROC _FramebufferPixelLocalStorageSize = (PFNGLFRAMEBUFFERPIXELLOCALSTORAGESIZEPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::FramebufferPixelLocalStorageSizeEXT); - return _FramebufferPixelLocalStorageSize(target, storageSize); -} -inline void DYNAMICGLES_FUNCTION(ClearPixelLocalStorageuiEXT)(GLsizei offset, GLsizei n, const GLuint* values) -{ - typedef void (GL_APIENTRY * PFNGLCLEARPIXELLOCALSTORAGEUIPROC)(GLsizei offset, GLsizei n, const GLuint * values); - PFNGLCLEARPIXELLOCALSTORAGEUIPROC _ClearPixelLocalStorageui = (PFNGLCLEARPIXELLOCALSTORAGEUIPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ClearPixelLocalStorageuiEXT); - return _ClearPixelLocalStorageui(offset, n, values); -} -inline void DYNAMICGLES_FUNCTION(GetFramebufferPixelLocalStorageSizeEXT)(GLuint target) -{ - typedef void (GL_APIENTRY * PFNGLGETFRAMEBUFFERPIXELLOCALSTORAGESIZEPROC)(GLuint target); - PFNGLGETFRAMEBUFFERPIXELLOCALSTORAGESIZEPROC _GetFramebufferPixelLocalStorageSize = (PFNGLGETFRAMEBUFFERPIXELLOCALSTORAGESIZEPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetFramebufferPixelLocalStorageSizeEXT); - return _GetFramebufferPixelLocalStorageSize(target); -} -inline void DYNAMICGLES_FUNCTION(BufferStorageEXT)(GLenum target, GLsizei size, const void* data, GLbitfield flags) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLBUFFERSTORAGEEXTPROC _BufferStorageEXT = (PFNGLBUFFERSTORAGEEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::BufferStorageEXT); - return _BufferStorageEXT(target, size, data, flags); -#endif -} -inline void DYNAMICGLES_FUNCTION(ClearTexImageEXT)(GLuint texture, GLint level, GLenum format, GLenum type, const GLvoid* data) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLCLEARTEXIMAGEEXTPROC _ClearTexImageEXT = (PFNGLCLEARTEXIMAGEEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ClearTexImageEXT); - return _ClearTexImageEXT(texture, level, format, type, data); -#endif -} -inline void DYNAMICGLES_FUNCTION(ClearTexSubImageEXT)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* data) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLCLEARTEXSUBIMAGEEXTPROC _ClearTexSubImageEXT = (PFNGLCLEARTEXSUBIMAGEEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ClearTexSubImageEXT); - return _ClearTexSubImageEXT(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); -#endif -} -inline void DYNAMICGLES_FUNCTION(ClearTexSubImageIMG)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* data) -{ - typedef void (GL_APIENTRY * PFNGLCLEARTEXSUBIMAGEIMGPROC)(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void* data); - PFNGLCLEARTEXSUBIMAGEIMGPROC _ClearTexSubImageIMG = (PFNGLCLEARTEXSUBIMAGEIMGPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ClearTexSubImageIMG); - return _ClearTexSubImageIMG(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); -} -inline void DYNAMICGLES_FUNCTION(FramebufferTexture2DDownsampleIMG)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLuint xscale, GLuint yscale) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLFRAMEBUFFERTEXTURE2DDOWNSAMPLEIMGPROC _FramebufferTexture2DDownsampleIMG = (PFNGLFRAMEBUFFERTEXTURE2DDOWNSAMPLEIMGPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::FramebufferTexture2DDownsampleIMG); - return _FramebufferTexture2DDownsampleIMG(target, attachment, textarget, texture, level, xscale, yscale); -#endif -} -inline void DYNAMICGLES_FUNCTION(FramebufferTextureLayerDownsampleIMG)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer, GLuint xscale, GLuint yscale) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLFRAMEBUFFERTEXTURELAYERDOWNSAMPLEIMGPROC _FramebufferTextureLayerDownsampleIMG = (PFNGLFRAMEBUFFERTEXTURELAYERDOWNSAMPLEIMGPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::FramebufferTextureLayerDownsampleIMG); - return _FramebufferTextureLayerDownsampleIMG(target, attachment, texture, level, layer, xscale, yscale); -#endif -} -inline void DYNAMICGLES_FUNCTION(PatchParameteriEXT)(GLenum pname, GLint val) -{ -#if TARGET_OS_IPHONE - assert(0); -#else - PFNGLPATCHPARAMETERIEXTPROC _PatchParameteriEXT = (PFNGLPATCHPARAMETERIEXTPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::PatchParameteriEXT); - return _PatchParameteriEXT(pname, val); -#endif -} - -#ifdef GL_IMG_bindless_texture - -inline GLuint64 DYNAMICGLES_FUNCTION(GetTextureHandleIMG)(GLuint texture) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetTextureHandleIMG) PFNGLGETTEXTUREHANDLEIMGPROC; -#endif - PFNGLGETTEXTUREHANDLEIMGPROC _GetTextureHandleIMG = (PFNGLGETTEXTUREHANDLEIMGPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetTextureHandleIMG); - return _GetTextureHandleIMG(texture); -} -inline GLuint64 DYNAMICGLES_FUNCTION(GetTextureSamplerHandleIMG)(GLuint texture, GLuint sampler) -{ -#if TARGET_OS_IPHONE - typedef decltype(&glGetTextureSamplerHandleIMG) PFNGLGETTEXTURESAMPLERHANDLEIMGPROC; -#endif - PFNGLGETTEXTURESAMPLERHANDLEIMGPROC _GetTextureSamplerHandleIMG = (PFNGLGETTEXTURESAMPLERHANDLEIMGPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::GetTextureSamplerHandleIMG); - return _GetTextureSamplerHandleIMG(texture, sampler); -} -inline void DYNAMICGLES_FUNCTION(UniformHandleui64IMG)(GLint location, GLuint64 value) -{ -#if TARGET_OS_IPHONE - assert(0); -#endif - PFNGLUNIFORMHANDLEUI64IMGPROC _UniformHandleui64IMG = (PFNGLUNIFORMHANDLEUI64IMGPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::UniformHandleui64IMG); - return _UniformHandleui64IMG(location, value); -} -inline void DYNAMICGLES_FUNCTION(UniformHandleui64vIMG)(GLint location, GLsizei count, const GLuint64* value) -{ -#if TARGET_OS_IPHONE - assert(0); -#endif - PFNGLUNIFORMHANDLEUI64VIMGPROC _UniformHandleui64vIMG = (PFNGLUNIFORMHANDLEUI64VIMGPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::UniformHandleui64vIMG); - return _UniformHandleui64vIMG(location, count, value); -} -inline void DYNAMICGLES_FUNCTION(ProgramUniformHandleui64IMG)(GLuint program, GLint location, GLuint64 value) -{ -#if TARGET_OS_IPHONE - assert(0); -#endif - PFNGLPROGRAMUNIFORMHANDLEUI64IMGPROC _ProgramUniformHandleui64IMG = (PFNGLPROGRAMUNIFORMHANDLEUI64IMGPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniformHandleui64IMG); - return _ProgramUniformHandleui64IMG(program, location, value); -} -inline void DYNAMICGLES_FUNCTION(ProgramUniformHandleui64vIMG)(GLuint program, GLint location, GLsizei count, const GLuint64* values) -{ -#if TARGET_OS_IPHONE - assert(0); -#endif - PFNGLPROGRAMUNIFORMHANDLEUI64VIMGPROC _ProgramUniformHandleui64vIMG = (PFNGLPROGRAMUNIFORMHANDLEUI64VIMGPROC)gl::internals::getGlesExtFunction(gl::internals::GlExtFuncName::ProgramUniformHandleui64vIMG); - return _ProgramUniformHandleui64vIMG(program, location, count, values); -} -#endif -#ifndef DYNAMICGLES_NO_NAMESPACE -} -#elif TARGET_OS_IPHONE -} -} -#endif - -inline bool isGlExtensionSupported(const char* extensionName, bool resetExtensionCache = false) -{ -#ifndef DYNAMICGLES_NO_NAMESPACE - const unsigned char* extensionString = GetString(GL_EXTENSIONS); -#else - const unsigned char* extensionString = glGetString(GL_EXTENSIONS); -#endif - return gl::internals::isExtensionSupported(extensionString, extensionName); -} - -#ifndef DYNAMICGLES_NO_NAMESPACE -} -#endif diff --git a/emscripten/include/pvrsdk/DynamicOCL.h b/emscripten/include/pvrsdk/DynamicOCL.h deleted file mode 100644 index 37704654..00000000 --- a/emscripten/include/pvrsdk/DynamicOCL.h +++ /dev/null @@ -1,1035 +0,0 @@ -#pragma once -#ifdef CL_PROTOTYPES -#undef CL_PROTOTYPES -#endif -#ifndef CL_NO_PROTOTYPES -#define CL_NO_PROTOTYPES -#endif -#if defined( _WIN32 ) -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#endif -#ifndef NOMINMAX -#define NOMINMAX -#endif -#include -#endif -#include -#ifdef __APPLE__ -#include -#else -#include -#endif -#include - -#include "pvr_openlib.h" - -#ifndef DYNAMICCL_NO_NAMESPACE -#define DEFINE_CL_FUNCTION_NAME(name) CL_API_ENTRY name -#else -#define DEFINE_CL_FUNCTION_NAME(name) CL_API_ENTRY cl##name -#endif - -/** DEFINE_CL_FUNCTION_NAME THE PLATFORM SPECIFIC LIBRARY NAME **/ -namespace cl { -namespace internals { -#ifdef _WIN32 -static const char* clLibName = "OpenCL.dll"; -#elif defined(TARGET_OS_MAC) -static const char* clLibName = "/System/Library/Frameworks/OpenCL.framework/OpenCL"; -#else -static const char* clLibName = "libOpenCL.so"; -#endif -static const char* clLibAltName = "libPVROCL.so"; -} -} - -namespace cl { -namespace CLFunctions { -enum Enum -{ - GetPlatformIDs, GetPlatformInfo, GetDeviceIDs, GetDeviceInfo, CreateSubDevices, RetainDevice, ReleaseDevice, - SetDefaultDeviceCommandQueue, GetDeviceAndHostTimer, GetHostTimer, CreateContext, CreateContextFromType, RetainContext, - ReleaseContext, GetContextInfo, CreateCommandQueueWithProperties, RetainCommandQueue, ReleaseCommandQueue, - GetCommandQueueInfo, CreateBuffer, CreateSubBuffer, CreateImage, CreatePipe, RetainMemObject, ReleaseMemObject, - GetSupportedImageFormats, GetMemObjectInfo, GetImageInfo, GetPipeInfo, SetMemObjectDestructorCallback, SVMAlloc, SVMFree, - CreateSamplerWithProperties, RetainSampler, ReleaseSampler, GetSamplerInfo, CreateProgramWithSource, CreateProgramWithBinary, - CreateProgramWithBuiltInKernels, CreateProgramWithIL, RetainProgram, ReleaseProgram, BuildProgram, CompileProgram, - LinkProgram, SetProgramReleaseCallback, SetProgramSpecializationConstant, UnloadPlatformCompiler, - GetProgramInfo, GetProgramBuildInfo, CreateKernel, CreateKernelsInProgram, CloneKernel, RetainKernel, ReleaseKernel, - SetKernelArg, SetKernelArgSVMPointer, SetKernelExecInfo, GetKernelInfo, GetKernelArgInfo, GetKernelWorkGroupInfo, - GetKernelSubGroupInfo, WaitForEvents, GetEventInfo, CreateUserEvent, RetainEvent, ReleaseEvent, SetUserEventStatus, - SetEventCallback, GetEventProfilingInfo, Flush, Finish, EnqueueReadBuffer, EnqueueReadBufferRect, EnqueueWriteBuffer, - EnqueueWriteBufferRect, EnqueueFillBuffer, EnqueueCopyBuffer, EnqueueCopyBufferRect, EnqueueReadImage, - EnqueueWriteImage, EnqueueFillImage, EnqueueCopyImage, EnqueueCopyImageToBuffer, EnqueueCopyBufferToImage, EnqueueMapBuffer, - EnqueueMapImage, EnqueueUnmapMemObject, EnqueueMigrateMemObjects, EnqueueNDRangeKernel, EnqueueNativeKernel, - EnqueueMarkerWithWaitList, EnqueueBarrierWithWaitList, EnqueueSVMFree, EnqueueSVMMemcpy, EnqueueSVMMemFill, - EnqueueSVMMap, EnqueueSVMUnmap, EnqueueSVMMigrateMem, GetExtensionFunctionAddressForPlatform, CreateImage2D, CreateImage3D, - EnqueueMarker, EnqueueWaitForEvents, EnqueueBarrier, UnloadCompiler, GetExtensionFunctionAddress, CreateCommandQueue, - CreateSampler, EnqueueTask, - CreateFromGLBuffer, CreateFromGLTexture, CreateFromGLRenderbuffer, GetGLObjectInfo, GetGLTextureInfo, EnqueueAcquireGLObjects, - EnqueueReleaseGLObjects, CreateFromGLTexture2D, CreateFromGLTexture3D, GetGLContextInfoKHR, - NUMBER_OF_CL_FUNCTIONS -}; -} - -namespace internals { -inline void* getClFunction(CLFunctions::Enum func) -{ - static void* CLFunctionTable[CLFunctions::NUMBER_OF_CL_FUNCTIONS]; - - if (CLFunctionTable[0] == NULL) - { - pvr::lib::LIBTYPE lib = pvr::lib::openlib(clLibName); - if (lib) - { - Log_Info("OpenCL Bindings: Successfully loaded library %s for OpenCL", clLibName); - } - else - { - lib = pvr::lib::openlib(clLibAltName); - if (lib) - { - Log_Info("OpenCL Bindings: Successfully loaded alternative library %s for OpenCL, after %s failed", clLibAltName, clLibName); - } - else - { - Log_Error("OpenCL Bindings: Failed to open library %s", clLibName); - return nullptr; - } - } - - CLFunctionTable[CLFunctions::GetPlatformIDs] = pvr::lib::getLibFunctionChecked(lib, "clGetPlatformIDs"); - CLFunctionTable[CLFunctions::GetPlatformInfo] = pvr::lib::getLibFunctionChecked(lib, "clGetPlatformInfo"); - CLFunctionTable[CLFunctions::GetDeviceIDs] = pvr::lib::getLibFunctionChecked(lib, "clGetDeviceIDs"); - CLFunctionTable[CLFunctions::GetDeviceInfo] = pvr::lib::getLibFunctionChecked(lib, "clGetDeviceInfo"); - CLFunctionTable[CLFunctions::CreateSubDevices] = pvr::lib::getLibFunctionChecked(lib, "clCreateSubDevices"); - CLFunctionTable[CLFunctions::RetainDevice] = pvr::lib::getLibFunctionChecked(lib, "clRetainDevice"); - CLFunctionTable[CLFunctions::ReleaseDevice] = pvr::lib::getLibFunctionChecked(lib, "clReleaseDevice"); - CLFunctionTable[CLFunctions::SetDefaultDeviceCommandQueue] = pvr::lib::getLibFunctionChecked(lib, "clSetDefaultDeviceCommandQueue"); - CLFunctionTable[CLFunctions::GetDeviceAndHostTimer] = pvr::lib::getLibFunctionChecked(lib, "clGetDeviceAndHostTimer"); - CLFunctionTable[CLFunctions::GetHostTimer] = pvr::lib::getLibFunctionChecked(lib, "clGetHostTimer"); - CLFunctionTable[CLFunctions::CreateContext] = pvr::lib::getLibFunctionChecked(lib, "clCreateContext"); - CLFunctionTable[CLFunctions::CreateContextFromType] = pvr::lib::getLibFunctionChecked(lib, "clCreateContextFromType"); - CLFunctionTable[CLFunctions::RetainContext] = pvr::lib::getLibFunctionChecked(lib, "clRetainContext"); - CLFunctionTable[CLFunctions::ReleaseContext] = pvr::lib::getLibFunctionChecked(lib, "clReleaseContext"); - CLFunctionTable[CLFunctions::GetContextInfo] = pvr::lib::getLibFunctionChecked(lib, "clGetContextInfo"); - CLFunctionTable[CLFunctions::CreateCommandQueueWithProperties] = pvr::lib::getLibFunctionChecked(lib, "clCreateCommandQueueWithProperties"); - CLFunctionTable[CLFunctions::RetainCommandQueue] = pvr::lib::getLibFunctionChecked(lib, "clRetainCommandQueue"); - CLFunctionTable[CLFunctions::ReleaseCommandQueue] = pvr::lib::getLibFunctionChecked(lib, "clReleaseCommandQueue"); - CLFunctionTable[CLFunctions::GetCommandQueueInfo] = pvr::lib::getLibFunctionChecked(lib, "clGetCommandQueueInfo"); - CLFunctionTable[CLFunctions::CreateBuffer] = pvr::lib::getLibFunctionChecked(lib, "clCreateBuffer"); - CLFunctionTable[CLFunctions::CreateSubBuffer] = pvr::lib::getLibFunctionChecked(lib, "clCreateSubBuffer"); - CLFunctionTable[CLFunctions::CreateImage] = pvr::lib::getLibFunctionChecked(lib, "clCreateImage"); - CLFunctionTable[CLFunctions::CreatePipe] = pvr::lib::getLibFunctionChecked(lib, "clCreatePipe"); - CLFunctionTable[CLFunctions::RetainMemObject] = pvr::lib::getLibFunctionChecked(lib, "clRetainMemObject"); - CLFunctionTable[CLFunctions::ReleaseMemObject] = pvr::lib::getLibFunctionChecked(lib, "clReleaseMemObject"); - CLFunctionTable[CLFunctions::GetSupportedImageFormats] = pvr::lib::getLibFunctionChecked(lib, "clGetSupportedImageFormats"); - CLFunctionTable[CLFunctions::GetMemObjectInfo] = pvr::lib::getLibFunctionChecked(lib, "clGetMemObjectInfo"); - CLFunctionTable[CLFunctions::GetImageInfo] = pvr::lib::getLibFunctionChecked(lib, "clGetImageInfo"); - CLFunctionTable[CLFunctions::GetPipeInfo] = pvr::lib::getLibFunctionChecked(lib, "clGetPipeInfo"); - CLFunctionTable[CLFunctions::SetMemObjectDestructorCallback] = pvr::lib::getLibFunctionChecked(lib, "clSetMemObjectDestructorCallback"); - CLFunctionTable[CLFunctions::SVMAlloc] = pvr::lib::getLibFunctionChecked(lib, "clSVMAlloc"); - CLFunctionTable[CLFunctions::SVMFree] = pvr::lib::getLibFunctionChecked(lib, "clSVMFree"); - CLFunctionTable[CLFunctions::CreateSamplerWithProperties] = pvr::lib::getLibFunctionChecked(lib, "clCreateSamplerWithProperties"); - CLFunctionTable[CLFunctions::RetainSampler] = pvr::lib::getLibFunctionChecked(lib, "clRetainSampler"); - CLFunctionTable[CLFunctions::ReleaseSampler] = pvr::lib::getLibFunctionChecked(lib, "clReleaseSampler"); - CLFunctionTable[CLFunctions::GetSamplerInfo] = pvr::lib::getLibFunctionChecked(lib, "clGetSamplerInfo"); - CLFunctionTable[CLFunctions::CreateProgramWithSource] = pvr::lib::getLibFunctionChecked(lib, "clCreateProgramWithSource"); - CLFunctionTable[CLFunctions::CreateProgramWithBinary] = pvr::lib::getLibFunctionChecked(lib, "clCreateProgramWithBinary"); - CLFunctionTable[CLFunctions::CreateProgramWithBuiltInKernels] = pvr::lib::getLibFunctionChecked(lib, "clCreateProgramWithBuiltInKernels"); - CLFunctionTable[CLFunctions::CreateProgramWithIL] = pvr::lib::getLibFunctionChecked(lib, "clCreateProgramWithIL"); - CLFunctionTable[CLFunctions::RetainProgram] = pvr::lib::getLibFunctionChecked(lib, "clRetainProgram"); - CLFunctionTable[CLFunctions::ReleaseProgram] = pvr::lib::getLibFunctionChecked(lib, "clReleaseProgram"); - CLFunctionTable[CLFunctions::BuildProgram] = pvr::lib::getLibFunctionChecked(lib, "clBuildProgram"); - CLFunctionTable[CLFunctions::CompileProgram] = pvr::lib::getLibFunctionChecked(lib, "clCompileProgram"); - CLFunctionTable[CLFunctions::LinkProgram] = pvr::lib::getLibFunctionChecked(lib, "clLinkProgram"); - CLFunctionTable[CLFunctions::SetProgramReleaseCallback] = pvr::lib::getLibFunctionChecked(lib, "clSetProgramReleaseCallback"); - CLFunctionTable[CLFunctions::SetProgramSpecializationConstant] = pvr::lib::getLibFunctionChecked(lib, "clSetProgramSpecializationConstant"); - CLFunctionTable[CLFunctions::UnloadPlatformCompiler] = pvr::lib::getLibFunctionChecked(lib, "clUnloadPlatformCompiler"); - CLFunctionTable[CLFunctions::GetProgramInfo] = pvr::lib::getLibFunctionChecked(lib, "clGetProgramInfo"); - CLFunctionTable[CLFunctions::GetProgramBuildInfo] = pvr::lib::getLibFunctionChecked(lib, "clGetProgramBuildInfo"); - CLFunctionTable[CLFunctions::CreateKernel] = pvr::lib::getLibFunctionChecked(lib, "clCreateKernel"); - CLFunctionTable[CLFunctions::CreateKernelsInProgram] = pvr::lib::getLibFunctionChecked(lib, "clCreateKernelsInProgram"); - CLFunctionTable[CLFunctions::CloneKernel] = pvr::lib::getLibFunctionChecked(lib, "clCloneKernel"); - CLFunctionTable[CLFunctions::RetainKernel] = pvr::lib::getLibFunctionChecked(lib, "clRetainKernel"); - CLFunctionTable[CLFunctions::ReleaseKernel] = pvr::lib::getLibFunctionChecked(lib, "clReleaseKernel"); - CLFunctionTable[CLFunctions::SetKernelArg] = pvr::lib::getLibFunctionChecked(lib, "clSetKernelArg"); - CLFunctionTable[CLFunctions::SetKernelArgSVMPointer] = pvr::lib::getLibFunctionChecked(lib, "clSetKernelArgSVMPointer"); - CLFunctionTable[CLFunctions::SetKernelExecInfo] = pvr::lib::getLibFunctionChecked(lib, "clSetKernelExecInfo"); - CLFunctionTable[CLFunctions::GetKernelInfo] = pvr::lib::getLibFunctionChecked(lib, "clGetKernelInfo"); - CLFunctionTable[CLFunctions::GetKernelArgInfo] = pvr::lib::getLibFunctionChecked(lib, "clGetKernelArgInfo"); - CLFunctionTable[CLFunctions::GetKernelWorkGroupInfo] = pvr::lib::getLibFunctionChecked(lib, "clGetKernelWorkGroupInfo"); - CLFunctionTable[CLFunctions::GetKernelSubGroupInfo] = pvr::lib::getLibFunctionChecked(lib, "clGetKernelSubGroupInfo"); - CLFunctionTable[CLFunctions::WaitForEvents] = pvr::lib::getLibFunctionChecked(lib, "clWaitForEvents"); - CLFunctionTable[CLFunctions::GetEventInfo] = pvr::lib::getLibFunctionChecked(lib, "clGetEventInfo"); - CLFunctionTable[CLFunctions::CreateUserEvent] = pvr::lib::getLibFunctionChecked(lib, "clCreateUserEvent"); - CLFunctionTable[CLFunctions::RetainEvent] = pvr::lib::getLibFunctionChecked(lib, "clRetainEvent"); - CLFunctionTable[CLFunctions::ReleaseEvent] = pvr::lib::getLibFunctionChecked(lib, "clReleaseEvent"); - CLFunctionTable[CLFunctions::SetUserEventStatus] = pvr::lib::getLibFunctionChecked(lib, "clSetUserEventStatus"); - CLFunctionTable[CLFunctions::SetEventCallback] = pvr::lib::getLibFunctionChecked(lib, "clSetEventCallback"); - CLFunctionTable[CLFunctions::GetEventProfilingInfo] = pvr::lib::getLibFunctionChecked(lib, "clGetEventProfilingInfo"); - CLFunctionTable[CLFunctions::Flush] = pvr::lib::getLibFunctionChecked(lib, "clFlush"); - CLFunctionTable[CLFunctions::Finish] = pvr::lib::getLibFunctionChecked(lib, "clFinish"); - CLFunctionTable[CLFunctions::EnqueueReadBuffer] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueReadBuffer"); - CLFunctionTable[CLFunctions::EnqueueReadBufferRect] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueReadBufferRect"); - CLFunctionTable[CLFunctions::EnqueueWriteBuffer] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueWriteBuffer"); - CLFunctionTable[CLFunctions::EnqueueWriteBufferRect] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueWriteBufferRect"); - CLFunctionTable[CLFunctions::EnqueueFillBuffer] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueFillBuffer"); - CLFunctionTable[CLFunctions::EnqueueCopyBuffer] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueCopyBuffer"); - CLFunctionTable[CLFunctions::EnqueueCopyBufferRect] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueCopyBufferRect"); - CLFunctionTable[CLFunctions::EnqueueReadImage] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueReadImage"); - CLFunctionTable[CLFunctions::EnqueueWriteImage] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueWriteImage"); - CLFunctionTable[CLFunctions::EnqueueFillImage] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueFillImage"); - CLFunctionTable[CLFunctions::EnqueueCopyImage] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueCopyImage"); - CLFunctionTable[CLFunctions::EnqueueCopyImageToBuffer] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueCopyImageToBuffer"); - CLFunctionTable[CLFunctions::EnqueueCopyBufferToImage] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueCopyBufferToImage"); - CLFunctionTable[CLFunctions::EnqueueMapBuffer] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueMapBuffer"); - CLFunctionTable[CLFunctions::EnqueueMapImage] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueMapImage"); - CLFunctionTable[CLFunctions::EnqueueUnmapMemObject] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueUnmapMemObject"); - CLFunctionTable[CLFunctions::EnqueueMigrateMemObjects] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueMigrateMemObjects"); - CLFunctionTable[CLFunctions::EnqueueNDRangeKernel] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueNDRangeKernel"); - CLFunctionTable[CLFunctions::EnqueueNativeKernel] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueNativeKernel"); - CLFunctionTable[CLFunctions::EnqueueMarkerWithWaitList] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueMarkerWithWaitList"); - CLFunctionTable[CLFunctions::EnqueueBarrierWithWaitList] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueBarrierWithWaitList"); - CLFunctionTable[CLFunctions::EnqueueSVMFree] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueSVMFree"); - CLFunctionTable[CLFunctions::EnqueueSVMMemcpy] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueSVMMemcpy"); - CLFunctionTable[CLFunctions::EnqueueSVMMemFill] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueSVMMemFill"); - CLFunctionTable[CLFunctions::EnqueueSVMMap] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueSVMMap"); - CLFunctionTable[CLFunctions::EnqueueSVMUnmap] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueSVMUnmap"); - CLFunctionTable[CLFunctions::EnqueueSVMMigrateMem] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueSVMMigrateMem"); - CLFunctionTable[CLFunctions::GetExtensionFunctionAddressForPlatform] = pvr::lib::getLibFunctionChecked(lib, "clGetExtensionFunctionAddressForPlatform"); - CLFunctionTable[CLFunctions::CreateImage2D] = pvr::lib::getLibFunctionChecked(lib, "clCreateImage2D"); - CLFunctionTable[CLFunctions::CreateImage3D] = pvr::lib::getLibFunctionChecked(lib, "clCreateImage3D"); - CLFunctionTable[CLFunctions::EnqueueMarker] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueMarker"); - CLFunctionTable[CLFunctions::EnqueueWaitForEvents] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueWaitForEvents"); - CLFunctionTable[CLFunctions::EnqueueBarrier] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueBarrier"); - CLFunctionTable[CLFunctions::UnloadCompiler] = pvr::lib::getLibFunctionChecked(lib, "clUnloadCompiler"); - CLFunctionTable[CLFunctions::GetExtensionFunctionAddress] = pvr::lib::getLibFunctionChecked(lib, "clGetExtensionFunctionAddress"); - CLFunctionTable[CLFunctions::CreateCommandQueue] = pvr::lib::getLibFunctionChecked(lib, "clCreateCommandQueue"); - CLFunctionTable[CLFunctions::CreateSampler] = pvr::lib::getLibFunctionChecked(lib, "clCreateSampler"); - CLFunctionTable[CLFunctions::EnqueueTask] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueTask"); - CLFunctionTable[CLFunctions::CreateFromGLBuffer] = pvr::lib::getLibFunctionChecked(lib, "clCreateFromGLBuffer"); - CLFunctionTable[CLFunctions::CreateFromGLTexture] = pvr::lib::getLibFunctionChecked(lib, "clCreateFromGLTexture"); - CLFunctionTable[CLFunctions::CreateFromGLRenderbuffer] = pvr::lib::getLibFunctionChecked(lib, "clCreateFromGLRenderbuffer"); - CLFunctionTable[CLFunctions::GetGLObjectInfo] = pvr::lib::getLibFunctionChecked(lib, "clGetGLObjectInfo"); - CLFunctionTable[CLFunctions::GetGLTextureInfo] = pvr::lib::getLibFunctionChecked(lib, "clGetGLTextureInfo"); - CLFunctionTable[CLFunctions::EnqueueAcquireGLObjects] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueAcquireGLObjects"); - CLFunctionTable[CLFunctions::EnqueueReleaseGLObjects] = pvr::lib::getLibFunctionChecked(lib, "clEnqueueReleaseGLObjects"); - CLFunctionTable[CLFunctions::CreateFromGLTexture2D] = pvr::lib::getLibFunctionChecked(lib, "clCreateFromGLTexture2D"); - CLFunctionTable[CLFunctions::CreateFromGLTexture3D] = pvr::lib::getLibFunctionChecked(lib, "clCreateFromGLTexture3D"); - CLFunctionTable[CLFunctions::GetGLContextInfoKHR] = pvr::lib::getLibFunctionChecked(lib, "clGetGLContextInfoKHR"); - } - return CLFunctionTable[func]; -} -} - -bool testFunctionExists(CLFunctions::Enum function) -{ - return internals::getClFunction(function) != 0; -} - -} -#ifndef DYNAMICCL_NO_NAMESPACE -namespace cl { -#endif -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(GetPlatformIDs)(cl_uint num_entries, cl_platform_id* platforms, cl_uint* num_platforms) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclGetPlatformIDs)(cl_uint num_entries, cl_platform_id * platforms, cl_uint * num_platforms); - static PFNclGetPlatformIDs _clGetPlatformIDs = (PFNclGetPlatformIDs)cl::internals::getClFunction(cl::CLFunctions::GetPlatformIDs); - return _clGetPlatformIDs(num_entries, platforms, num_platforms); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(GetPlatformInfo)(cl_platform_id platform, cl_platform_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclGetPlatformInfo)(cl_platform_id platform, cl_platform_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret); - static PFNclGetPlatformInfo _clGetPlatformInfo = (PFNclGetPlatformInfo)cl::internals::getClFunction(cl::CLFunctions::GetPlatformInfo); - return _clGetPlatformInfo(platform, param_name, param_value_size, param_value, param_value_size_ret); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(GetDeviceIDs)(cl_platform_id platform, cl_device_type device_type, cl_uint num_entries, cl_device_id* devices, cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclGetDeviceIDs)(cl_platform_id platform, cl_device_type device_type, cl_uint num_entries, cl_device_id * devices, cl_uint * num_devices); - static PFNclGetDeviceIDs _clGetDeviceIDs = (PFNclGetDeviceIDs)cl::internals::getClFunction(cl::CLFunctions::GetDeviceIDs); - return _clGetDeviceIDs(platform, device_type, num_entries, devices, num_devices); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(GetDeviceInfo)(cl_device_id device, cl_device_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclGetDeviceInfo)(cl_device_id device, cl_device_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret); - static PFNclGetDeviceInfo _clGetDeviceInfo = (PFNclGetDeviceInfo)cl::internals::getClFunction(cl::CLFunctions::GetDeviceInfo); - return _clGetDeviceInfo(device, param_name, param_value_size, param_value, param_value_size_ret); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(CreateSubDevices)(cl_device_id in_device, const cl_device_partition_property* properties, cl_uint num_devices, cl_device_id* out_devices, cl_uint* num_devices_ret) CL_API_SUFFIX__VERSION_1_2 -{ - typedef cl_int(CL_API_CALL * PFNclCreateSubDevices)(cl_device_id in_device, const cl_device_partition_property * properties, cl_uint num_devices, cl_device_id * out_devices, cl_uint * num_devices_ret); - static PFNclCreateSubDevices _clCreateSubDevices = (PFNclCreateSubDevices)cl::internals::getClFunction(cl::CLFunctions::CreateSubDevices); - return _clCreateSubDevices(in_device, properties, num_devices, out_devices, num_devices_ret); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(RetainDevice)(cl_device_id device) CL_API_SUFFIX__VERSION_1_2 -{ - typedef cl_int(CL_API_CALL * PFNclRetainDevice)(cl_device_id device); - static PFNclRetainDevice _clRetainDevice = (PFNclRetainDevice)cl::internals::getClFunction(cl::CLFunctions::RetainDevice); - return _clRetainDevice(device); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(ReleaseDevice)(cl_device_id device) CL_API_SUFFIX__VERSION_1_2 -{ - typedef cl_int(CL_API_CALL * PFNclReleaseDevice)(cl_device_id device); - static PFNclReleaseDevice _clReleaseDevice = (PFNclReleaseDevice)cl::internals::getClFunction(cl::CLFunctions::ReleaseDevice); - return _clReleaseDevice(device); -} -#ifdef CL_API_SUFFIX__VERSION_2_1 -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(SetDefaultDeviceCommandQueue)(cl_context context, cl_device_id device, cl_command_queue command_queue) CL_API_SUFFIX__VERSION_2_1 -{ - typedef cl_int(CL_API_CALL * PFNclSetDefaultDeviceCommandQueue)(cl_context context, cl_device_id device, cl_command_queue command_queue); - static PFNclSetDefaultDeviceCommandQueue _clSetDefaultDeviceCommandQueue = (PFNclSetDefaultDeviceCommandQueue)cl::internals::getClFunction(cl::CLFunctions::SetDefaultDeviceCommandQueue); - return _clSetDefaultDeviceCommandQueue(context, device, command_queue); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(GetDeviceAndHostTimer)(cl_device_id device, cl_ulong* device_timestamp, cl_ulong* host_timestamp) CL_API_SUFFIX__VERSION_2_1 -{ - typedef cl_int(CL_API_CALL * PFNclGetDeviceAndHostTimer)(cl_device_id device, cl_ulong * device_timestamp, cl_ulong * host_timestamp); - static PFNclGetDeviceAndHostTimer _clGetDeviceAndHostTimer = (PFNclGetDeviceAndHostTimer)cl::internals::getClFunction(cl::CLFunctions::GetDeviceAndHostTimer); - return _clGetDeviceAndHostTimer(device, device_timestamp, host_timestamp); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(GetHostTimer)(cl_device_id device, cl_ulong* host_timestamp) CL_API_SUFFIX__VERSION_2_1 -{ - typedef cl_int(CL_API_CALL * PFNclGetHostTimer)(cl_device_id device, cl_ulong * host_timestamp); - static PFNclGetHostTimer _clGetHostTimer = (PFNclGetHostTimer)cl::internals::getClFunction(cl::CLFunctions::GetHostTimer); - return _clGetHostTimer(device, host_timestamp); -} -#endif -inline cl_context CL_API_CALL DEFINE_CL_FUNCTION_NAME(CreateContext)(const cl_context_properties* properties, cl_uint num_devices, const cl_device_id* devices, void (CL_CALLBACK* pfn_notify)(const char*, const void*, size_t, void*), void* user_data, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_context(CL_API_CALL * PFNclCreateContext)(const cl_context_properties * properties, cl_uint num_devices, const cl_device_id * devices, void (CL_CALLBACK*)(const char*, const void*, size_t, void*), void* user_data, cl_int * errcode_ret); - static PFNclCreateContext _clCreateContext = (PFNclCreateContext)cl::internals::getClFunction(cl::CLFunctions::CreateContext); - return _clCreateContext(properties, num_devices, devices, pfn_notify, user_data, errcode_ret); -} -inline cl_context CL_API_CALL DEFINE_CL_FUNCTION_NAME(CreateContextFromType)(const cl_context_properties* properties, cl_device_type device_type, void (CL_CALLBACK* pfn_notify)(const char*, const void*, size_t, void*), void* user_data, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_context(CL_API_CALL * PFNclCreateContextFromType)(const cl_context_properties * properties, cl_device_type device_type, void (CL_CALLBACK*)(const char*, const void*, size_t, void*), void* user_data, cl_int * errcode_ret); - static PFNclCreateContextFromType _clCreateContextFromType = (PFNclCreateContextFromType)cl::internals::getClFunction(cl::CLFunctions::CreateContextFromType); - return _clCreateContextFromType(properties, device_type, pfn_notify, user_data, errcode_ret); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(RetainContext)(cl_context context) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclRetainContext)(cl_context context); - static PFNclRetainContext _clRetainContext = (PFNclRetainContext)cl::internals::getClFunction(cl::CLFunctions::RetainContext); - return _clRetainContext(context); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(ReleaseContext)(cl_context context) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclReleaseContext)(cl_context context); - static PFNclReleaseContext _clReleaseContext = (PFNclReleaseContext)cl::internals::getClFunction(cl::CLFunctions::ReleaseContext); - return _clReleaseContext(context); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(GetContextInfo)(cl_context context, cl_context_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclGetContextInfo)(cl_context context, cl_context_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret); - static PFNclGetContextInfo _clGetContextInfo = (PFNclGetContextInfo)cl::internals::getClFunction(cl::CLFunctions::GetContextInfo); - return _clGetContextInfo(context, param_name, param_value_size, param_value, param_value_size_ret); -} -#ifdef CL_API_SUFFIX__VERSION_2_0 -inline cl_command_queue CL_API_CALL DEFINE_CL_FUNCTION_NAME(CreateCommandQueueWithProperties)(cl_context context, cl_device_id device, const cl_queue_properties* properties, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_2_0 -{ - typedef cl_command_queue(CL_API_CALL * PFNclCreateCommandQueueWithProperties)(cl_context context, cl_device_id device, const cl_queue_properties * properties, cl_int * errcode_ret); - static PFNclCreateCommandQueueWithProperties _clCreateCommandQueueWithProperties = (PFNclCreateCommandQueueWithProperties)cl::internals::getClFunction(cl::CLFunctions::CreateCommandQueueWithProperties); - return _clCreateCommandQueueWithProperties(context, device, properties, errcode_ret); -} -#endif -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(RetainCommandQueue)(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclRetainCommandQueue)(cl_command_queue command_queue); - static PFNclRetainCommandQueue _clRetainCommandQueue = (PFNclRetainCommandQueue)cl::internals::getClFunction(cl::CLFunctions::RetainCommandQueue); - return _clRetainCommandQueue(command_queue); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(ReleaseCommandQueue)(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclReleaseCommandQueue)(cl_command_queue command_queue); - static PFNclReleaseCommandQueue _clReleaseCommandQueue = (PFNclReleaseCommandQueue)cl::internals::getClFunction(cl::CLFunctions::ReleaseCommandQueue); - return _clReleaseCommandQueue(command_queue); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(GetCommandQueueInfo)(cl_command_queue command_queue, cl_command_queue_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclGetCommandQueueInfo)(cl_command_queue command_queue, cl_command_queue_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret); - static PFNclGetCommandQueueInfo _clGetCommandQueueInfo = (PFNclGetCommandQueueInfo)cl::internals::getClFunction(cl::CLFunctions::GetCommandQueueInfo); - return _clGetCommandQueueInfo(command_queue, param_name, param_value_size, param_value, param_value_size_ret); -} -inline cl_mem CL_API_CALL DEFINE_CL_FUNCTION_NAME(CreateBuffer)(cl_context context, cl_mem_flags flags, size_t size, void* host_ptr, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_mem(CL_API_CALL * PFNclCreateBuffer)(cl_context context, cl_mem_flags flags, size_t size, void* host_ptr, cl_int * errcode_ret); - static PFNclCreateBuffer _clCreateBuffer = (PFNclCreateBuffer)cl::internals::getClFunction(cl::CLFunctions::CreateBuffer); - return _clCreateBuffer(context, flags, size, host_ptr, errcode_ret); -} -inline cl_mem CL_API_CALL DEFINE_CL_FUNCTION_NAME(CreateSubBuffer)(cl_mem buffer, cl_mem_flags flags, cl_buffer_create_type buffer_create_type, const void* buffer_create_info, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1 -{ - typedef cl_mem(CL_API_CALL * PFNclCreateSubBuffer)(cl_mem buffer, cl_mem_flags flags, cl_buffer_create_type buffer_create_type, const void* buffer_create_info, cl_int * errcode_ret); - static PFNclCreateSubBuffer _clCreateSubBuffer = (PFNclCreateSubBuffer)cl::internals::getClFunction(cl::CLFunctions::CreateSubBuffer); - return _clCreateSubBuffer(buffer, flags, buffer_create_type, buffer_create_info, errcode_ret); -} -inline cl_mem CL_API_CALL DEFINE_CL_FUNCTION_NAME(CreateImage)(cl_context context, cl_mem_flags flags, const cl_image_format* image_format, const cl_image_desc* image_desc, void* host_ptr, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2 -{ - typedef cl_mem(CL_API_CALL * PFNclCreateImage)(cl_context context, cl_mem_flags flags, const cl_image_format * image_format, const cl_image_desc * image_desc, void* host_ptr, cl_int * errcode_ret); - static PFNclCreateImage _clCreateImage = (PFNclCreateImage)cl::internals::getClFunction(cl::CLFunctions::CreateImage); - return _clCreateImage(context, flags, image_format, image_desc, host_ptr, errcode_ret); -} -#ifdef CL_API_SUFFIX__VERSION_2_0 -inline cl_mem CL_API_CALL DEFINE_CL_FUNCTION_NAME(CreatePipe)(cl_context context, cl_mem_flags flags, cl_uint pipe_packet_size, cl_uint pipe_max_packets, const cl_pipe_properties* properties, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_2_0 -{ - typedef cl_mem(CL_API_CALL * PFNclCreatePipe)(cl_context context, cl_mem_flags flags, cl_uint pipe_packet_size, cl_uint pipe_max_packets, const cl_pipe_properties * properties, cl_int * errcode_ret); - static PFNclCreatePipe _clCreatePipe = (PFNclCreatePipe)cl::internals::getClFunction(cl::CLFunctions::CreatePipe); - return _clCreatePipe(context, flags, pipe_packet_size, pipe_max_packets, properties, errcode_ret); -} -#endif -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(RetainMemObject)(cl_mem memobj) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclRetainMemObject)(cl_mem memobj); - static PFNclRetainMemObject _clRetainMemObject = (PFNclRetainMemObject)cl::internals::getClFunction(cl::CLFunctions::RetainMemObject); - return _clRetainMemObject(memobj); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(ReleaseMemObject)(cl_mem memobj) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclReleaseMemObject)(cl_mem memobj); - static PFNclReleaseMemObject _clReleaseMemObject = (PFNclReleaseMemObject)cl::internals::getClFunction(cl::CLFunctions::ReleaseMemObject); - return _clReleaseMemObject(memobj); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(GetSupportedImageFormats)(cl_context context, cl_mem_flags flags, cl_mem_object_type image_type, cl_uint num_entries, cl_image_format* image_formats, cl_uint* num_image_formats) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclGetSupportedImageFormats)(cl_context context, cl_mem_flags flags, cl_mem_object_type image_type, cl_uint num_entries, cl_image_format * image_formats, cl_uint * num_image_formats); - static PFNclGetSupportedImageFormats _clGetSupportedImageFormats = (PFNclGetSupportedImageFormats)cl::internals::getClFunction(cl::CLFunctions::GetSupportedImageFormats); - return _clGetSupportedImageFormats(context, flags, image_type, num_entries, image_formats, num_image_formats); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(GetMemObjectInfo)(cl_mem memobj, cl_mem_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclGetMemObjectInfo)(cl_mem memobj, cl_mem_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret); - static PFNclGetMemObjectInfo _clGetMemObjectInfo = (PFNclGetMemObjectInfo)cl::internals::getClFunction(cl::CLFunctions::GetMemObjectInfo); - return _clGetMemObjectInfo(memobj, param_name, param_value_size, param_value, param_value_size_ret); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(GetImageInfo)(cl_mem image, cl_image_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclGetImageInfo)(cl_mem image, cl_image_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret); - static PFNclGetImageInfo _clGetImageInfo = (PFNclGetImageInfo)cl::internals::getClFunction(cl::CLFunctions::GetImageInfo); - return _clGetImageInfo(image, param_name, param_value_size, param_value, param_value_size_ret); -} -#ifdef CL_API_SUFFIX__VERSION_2_0 -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(GetPipeInfo)(cl_mem pipe, cl_pipe_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_2_0 -{ - typedef cl_int(CL_API_CALL * PFNclGetPipeInfo)(cl_mem pipe, cl_pipe_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret); - static PFNclGetPipeInfo _clGetPipeInfo = (PFNclGetPipeInfo)cl::internals::getClFunction(cl::CLFunctions::GetPipeInfo); - return _clGetPipeInfo(pipe, param_name, param_value_size, param_value, param_value_size_ret); -} -inline void* CL_API_CALL DEFINE_CL_FUNCTION_NAME(SVMAlloc)(cl_context context, cl_svm_mem_flags flags, size_t size, cl_uint alignment) CL_API_SUFFIX__VERSION_2_0 -{ - typedef void* (CL_API_CALL * PFNclSVMAlloc)(cl_context context, cl_svm_mem_flags flags, size_t size, cl_uint alignment); - PFNclSVMAlloc _clSVMAlloc = (PFNclSVMAlloc)cl::internals::getClFunction(cl::CLFunctions::SVMAlloc); - return _clSVMAlloc(context, flags, size, alignment); -} -inline void CL_API_CALL DEFINE_CL_FUNCTION_NAME(SVMFree)(cl_context context, void* svm_pointer) CL_API_SUFFIX__VERSION_2_0 -{ - typedef void(CL_API_CALL * PFNclSVMFree)(cl_context context, void* svm_pointer); - PFNclSVMFree _clSVMFree = (PFNclSVMFree)cl::internals::getClFunction(cl::CLFunctions::SVMFree); - return _clSVMFree(context, svm_pointer); -} -inline cl_sampler CL_API_CALL DEFINE_CL_FUNCTION_NAME(CreateSamplerWithProperties)(cl_context context, const cl_sampler_properties* normalized_coords, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_2_0 -{ - typedef cl_sampler(CL_API_CALL * PFNclCreateSamplerWithProperties)(cl_context context, const cl_sampler_properties * normalized_coords, cl_int * errcode_ret); - PFNclCreateSamplerWithProperties _clCreateSamplerWithProperties = (PFNclCreateSamplerWithProperties)cl::internals::getClFunction(cl::CLFunctions::CreateSamplerWithProperties); - return _clCreateSamplerWithProperties(context, normalized_coords, errcode_ret); -} -#endif -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(SetMemObjectDestructorCallback)(cl_mem memobj, void (CL_CALLBACK* pfn_notify)(cl_mem memobj, void* user_data), void* user_data) CL_API_SUFFIX__VERSION_1_1 -{ - typedef cl_int(CL_API_CALL * PFNclSetMemObjectDestructorCallback)(cl_mem memobj, void (CL_CALLBACK * pfn_notify)(cl_mem memobj, void* user_data), void* user_data); - static PFNclSetMemObjectDestructorCallback _clSetMemObjectDestructorCallback = (PFNclSetMemObjectDestructorCallback)cl::internals::getClFunction(cl::CLFunctions::SetMemObjectDestructorCallback); - return _clSetMemObjectDestructorCallback(memobj, pfn_notify, user_data); -} - -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(RetainSampler)(cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclRetainSampler)(cl_sampler sampler); - static PFNclRetainSampler _clRetainSampler = (PFNclRetainSampler)cl::internals::getClFunction(cl::CLFunctions::RetainSampler); - return _clRetainSampler(sampler); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(ReleaseSampler)(cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclReleaseSampler)(cl_sampler sampler); - static PFNclReleaseSampler _clReleaseSampler = (PFNclReleaseSampler)cl::internals::getClFunction(cl::CLFunctions::ReleaseSampler); - return _clReleaseSampler(sampler); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(GetSamplerInfo)(cl_sampler sampler, cl_sampler_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclGetSamplerInfo)(cl_sampler sampler, cl_sampler_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret); - static PFNclGetSamplerInfo _clGetSamplerInfo = (PFNclGetSamplerInfo)cl::internals::getClFunction(cl::CLFunctions::GetSamplerInfo); - return _clGetSamplerInfo(sampler, param_name, param_value_size, param_value, param_value_size_ret); -} -inline cl_program CL_API_CALL DEFINE_CL_FUNCTION_NAME(CreateProgramWithSource)(cl_context context, cl_uint count, const char** strings, const size_t* lengths, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_program(CL_API_CALL * PFNclCreateProgramWithSource)(cl_context context, cl_uint count, const char** strings, const size_t* lengths, cl_int * errcode_ret); - static PFNclCreateProgramWithSource _clCreateProgramWithSource = (PFNclCreateProgramWithSource)cl::internals::getClFunction(cl::CLFunctions::CreateProgramWithSource); - return _clCreateProgramWithSource(context, count, strings, lengths, errcode_ret); -} -inline cl_program CL_API_CALL DEFINE_CL_FUNCTION_NAME(CreateProgramWithBinary)(cl_context context, cl_uint num_devices, const cl_device_id* device_list, const size_t* lengths, const unsigned char** binaries, cl_int* binary_status, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_program(CL_API_CALL * PFNclCreateProgramWithBinary)(cl_context context, cl_uint num_devices, const cl_device_id * device_list, const size_t* lengths, const unsigned char** binaries, cl_int * binary_status, cl_int * errcode_ret); - static PFNclCreateProgramWithBinary _clCreateProgramWithBinary = (PFNclCreateProgramWithBinary)cl::internals::getClFunction(cl::CLFunctions::CreateProgramWithBinary); - return _clCreateProgramWithBinary(context, num_devices, device_list, lengths, binaries, binary_status, errcode_ret); -} -inline cl_program CL_API_CALL DEFINE_CL_FUNCTION_NAME(CreateProgramWithBuiltInKernels)(cl_context context, cl_uint num_devices, const cl_device_id* device_list, const char* kernel_names, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2 -{ - typedef cl_program(CL_API_CALL * PFNclCreateProgramWithBuiltInKernels)(cl_context context, cl_uint num_devices, const cl_device_id * device_list, const char* kernel_names, cl_int * errcode_ret); - static PFNclCreateProgramWithBuiltInKernels _clCreateProgramWithBuiltInKernels = (PFNclCreateProgramWithBuiltInKernels)cl::internals::getClFunction(cl::CLFunctions::CreateProgramWithBuiltInKernels); - return _clCreateProgramWithBuiltInKernels(context, num_devices, device_list, kernel_names, errcode_ret); -} -#ifdef CL_API_SUFFIX__VERSION_2_1 -inline cl_program CL_API_CALL DEFINE_CL_FUNCTION_NAME(CreateProgramWithIL)(cl_context context, const void* il, size_t length, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_2_1 -{ - typedef cl_program(CL_API_CALL * PFNclCreateProgramWithIL)(cl_context context, const void* il, size_t length, cl_int * errcode_ret); - static PFNclCreateProgramWithIL _clCreateProgramWithIL = (PFNclCreateProgramWithIL)cl::internals::getClFunction(cl::CLFunctions::CreateProgramWithIL); - return _clCreateProgramWithIL(context, il, length, errcode_ret); -} -#endif -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(RetainProgram)(cl_program program) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclRetainProgram)(cl_program program); - static PFNclRetainProgram _clRetainProgram = (PFNclRetainProgram)cl::internals::getClFunction(cl::CLFunctions::RetainProgram); - return _clRetainProgram(program); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(ReleaseProgram)(cl_program program) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclReleaseProgram)(cl_program program); - static PFNclReleaseProgram _clReleaseProgram = (PFNclReleaseProgram)cl::internals::getClFunction(cl::CLFunctions::ReleaseProgram); - return _clReleaseProgram(program); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(BuildProgram)(cl_program program, cl_uint num_devices, const cl_device_id* device_list, const char* options, void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data), void* user_data) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclBuildProgram)(cl_program program, cl_uint num_devices, const cl_device_id * device_list, const char* options, void (CL_CALLBACK * pfn_notify)(cl_program program, void* user_data), void* user_data); - static PFNclBuildProgram _clBuildProgram = (PFNclBuildProgram)cl::internals::getClFunction(cl::CLFunctions::BuildProgram); - return _clBuildProgram(program, num_devices, device_list, options, pfn_notify, user_data); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(CompileProgram)(cl_program program, cl_uint num_devices, const cl_device_id* device_list, const char* options, cl_uint num_input_headers, const cl_program* input_headers, const char** header_include_names, void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data), void* user_data) CL_API_SUFFIX__VERSION_1_2 -{ - typedef cl_int(CL_API_CALL * PFNclCompileProgram)(cl_program program, cl_uint num_devices, const cl_device_id * device_list, const char* options, cl_uint num_input_headers, const cl_program * input_headers, const char** header_include_names, void (CL_CALLBACK * pfn_notify)(cl_program program, void* user_data), void* user_data); - static PFNclCompileProgram _clCompileProgram = (PFNclCompileProgram)cl::internals::getClFunction(cl::CLFunctions::CompileProgram); - return _clCompileProgram(program, num_devices, device_list, options, num_input_headers, input_headers, header_include_names, pfn_notify, user_data); -} -inline cl_program CL_API_CALL DEFINE_CL_FUNCTION_NAME(LinkProgram)(cl_context context, cl_uint num_devices, const cl_device_id* device_list, const char* options, cl_uint num_input_programs, const cl_program* input_programs, void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data), void* user_data, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2 -{ - typedef cl_program(CL_API_CALL * PFNclLinkProgram)(cl_context context, cl_uint num_devices, const cl_device_id * device_list, const char* options, cl_uint num_input_programs, const cl_program * input_programs, void (CL_CALLBACK * pfn_notify)(cl_program program, void* user_data), void* user_data, cl_int * errcode_ret); - static PFNclLinkProgram _clLinkProgram = (PFNclLinkProgram)cl::internals::getClFunction(cl::CLFunctions::LinkProgram); - return _clLinkProgram(context, num_devices, device_list, options, num_input_programs, input_programs, pfn_notify, user_data, errcode_ret); -} -#ifdef CL_API_SUFFIX__VERSION_2_2 -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(SetProgramReleaseCallback)(cl_program program, void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data), void* user_data) CL_API_SUFFIX__VERSION_2_2 -{ - typedef cl_int(CL_API_CALL * PFNclSetProgramReleaseCallback)(cl_program program, void (CL_CALLBACK * pfn_notify)(cl_program program, void* user_data), void* user_data); - static PFNclSetProgramReleaseCallback _clSetProgramReleaseCallback = (PFNclSetProgramReleaseCallback)cl::internals::getClFunction(cl::CLFunctions::SetProgramReleaseCallback); - return _clSetProgramReleaseCallback(program, pfn_notify, user_data); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(SetProgramSpecializationConstant)(cl_program program, cl_uint spec_id, size_t spec_size, const void* spec_value) CL_API_SUFFIX__VERSION_2_2 -{ - typedef cl_int(CL_API_CALL * PFNclSetProgramSpecializationConstant)(cl_program program, cl_uint spec_id, size_t spec_size, const void* spec_value); - static PFNclSetProgramSpecializationConstant _clSetProgramSpecializationConstant = (PFNclSetProgramSpecializationConstant)cl::internals::getClFunction(cl::CLFunctions::SetProgramSpecializationConstant); - return _clSetProgramSpecializationConstant(program, spec_id, spec_size, spec_value); -} -#endif -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(UnloadPlatformCompiler)(cl_platform_id platform) CL_API_SUFFIX__VERSION_1_2 -{ - typedef cl_int(CL_API_CALL * PFNclUnloadPlatformCompiler)(cl_platform_id platform); - static PFNclUnloadPlatformCompiler _clUnloadPlatformCompiler = (PFNclUnloadPlatformCompiler)cl::internals::getClFunction(cl::CLFunctions::UnloadPlatformCompiler); - return _clUnloadPlatformCompiler(platform); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(GetProgramInfo)(cl_program program, cl_program_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclGetProgramInfo)(cl_program program, cl_program_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret); - static PFNclGetProgramInfo _clGetProgramInfo = (PFNclGetProgramInfo)cl::internals::getClFunction(cl::CLFunctions::GetProgramInfo); - return _clGetProgramInfo(program, param_name, param_value_size, param_value, param_value_size_ret); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(GetProgramBuildInfo)(cl_program program, cl_device_id device, cl_program_build_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclGetProgramBuildInfo)(cl_program program, cl_device_id device, cl_program_build_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret); - static PFNclGetProgramBuildInfo _clGetProgramBuildInfo = (PFNclGetProgramBuildInfo)cl::internals::getClFunction(cl::CLFunctions::GetProgramBuildInfo); - return _clGetProgramBuildInfo(program, device, param_name, param_value_size, param_value, param_value_size_ret); -} -inline cl_kernel CL_API_CALL DEFINE_CL_FUNCTION_NAME(CreateKernel)(cl_program program, const char* kernel_name, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_kernel(CL_API_CALL * PFNclCreateKernel)(cl_program program, const char* kernel_name, cl_int * errcode_ret); - static PFNclCreateKernel _clCreateKernel = (PFNclCreateKernel)cl::internals::getClFunction(cl::CLFunctions::CreateKernel); - return _clCreateKernel(program, kernel_name, errcode_ret); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(CreateKernelsInProgram)(cl_program program, cl_uint num_kernels, cl_kernel* kernels, cl_uint* num_kernels_ret) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclCreateKernelsInProgram)(cl_program program, cl_uint num_kernels, cl_kernel * kernels, cl_uint * num_kernels_ret); - static PFNclCreateKernelsInProgram _clCreateKernelsInProgram = (PFNclCreateKernelsInProgram)cl::internals::getClFunction(cl::CLFunctions::CreateKernelsInProgram); - return _clCreateKernelsInProgram(program, num_kernels, kernels, num_kernels_ret); -} -#ifdef CL_API_SUFFIX__VERSION_2_1 -inline cl_kernel CL_API_CALL DEFINE_CL_FUNCTION_NAME(CloneKernel)(cl_kernel source_kernel, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_2_1 -{ - typedef cl_kernel(CL_API_CALL * PFNclCloneKernel)(cl_kernel source_kernel, cl_int * errcode_ret); - static PFNclCloneKernel _clCloneKernel = (PFNclCloneKernel)cl::internals::getClFunction(cl::CLFunctions::CloneKernel); - return _clCloneKernel(source_kernel, errcode_ret); -} -#endif -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(RetainKernel)(cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclRetainKernel)(cl_kernel kernel); - static PFNclRetainKernel _clRetainKernel = (PFNclRetainKernel)cl::internals::getClFunction(cl::CLFunctions::RetainKernel); - return _clRetainKernel(kernel); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(ReleaseKernel)(cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclReleaseKernel)(cl_kernel kernel); - static PFNclReleaseKernel _clReleaseKernel = (PFNclReleaseKernel)cl::internals::getClFunction(cl::CLFunctions::ReleaseKernel); - return _clReleaseKernel(kernel); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(SetKernelArg)(cl_kernel kernel, cl_uint arg_index, size_t arg_size, const void* arg_value) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclSetKernelArg)(cl_kernel kernel, cl_uint arg_index, size_t arg_size, const void* arg_value); - static PFNclSetKernelArg _clSetKernelArg = (PFNclSetKernelArg)cl::internals::getClFunction(cl::CLFunctions::SetKernelArg); - return _clSetKernelArg(kernel, arg_index, arg_size, arg_value); -} -#ifdef CL_API_SUFFIX__VERSION_2_0 -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(SetKernelArgSVMPointer)(cl_kernel kernel, cl_uint arg_index, const void* arg_value) CL_API_SUFFIX__VERSION_2_0 -{ - typedef cl_int(CL_API_CALL * PFNclSetKernelArgSVMPointer)(cl_kernel kernel, cl_uint arg_index, const void* arg_value); - static PFNclSetKernelArgSVMPointer _clSetKernelArgSVMPointer = (PFNclSetKernelArgSVMPointer)cl::internals::getClFunction(cl::CLFunctions::SetKernelArgSVMPointer); - return _clSetKernelArgSVMPointer(kernel, arg_index, arg_value); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(SetKernelExecInfo)(cl_kernel kernel, cl_kernel_exec_info param_name, size_t param_value_size, const void* param_value) CL_API_SUFFIX__VERSION_2_0 -{ - typedef cl_int(CL_API_CALL * PFNclSetKernelExecInfo)(cl_kernel kernel, cl_kernel_exec_info param_name, size_t param_value_size, const void* param_value); - static PFNclSetKernelExecInfo _clSetKernelExecInfo = (PFNclSetKernelExecInfo)cl::internals::getClFunction(cl::CLFunctions::SetKernelExecInfo); - return _clSetKernelExecInfo(kernel, param_name, param_value_size, param_value); -} -#endif -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(GetKernelInfo)(cl_kernel kernel, cl_kernel_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclGetKernelInfo)(cl_kernel kernel, cl_kernel_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret); - static PFNclGetKernelInfo _clGetKernelInfo = (PFNclGetKernelInfo)cl::internals::getClFunction(cl::CLFunctions::GetKernelInfo); - return _clGetKernelInfo(kernel, param_name, param_value_size, param_value, param_value_size_ret); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(GetKernelArgInfo)(cl_kernel kernel, cl_uint arg_indx, cl_kernel_arg_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_2 -{ - typedef cl_int(CL_API_CALL * PFNclGetKernelArgInfo)(cl_kernel kernel, cl_uint arg_indx, cl_kernel_arg_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret); - static PFNclGetKernelArgInfo _clGetKernelArgInfo = (PFNclGetKernelArgInfo)cl::internals::getClFunction(cl::CLFunctions::GetKernelArgInfo); - return _clGetKernelArgInfo(kernel, arg_indx, param_name, param_value_size, param_value, param_value_size_ret); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(GetKernelWorkGroupInfo)(cl_kernel kernel, cl_device_id device, cl_kernel_work_group_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclGetKernelWorkGroupInfo)(cl_kernel kernel, cl_device_id device, cl_kernel_work_group_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret); - static PFNclGetKernelWorkGroupInfo _clGetKernelWorkGroupInfo = (PFNclGetKernelWorkGroupInfo)cl::internals::getClFunction(cl::CLFunctions::GetKernelWorkGroupInfo); - return _clGetKernelWorkGroupInfo(kernel, device, param_name, param_value_size, param_value, param_value_size_ret); -} -#ifdef CL_API_SUFFIX__VERSION_2_1 -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(GetKernelSubGroupInfo)(cl_kernel kernel, cl_device_id device, cl_kernel_sub_group_info param_name, size_t input_value_size, const void* input_value, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_2_1 -{ - typedef cl_int(CL_API_CALL * PFNclGetKernelSubGroupInfo)(cl_kernel kernel, cl_device_id device, cl_kernel_sub_group_info param_name, size_t input_value_size, const void* input_value, size_t param_value_size, void* param_value, size_t* param_value_size_ret); - static PFNclGetKernelSubGroupInfo _clGetKernelSubGroupInfo = (PFNclGetKernelSubGroupInfo)cl::internals::getClFunction(cl::CLFunctions::GetKernelSubGroupInfo); - return _clGetKernelSubGroupInfo(kernel, device, param_name, input_value_size, input_value, param_value_size, param_value, param_value_size_ret); -} -#endif -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(WaitForEvents)(cl_uint num_events, const cl_event* event_list) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclWaitForEvents)(cl_uint num_events, const cl_event * event_list); - static PFNclWaitForEvents _clWaitForEvents = (PFNclWaitForEvents)cl::internals::getClFunction(cl::CLFunctions::WaitForEvents); - return _clWaitForEvents(num_events, event_list); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(GetEventInfo)(cl_event event, cl_event_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclGetEventInfo)(cl_event event, cl_event_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret); - static PFNclGetEventInfo _clGetEventInfo = (PFNclGetEventInfo)cl::internals::getClFunction(cl::CLFunctions::GetEventInfo); - return _clGetEventInfo(event, param_name, param_value_size, param_value, param_value_size_ret); -} -inline cl_event CL_API_CALL DEFINE_CL_FUNCTION_NAME(CreateUserEvent)(cl_context context, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1 -{ - typedef cl_event(CL_API_CALL * PFNclCreateUserEvent)(cl_context context, cl_int * errcode_ret); - static PFNclCreateUserEvent _clCreateUserEvent = (PFNclCreateUserEvent)cl::internals::getClFunction(cl::CLFunctions::CreateUserEvent); - return _clCreateUserEvent(context, errcode_ret); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(RetainEvent)(cl_event event) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclRetainEvent)(cl_event event); - static PFNclRetainEvent _clRetainEvent = (PFNclRetainEvent)cl::internals::getClFunction(cl::CLFunctions::RetainEvent); - return _clRetainEvent(event); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(ReleaseEvent)(cl_event event) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclReleaseEvent)(cl_event event); - static PFNclReleaseEvent _clReleaseEvent = (PFNclReleaseEvent)cl::internals::getClFunction(cl::CLFunctions::ReleaseEvent); - return _clReleaseEvent(event); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(SetUserEventStatus)(cl_event event, cl_int execution_status) CL_API_SUFFIX__VERSION_1_1 -{ - typedef cl_int(CL_API_CALL * PFNclSetUserEventStatus)(cl_event event, cl_int execution_status); - static PFNclSetUserEventStatus _clSetUserEventStatus = (PFNclSetUserEventStatus)cl::internals::getClFunction(cl::CLFunctions::SetUserEventStatus); - return _clSetUserEventStatus(event, execution_status); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(SetEventCallback)(cl_event event, cl_int command_exec_callback_type, void (CL_CALLBACK* pfn_notify)(cl_event, cl_int, void*), void* user_data) CL_API_SUFFIX__VERSION_1_1 -{ - typedef cl_int(CL_API_CALL * PFNclSetEventCallback)(cl_event event, cl_int command_exec_callback_type, void (CL_CALLBACK * pfn_notify)(cl_event, cl_int, void*), void* user_data); - static PFNclSetEventCallback _clSetEventCallback = (PFNclSetEventCallback)cl::internals::getClFunction(cl::CLFunctions::SetEventCallback); - return _clSetEventCallback(event, command_exec_callback_type, pfn_notify, user_data); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(GetEventProfilingInfo)(cl_event event, cl_profiling_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclGetEventProfilingInfo)(cl_event event, cl_profiling_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret); - static PFNclGetEventProfilingInfo _clGetEventProfilingInfo = (PFNclGetEventProfilingInfo)cl::internals::getClFunction(cl::CLFunctions::GetEventProfilingInfo); - return _clGetEventProfilingInfo(event, param_name, param_value_size, param_value, param_value_size_ret); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(Flush)(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclFlush)(cl_command_queue command_queue); - static PFNclFlush _clFlush = (PFNclFlush)cl::internals::getClFunction(cl::CLFunctions::Flush); - return _clFlush(command_queue); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(Finish)(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclFinish)(cl_command_queue command_queue); - static PFNclFinish _clFinish = (PFNclFinish)cl::internals::getClFunction(cl::CLFunctions::Finish); - return _clFinish(command_queue); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueReadBuffer)(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read, size_t offset, size_t size, void* ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueReadBuffer)(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read, size_t offset, size_t size, void* ptr, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); - static PFNclEnqueueReadBuffer _clEnqueueReadBuffer = (PFNclEnqueueReadBuffer)cl::internals::getClFunction(cl::CLFunctions::EnqueueReadBuffer); - return _clEnqueueReadBuffer(command_queue, buffer, blocking_read, offset, size, ptr, num_events_in_wait_list, event_wait_list, event); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueReadBufferRect)(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read, const size_t* buffer_offset, const size_t* host_offset, const size_t* region, size_t buffer_row_pitch, size_t buffer_slice_pitch, size_t host_row_pitch, size_t host_slice_pitch, void* ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_1 -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueReadBufferRect)(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read, const size_t* buffer_offset, const size_t* host_offset, const size_t* region, size_t buffer_row_pitch, size_t buffer_slice_pitch, size_t host_row_pitch, size_t host_slice_pitch, void* ptr, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); - static PFNclEnqueueReadBufferRect _clEnqueueReadBufferRect = (PFNclEnqueueReadBufferRect)cl::internals::getClFunction(cl::CLFunctions::EnqueueReadBufferRect); - return _clEnqueueReadBufferRect(command_queue, buffer, blocking_read, buffer_offset, host_offset, region, buffer_row_pitch, buffer_slice_pitch, host_row_pitch, host_slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueWriteBuffer)(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_write, size_t offset, size_t size, const void* ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueWriteBuffer)(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_write, size_t offset, size_t size, const void* ptr, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); - static PFNclEnqueueWriteBuffer _clEnqueueWriteBuffer = (PFNclEnqueueWriteBuffer)cl::internals::getClFunction(cl::CLFunctions::EnqueueWriteBuffer); - return _clEnqueueWriteBuffer(command_queue, buffer, blocking_write, offset, size, ptr, num_events_in_wait_list, event_wait_list, event); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueWriteBufferRect)(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_write, const size_t* buffer_offset, const size_t* host_offset, const size_t* region, size_t buffer_row_pitch, size_t buffer_slice_pitch, size_t host_row_pitch, size_t host_slice_pitch, const void* ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_1 -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueWriteBufferRect)(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_write, const size_t* buffer_offset, const size_t* host_offset, const size_t* region, size_t buffer_row_pitch, size_t buffer_slice_pitch, size_t host_row_pitch, size_t host_slice_pitch, const void* ptr, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); - static PFNclEnqueueWriteBufferRect _clEnqueueWriteBufferRect = (PFNclEnqueueWriteBufferRect)cl::internals::getClFunction(cl::CLFunctions::EnqueueWriteBufferRect); - return _clEnqueueWriteBufferRect(command_queue, buffer, blocking_write, buffer_offset, host_offset, region, buffer_row_pitch, buffer_slice_pitch, host_row_pitch, host_slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueFillBuffer)(cl_command_queue command_queue, cl_mem buffer, const void* pattern, size_t pattern_size, size_t offset, size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_2 -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueFillBuffer)(cl_command_queue command_queue, cl_mem buffer, const void* pattern, size_t pattern_size, size_t offset, size_t size, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); - static PFNclEnqueueFillBuffer _clEnqueueFillBuffer = (PFNclEnqueueFillBuffer)cl::internals::getClFunction(cl::CLFunctions::EnqueueFillBuffer); - return _clEnqueueFillBuffer(command_queue, buffer, pattern, pattern_size, offset, size, num_events_in_wait_list, event_wait_list, event); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueCopyBuffer)(cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_buffer, size_t src_offset, size_t dst_offset, size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueCopyBuffer)(cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_buffer, size_t src_offset, size_t dst_offset, size_t size, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); - static PFNclEnqueueCopyBuffer _clEnqueueCopyBuffer = (PFNclEnqueueCopyBuffer)cl::internals::getClFunction(cl::CLFunctions::EnqueueCopyBuffer); - return _clEnqueueCopyBuffer(command_queue, src_buffer, dst_buffer, src_offset, dst_offset, size, num_events_in_wait_list, event_wait_list, event); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueCopyBufferRect)(cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_buffer, const size_t* src_origin, const size_t* dst_origin, const size_t* region, size_t src_row_pitch, size_t src_slice_pitch, size_t dst_row_pitch, size_t dst_slice_pitch, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_1 -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueCopyBufferRect)(cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_buffer, const size_t* src_origin, const size_t* dst_origin, const size_t* region, size_t src_row_pitch, size_t src_slice_pitch, size_t dst_row_pitch, size_t dst_slice_pitch, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); - static PFNclEnqueueCopyBufferRect _clEnqueueCopyBufferRect = (PFNclEnqueueCopyBufferRect)cl::internals::getClFunction(cl::CLFunctions::EnqueueCopyBufferRect); - return _clEnqueueCopyBufferRect(command_queue, src_buffer, dst_buffer, src_origin, dst_origin, region, src_row_pitch, src_slice_pitch, dst_row_pitch, dst_slice_pitch, num_events_in_wait_list, event_wait_list, event); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueReadImage)(cl_command_queue command_queue, cl_mem image, cl_bool blocking_read, const size_t* origin, const size_t* region, size_t row_pitch, size_t slice_pitch, void* ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueReadImage)(cl_command_queue command_queue, cl_mem image, cl_bool blocking_read, const size_t* origin, const size_t* region, size_t row_pitch, size_t slice_pitch, void* ptr, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); - static PFNclEnqueueReadImage _clEnqueueReadImage = (PFNclEnqueueReadImage)cl::internals::getClFunction(cl::CLFunctions::EnqueueReadImage); - return _clEnqueueReadImage(command_queue, image, blocking_read, origin, region, row_pitch, slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueWriteImage)(cl_command_queue command_queue, cl_mem image, cl_bool blocking_write, const size_t* origin, const size_t* region, size_t input_row_pitch, size_t input_slice_pitch, const void* ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueWriteImage)(cl_command_queue command_queue, cl_mem image, cl_bool blocking_write, const size_t* origin, const size_t* region, size_t input_row_pitch, size_t input_slice_pitch, const void* ptr, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); - static PFNclEnqueueWriteImage _clEnqueueWriteImage = (PFNclEnqueueWriteImage)cl::internals::getClFunction(cl::CLFunctions::EnqueueWriteImage); - return _clEnqueueWriteImage(command_queue, image, blocking_write, origin, region, input_row_pitch, input_slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueFillImage)(cl_command_queue command_queue, cl_mem image, const void* fill_color, const size_t* origin, const size_t* region, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_2 -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueFillImage)(cl_command_queue command_queue, cl_mem image, const void* fill_color, const size_t* origin, const size_t* region, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); - static PFNclEnqueueFillImage _clEnqueueFillImage = (PFNclEnqueueFillImage)cl::internals::getClFunction(cl::CLFunctions::EnqueueFillImage); - return _clEnqueueFillImage(command_queue, image, fill_color, origin, region, num_events_in_wait_list, event_wait_list, event); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueCopyImage)(cl_command_queue command_queue, cl_mem src_image, cl_mem dst_image, const size_t* src_origin, const size_t* dst_origin, const size_t* region, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueCopyImage)(cl_command_queue command_queue, cl_mem src_image, cl_mem dst_image, const size_t* src_origin, const size_t* dst_origin, const size_t* region, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); - static PFNclEnqueueCopyImage _clEnqueueCopyImage = (PFNclEnqueueCopyImage)cl::internals::getClFunction(cl::CLFunctions::EnqueueCopyImage); - return _clEnqueueCopyImage(command_queue, src_image, dst_image, src_origin, dst_origin, region, num_events_in_wait_list, event_wait_list, event); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueCopyImageToBuffer)(cl_command_queue command_queue, cl_mem src_image, cl_mem dst_buffer, const size_t* src_origin, const size_t* region, size_t dst_offset, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueCopyImageToBuffer)(cl_command_queue command_queue, cl_mem src_image, cl_mem dst_buffer, const size_t* src_origin, const size_t* region, size_t dst_offset, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); - static PFNclEnqueueCopyImageToBuffer _clEnqueueCopyImageToBuffer = (PFNclEnqueueCopyImageToBuffer)cl::internals::getClFunction(cl::CLFunctions::EnqueueCopyImageToBuffer); - return _clEnqueueCopyImageToBuffer(command_queue, src_image, dst_buffer, src_origin, region, dst_offset, num_events_in_wait_list, event_wait_list, event); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueCopyBufferToImage)(cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_image, size_t src_offset, const size_t* dst_origin, const size_t* region, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueCopyBufferToImage)(cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_image, size_t src_offset, const size_t* dst_origin, const size_t* region, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); - static PFNclEnqueueCopyBufferToImage _clEnqueueCopyBufferToImage = (PFNclEnqueueCopyBufferToImage)cl::internals::getClFunction(cl::CLFunctions::EnqueueCopyBufferToImage); - return _clEnqueueCopyBufferToImage(command_queue, src_buffer, dst_image, src_offset, dst_origin, region, num_events_in_wait_list, event_wait_list, event); -} -inline void* CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueMapBuffer)(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_map, cl_map_flags map_flags, size_t offset, size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0 -{ - typedef void* (CL_API_CALL * PFNclEnqueueMapBuffer)(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_map, cl_map_flags map_flags, size_t offset, size_t size, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event, cl_int * errcode_ret); - static PFNclEnqueueMapBuffer _clEnqueueMapBuffer = (PFNclEnqueueMapBuffer)cl::internals::getClFunction(cl::CLFunctions::EnqueueMapBuffer); - return _clEnqueueMapBuffer(command_queue, buffer, blocking_map, map_flags, offset, size, num_events_in_wait_list, event_wait_list, event, errcode_ret); -} -inline void* CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueMapImage)(cl_command_queue command_queue, cl_mem image, cl_bool blocking_map, cl_map_flags map_flags, const size_t* origin, const size_t* region, size_t* image_row_pitch, size_t* image_slice_pitch, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0 -{ - typedef void* (CL_API_CALL * PFNclEnqueueMapImage)(cl_command_queue command_queue, cl_mem image, cl_bool blocking_map, cl_map_flags map_flags, const size_t* origin, const size_t* region, size_t* image_row_pitch, size_t* image_slice_pitch, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event, cl_int * errcode_ret); - static PFNclEnqueueMapImage _clEnqueueMapImage = (PFNclEnqueueMapImage)cl::internals::getClFunction(cl::CLFunctions::EnqueueMapImage); - return _clEnqueueMapImage(command_queue, image, blocking_map, map_flags, origin, region, image_row_pitch, image_slice_pitch, num_events_in_wait_list, event_wait_list, event, errcode_ret); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueUnmapMemObject)(cl_command_queue command_queue, cl_mem memobj, void* mapped_ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueUnmapMemObject)(cl_command_queue command_queue, cl_mem memobj, void* mapped_ptr, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); - static PFNclEnqueueUnmapMemObject _clEnqueueUnmapMemObject = (PFNclEnqueueUnmapMemObject)cl::internals::getClFunction(cl::CLFunctions::EnqueueUnmapMemObject); - return _clEnqueueUnmapMemObject(command_queue, memobj, mapped_ptr, num_events_in_wait_list, event_wait_list, event); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueMigrateMemObjects)(cl_command_queue command_queue, cl_uint num_mem_objects, const cl_mem* mem_objects, cl_mem_migration_flags flags, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_2 -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueMigrateMemObjects)(cl_command_queue command_queue, cl_uint num_mem_objects, const cl_mem * mem_objects, cl_mem_migration_flags flags, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); - static PFNclEnqueueMigrateMemObjects _clEnqueueMigrateMemObjects = (PFNclEnqueueMigrateMemObjects)cl::internals::getClFunction(cl::CLFunctions::EnqueueMigrateMemObjects); - return _clEnqueueMigrateMemObjects(command_queue, num_mem_objects, mem_objects, flags, num_events_in_wait_list, event_wait_list, event); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueNDRangeKernel)(cl_command_queue command_queue, cl_kernel kernel, cl_uint work_dim, const size_t* global_work_offset, const size_t* global_work_size, const size_t* local_work_size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueNDRangeKernel)(cl_command_queue command_queue, cl_kernel kernel, cl_uint work_dim, const size_t* global_work_offset, const size_t* global_work_size, const size_t* local_work_size, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); - static PFNclEnqueueNDRangeKernel _clEnqueueNDRangeKernel = (PFNclEnqueueNDRangeKernel)cl::internals::getClFunction(cl::CLFunctions::EnqueueNDRangeKernel); - return _clEnqueueNDRangeKernel(command_queue, kernel, work_dim, global_work_offset, global_work_size, local_work_size, num_events_in_wait_list, event_wait_list, event); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueNativeKernel)(cl_command_queue command_queue, void (CL_CALLBACK* user_func)(void*), void* args, size_t cb_args, cl_uint num_mem_objects, const cl_mem* mem_list, const void** args_mem_loc, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueNativeKernel)(cl_command_queue command_queue, void (CL_CALLBACK * user_func)(void*), void* args, size_t cb_args, cl_uint num_mem_objects, const cl_mem * mem_list, const void** args_mem_loc, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); - static PFNclEnqueueNativeKernel _clEnqueueNativeKernel = (PFNclEnqueueNativeKernel)cl::internals::getClFunction(cl::CLFunctions::EnqueueNativeKernel); - return _clEnqueueNativeKernel(command_queue, user_func, args, cb_args, num_mem_objects, mem_list, args_mem_loc, num_events_in_wait_list, event_wait_list, event); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueMarkerWithWaitList)(cl_command_queue command_queue, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_2 -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueMarkerWithWaitList)(cl_command_queue command_queue, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); - static PFNclEnqueueMarkerWithWaitList _clEnqueueMarkerWithWaitList = (PFNclEnqueueMarkerWithWaitList)cl::internals::getClFunction(cl::CLFunctions::EnqueueMarkerWithWaitList); - return _clEnqueueMarkerWithWaitList(command_queue, num_events_in_wait_list, event_wait_list, event); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueBarrierWithWaitList)(cl_command_queue command_queue, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_2 -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueBarrierWithWaitList)(cl_command_queue command_queue, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); - static PFNclEnqueueBarrierWithWaitList _clEnqueueBarrierWithWaitList = (PFNclEnqueueBarrierWithWaitList)cl::internals::getClFunction(cl::CLFunctions::EnqueueBarrierWithWaitList); - return _clEnqueueBarrierWithWaitList(command_queue, num_events_in_wait_list, event_wait_list, event); -} -#ifdef CL_API_SUFFIX__VERSION_2_0 -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueSVMFree)(cl_command_queue command_queue, cl_uint num_svm_pointers, void* svm_pointers[], void (CL_CALLBACK* pfn_free_func)(cl_command_queue queue, cl_uint num_svm_pointers, void* svm_pointers[], void* user_data), void* user_data, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_2_0 -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueSVMFree)(cl_command_queue command_queue, cl_uint num_svm_pointers, void* svm_pointers[], void (CL_CALLBACK * pfn_free_func)(cl_command_queue queue, cl_uint num_svm_pointers, void* svm_pointers[], void* user_data), void* user_data, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); - static PFNclEnqueueSVMFree _clEnqueueSVMFree = (PFNclEnqueueSVMFree)cl::internals::getClFunction(cl::CLFunctions::EnqueueSVMFree); - return _clEnqueueSVMFree(command_queue, num_svm_pointers, svm_pointers, pfn_free_func, user_data, num_events_in_wait_list, event_wait_list, event); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueSVMMemcpy)(cl_command_queue command_queue, cl_bool blocking_copy, void* dst_ptr, const void* src_ptr, size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_2_0 -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueSVMMemcpy)(cl_command_queue command_queue, cl_bool blocking_copy, void* dst_ptr, const void* src_ptr, size_t size, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); - static PFNclEnqueueSVMMemcpy _clEnqueueSVMMemcpy = (PFNclEnqueueSVMMemcpy)cl::internals::getClFunction(cl::CLFunctions::EnqueueSVMMemcpy); - return _clEnqueueSVMMemcpy(command_queue, blocking_copy, dst_ptr, src_ptr, size, num_events_in_wait_list, event_wait_list, event); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueSVMMemFill)(cl_command_queue command_queue, void* svm_ptr, const void* pattern, size_t pattern_size, size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_2_0 -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueSVMMemFill)(cl_command_queue command_queue, void* svm_ptr, const void* pattern, size_t pattern_size, size_t size, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); - static PFNclEnqueueSVMMemFill _clEnqueueSVMMemFill = (PFNclEnqueueSVMMemFill)cl::internals::getClFunction(cl::CLFunctions::EnqueueSVMMemFill); - return _clEnqueueSVMMemFill(command_queue, svm_ptr, pattern, pattern_size, size, num_events_in_wait_list, event_wait_list, event); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueSVMMap)(cl_command_queue command_queue, cl_bool blocking_map, cl_map_flags flags, void* svm_ptr, size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_2_0 -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueSVMMap)(cl_command_queue command_queue, cl_bool blocking_map, cl_map_flags flags, void* svm_ptr, size_t size, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); - static PFNclEnqueueSVMMap _clEnqueueSVMMap = (PFNclEnqueueSVMMap)cl::internals::getClFunction(cl::CLFunctions::EnqueueSVMMap); - return _clEnqueueSVMMap(command_queue, blocking_map, flags, svm_ptr, size, num_events_in_wait_list, event_wait_list, event); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueSVMUnmap)(cl_command_queue command_queue, void* svm_ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_2_0 -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueSVMUnmap)(cl_command_queue command_queue, void* svm_ptr, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); - static PFNclEnqueueSVMUnmap _clEnqueueSVMUnmap = (PFNclEnqueueSVMUnmap)cl::internals::getClFunction(cl::CLFunctions::EnqueueSVMUnmap); - return _clEnqueueSVMUnmap(command_queue, svm_ptr, num_events_in_wait_list, event_wait_list, event); -} -#endif -#ifdef CL_API_SUFFIX__VERSION_2_1 -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueSVMMigrateMem)(cl_command_queue command_queue, cl_uint num_svm_pointers, const void** svm_pointers, const size_t* sizes, cl_mem_migration_flags flags, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_2_1 -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueSVMMigrateMem)(cl_command_queue command_queue, cl_uint num_svm_pointers, const void** svm_pointers, const size_t* sizes, cl_mem_migration_flags flags, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); - static PFNclEnqueueSVMMigrateMem _clEnqueueSVMMigrateMem = (PFNclEnqueueSVMMigrateMem)cl::internals::getClFunction(cl::CLFunctions::EnqueueSVMMigrateMem); - return _clEnqueueSVMMigrateMem(command_queue, num_svm_pointers, svm_pointers, sizes, flags, num_events_in_wait_list, event_wait_list, event); - -} -#endif -inline void* CL_API_CALL DEFINE_CL_FUNCTION_NAME(GetExtensionFunctionAddressForPlatform)(cl_platform_id platform, const char* func_name) CL_API_SUFFIX__VERSION_1_2 -{ - typedef void* (CL_API_CALL * PFNclGetExtensionFunctionAddressForPlatform)(cl_platform_id platform, const char* func_name); - static PFNclGetExtensionFunctionAddressForPlatform _clGetExtensionFunctionAddressForPlatform = (PFNclGetExtensionFunctionAddressForPlatform)cl::internals::getClFunction(cl::CLFunctions::GetExtensionFunctionAddressForPlatform); - return _clGetExtensionFunctionAddressForPlatform(platform, func_name); -} -CL_EXT_PREFIX__VERSION_1_1_DEPRECATED inline cl_mem CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_API_CALL DEFINE_CL_FUNCTION_NAME(CreateImage2D)(cl_context context, cl_mem_flags flags, const cl_image_format* image_format, size_t image_width, size_t image_height, size_t image_row_pitch, void* host_ptr, cl_int* errcode_ret) -{ - typedef cl_mem(CL_API_CALL * PFNclCreateImage2D)(cl_context context, cl_mem_flags flags, const cl_image_format * image_format, size_t image_width, size_t image_height, size_t image_row_pitch, void* host_ptr, cl_int * errcode_ret); - static PFNclCreateImage2D _clCreateImage2D = (PFNclCreateImage2D)cl::internals::getClFunction(cl::CLFunctions::CreateImage2D); - return _clCreateImage2D(context, flags, image_format, image_width, image_height, image_row_pitch, host_ptr, errcode_ret); -} -CL_EXT_PREFIX__VERSION_1_1_DEPRECATED inline cl_mem CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_API_CALL DEFINE_CL_FUNCTION_NAME(CreateImage3D)(cl_context context, cl_mem_flags flags, const cl_image_format* image_format, size_t image_width, size_t image_height, size_t image_depth, size_t image_row_pitch, size_t image_slice_pitch, void* host_ptr, cl_int* errcode_ret) -{ - typedef cl_mem(CL_API_CALL * PFNclCreateImage3D)(cl_context context, cl_mem_flags flags, const cl_image_format * image_format, size_t image_width, size_t image_height, size_t image_depth, size_t image_row_pitch, size_t image_slice_pitch, void* host_ptr, cl_int * errcode_ret); - static PFNclCreateImage3D _clCreateImage3D = (PFNclCreateImage3D)cl::internals::getClFunction(cl::CLFunctions::CreateImage3D); - return _clCreateImage3D(context, flags, image_format, image_width, image_height, image_depth, image_row_pitch, image_slice_pitch, host_ptr, errcode_ret); -} -CL_EXT_PREFIX__VERSION_1_1_DEPRECATED inline cl_int CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueMarker)(cl_command_queue command_queue, cl_event* event) -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueMarker)(cl_command_queue command_queue, cl_event * event); - static PFNclEnqueueMarker _clEnqueueMarker = (PFNclEnqueueMarker)cl::internals::getClFunction(cl::CLFunctions::EnqueueMarker); - return _clEnqueueMarker(command_queue, event); -} -CL_EXT_PREFIX__VERSION_1_1_DEPRECATED inline cl_int CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueWaitForEvents)(cl_command_queue command_queue, cl_uint num_events, const cl_event* event_list) -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueWaitForEvents)(cl_command_queue command_queue, cl_uint num_events, const cl_event * event_list); - static PFNclEnqueueWaitForEvents _clEnqueueWaitForEvents = (PFNclEnqueueWaitForEvents)cl::internals::getClFunction(cl::CLFunctions::EnqueueWaitForEvents); - return _clEnqueueWaitForEvents(command_queue, num_events, event_list); -} -CL_EXT_PREFIX__VERSION_1_1_DEPRECATED inline cl_int CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueBarrier)(cl_command_queue command_queue) -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueBarrier)(cl_command_queue command_queue); - static PFNclEnqueueBarrier _clEnqueueBarrier = (PFNclEnqueueBarrier)cl::internals::getClFunction(cl::CLFunctions::EnqueueBarrier); - return _clEnqueueBarrier(command_queue); -} -CL_EXT_PREFIX__VERSION_1_1_DEPRECATED inline cl_int CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_API_CALL DEFINE_CL_FUNCTION_NAME(UnloadCompiler)(void) -{ - typedef cl_int(CL_API_CALL * PFNclUnloadCompiler)(void); - static PFNclUnloadCompiler _clUnloadCompiler = (PFNclUnloadCompiler)cl::internals::getClFunction(cl::CLFunctions::UnloadCompiler); - return _clUnloadCompiler(); -} -CL_EXT_PREFIX__VERSION_1_1_DEPRECATED inline void* CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_API_CALL DEFINE_CL_FUNCTION_NAME(GetExtensionFunctionAddress)(const char* func_name) -{ - typedef void* (CL_API_CALL * PFNclGetExtensionFunctionAddress)(const char* func_name); - static PFNclGetExtensionFunctionAddress _clGetExtensionFunctionAddress = (PFNclGetExtensionFunctionAddress)cl::internals::getClFunction(cl::CLFunctions::GetExtensionFunctionAddress); - return _clGetExtensionFunctionAddress(func_name); -} -#ifdef CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED -CL_EXT_PREFIX__VERSION_1_2_DEPRECATED inline cl_command_queue CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED CL_API_CALL DEFINE_CL_FUNCTION_NAME(CreateCommandQueue)(cl_context context, cl_device_id device, cl_command_queue_properties properties, cl_int* errcode_ret) -{ - typedef cl_command_queue(CL_API_CALL * PFNclCreateCommandQueue)(cl_context context, cl_device_id device, cl_command_queue_properties properties, cl_int * errcode_ret); - static PFNclCreateCommandQueue _clCreateCommandQueue = (PFNclCreateCommandQueue)cl::internals::getClFunction(cl::CLFunctions::CreateCommandQueue); - return _clCreateCommandQueue(context, device, properties, errcode_ret); -} -CL_EXT_PREFIX__VERSION_1_2_DEPRECATED inline cl_sampler CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED CL_API_CALL DEFINE_CL_FUNCTION_NAME(CreateSampler)(cl_context context, cl_bool normalized_coords, cl_addressing_mode addressing_mode, cl_filter_mode filter_mode, cl_int* errcode_ret) -{ - typedef cl_sampler(CL_API_CALL * PFNclCreateSampler)(cl_context context, cl_bool normalized_coords, cl_addressing_mode addressing_mode, cl_filter_mode filter_mode, cl_int * errcode_ret); - static PFNclCreateSampler _clCreateSampler = (PFNclCreateSampler)cl::internals::getClFunction(cl::CLFunctions::CreateSampler); - return _clCreateSampler(context, normalized_coords, addressing_mode, filter_mode, errcode_ret); -} -CL_EXT_PREFIX__VERSION_1_2_DEPRECATED inline cl_int CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED CL_EXT_SUFFIX__VERSION_1_2_DEPRECATED CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueTask)(cl_command_queue command_queue, cl_kernel kernel, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) -{ - typedef cl_int(CL_API_CALL * PFNclEnqueueTask)(cl_command_queue command_queue, cl_kernel kernel, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); - static PFNclEnqueueTask _clEnqueueTask = (PFNclEnqueueTask)cl::internals::getClFunction(cl::CLFunctions::EnqueueTask); - return _clEnqueueTask(command_queue, kernel, num_events_in_wait_list, event_wait_list, event); -} -#endif -/* CL_GL */ -inline cl_mem CL_API_CALL DEFINE_CL_FUNCTION_NAME(CreateFromGLBuffer)(cl_context context, cl_mem_flags flags, cl_GLuint bufobj, int* errcode_ret) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_mem(CL_API_CALL * PFN_clCreateFromGLBuffer)(cl_context, cl_mem_flags, cl_GLuint, int*); - static PFN_clCreateFromGLBuffer _CreateFromGLBuffer = (PFN_clCreateFromGLBuffer)cl::internals::getClFunction(cl::CLFunctions::CreateFromGLBuffer); - return _CreateFromGLBuffer(context, flags, bufobj, errcode_ret); -} -inline cl_mem CL_API_CALL DEFINE_CL_FUNCTION_NAME(CreateFromGLTexture)(cl_context context, cl_mem_flags flags, cl_GLenum target, cl_GLint miplevel, cl_GLuint texture, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2 -{ - typedef cl_mem(CL_API_CALL * PFN_clCreateFromGLTexture)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int*); - static PFN_clCreateFromGLTexture _CreateFromGLTexture = (PFN_clCreateFromGLTexture)cl::internals::getClFunction(cl::CLFunctions::CreateFromGLTexture); - return _CreateFromGLTexture(context, flags, target, miplevel, texture, errcode_ret); -} -inline cl_mem CL_API_CALL DEFINE_CL_FUNCTION_NAME(CreateFromGLRenderbuffer)(cl_context context, cl_mem_flags flags, cl_GLuint renderbuffer, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_mem(CL_API_CALL * PFN_clCreateFromGLRenderbuffer)(cl_context context, cl_mem_flags flags, cl_GLuint renderbuffer, cl_int * errcode_ret); - static PFN_clCreateFromGLRenderbuffer _CreateFromGLRenderbuffer = (PFN_clCreateFromGLRenderbuffer)cl::internals::getClFunction(cl::CLFunctions::CreateFromGLRenderbuffer); - return _CreateFromGLRenderbuffer(context, flags, renderbuffer, errcode_ret); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(GetGLObjectInfo)(cl_mem memobj, cl_gl_object_type* gl_object_type, cl_GLuint* gl_object_name) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFN_clGetGLObjectInfo)(cl_mem memobj, cl_gl_object_type*, cl_GLuint*); - static PFN_clGetGLObjectInfo _GetGLObjectInfo = (PFN_clGetGLObjectInfo)cl::internals::getClFunction(cl::CLFunctions::GetGLObjectInfo); - return _GetGLObjectInfo(memobj, gl_object_type, gl_object_name); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(GetGLTextureInfo)(cl_mem memobj, cl_gl_texture_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFN_clGetGLTextureInfo)(cl_mem, cl_gl_texture_info, size_t, void*, size_t*); - static PFN_clGetGLTextureInfo _GetGLTextureInfo = (PFN_clGetGLTextureInfo)cl::internals::getClFunction(cl::CLFunctions::GetGLTextureInfo); - return _GetGLTextureInfo(memobj, param_name, param_value_size, param_value, param_value_size_ret); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueAcquireGLObjects)(cl_command_queue command_queue, cl_uint num_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFN_clEnqueueAcquireGLObjects)(cl_command_queue, cl_uint, const cl_mem*, cl_uint, const cl_event*, cl_event * event); - - static PFN_clEnqueueAcquireGLObjects _EnqueueAcquireGLObjects = (PFN_clEnqueueAcquireGLObjects)cl::internals::getClFunction(cl::CLFunctions::EnqueueAcquireGLObjects); - return _EnqueueAcquireGLObjects(command_queue, num_objects, mem_objects, num_events_in_wait_list, event_wait_list, event); -} -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(EnqueueReleaseGLObjects)(cl_command_queue command_queue, cl_uint num_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFN_clEnqueueReleaseGLObjects)(cl_command_queue, cl_uint, const cl_mem*, cl_uint, const cl_event*, cl_event * event); - static PFN_clEnqueueReleaseGLObjects _EnqueueReleaseGLObjects = (PFN_clEnqueueReleaseGLObjects)cl::internals::getClFunction(cl::CLFunctions::EnqueueReleaseGLObjects); - return _EnqueueReleaseGLObjects(command_queue, num_objects, mem_objects, num_events_in_wait_list, event_wait_list, event); -} -inline CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_API_CALL DEFINE_CL_FUNCTION_NAME(CreateFromGLTexture2D)(cl_context context, cl_mem_flags flags, cl_GLenum target, cl_GLint miplevel, cl_GLuint texture, cl_int* errcode_ret) -{ - typedef cl_mem(CL_API_CALL * PFN_clCreateFromGLTexture2D)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int*); - static PFN_clCreateFromGLTexture2D _CreateFromGLTexture2D = (PFN_clCreateFromGLTexture2D)cl::internals::getClFunction(cl::CLFunctions::CreateFromGLTexture2D); - return _CreateFromGLTexture2D(context, flags, target, miplevel, texture, errcode_ret); -} -inline CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED CL_API_CALL DEFINE_CL_FUNCTION_NAME(CreateFromGLTexture3D)(cl_context context, cl_mem_flags flags, cl_GLenum target, cl_GLint miplevel, cl_GLuint texture, cl_int* errcode_ret) -{ - typedef cl_mem(CL_API_CALL * PFN_clCreateFromGLTexture3D)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int*); - static PFN_clCreateFromGLTexture3D _CreateFromGLTexture3D = (PFN_clCreateFromGLTexture3D)cl::internals::getClFunction(cl::CLFunctions::CreateFromGLTexture3D); - return _CreateFromGLTexture3D(context, flags, target, miplevel, texture, errcode_ret); -} -#ifdef cl_gl_context_info -inline cl_int CL_API_CALL DEFINE_CL_FUNCTION_NAME(GetGLContextInfoKHR)(const cl_context_properties* properties, cl_gl_context_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0 -{ - typedef cl_int(CL_API_CALL * PFN_clGetGLContextInfoKHR)(const cl_context_properties*, cl_gl_context_info, size_t, void*, size_t*); - static PFN_clGetGLContextInfoKHR _GetGLContextInfoKHR = (PFN_clGetGLContextInfoKHR)cl::internals::getClFunction(cl::CLFunctions::GetGLContextInfoKHR); - return _GetGLContextInfoKHR(properties, param_name, param_value_size, param_value, param_value_size_ret); -} -#endif -#ifndef DYNAMICCL_NO_NAMESPACE -} -#endif - -namespace cl { -namespace internals { -namespace CLExtFunctions { -enum Enum -{ - CreateFromEGLImageKHR, EnqueueAcquireEGLObjectsKHR, EnqueueReleaseEGLObjectsKHR, CreateEventFromEGLSyncKHR, NUMBER_OF_CL_EXT_FUNCTIONS -}; - -static const std::pair OpenCLExtFunctionNamePairs[] = -{ - { CreateFromEGLImageKHR, "clCreateFromEGLImageKHR" }, - { EnqueueAcquireEGLObjectsKHR, "clEnqueueAcquireEGLObjectsKHR" }, - { EnqueueReleaseEGLObjectsKHR, "clEnqueueReleaseEGLObjectsKHR" }, - { CreateEventFromEGLSyncKHR, "clCreateEventFromEGLSyncKHR" }, -}; -} - -static inline void* GetClExtensionFunction(cl_platform_id platform, const char* funcName) -{ - return (void*)clGetExtensionFunctionAddressForPlatform(platform, funcName); -} - -inline void* getClExtFunction(cl_platform_id platform, CLFunctions::Enum func, bool reset = false) -{ - static void* CLFunctionTable[CLExtFunctions::NUMBER_OF_CL_EXT_FUNCTIONS + 1]; - - if (!CLFunctionTable[CLExtFunctions::NUMBER_OF_CL_EXT_FUNCTIONS] || reset) - { - uint32_t numExtensionStrings = sizeof(CLExtFunctions::OpenCLExtFunctionNamePairs) / sizeof(CLExtFunctions::OpenCLExtFunctionNamePairs[0]); - uint32_t numExtensionEnums = CLExtFunctions::NUMBER_OF_CL_EXT_FUNCTIONS; - - assert(numExtensionStrings == numExtensionEnums); - - for (uint32_t i = 0; i < numExtensionStrings; i++) - { - assert(CLFunctionTable[i] == 0); - CLFunctionTable[i] = GetClExtensionFunction(platform, CLExtFunctions::OpenCLExtFunctionNamePairs[i].second); - } - // Set the last element of the function table to avoid issues - CLFunctionTable[CLExtFunctions::NUMBER_OF_CL_EXT_FUNCTIONS] = (void*)1; - - } - return CLFunctionTable[func]; -} -} -} diff --git a/emscripten/include/pvrsdk/EGL/egl.h b/emscripten/include/pvrsdk/EGL/egl.h deleted file mode 100644 index bf94f61b..00000000 --- a/emscripten/include/pvrsdk/EGL/egl.h +++ /dev/null @@ -1,313 +0,0 @@ -#ifndef __egl_h_ -#define __egl_h_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2013-2017 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in 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, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER 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. -*/ -/* -** This header is generated from the Khronos OpenGL / OpenGL ES XML -** API Registry. The current version of the Registry, generator scripts -** used to make the header, and the header can be found at -** http://www.khronos.org/registry/egl -** -** Khronos $Git commit SHA1: a732b061e7 $ on $Git commit date: 2017-06-17 23:27:53 +0100 $ -*/ - -#include "EGL/eglplatform.h" - -/* Generated on date 20170627 */ - -/* Generated C header for: - * API: egl - * Versions considered: .* - * Versions emitted: .* - * Default extensions included: None - * Additional extensions included: _nomatch_^ - * Extensions removed: _nomatch_^ - */ - -#ifndef EGL_VERSION_1_0 -#define EGL_VERSION_1_0 1 -typedef unsigned int EGLBoolean; -typedef void *EGLDisplay; -#include "KHR/khrplatform.h" -#include "EGL/eglplatform.h" -typedef void *EGLConfig; -typedef void *EGLSurface; -typedef void *EGLContext; -typedef void (*__eglMustCastToProperFunctionPointerType)(void); -#define EGL_ALPHA_SIZE 0x3021 -#define EGL_BAD_ACCESS 0x3002 -#define EGL_BAD_ALLOC 0x3003 -#define EGL_BAD_ATTRIBUTE 0x3004 -#define EGL_BAD_CONFIG 0x3005 -#define EGL_BAD_CONTEXT 0x3006 -#define EGL_BAD_CURRENT_SURFACE 0x3007 -#define EGL_BAD_DISPLAY 0x3008 -#define EGL_BAD_MATCH 0x3009 -#define EGL_BAD_NATIVE_PIXMAP 0x300A -#define EGL_BAD_NATIVE_WINDOW 0x300B -#define EGL_BAD_PARAMETER 0x300C -#define EGL_BAD_SURFACE 0x300D -#define EGL_BLUE_SIZE 0x3022 -#define EGL_BUFFER_SIZE 0x3020 -#define EGL_CONFIG_CAVEAT 0x3027 -#define EGL_CONFIG_ID 0x3028 -#define EGL_CORE_NATIVE_ENGINE 0x305B -#define EGL_DEPTH_SIZE 0x3025 -#define EGL_DONT_CARE EGL_CAST(EGLint,-1) -#define EGL_DRAW 0x3059 -#define EGL_EXTENSIONS 0x3055 -#define EGL_FALSE 0 -#define EGL_GREEN_SIZE 0x3023 -#define EGL_HEIGHT 0x3056 -#define EGL_LARGEST_PBUFFER 0x3058 -#define EGL_LEVEL 0x3029 -#define EGL_MAX_PBUFFER_HEIGHT 0x302A -#define EGL_MAX_PBUFFER_PIXELS 0x302B -#define EGL_MAX_PBUFFER_WIDTH 0x302C -#define EGL_NATIVE_RENDERABLE 0x302D -#define EGL_NATIVE_VISUAL_ID 0x302E -#define EGL_NATIVE_VISUAL_TYPE 0x302F -#define EGL_NONE 0x3038 -#define EGL_NON_CONFORMANT_CONFIG 0x3051 -#define EGL_NOT_INITIALIZED 0x3001 -#define EGL_NO_CONTEXT EGL_CAST(EGLContext,0) -#define EGL_NO_DISPLAY EGL_CAST(EGLDisplay,0) -#define EGL_NO_SURFACE EGL_CAST(EGLSurface,0) -#define EGL_PBUFFER_BIT 0x0001 -#define EGL_PIXMAP_BIT 0x0002 -#define EGL_READ 0x305A -#define EGL_RED_SIZE 0x3024 -#define EGL_SAMPLES 0x3031 -#define EGL_SAMPLE_BUFFERS 0x3032 -#define EGL_SLOW_CONFIG 0x3050 -#define EGL_STENCIL_SIZE 0x3026 -#define EGL_SUCCESS 0x3000 -#define EGL_SURFACE_TYPE 0x3033 -#define EGL_TRANSPARENT_BLUE_VALUE 0x3035 -#define EGL_TRANSPARENT_GREEN_VALUE 0x3036 -#define EGL_TRANSPARENT_RED_VALUE 0x3037 -#define EGL_TRANSPARENT_RGB 0x3052 -#define EGL_TRANSPARENT_TYPE 0x3034 -#define EGL_TRUE 1 -#define EGL_VENDOR 0x3053 -#define EGL_VERSION 0x3054 -#define EGL_WIDTH 0x3057 -#define EGL_WINDOW_BIT 0x0004 -#ifndef EGL_NO_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config); -EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target); -EGLAPI EGLContext EGLAPIENTRY eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface (EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext (EGLDisplay dpy, EGLContext ctx); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface (EGLDisplay dpy, EGLSurface surface); -EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value); -EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config); -EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay (void); -EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface (EGLint readdraw); -EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay (EGLNativeDisplayType display_id); -EGLAPI EGLint EGLAPIENTRY eglGetError (void); -EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress (const char *procname); -EGLAPI EGLBoolean EGLAPIENTRY eglInitialize (EGLDisplay dpy, EGLint *major, EGLint *minor); -EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value); -EGLAPI const char *EGLAPIENTRY eglQueryString (EGLDisplay dpy, EGLint name); -EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value); -EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers (EGLDisplay dpy, EGLSurface surface); -EGLAPI EGLBoolean EGLAPIENTRY eglTerminate (EGLDisplay dpy); -EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL (void); -EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative (EGLint engine); -#endif -#endif /* EGL_VERSION_1_0 */ - -#ifndef EGL_VERSION_1_1 -#define EGL_VERSION_1_1 1 -#define EGL_BACK_BUFFER 0x3084 -#define EGL_BIND_TO_TEXTURE_RGB 0x3039 -#define EGL_BIND_TO_TEXTURE_RGBA 0x303A -#define EGL_CONTEXT_LOST 0x300E -#define EGL_MIN_SWAP_INTERVAL 0x303B -#define EGL_MAX_SWAP_INTERVAL 0x303C -#define EGL_MIPMAP_TEXTURE 0x3082 -#define EGL_MIPMAP_LEVEL 0x3083 -#define EGL_NO_TEXTURE 0x305C -#define EGL_TEXTURE_2D 0x305F -#define EGL_TEXTURE_FORMAT 0x3080 -#define EGL_TEXTURE_RGB 0x305D -#define EGL_TEXTURE_RGBA 0x305E -#define EGL_TEXTURE_TARGET 0x3081 -#ifndef EGL_NO_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer); -EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer); -EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value); -EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval (EGLDisplay dpy, EGLint interval); -#endif -#endif /* EGL_VERSION_1_1 */ - -#ifndef EGL_VERSION_1_2 -#define EGL_VERSION_1_2 1 -typedef unsigned int EGLenum; -typedef void *EGLClientBuffer; -#define EGL_ALPHA_FORMAT 0x3088 -#define EGL_ALPHA_FORMAT_NONPRE 0x308B -#define EGL_ALPHA_FORMAT_PRE 0x308C -#define EGL_ALPHA_MASK_SIZE 0x303E -#define EGL_BUFFER_PRESERVED 0x3094 -#define EGL_BUFFER_DESTROYED 0x3095 -#define EGL_CLIENT_APIS 0x308D -#define EGL_COLORSPACE 0x3087 -#define EGL_COLORSPACE_sRGB 0x3089 -#define EGL_COLORSPACE_LINEAR 0x308A -#define EGL_COLOR_BUFFER_TYPE 0x303F -#define EGL_CONTEXT_CLIENT_TYPE 0x3097 -#define EGL_DISPLAY_SCALING 10000 -#define EGL_HORIZONTAL_RESOLUTION 0x3090 -#define EGL_LUMINANCE_BUFFER 0x308F -#define EGL_LUMINANCE_SIZE 0x303D -#define EGL_OPENGL_ES_BIT 0x0001 -#define EGL_OPENVG_BIT 0x0002 -#define EGL_OPENGL_ES_API 0x30A0 -#define EGL_OPENVG_API 0x30A1 -#define EGL_OPENVG_IMAGE 0x3096 -#define EGL_PIXEL_ASPECT_RATIO 0x3092 -#define EGL_RENDERABLE_TYPE 0x3040 -#define EGL_RENDER_BUFFER 0x3086 -#define EGL_RGB_BUFFER 0x308E -#define EGL_SINGLE_BUFFER 0x3085 -#define EGL_SWAP_BEHAVIOR 0x3093 -#define EGL_UNKNOWN EGL_CAST(EGLint,-1) -#define EGL_VERTICAL_RESOLUTION 0x3091 -#ifndef EGL_NO_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI (EGLenum api); -EGLAPI EGLenum EGLAPIENTRY eglQueryAPI (void); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread (void); -EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient (void); -#endif -#endif /* EGL_VERSION_1_2 */ - -#ifndef EGL_VERSION_1_3 -#define EGL_VERSION_1_3 1 -#define EGL_CONFORMANT 0x3042 -#define EGL_CONTEXT_CLIENT_VERSION 0x3098 -#define EGL_MATCH_NATIVE_PIXMAP 0x3041 -#define EGL_OPENGL_ES2_BIT 0x0004 -#define EGL_VG_ALPHA_FORMAT 0x3088 -#define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B -#define EGL_VG_ALPHA_FORMAT_PRE 0x308C -#define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040 -#define EGL_VG_COLORSPACE 0x3087 -#define EGL_VG_COLORSPACE_sRGB 0x3089 -#define EGL_VG_COLORSPACE_LINEAR 0x308A -#define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020 -#endif /* EGL_VERSION_1_3 */ - -#ifndef EGL_VERSION_1_4 -#define EGL_VERSION_1_4 1 -#define EGL_DEFAULT_DISPLAY EGL_CAST(EGLNativeDisplayType,0) -#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200 -#define EGL_MULTISAMPLE_RESOLVE 0x3099 -#define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A -#define EGL_MULTISAMPLE_RESOLVE_BOX 0x309B -#define EGL_OPENGL_API 0x30A2 -#define EGL_OPENGL_BIT 0x0008 -#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400 -#ifndef EGL_NO_PROTOTYPES -EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext (void); -#endif -#endif /* EGL_VERSION_1_4 */ - -#ifndef EGL_VERSION_1_5 -#define EGL_VERSION_1_5 1 -typedef void *EGLSync; -typedef intptr_t EGLAttrib; -typedef khronos_utime_nanoseconds_t EGLTime; -typedef void *EGLImage; -#define EGL_CONTEXT_MAJOR_VERSION 0x3098 -#define EGL_CONTEXT_MINOR_VERSION 0x30FB -#define EGL_CONTEXT_OPENGL_PROFILE_MASK 0x30FD -#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY 0x31BD -#define EGL_NO_RESET_NOTIFICATION 0x31BE -#define EGL_LOSE_CONTEXT_ON_RESET 0x31BF -#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT 0x00000001 -#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT 0x00000002 -#define EGL_CONTEXT_OPENGL_DEBUG 0x31B0 -#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE 0x31B1 -#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS 0x31B2 -#define EGL_OPENGL_ES3_BIT 0x00000040 -#define EGL_CL_EVENT_HANDLE 0x309C -#define EGL_SYNC_CL_EVENT 0x30FE -#define EGL_SYNC_CL_EVENT_COMPLETE 0x30FF -#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE 0x30F0 -#define EGL_SYNC_TYPE 0x30F7 -#define EGL_SYNC_STATUS 0x30F1 -#define EGL_SYNC_CONDITION 0x30F8 -#define EGL_SIGNALED 0x30F2 -#define EGL_UNSIGNALED 0x30F3 -#define EGL_SYNC_FLUSH_COMMANDS_BIT 0x0001 -#define EGL_FOREVER 0xFFFFFFFFFFFFFFFFull -#define EGL_TIMEOUT_EXPIRED 0x30F5 -#define EGL_CONDITION_SATISFIED 0x30F6 -#define EGL_NO_SYNC EGL_CAST(EGLSync,0) -#define EGL_SYNC_FENCE 0x30F9 -#define EGL_GL_COLORSPACE 0x309D -#define EGL_GL_COLORSPACE_SRGB 0x3089 -#define EGL_GL_COLORSPACE_LINEAR 0x308A -#define EGL_GL_RENDERBUFFER 0x30B9 -#define EGL_GL_TEXTURE_2D 0x30B1 -#define EGL_GL_TEXTURE_LEVEL 0x30BC -#define EGL_GL_TEXTURE_3D 0x30B2 -#define EGL_GL_TEXTURE_ZOFFSET 0x30BD -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x30B3 -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x30B4 -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x30B5 -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x30B6 -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x30B7 -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8 -#define EGL_IMAGE_PRESERVED 0x30D2 -#define EGL_NO_IMAGE EGL_CAST(EGLImage,0) -#ifndef EGL_NO_PROTOTYPES -EGLAPI EGLSync EGLAPIENTRY eglCreateSync (EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroySync (EGLDisplay dpy, EGLSync sync); -EGLAPI EGLint EGLAPIENTRY eglClientWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout); -EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttrib (EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value); -EGLAPI EGLImage EGLAPIENTRY eglCreateImage (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImage (EGLDisplay dpy, EGLImage image); -EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplay (EGLenum platform, void *native_display, const EGLAttrib *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags); -#endif -#endif /* EGL_VERSION_1_5 */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/emscripten/include/pvrsdk/EGL/eglext.h b/emscripten/include/pvrsdk/EGL/eglext.h deleted file mode 100644 index ded794a2..00000000 --- a/emscripten/include/pvrsdk/EGL/eglext.h +++ /dev/null @@ -1,1241 +0,0 @@ -#ifndef __eglext_h_ -#define __eglext_h_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2013-2017 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in 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, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER 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. -*/ -/* -** This header is generated from the Khronos OpenGL / OpenGL ES XML -** API Registry. The current version of the Registry, generator scripts -** used to make the header, and the header can be found at -** http://www.khronos.org/registry/egl -** -** Khronos $Git commit SHA1: a732b061e7 $ on $Git commit date: 2017-06-17 23:27:53 +0100 $ -*/ - -#include "EGL/eglplatform.h" - -#define EGL_EGLEXT_VERSION 20170627 - -/* Generated C header for: - * API: egl - * Versions considered: .* - * Versions emitted: _nomatch_^ - * Default extensions included: egl - * Additional extensions included: _nomatch_^ - * Extensions removed: _nomatch_^ - */ - -#ifndef EGL_KHR_cl_event -#define EGL_KHR_cl_event 1 -#define EGL_CL_EVENT_HANDLE_KHR 0x309C -#define EGL_SYNC_CL_EVENT_KHR 0x30FE -#define EGL_SYNC_CL_EVENT_COMPLETE_KHR 0x30FF -#endif /* EGL_KHR_cl_event */ - -#ifndef EGL_KHR_cl_event2 -#define EGL_KHR_cl_event2 1 -typedef void *EGLSyncKHR; -typedef intptr_t EGLAttribKHR; -typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNC64KHRPROC) (EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSync64KHR (EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list); -#endif -#endif /* EGL_KHR_cl_event2 */ - -#ifndef EGL_KHR_client_get_all_proc_addresses -#define EGL_KHR_client_get_all_proc_addresses 1 -#endif /* EGL_KHR_client_get_all_proc_addresses */ - -#ifndef EGL_KHR_config_attribs -#define EGL_KHR_config_attribs 1 -#define EGL_CONFORMANT_KHR 0x3042 -#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR 0x0020 -#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR 0x0040 -#endif /* EGL_KHR_config_attribs */ - -#ifndef EGL_KHR_context_flush_control -#define EGL_KHR_context_flush_control 1 -#define EGL_CONTEXT_RELEASE_BEHAVIOR_NONE_KHR 0 -#define EGL_CONTEXT_RELEASE_BEHAVIOR_KHR 0x2097 -#define EGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR 0x2098 -#endif /* EGL_KHR_context_flush_control */ - -#ifndef EGL_KHR_create_context -#define EGL_KHR_create_context 1 -#define EGL_CONTEXT_MAJOR_VERSION_KHR 0x3098 -#define EGL_CONTEXT_MINOR_VERSION_KHR 0x30FB -#define EGL_CONTEXT_FLAGS_KHR 0x30FC -#define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30FD -#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR 0x31BD -#define EGL_NO_RESET_NOTIFICATION_KHR 0x31BE -#define EGL_LOSE_CONTEXT_ON_RESET_KHR 0x31BF -#define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR 0x00000001 -#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002 -#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004 -#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001 -#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002 -#define EGL_OPENGL_ES3_BIT_KHR 0x00000040 -#endif /* EGL_KHR_create_context */ - -#ifndef EGL_KHR_create_context_no_error -#define EGL_KHR_create_context_no_error 1 -#define EGL_CONTEXT_OPENGL_NO_ERROR_KHR 0x31B3 -#endif /* EGL_KHR_create_context_no_error */ - -#ifndef EGL_KHR_debug -#define EGL_KHR_debug 1 -typedef void *EGLLabelKHR; -typedef void *EGLObjectKHR; -typedef void (EGLAPIENTRY *EGLDEBUGPROCKHR)(EGLenum error,const char *command,EGLint messageType,EGLLabelKHR threadLabel,EGLLabelKHR objectLabel,const char* message); -#define EGL_OBJECT_THREAD_KHR 0x33B0 -#define EGL_OBJECT_DISPLAY_KHR 0x33B1 -#define EGL_OBJECT_CONTEXT_KHR 0x33B2 -#define EGL_OBJECT_SURFACE_KHR 0x33B3 -#define EGL_OBJECT_IMAGE_KHR 0x33B4 -#define EGL_OBJECT_SYNC_KHR 0x33B5 -#define EGL_OBJECT_STREAM_KHR 0x33B6 -#define EGL_DEBUG_MSG_CRITICAL_KHR 0x33B9 -#define EGL_DEBUG_MSG_ERROR_KHR 0x33BA -#define EGL_DEBUG_MSG_WARN_KHR 0x33BB -#define EGL_DEBUG_MSG_INFO_KHR 0x33BC -#define EGL_DEBUG_CALLBACK_KHR 0x33B8 -typedef EGLint (EGLAPIENTRYP PFNEGLDEBUGMESSAGECONTROLKHRPROC) (EGLDEBUGPROCKHR callback, const EGLAttrib *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEBUGKHRPROC) (EGLint attribute, EGLAttrib *value); -typedef EGLint (EGLAPIENTRYP PFNEGLLABELOBJECTKHRPROC) (EGLDisplay display, EGLenum objectType, EGLObjectKHR object, EGLLabelKHR label); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLint EGLAPIENTRY eglDebugMessageControlKHR (EGLDEBUGPROCKHR callback, const EGLAttrib *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryDebugKHR (EGLint attribute, EGLAttrib *value); -EGLAPI EGLint EGLAPIENTRY eglLabelObjectKHR (EGLDisplay display, EGLenum objectType, EGLObjectKHR object, EGLLabelKHR label); -#endif -#endif /* EGL_KHR_debug */ - -#ifndef EGL_KHR_display_reference -#define EGL_KHR_display_reference 1 -#define EGL_TRACK_REFERENCES_KHR 0x3352 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDISPLAYATTRIBKHRPROC) (EGLDisplay dpy, EGLint name, EGLAttrib *value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribKHR (EGLDisplay dpy, EGLint name, EGLAttrib *value); -#endif -#endif /* EGL_KHR_display_reference */ - -#ifndef EGL_KHR_fence_sync -#define EGL_KHR_fence_sync 1 -typedef khronos_utime_nanoseconds_t EGLTimeKHR; -#ifdef KHRONOS_SUPPORT_INT64 -#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0 -#define EGL_SYNC_CONDITION_KHR 0x30F8 -#define EGL_SYNC_FENCE_KHR 0x30F9 -typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync); -typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR (EGLDisplay dpy, EGLSyncKHR sync); -EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); -EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); -#endif -#endif /* KHRONOS_SUPPORT_INT64 */ -#endif /* EGL_KHR_fence_sync */ - -#ifndef EGL_KHR_get_all_proc_addresses -#define EGL_KHR_get_all_proc_addresses 1 -#endif /* EGL_KHR_get_all_proc_addresses */ - -#ifndef EGL_KHR_gl_colorspace -#define EGL_KHR_gl_colorspace 1 -#define EGL_GL_COLORSPACE_KHR 0x309D -#define EGL_GL_COLORSPACE_SRGB_KHR 0x3089 -#define EGL_GL_COLORSPACE_LINEAR_KHR 0x308A -#endif /* EGL_KHR_gl_colorspace */ - -#ifndef EGL_KHR_gl_renderbuffer_image -#define EGL_KHR_gl_renderbuffer_image 1 -#define EGL_GL_RENDERBUFFER_KHR 0x30B9 -#endif /* EGL_KHR_gl_renderbuffer_image */ - -#ifndef EGL_KHR_gl_texture_2D_image -#define EGL_KHR_gl_texture_2D_image 1 -#define EGL_GL_TEXTURE_2D_KHR 0x30B1 -#define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC -#endif /* EGL_KHR_gl_texture_2D_image */ - -#ifndef EGL_KHR_gl_texture_3D_image -#define EGL_KHR_gl_texture_3D_image 1 -#define EGL_GL_TEXTURE_3D_KHR 0x30B2 -#define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD -#endif /* EGL_KHR_gl_texture_3D_image */ - -#ifndef EGL_KHR_gl_texture_cubemap_image -#define EGL_KHR_gl_texture_cubemap_image 1 -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3 -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4 -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5 -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6 -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7 -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8 -#endif /* EGL_KHR_gl_texture_cubemap_image */ - -#ifndef EGL_KHR_image -#define EGL_KHR_image 1 -typedef void *EGLImageKHR; -#define EGL_NATIVE_PIXMAP_KHR 0x30B0 -#define EGL_NO_IMAGE_KHR EGL_CAST(EGLImageKHR,0) -typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image); -#endif -#endif /* EGL_KHR_image */ - -#ifndef EGL_KHR_image_base -#define EGL_KHR_image_base 1 -#define EGL_IMAGE_PRESERVED_KHR 0x30D2 -#endif /* EGL_KHR_image_base */ - -#ifndef EGL_KHR_image_pixmap -#define EGL_KHR_image_pixmap 1 -#endif /* EGL_KHR_image_pixmap */ - -#ifndef EGL_KHR_lock_surface -#define EGL_KHR_lock_surface 1 -#define EGL_READ_SURFACE_BIT_KHR 0x0001 -#define EGL_WRITE_SURFACE_BIT_KHR 0x0002 -#define EGL_LOCK_SURFACE_BIT_KHR 0x0080 -#define EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100 -#define EGL_MATCH_FORMAT_KHR 0x3043 -#define EGL_FORMAT_RGB_565_EXACT_KHR 0x30C0 -#define EGL_FORMAT_RGB_565_KHR 0x30C1 -#define EGL_FORMAT_RGBA_8888_EXACT_KHR 0x30C2 -#define EGL_FORMAT_RGBA_8888_KHR 0x30C3 -#define EGL_MAP_PRESERVE_PIXELS_KHR 0x30C4 -#define EGL_LOCK_USAGE_HINT_KHR 0x30C5 -#define EGL_BITMAP_POINTER_KHR 0x30C6 -#define EGL_BITMAP_PITCH_KHR 0x30C7 -#define EGL_BITMAP_ORIGIN_KHR 0x30C8 -#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR 0x30C9 -#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA -#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR 0x30CB -#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC -#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD -#define EGL_LOWER_LEFT_KHR 0x30CE -#define EGL_UPPER_LEFT_KHR 0x30CF -typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay dpy, EGLSurface surface); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay dpy, EGLSurface surface); -#endif -#endif /* EGL_KHR_lock_surface */ - -#ifndef EGL_KHR_lock_surface2 -#define EGL_KHR_lock_surface2 1 -#define EGL_BITMAP_PIXEL_SIZE_KHR 0x3110 -#endif /* EGL_KHR_lock_surface2 */ - -#ifndef EGL_KHR_lock_surface3 -#define EGL_KHR_lock_surface3 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACE64KHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLAttribKHR *value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface64KHR (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLAttribKHR *value); -#endif -#endif /* EGL_KHR_lock_surface3 */ - -#ifndef EGL_KHR_mutable_render_buffer -#define EGL_KHR_mutable_render_buffer 1 -#define EGL_MUTABLE_RENDER_BUFFER_BIT_KHR 0x1000 -#endif /* EGL_KHR_mutable_render_buffer */ - -#ifndef EGL_KHR_no_config_context -#define EGL_KHR_no_config_context 1 -#define EGL_NO_CONFIG_KHR EGL_CAST(EGLConfig,0) -#endif /* EGL_KHR_no_config_context */ - -#ifndef EGL_KHR_partial_update -#define EGL_KHR_partial_update 1 -#define EGL_BUFFER_AGE_KHR 0x313D -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETDAMAGEREGIONKHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglSetDamageRegionKHR (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects); -#endif -#endif /* EGL_KHR_partial_update */ - -#ifndef EGL_KHR_platform_android -#define EGL_KHR_platform_android 1 -#define EGL_PLATFORM_ANDROID_KHR 0x3141 -#endif /* EGL_KHR_platform_android */ - -#ifndef EGL_KHR_platform_gbm -#define EGL_KHR_platform_gbm 1 -#define EGL_PLATFORM_GBM_KHR 0x31D7 -#endif /* EGL_KHR_platform_gbm */ - -#ifndef EGL_KHR_platform_wayland -#define EGL_KHR_platform_wayland 1 -#define EGL_PLATFORM_WAYLAND_KHR 0x31D8 -#endif /* EGL_KHR_platform_wayland */ - -#ifndef EGL_KHR_platform_x11 -#define EGL_KHR_platform_x11 1 -#define EGL_PLATFORM_X11_KHR 0x31D5 -#define EGL_PLATFORM_X11_SCREEN_KHR 0x31D6 -#endif /* EGL_KHR_platform_x11 */ - -#ifndef EGL_KHR_reusable_sync -#define EGL_KHR_reusable_sync 1 -#ifdef KHRONOS_SUPPORT_INT64 -#define EGL_SYNC_STATUS_KHR 0x30F1 -#define EGL_SIGNALED_KHR 0x30F2 -#define EGL_UNSIGNALED_KHR 0x30F3 -#define EGL_TIMEOUT_EXPIRED_KHR 0x30F5 -#define EGL_CONDITION_SATISFIED_KHR 0x30F6 -#define EGL_SYNC_TYPE_KHR 0x30F7 -#define EGL_SYNC_REUSABLE_KHR 0x30FA -#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001 -#define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull -#define EGL_NO_SYNC_KHR EGL_CAST(EGLSyncKHR,0) -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); -#endif -#endif /* KHRONOS_SUPPORT_INT64 */ -#endif /* EGL_KHR_reusable_sync */ - -#ifndef EGL_KHR_stream -#define EGL_KHR_stream 1 -typedef void *EGLStreamKHR; -typedef khronos_uint64_t EGLuint64KHR; -#ifdef KHRONOS_SUPPORT_INT64 -#define EGL_NO_STREAM_KHR EGL_CAST(EGLStreamKHR,0) -#define EGL_CONSUMER_LATENCY_USEC_KHR 0x3210 -#define EGL_PRODUCER_FRAME_KHR 0x3212 -#define EGL_CONSUMER_FRAME_KHR 0x3213 -#define EGL_STREAM_STATE_KHR 0x3214 -#define EGL_STREAM_STATE_CREATED_KHR 0x3215 -#define EGL_STREAM_STATE_CONNECTING_KHR 0x3216 -#define EGL_STREAM_STATE_EMPTY_KHR 0x3217 -#define EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR 0x3218 -#define EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR 0x3219 -#define EGL_STREAM_STATE_DISCONNECTED_KHR 0x321A -#define EGL_BAD_STREAM_KHR 0x321B -#define EGL_BAD_STATE_KHR 0x321C -typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMKHRPROC) (EGLDisplay dpy, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMU64KHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR (EGLDisplay dpy, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroyStreamKHR (EGLDisplay dpy, EGLStreamKHR stream); -EGLAPI EGLBoolean EGLAPIENTRY eglStreamAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value); -#endif -#endif /* KHRONOS_SUPPORT_INT64 */ -#endif /* EGL_KHR_stream */ - -#ifndef EGL_KHR_stream_attrib -#define EGL_KHR_stream_attrib 1 -#ifdef KHRONOS_SUPPORT_INT64 -typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMATTRIBKHRPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETSTREAMATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib value); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib *value); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamAttribKHR (EGLDisplay dpy, const EGLAttrib *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglSetStreamAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib value); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib *value); -EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list); -#endif -#endif /* KHRONOS_SUPPORT_INT64 */ -#endif /* EGL_KHR_stream_attrib */ - -#ifndef EGL_KHR_stream_consumer_gltexture -#define EGL_KHR_stream_consumer_gltexture 1 -#ifdef EGL_KHR_stream -#define EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR 0x321E -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalKHR (EGLDisplay dpy, EGLStreamKHR stream); -EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR (EGLDisplay dpy, EGLStreamKHR stream); -EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR (EGLDisplay dpy, EGLStreamKHR stream); -#endif -#endif /* EGL_KHR_stream */ -#endif /* EGL_KHR_stream_consumer_gltexture */ - -#ifndef EGL_KHR_stream_cross_process_fd -#define EGL_KHR_stream_cross_process_fd 1 -typedef int EGLNativeFileDescriptorKHR; -#ifdef EGL_KHR_stream -#define EGL_NO_FILE_DESCRIPTOR_KHR EGL_CAST(EGLNativeFileDescriptorKHR,-1) -typedef EGLNativeFileDescriptorKHR (EGLAPIENTRYP PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); -typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLNativeFileDescriptorKHR EGLAPIENTRY eglGetStreamFileDescriptorKHR (EGLDisplay dpy, EGLStreamKHR stream); -EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamFromFileDescriptorKHR (EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor); -#endif -#endif /* EGL_KHR_stream */ -#endif /* EGL_KHR_stream_cross_process_fd */ - -#ifndef EGL_KHR_stream_fifo -#define EGL_KHR_stream_fifo 1 -#ifdef EGL_KHR_stream -#define EGL_STREAM_FIFO_LENGTH_KHR 0x31FC -#define EGL_STREAM_TIME_NOW_KHR 0x31FD -#define EGL_STREAM_TIME_CONSUMER_KHR 0x31FE -#define EGL_STREAM_TIME_PRODUCER_KHR 0x31FF -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMTIMEKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamTimeKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value); -#endif -#endif /* EGL_KHR_stream */ -#endif /* EGL_KHR_stream_fifo */ - -#ifndef EGL_KHR_stream_producer_aldatalocator -#define EGL_KHR_stream_producer_aldatalocator 1 -#ifdef EGL_KHR_stream -#endif /* EGL_KHR_stream */ -#endif /* EGL_KHR_stream_producer_aldatalocator */ - -#ifndef EGL_KHR_stream_producer_eglsurface -#define EGL_KHR_stream_producer_eglsurface 1 -#ifdef EGL_KHR_stream -#define EGL_STREAM_BIT_KHR 0x0800 -typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC) (EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSurface EGLAPIENTRY eglCreateStreamProducerSurfaceKHR (EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list); -#endif -#endif /* EGL_KHR_stream */ -#endif /* EGL_KHR_stream_producer_eglsurface */ - -#ifndef EGL_KHR_surfaceless_context -#define EGL_KHR_surfaceless_context 1 -#endif /* EGL_KHR_surfaceless_context */ - -#ifndef EGL_KHR_swap_buffers_with_damage -#define EGL_KHR_swap_buffers_with_damage 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEKHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageKHR (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects); -#endif -#endif /* EGL_KHR_swap_buffers_with_damage */ - -#ifndef EGL_KHR_vg_parent_image -#define EGL_KHR_vg_parent_image 1 -#define EGL_VG_PARENT_IMAGE_KHR 0x30BA -#endif /* EGL_KHR_vg_parent_image */ - -#ifndef EGL_KHR_wait_sync -#define EGL_KHR_wait_sync 1 -typedef EGLint (EGLAPIENTRYP PFNEGLWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLint EGLAPIENTRY eglWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags); -#endif -#endif /* EGL_KHR_wait_sync */ - -#ifndef EGL_ANDROID_blob_cache -#define EGL_ANDROID_blob_cache 1 -typedef khronos_ssize_t EGLsizeiANDROID; -typedef void (*EGLSetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, const void *value, EGLsizeiANDROID valueSize); -typedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, void *value, EGLsizeiANDROID valueSize); -typedef void (EGLAPIENTRYP PFNEGLSETBLOBCACHEFUNCSANDROIDPROC) (EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI void EGLAPIENTRY eglSetBlobCacheFuncsANDROID (EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get); -#endif -#endif /* EGL_ANDROID_blob_cache */ - -#ifndef EGL_ANDROID_create_native_client_buffer -#define EGL_ANDROID_create_native_client_buffer 1 -#define EGL_NATIVE_BUFFER_USAGE_ANDROID 0x3143 -#define EGL_NATIVE_BUFFER_USAGE_PROTECTED_BIT_ANDROID 0x00000001 -#define EGL_NATIVE_BUFFER_USAGE_RENDERBUFFER_BIT_ANDROID 0x00000002 -#define EGL_NATIVE_BUFFER_USAGE_TEXTURE_BIT_ANDROID 0x00000004 -typedef EGLClientBuffer (EGLAPIENTRYP PFNEGLCREATENATIVECLIENTBUFFERANDROIDPROC) (const EGLint *attrib_list); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLClientBuffer EGLAPIENTRY eglCreateNativeClientBufferANDROID (const EGLint *attrib_list); -#endif -#endif /* EGL_ANDROID_create_native_client_buffer */ - -#ifndef EGL_ANDROID_framebuffer_target -#define EGL_ANDROID_framebuffer_target 1 -#define EGL_FRAMEBUFFER_TARGET_ANDROID 0x3147 -#endif /* EGL_ANDROID_framebuffer_target */ - -#ifndef EGL_ANDROID_front_buffer_auto_refresh -#define EGL_ANDROID_front_buffer_auto_refresh 1 -#define EGL_FRONT_BUFFER_AUTO_REFRESH_ANDROID 0x314C -#endif /* EGL_ANDROID_front_buffer_auto_refresh */ - -#ifndef EGL_ANDROID_image_native_buffer -#define EGL_ANDROID_image_native_buffer 1 -#define EGL_NATIVE_BUFFER_ANDROID 0x3140 -#endif /* EGL_ANDROID_image_native_buffer */ - -#ifndef EGL_ANDROID_native_fence_sync -#define EGL_ANDROID_native_fence_sync 1 -#define EGL_SYNC_NATIVE_FENCE_ANDROID 0x3144 -#define EGL_SYNC_NATIVE_FENCE_FD_ANDROID 0x3145 -#define EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID 0x3146 -#define EGL_NO_NATIVE_FENCE_FD_ANDROID -1 -typedef EGLint (EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC) (EGLDisplay dpy, EGLSyncKHR sync); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID (EGLDisplay dpy, EGLSyncKHR sync); -#endif -#endif /* EGL_ANDROID_native_fence_sync */ - -#ifndef EGL_ANDROID_presentation_time -#define EGL_ANDROID_presentation_time 1 -typedef khronos_stime_nanoseconds_t EGLnsecsANDROID; -typedef EGLBoolean (EGLAPIENTRYP PFNEGLPRESENTATIONTIMEANDROIDPROC) (EGLDisplay dpy, EGLSurface surface, EGLnsecsANDROID time); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglPresentationTimeANDROID (EGLDisplay dpy, EGLSurface surface, EGLnsecsANDROID time); -#endif -#endif /* EGL_ANDROID_presentation_time */ - -#ifndef EGL_ANDROID_recordable -#define EGL_ANDROID_recordable 1 -#define EGL_RECORDABLE_ANDROID 0x3142 -#endif /* EGL_ANDROID_recordable */ - -#ifndef EGL_ANGLE_d3d_share_handle_client_buffer -#define EGL_ANGLE_d3d_share_handle_client_buffer 1 -#define EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE 0x3200 -#endif /* EGL_ANGLE_d3d_share_handle_client_buffer */ - -#ifndef EGL_ANGLE_device_d3d -#define EGL_ANGLE_device_d3d 1 -#define EGL_D3D9_DEVICE_ANGLE 0x33A0 -#define EGL_D3D11_DEVICE_ANGLE 0x33A1 -#endif /* EGL_ANGLE_device_d3d */ - -#ifndef EGL_ANGLE_query_surface_pointer -#define EGL_ANGLE_query_surface_pointer 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPOINTERANGLEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value); -#endif -#endif /* EGL_ANGLE_query_surface_pointer */ - -#ifndef EGL_ANGLE_surface_d3d_texture_2d_share_handle -#define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1 -#endif /* EGL_ANGLE_surface_d3d_texture_2d_share_handle */ - -#ifndef EGL_ANGLE_window_fixed_size -#define EGL_ANGLE_window_fixed_size 1 -#define EGL_FIXED_SIZE_ANGLE 0x3201 -#endif /* EGL_ANGLE_window_fixed_size */ - -#ifndef EGL_ARM_implicit_external_sync -#define EGL_ARM_implicit_external_sync 1 -#define EGL_SYNC_PRIOR_COMMANDS_IMPLICIT_EXTERNAL_ARM 0x328A -#endif /* EGL_ARM_implicit_external_sync */ - -#ifndef EGL_ARM_pixmap_multisample_discard -#define EGL_ARM_pixmap_multisample_discard 1 -#define EGL_DISCARD_SAMPLES_ARM 0x3286 -#endif /* EGL_ARM_pixmap_multisample_discard */ - -#ifndef EGL_EXT_bind_to_front -#define EGL_EXT_bind_to_front 1 -#define EGL_FRONT_BUFFER_EXT 0x3464 -#endif /* EGL_EXT_bind_to_front */ - -#ifndef EGL_EXT_buffer_age -#define EGL_EXT_buffer_age 1 -#define EGL_BUFFER_AGE_EXT 0x313D -#endif /* EGL_EXT_buffer_age */ - -#ifndef EGL_EXT_client_extensions -#define EGL_EXT_client_extensions 1 -#endif /* EGL_EXT_client_extensions */ - -#ifndef EGL_EXT_compositor -#define EGL_EXT_compositor 1 -#define EGL_PRIMARY_COMPOSITOR_CONTEXT_EXT 0x3460 -#define EGL_EXTERNAL_REF_ID_EXT 0x3461 -#define EGL_COMPOSITOR_DROP_NEWEST_FRAME_EXT 0x3462 -#define EGL_COMPOSITOR_KEEP_NEWEST_FRAME_EXT 0x3463 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORSETCONTEXTLISTEXTPROC) (const EGLint *external_ref_ids, EGLint num_entries); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORSETCONTEXTATTRIBUTESEXTPROC) (EGLint external_ref_id, const EGLint *context_attributes, EGLint num_entries); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORSETWINDOWLISTEXTPROC) (EGLint external_ref_id, const EGLint *external_win_ids, EGLint num_entries); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORSETWINDOWATTRIBUTESEXTPROC) (EGLint external_win_id, const EGLint *window_attributes, EGLint num_entries); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORBINDTEXWINDOWEXTPROC) (EGLint external_win_id); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORSETSIZEEXTPROC) (EGLint external_win_id, EGLint width, EGLint height); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORSWAPPOLICYEXTPROC) (EGLint external_win_id, EGLint policy); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglCompositorSetContextListEXT (const EGLint *external_ref_ids, EGLint num_entries); -EGLAPI EGLBoolean EGLAPIENTRY eglCompositorSetContextAttributesEXT (EGLint external_ref_id, const EGLint *context_attributes, EGLint num_entries); -EGLAPI EGLBoolean EGLAPIENTRY eglCompositorSetWindowListEXT (EGLint external_ref_id, const EGLint *external_win_ids, EGLint num_entries); -EGLAPI EGLBoolean EGLAPIENTRY eglCompositorSetWindowAttributesEXT (EGLint external_win_id, const EGLint *window_attributes, EGLint num_entries); -EGLAPI EGLBoolean EGLAPIENTRY eglCompositorBindTexWindowEXT (EGLint external_win_id); -EGLAPI EGLBoolean EGLAPIENTRY eglCompositorSetSizeEXT (EGLint external_win_id, EGLint width, EGLint height); -EGLAPI EGLBoolean EGLAPIENTRY eglCompositorSwapPolicyEXT (EGLint external_win_id, EGLint policy); -#endif -#endif /* EGL_EXT_compositor */ - -#ifndef EGL_EXT_create_context_robustness -#define EGL_EXT_create_context_robustness 1 -#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT 0x30BF -#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT 0x3138 -#define EGL_NO_RESET_NOTIFICATION_EXT 0x31BE -#define EGL_LOSE_CONTEXT_ON_RESET_EXT 0x31BF -#endif /* EGL_EXT_create_context_robustness */ - -#ifndef EGL_EXT_device_base -#define EGL_EXT_device_base 1 -typedef void *EGLDeviceEXT; -#define EGL_NO_DEVICE_EXT EGL_CAST(EGLDeviceEXT,0) -#define EGL_BAD_DEVICE_EXT 0x322B -#define EGL_DEVICE_EXT 0x322C -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICEATTRIBEXTPROC) (EGLDeviceEXT device, EGLint attribute, EGLAttrib *value); -typedef const char *(EGLAPIENTRYP PFNEGLQUERYDEVICESTRINGEXTPROC) (EGLDeviceEXT device, EGLint name); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICESEXTPROC) (EGLint max_devices, EGLDeviceEXT *devices, EGLint *num_devices); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDISPLAYATTRIBEXTPROC) (EGLDisplay dpy, EGLint attribute, EGLAttrib *value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglQueryDeviceAttribEXT (EGLDeviceEXT device, EGLint attribute, EGLAttrib *value); -EGLAPI const char *EGLAPIENTRY eglQueryDeviceStringEXT (EGLDeviceEXT device, EGLint name); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryDevicesEXT (EGLint max_devices, EGLDeviceEXT *devices, EGLint *num_devices); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribEXT (EGLDisplay dpy, EGLint attribute, EGLAttrib *value); -#endif -#endif /* EGL_EXT_device_base */ - -#ifndef EGL_EXT_device_drm -#define EGL_EXT_device_drm 1 -#define EGL_DRM_DEVICE_FILE_EXT 0x3233 -#endif /* EGL_EXT_device_drm */ - -#ifndef EGL_EXT_device_enumeration -#define EGL_EXT_device_enumeration 1 -#endif /* EGL_EXT_device_enumeration */ - -#ifndef EGL_EXT_device_openwf -#define EGL_EXT_device_openwf 1 -#define EGL_OPENWF_DEVICE_ID_EXT 0x3237 -#endif /* EGL_EXT_device_openwf */ - -#ifndef EGL_EXT_device_query -#define EGL_EXT_device_query 1 -#endif /* EGL_EXT_device_query */ - -#ifndef EGL_EXT_gl_colorspace_bt2020_linear -#define EGL_EXT_gl_colorspace_bt2020_linear 1 -#define EGL_GL_COLORSPACE_BT2020_LINEAR_EXT 0x333F -#endif /* EGL_EXT_gl_colorspace_bt2020_linear */ - -#ifndef EGL_EXT_gl_colorspace_bt2020_pq -#define EGL_EXT_gl_colorspace_bt2020_pq 1 -#define EGL_GL_COLORSPACE_BT2020_PQ_EXT 0x3340 -#endif /* EGL_EXT_gl_colorspace_bt2020_pq */ - -#ifndef EGL_EXT_gl_colorspace_display_p3 -#define EGL_EXT_gl_colorspace_display_p3 1 -#define EGL_GL_COLORSPACE_DISPLAY_P3_EXT 0x3363 -#endif /* EGL_EXT_gl_colorspace_display_p3 */ - -#ifndef EGL_EXT_gl_colorspace_display_p3_linear -#define EGL_EXT_gl_colorspace_display_p3_linear 1 -#define EGL_GL_COLORSPACE_DISPLAY_P3_LINEAR_EXT 0x3362 -#endif /* EGL_EXT_gl_colorspace_display_p3_linear */ - -#ifndef EGL_EXT_gl_colorspace_scrgb -#define EGL_EXT_gl_colorspace_scrgb 1 -#define EGL_GL_COLORSPACE_SCRGB_EXT 0x3351 -#endif /* EGL_EXT_gl_colorspace_scrgb */ - -#ifndef EGL_EXT_gl_colorspace_scrgb_linear -#define EGL_EXT_gl_colorspace_scrgb_linear 1 -#define EGL_GL_COLORSPACE_SCRGB_LINEAR_EXT 0x3350 -#endif /* EGL_EXT_gl_colorspace_scrgb_linear */ - -#ifndef EGL_EXT_image_dma_buf_import -#define EGL_EXT_image_dma_buf_import 1 -#define EGL_LINUX_DMA_BUF_EXT 0x3270 -#define EGL_LINUX_DRM_FOURCC_EXT 0x3271 -#define EGL_DMA_BUF_PLANE0_FD_EXT 0x3272 -#define EGL_DMA_BUF_PLANE0_OFFSET_EXT 0x3273 -#define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274 -#define EGL_DMA_BUF_PLANE1_FD_EXT 0x3275 -#define EGL_DMA_BUF_PLANE1_OFFSET_EXT 0x3276 -#define EGL_DMA_BUF_PLANE1_PITCH_EXT 0x3277 -#define EGL_DMA_BUF_PLANE2_FD_EXT 0x3278 -#define EGL_DMA_BUF_PLANE2_OFFSET_EXT 0x3279 -#define EGL_DMA_BUF_PLANE2_PITCH_EXT 0x327A -#define EGL_YUV_COLOR_SPACE_HINT_EXT 0x327B -#define EGL_SAMPLE_RANGE_HINT_EXT 0x327C -#define EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT 0x327D -#define EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT 0x327E -#define EGL_ITU_REC601_EXT 0x327F -#define EGL_ITU_REC709_EXT 0x3280 -#define EGL_ITU_REC2020_EXT 0x3281 -#define EGL_YUV_FULL_RANGE_EXT 0x3282 -#define EGL_YUV_NARROW_RANGE_EXT 0x3283 -#define EGL_YUV_CHROMA_SITING_0_EXT 0x3284 -#define EGL_YUV_CHROMA_SITING_0_5_EXT 0x3285 -#endif /* EGL_EXT_image_dma_buf_import */ - -#ifndef EGL_EXT_image_dma_buf_import_modifiers -#define EGL_EXT_image_dma_buf_import_modifiers 1 -#define EGL_DMA_BUF_PLANE3_FD_EXT 0x3440 -#define EGL_DMA_BUF_PLANE3_OFFSET_EXT 0x3441 -#define EGL_DMA_BUF_PLANE3_PITCH_EXT 0x3442 -#define EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT 0x3443 -#define EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT 0x3444 -#define EGL_DMA_BUF_PLANE1_MODIFIER_LO_EXT 0x3445 -#define EGL_DMA_BUF_PLANE1_MODIFIER_HI_EXT 0x3446 -#define EGL_DMA_BUF_PLANE2_MODIFIER_LO_EXT 0x3447 -#define EGL_DMA_BUF_PLANE2_MODIFIER_HI_EXT 0x3448 -#define EGL_DMA_BUF_PLANE3_MODIFIER_LO_EXT 0x3449 -#define EGL_DMA_BUF_PLANE3_MODIFIER_HI_EXT 0x344A -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDMABUFFORMATSEXTPROC) (EGLDisplay dpy, EGLint max_formats, EGLint *formats, EGLint *num_formats); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDMABUFMODIFIERSEXTPROC) (EGLDisplay dpy, EGLint format, EGLint max_modifiers, EGLuint64KHR *modifiers, EGLBoolean *external_only, EGLint *num_modifiers); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglQueryDmaBufFormatsEXT (EGLDisplay dpy, EGLint max_formats, EGLint *formats, EGLint *num_formats); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryDmaBufModifiersEXT (EGLDisplay dpy, EGLint format, EGLint max_modifiers, EGLuint64KHR *modifiers, EGLBoolean *external_only, EGLint *num_modifiers); -#endif -#endif /* EGL_EXT_image_dma_buf_import_modifiers */ - -#ifndef EGL_EXT_image_implicit_sync_control -#define EGL_EXT_image_implicit_sync_control 1 -#define EGL_IMPORT_SYNC_TYPE_EXT 0x3470 -#define EGL_IMPORT_IMPLICIT_SYNC_EXT 0x3471 -#define EGL_IMPORT_EXPLICIT_SYNC_EXT 0x3472 -#endif /* EGL_EXT_image_implicit_sync_control */ - -#ifndef EGL_EXT_multiview_window -#define EGL_EXT_multiview_window 1 -#define EGL_MULTIVIEW_VIEW_COUNT_EXT 0x3134 -#endif /* EGL_EXT_multiview_window */ - -#ifndef EGL_EXT_output_base -#define EGL_EXT_output_base 1 -typedef void *EGLOutputLayerEXT; -typedef void *EGLOutputPortEXT; -#define EGL_NO_OUTPUT_LAYER_EXT EGL_CAST(EGLOutputLayerEXT,0) -#define EGL_NO_OUTPUT_PORT_EXT EGL_CAST(EGLOutputPortEXT,0) -#define EGL_BAD_OUTPUT_LAYER_EXT 0x322D -#define EGL_BAD_OUTPUT_PORT_EXT 0x322E -#define EGL_SWAP_INTERVAL_EXT 0x322F -typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTLAYERSEXTPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputLayerEXT *layers, EGLint max_layers, EGLint *num_layers); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTPORTSEXTPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputPortEXT *ports, EGLint max_ports, EGLint *num_ports); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLOUTPUTLAYERATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib *value); -typedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERSTRINGEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLOUTPUTPORTATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib value); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib *value); -typedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTSTRINGEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint name); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglGetOutputLayersEXT (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputLayerEXT *layers, EGLint max_layers, EGLint *num_layers); -EGLAPI EGLBoolean EGLAPIENTRY eglGetOutputPortsEXT (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputPortEXT *ports, EGLint max_ports, EGLint *num_ports); -EGLAPI EGLBoolean EGLAPIENTRY eglOutputLayerAttribEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryOutputLayerAttribEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib *value); -EGLAPI const char *EGLAPIENTRY eglQueryOutputLayerStringEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name); -EGLAPI EGLBoolean EGLAPIENTRY eglOutputPortAttribEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib value); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryOutputPortAttribEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib *value); -EGLAPI const char *EGLAPIENTRY eglQueryOutputPortStringEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint name); -#endif -#endif /* EGL_EXT_output_base */ - -#ifndef EGL_EXT_output_drm -#define EGL_EXT_output_drm 1 -#define EGL_DRM_CRTC_EXT 0x3234 -#define EGL_DRM_PLANE_EXT 0x3235 -#define EGL_DRM_CONNECTOR_EXT 0x3236 -#endif /* EGL_EXT_output_drm */ - -#ifndef EGL_EXT_output_openwf -#define EGL_EXT_output_openwf 1 -#define EGL_OPENWF_PIPELINE_ID_EXT 0x3238 -#define EGL_OPENWF_PORT_ID_EXT 0x3239 -#endif /* EGL_EXT_output_openwf */ - -#ifndef EGL_EXT_pixel_format_float -#define EGL_EXT_pixel_format_float 1 -#define EGL_COLOR_COMPONENT_TYPE_EXT 0x3339 -#define EGL_COLOR_COMPONENT_TYPE_FIXED_EXT 0x333A -#define EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT 0x333B -#endif /* EGL_EXT_pixel_format_float */ - -#ifndef EGL_EXT_platform_base -#define EGL_EXT_platform_base 1 -typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC) (EGLenum platform, void *native_display, const EGLint *attrib_list); -typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list); -typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplayEXT (EGLenum platform, void *native_display, const EGLint *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list); -#endif -#endif /* EGL_EXT_platform_base */ - -#ifndef EGL_EXT_platform_device -#define EGL_EXT_platform_device 1 -#define EGL_PLATFORM_DEVICE_EXT 0x313F -#endif /* EGL_EXT_platform_device */ - -#ifndef EGL_EXT_platform_wayland -#define EGL_EXT_platform_wayland 1 -#define EGL_PLATFORM_WAYLAND_EXT 0x31D8 -#endif /* EGL_EXT_platform_wayland */ - -#ifndef EGL_EXT_platform_x11 -#define EGL_EXT_platform_x11 1 -#define EGL_PLATFORM_X11_EXT 0x31D5 -#define EGL_PLATFORM_X11_SCREEN_EXT 0x31D6 -#endif /* EGL_EXT_platform_x11 */ - -#ifndef EGL_EXT_protected_content -#define EGL_EXT_protected_content 1 -#define EGL_PROTECTED_CONTENT_EXT 0x32C0 -#endif /* EGL_EXT_protected_content */ - -#ifndef EGL_EXT_protected_surface -#define EGL_EXT_protected_surface 1 -#endif /* EGL_EXT_protected_surface */ - -#ifndef EGL_EXT_stream_consumer_egloutput -#define EGL_EXT_stream_consumer_egloutput 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMEROUTPUTEXTPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerOutputEXT (EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer); -#endif -#endif /* EGL_EXT_stream_consumer_egloutput */ - -#ifndef EGL_EXT_surface_CTA861_3_metadata -#define EGL_EXT_surface_CTA861_3_metadata 1 -#define EGL_CTA861_3_MAX_CONTENT_LIGHT_LEVEL_EXT 0x3360 -#define EGL_CTA861_3_MAX_FRAME_AVERAGE_LEVEL_EXT 0x3361 -#endif /* EGL_EXT_surface_CTA861_3_metadata */ - -#ifndef EGL_EXT_surface_SMPTE2086_metadata -#define EGL_EXT_surface_SMPTE2086_metadata 1 -#define EGL_SMPTE2086_DISPLAY_PRIMARY_RX_EXT 0x3341 -#define EGL_SMPTE2086_DISPLAY_PRIMARY_RY_EXT 0x3342 -#define EGL_SMPTE2086_DISPLAY_PRIMARY_GX_EXT 0x3343 -#define EGL_SMPTE2086_DISPLAY_PRIMARY_GY_EXT 0x3344 -#define EGL_SMPTE2086_DISPLAY_PRIMARY_BX_EXT 0x3345 -#define EGL_SMPTE2086_DISPLAY_PRIMARY_BY_EXT 0x3346 -#define EGL_SMPTE2086_WHITE_POINT_X_EXT 0x3347 -#define EGL_SMPTE2086_WHITE_POINT_Y_EXT 0x3348 -#define EGL_SMPTE2086_MAX_LUMINANCE_EXT 0x3349 -#define EGL_SMPTE2086_MIN_LUMINANCE_EXT 0x334A -#define EGL_METADATA_SCALING_EXT 50000 -#endif /* EGL_EXT_surface_SMPTE2086_metadata */ - -#ifndef EGL_EXT_swap_buffers_with_damage -#define EGL_EXT_swap_buffers_with_damage 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageEXT (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects); -#endif -#endif /* EGL_EXT_swap_buffers_with_damage */ - -#ifndef EGL_EXT_yuv_surface -#define EGL_EXT_yuv_surface 1 -#define EGL_YUV_ORDER_EXT 0x3301 -#define EGL_YUV_NUMBER_OF_PLANES_EXT 0x3311 -#define EGL_YUV_SUBSAMPLE_EXT 0x3312 -#define EGL_YUV_DEPTH_RANGE_EXT 0x3317 -#define EGL_YUV_CSC_STANDARD_EXT 0x330A -#define EGL_YUV_PLANE_BPP_EXT 0x331A -#define EGL_YUV_BUFFER_EXT 0x3300 -#define EGL_YUV_ORDER_YUV_EXT 0x3302 -#define EGL_YUV_ORDER_YVU_EXT 0x3303 -#define EGL_YUV_ORDER_YUYV_EXT 0x3304 -#define EGL_YUV_ORDER_UYVY_EXT 0x3305 -#define EGL_YUV_ORDER_YVYU_EXT 0x3306 -#define EGL_YUV_ORDER_VYUY_EXT 0x3307 -#define EGL_YUV_ORDER_AYUV_EXT 0x3308 -#define EGL_YUV_SUBSAMPLE_4_2_0_EXT 0x3313 -#define EGL_YUV_SUBSAMPLE_4_2_2_EXT 0x3314 -#define EGL_YUV_SUBSAMPLE_4_4_4_EXT 0x3315 -#define EGL_YUV_DEPTH_RANGE_LIMITED_EXT 0x3318 -#define EGL_YUV_DEPTH_RANGE_FULL_EXT 0x3319 -#define EGL_YUV_CSC_STANDARD_601_EXT 0x330B -#define EGL_YUV_CSC_STANDARD_709_EXT 0x330C -#define EGL_YUV_CSC_STANDARD_2020_EXT 0x330D -#define EGL_YUV_PLANE_BPP_0_EXT 0x331B -#define EGL_YUV_PLANE_BPP_8_EXT 0x331C -#define EGL_YUV_PLANE_BPP_10_EXT 0x331D -#endif /* EGL_EXT_yuv_surface */ - -#ifndef EGL_HI_clientpixmap -#define EGL_HI_clientpixmap 1 -struct EGLClientPixmapHI { - void *pData; - EGLint iWidth; - EGLint iHeight; - EGLint iStride; -}; -#define EGL_CLIENT_PIXMAP_POINTER_HI 0x8F74 -typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC) (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI *pixmap); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurfaceHI (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI *pixmap); -#endif -#endif /* EGL_HI_clientpixmap */ - -#ifndef EGL_HI_colorformats -#define EGL_HI_colorformats 1 -#define EGL_COLOR_FORMAT_HI 0x8F70 -#define EGL_COLOR_RGB_HI 0x8F71 -#define EGL_COLOR_RGBA_HI 0x8F72 -#define EGL_COLOR_ARGB_HI 0x8F73 -#endif /* EGL_HI_colorformats */ - -#ifndef EGL_IMG_context_priority -#define EGL_IMG_context_priority 1 -#define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100 -#define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101 -#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102 -#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103 -#endif /* EGL_IMG_context_priority */ - -#ifndef EGL_IMG_image_plane_attribs -#define EGL_IMG_image_plane_attribs 1 -#define EGL_NATIVE_BUFFER_MULTIPLANE_SEPARATE_IMG 0x3105 -#define EGL_NATIVE_BUFFER_PLANE_OFFSET_IMG 0x3106 -#endif /* EGL_IMG_image_plane_attribs */ - -#ifndef EGL_MESA_drm_image -#define EGL_MESA_drm_image 1 -#define EGL_DRM_BUFFER_FORMAT_MESA 0x31D0 -#define EGL_DRM_BUFFER_USE_MESA 0x31D1 -#define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA 0x31D2 -#define EGL_DRM_BUFFER_MESA 0x31D3 -#define EGL_DRM_BUFFER_STRIDE_MESA 0x31D4 -#define EGL_DRM_BUFFER_USE_SCANOUT_MESA 0x00000001 -#define EGL_DRM_BUFFER_USE_SHARE_MESA 0x00000002 -typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESAPROC) (EGLDisplay dpy, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA (EGLDisplay dpy, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride); -#endif -#endif /* EGL_MESA_drm_image */ - -#ifndef EGL_MESA_image_dma_buf_export -#define EGL_MESA_image_dma_buf_export 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDMABUFIMAGEQUERYMESAPROC) (EGLDisplay dpy, EGLImageKHR image, int *fourcc, int *num_planes, EGLuint64KHR *modifiers); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDMABUFIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, int *fds, EGLint *strides, EGLint *offsets); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglExportDMABUFImageQueryMESA (EGLDisplay dpy, EGLImageKHR image, int *fourcc, int *num_planes, EGLuint64KHR *modifiers); -EGLAPI EGLBoolean EGLAPIENTRY eglExportDMABUFImageMESA (EGLDisplay dpy, EGLImageKHR image, int *fds, EGLint *strides, EGLint *offsets); -#endif -#endif /* EGL_MESA_image_dma_buf_export */ - -#ifndef EGL_MESA_platform_gbm -#define EGL_MESA_platform_gbm 1 -#define EGL_PLATFORM_GBM_MESA 0x31D7 -#endif /* EGL_MESA_platform_gbm */ - -#ifndef EGL_MESA_platform_surfaceless -#define EGL_MESA_platform_surfaceless 1 -#define EGL_PLATFORM_SURFACELESS_MESA 0x31DD -#endif /* EGL_MESA_platform_surfaceless */ - -#ifndef EGL_NOK_swap_region -#define EGL_NOK_swap_region 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOKPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegionNOK (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects); -#endif -#endif /* EGL_NOK_swap_region */ - -#ifndef EGL_NOK_swap_region2 -#define EGL_NOK_swap_region2 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGION2NOKPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegion2NOK (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects); -#endif -#endif /* EGL_NOK_swap_region2 */ - -#ifndef EGL_NOK_texture_from_pixmap -#define EGL_NOK_texture_from_pixmap 1 -#define EGL_Y_INVERTED_NOK 0x307F -#endif /* EGL_NOK_texture_from_pixmap */ - -#ifndef EGL_NV_3dvision_surface -#define EGL_NV_3dvision_surface 1 -#define EGL_AUTO_STEREO_NV 0x3136 -#endif /* EGL_NV_3dvision_surface */ - -#ifndef EGL_NV_coverage_sample -#define EGL_NV_coverage_sample 1 -#define EGL_COVERAGE_BUFFERS_NV 0x30E0 -#define EGL_COVERAGE_SAMPLES_NV 0x30E1 -#endif /* EGL_NV_coverage_sample */ - -#ifndef EGL_NV_coverage_sample_resolve -#define EGL_NV_coverage_sample_resolve 1 -#define EGL_COVERAGE_SAMPLE_RESOLVE_NV 0x3131 -#define EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV 0x3132 -#define EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV 0x3133 -#endif /* EGL_NV_coverage_sample_resolve */ - -#ifndef EGL_NV_cuda_event -#define EGL_NV_cuda_event 1 -#define EGL_CUDA_EVENT_HANDLE_NV 0x323B -#define EGL_SYNC_CUDA_EVENT_NV 0x323C -#define EGL_SYNC_CUDA_EVENT_COMPLETE_NV 0x323D -#endif /* EGL_NV_cuda_event */ - -#ifndef EGL_NV_depth_nonlinear -#define EGL_NV_depth_nonlinear 1 -#define EGL_DEPTH_ENCODING_NV 0x30E2 -#define EGL_DEPTH_ENCODING_NONE_NV 0 -#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3 -#endif /* EGL_NV_depth_nonlinear */ - -#ifndef EGL_NV_device_cuda -#define EGL_NV_device_cuda 1 -#define EGL_CUDA_DEVICE_NV 0x323A -#endif /* EGL_NV_device_cuda */ - -#ifndef EGL_NV_native_query -#define EGL_NV_native_query 1 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEDISPLAYNVPROC) (EGLDisplay dpy, EGLNativeDisplayType *display_id); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEWINDOWNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEPIXMAPNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeDisplayNV (EGLDisplay dpy, EGLNativeDisplayType *display_id); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeWindowNV (EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativePixmapNV (EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap); -#endif -#endif /* EGL_NV_native_query */ - -#ifndef EGL_NV_post_convert_rounding -#define EGL_NV_post_convert_rounding 1 -#endif /* EGL_NV_post_convert_rounding */ - -#ifndef EGL_NV_post_sub_buffer -#define EGL_NV_post_sub_buffer 1 -#define EGL_POST_SUB_BUFFER_SUPPORTED_NV 0x30BE -typedef EGLBoolean (EGLAPIENTRYP PFNEGLPOSTSUBBUFFERNVPROC) (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglPostSubBufferNV (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height); -#endif -#endif /* EGL_NV_post_sub_buffer */ - -#ifndef EGL_NV_robustness_video_memory_purge -#define EGL_NV_robustness_video_memory_purge 1 -#define EGL_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV 0x334C -#endif /* EGL_NV_robustness_video_memory_purge */ - -#ifndef EGL_NV_stream_consumer_gltexture_yuv -#define EGL_NV_stream_consumer_gltexture_yuv 1 -#define EGL_YUV_PLANE0_TEXTURE_UNIT_NV 0x332C -#define EGL_YUV_PLANE1_TEXTURE_UNIT_NV 0x332D -#define EGL_YUV_PLANE2_TEXTURE_UNIT_NV 0x332E -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALATTRIBSNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLAttrib *attrib_list); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalAttribsNV (EGLDisplay dpy, EGLStreamKHR stream, EGLAttrib *attrib_list); -#endif -#endif /* EGL_NV_stream_consumer_gltexture_yuv */ - -#ifndef EGL_NV_stream_cross_display -#define EGL_NV_stream_cross_display 1 -#define EGL_STREAM_CROSS_DISPLAY_NV 0x334E -#endif /* EGL_NV_stream_cross_display */ - -#ifndef EGL_NV_stream_cross_object -#define EGL_NV_stream_cross_object 1 -#define EGL_STREAM_CROSS_OBJECT_NV 0x334D -#endif /* EGL_NV_stream_cross_object */ - -#ifndef EGL_NV_stream_cross_partition -#define EGL_NV_stream_cross_partition 1 -#define EGL_STREAM_CROSS_PARTITION_NV 0x323F -#endif /* EGL_NV_stream_cross_partition */ - -#ifndef EGL_NV_stream_cross_process -#define EGL_NV_stream_cross_process 1 -#define EGL_STREAM_CROSS_PROCESS_NV 0x3245 -#endif /* EGL_NV_stream_cross_process */ - -#ifndef EGL_NV_stream_cross_system -#define EGL_NV_stream_cross_system 1 -#define EGL_STREAM_CROSS_SYSTEM_NV 0x334F -#endif /* EGL_NV_stream_cross_system */ - -#ifndef EGL_NV_stream_fifo_next -#define EGL_NV_stream_fifo_next 1 -#define EGL_PENDING_FRAME_NV 0x3329 -#define EGL_STREAM_TIME_PENDING_NV 0x332A -#endif /* EGL_NV_stream_fifo_next */ - -#ifndef EGL_NV_stream_fifo_synchronous -#define EGL_NV_stream_fifo_synchronous 1 -#define EGL_STREAM_FIFO_SYNCHRONOUS_NV 0x3336 -#endif /* EGL_NV_stream_fifo_synchronous */ - -#ifndef EGL_NV_stream_frame_limits -#define EGL_NV_stream_frame_limits 1 -#define EGL_PRODUCER_MAX_FRAME_HINT_NV 0x3337 -#define EGL_CONSUMER_MAX_FRAME_HINT_NV 0x3338 -#endif /* EGL_NV_stream_frame_limits */ - -#ifndef EGL_NV_stream_metadata -#define EGL_NV_stream_metadata 1 -#define EGL_MAX_STREAM_METADATA_BLOCKS_NV 0x3250 -#define EGL_MAX_STREAM_METADATA_BLOCK_SIZE_NV 0x3251 -#define EGL_MAX_STREAM_METADATA_TOTAL_SIZE_NV 0x3252 -#define EGL_PRODUCER_METADATA_NV 0x3253 -#define EGL_CONSUMER_METADATA_NV 0x3254 -#define EGL_PENDING_METADATA_NV 0x3328 -#define EGL_METADATA0_SIZE_NV 0x3255 -#define EGL_METADATA1_SIZE_NV 0x3256 -#define EGL_METADATA2_SIZE_NV 0x3257 -#define EGL_METADATA3_SIZE_NV 0x3258 -#define EGL_METADATA0_TYPE_NV 0x3259 -#define EGL_METADATA1_TYPE_NV 0x325A -#define EGL_METADATA2_TYPE_NV 0x325B -#define EGL_METADATA3_TYPE_NV 0x325C -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDISPLAYATTRIBNVPROC) (EGLDisplay dpy, EGLint attribute, EGLAttrib *value); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETSTREAMMETADATANVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLint n, EGLint offset, EGLint size, const void *data); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMMETADATANVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum name, EGLint n, EGLint offset, EGLint size, void *data); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribNV (EGLDisplay dpy, EGLint attribute, EGLAttrib *value); -EGLAPI EGLBoolean EGLAPIENTRY eglSetStreamMetadataNV (EGLDisplay dpy, EGLStreamKHR stream, EGLint n, EGLint offset, EGLint size, const void *data); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamMetadataNV (EGLDisplay dpy, EGLStreamKHR stream, EGLenum name, EGLint n, EGLint offset, EGLint size, void *data); -#endif -#endif /* EGL_NV_stream_metadata */ - -#ifndef EGL_NV_stream_remote -#define EGL_NV_stream_remote 1 -#define EGL_STREAM_STATE_INITIALIZING_NV 0x3240 -#define EGL_STREAM_TYPE_NV 0x3241 -#define EGL_STREAM_PROTOCOL_NV 0x3242 -#define EGL_STREAM_ENDPOINT_NV 0x3243 -#define EGL_STREAM_LOCAL_NV 0x3244 -#define EGL_STREAM_PRODUCER_NV 0x3247 -#define EGL_STREAM_CONSUMER_NV 0x3248 -#define EGL_STREAM_PROTOCOL_FD_NV 0x3246 -#endif /* EGL_NV_stream_remote */ - -#ifndef EGL_NV_stream_reset -#define EGL_NV_stream_reset 1 -#define EGL_SUPPORT_RESET_NV 0x3334 -#define EGL_SUPPORT_REUSE_NV 0x3335 -typedef EGLBoolean (EGLAPIENTRYP PFNEGLRESETSTREAMNVPROC) (EGLDisplay dpy, EGLStreamKHR stream); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglResetStreamNV (EGLDisplay dpy, EGLStreamKHR stream); -#endif -#endif /* EGL_NV_stream_reset */ - -#ifndef EGL_NV_stream_socket -#define EGL_NV_stream_socket 1 -#define EGL_STREAM_PROTOCOL_SOCKET_NV 0x324B -#define EGL_SOCKET_HANDLE_NV 0x324C -#define EGL_SOCKET_TYPE_NV 0x324D -#endif /* EGL_NV_stream_socket */ - -#ifndef EGL_NV_stream_socket_inet -#define EGL_NV_stream_socket_inet 1 -#define EGL_SOCKET_TYPE_INET_NV 0x324F -#endif /* EGL_NV_stream_socket_inet */ - -#ifndef EGL_NV_stream_socket_unix -#define EGL_NV_stream_socket_unix 1 -#define EGL_SOCKET_TYPE_UNIX_NV 0x324E -#endif /* EGL_NV_stream_socket_unix */ - -#ifndef EGL_NV_stream_sync -#define EGL_NV_stream_sync 1 -#define EGL_SYNC_NEW_FRAME_NV 0x321F -typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESTREAMSYNCNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum type, const EGLint *attrib_list); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateStreamSyncNV (EGLDisplay dpy, EGLStreamKHR stream, EGLenum type, const EGLint *attrib_list); -#endif -#endif /* EGL_NV_stream_sync */ - -#ifndef EGL_NV_sync -#define EGL_NV_sync 1 -typedef void *EGLSyncNV; -typedef khronos_utime_nanoseconds_t EGLTimeNV; -#ifdef KHRONOS_SUPPORT_INT64 -#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6 -#define EGL_SYNC_STATUS_NV 0x30E7 -#define EGL_SIGNALED_NV 0x30E8 -#define EGL_UNSIGNALED_NV 0x30E9 -#define EGL_SYNC_FLUSH_COMMANDS_BIT_NV 0x0001 -#define EGL_FOREVER_NV 0xFFFFFFFFFFFFFFFFull -#define EGL_ALREADY_SIGNALED_NV 0x30EA -#define EGL_TIMEOUT_EXPIRED_NV 0x30EB -#define EGL_CONDITION_SATISFIED_NV 0x30EC -#define EGL_SYNC_TYPE_NV 0x30ED -#define EGL_SYNC_CONDITION_NV 0x30EE -#define EGL_SYNC_FENCE_NV 0x30EF -#define EGL_NO_SYNC_NV EGL_CAST(EGLSyncNV,0) -typedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync); -typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSyncNV EGLAPIENTRY eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncNV (EGLSyncNV sync); -EGLAPI EGLBoolean EGLAPIENTRY eglFenceNV (EGLSyncNV sync); -EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout); -EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncNV (EGLSyncNV sync, EGLenum mode); -EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value); -#endif -#endif /* KHRONOS_SUPPORT_INT64 */ -#endif /* EGL_NV_sync */ - -#ifndef EGL_NV_system_time -#define EGL_NV_system_time 1 -typedef khronos_utime_nanoseconds_t EGLuint64NV; -#ifdef KHRONOS_SUPPORT_INT64 -typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC) (void); -typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMENVPROC) (void); -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeFrequencyNV (void); -EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV (void); -#endif -#endif /* KHRONOS_SUPPORT_INT64 */ -#endif /* EGL_NV_system_time */ - -#ifndef EGL_TIZEN_image_native_buffer -#define EGL_TIZEN_image_native_buffer 1 -#define EGL_NATIVE_BUFFER_TIZEN 0x32A0 -#endif /* EGL_TIZEN_image_native_buffer */ - -#ifndef EGL_TIZEN_image_native_surface -#define EGL_TIZEN_image_native_surface 1 -#define EGL_NATIVE_SURFACE_TIZEN 0x32A1 -#endif /* EGL_TIZEN_image_native_surface */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/emscripten/include/pvrsdk/EGL/eglplatform.h b/emscripten/include/pvrsdk/EGL/eglplatform.h deleted file mode 100644 index 4fd279dd..00000000 --- a/emscripten/include/pvrsdk/EGL/eglplatform.h +++ /dev/null @@ -1,143 +0,0 @@ -#ifndef __eglplatform_h_ -#define __eglplatform_h_ - -/* -** Copyright (c) 2007-2016 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in 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, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER 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. -*/ - -/* Platform-specific types and definitions for egl.h - * $Revision: 30994 $ on $Date: 2015-04-30 13:36:48 -0700 (Thu, 30 Apr 2015) $ - * - * Adopters may modify khrplatform.h and this file to suit their platform. - * You are encouraged to submit all modifications to the Khronos group so that - * they can be included in future versions of this file. Please submit changes - * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) - * by filing a bug against product "EGL" component "Registry". - */ - -#include "KHR/khrplatform.h" - -/* Macros used in EGL function prototype declarations. - * - * EGL functions should be prototyped as: - * - * EGLAPI return-type EGLAPIENTRY eglFunction(arguments); - * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments); - * - * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h - */ - -#ifndef EGLAPI -#define EGLAPI KHRONOS_APICALL -#endif - -#ifndef EGLAPIENTRY -#define EGLAPIENTRY KHRONOS_APIENTRY -#endif -#define EGLAPIENTRYP EGLAPIENTRY* - -/* The types NativeDisplayType, NativeWindowType, and NativePixmapType - * are aliases of window-system-dependent types, such as X Display * or - * Windows Device Context. They must be defined in platform-specific - * code below. The EGL-prefixed versions of Native*Type are the same - * types, renamed in EGL 1.3 so all types in the API start with "EGL". - * - * Khronos STRONGLY RECOMMENDS that you use the default definitions - * provided below, since these changes affect both binary and source - * portability of applications using EGL running on different EGL - * implementations. - */ - -#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */ -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN 1 -#endif -#include - -typedef HDC EGLNativeDisplayType; -typedef HBITMAP EGLNativePixmapType; -typedef HWND EGLNativeWindowType; - -#elif defined(__APPLE__) || defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */ - -typedef int EGLNativeDisplayType; -typedef void *EGLNativeWindowType; -typedef void *EGLNativePixmapType; - -#elif defined(__ANDROID__) || defined(ANDROID) - -#include - -struct egl_native_pixmap_t; - -typedef struct ANativeWindow* EGLNativeWindowType; -typedef struct egl_native_pixmap_t* EGLNativePixmapType; -typedef void* EGLNativeDisplayType; - -#elif defined(SUPPORT_X11) - -/* X11 (tentative) */ -#include -#include - -typedef Display *EGLNativeDisplayType; -typedef Pixmap EGLNativePixmapType; -typedef Window EGLNativeWindowType; - -#else - -#if defined(_WIN64) || __WORDSIZE == 64 -typedef khronos_int64_t EGLNativeDisplayType; -#else -typedef int EGLNativeDisplayType; -#endif - -typedef void *EGLNativeWindowType; -typedef void *EGLNativePixmapType; - - -#endif - -/* EGL 1.2 types, renamed for consistency in EGL 1.3 */ -typedef EGLNativeDisplayType NativeDisplayType; -typedef EGLNativePixmapType NativePixmapType; -typedef EGLNativeWindowType NativeWindowType; - - -/* Define EGLint. This must be a signed integral type large enough to contain - * all legal attribute names and values passed into and out of EGL, whether - * their type is boolean, bitmask, enumerant (symbolic constant), integer, - * handle, or other. While in general a 32-bit integer will suffice, if - * handles are 64 bit types, then EGLint should be defined as a signed 64-bit - * integer type. - */ -typedef khronos_int32_t EGLint; - - -/* C++ / C typecast macros for special EGL handle values */ -#if defined(__cplusplus) -#define EGL_CAST(type, value) (static_cast(value)) -#else -#define EGL_CAST(type, value) ((type) (value)) -#endif - -#endif /* __eglplatform_h */ diff --git a/emscripten/include/pvrsdk/GLES/egl.h b/emscripten/include/pvrsdk/GLES/egl.h deleted file mode 100644 index 86f644c9..00000000 --- a/emscripten/include/pvrsdk/GLES/egl.h +++ /dev/null @@ -1,29 +0,0 @@ -/* -** Copyright (c) 2008-2017 The Khronos Group Inc. -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -/* - * Skeleton egl.h to provide compatibility for early GLES 1.0 - * applications. Several early implementations included gl.h - * in egl.h leading applications to include only egl.h - */ - -#ifndef __legacy_egl_h_ -#define __legacy_egl_h_ - -#include -#include - -#endif /* __legacy_egl_h_ */ diff --git a/emscripten/include/pvrsdk/GLES/gl.h b/emscripten/include/pvrsdk/GLES/gl.h deleted file mode 100644 index df2cc4f9..00000000 --- a/emscripten/include/pvrsdk/GLES/gl.h +++ /dev/null @@ -1,586 +0,0 @@ -#ifndef __gl_h_ -#define __gl_h_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2013-2017 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in 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, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER 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. -*/ -/* -** This header is generated from the Khronos OpenGL / OpenGL ES XML -** API Registry. The current version of the Registry, generator scripts -** used to make the header, and the header can be found at -** https://github.com/KhronosGroup/OpenGL-Registry -*/ - -#include - -/* Generated on date 20170209 */ - -/* Generated C header for: - * API: gles1 - * Profile: common - * Versions considered: .* - * Versions emitted: .* - * Default extensions included: None - * Additional extensions included: ^(GL_OES_read_format|GL_OES_compressed_paletted_texture|GL_OES_point_size_array|GL_OES_point_sprite)$ - * Extensions removed: _nomatch_^ - */ - -#ifndef GL_VERSION_ES_CM_1_0 -#define GL_VERSION_ES_CM_1_0 1 -typedef void GLvoid; -typedef unsigned int GLenum; -#include -typedef khronos_float_t GLfloat; -typedef khronos_int32_t GLfixed; -typedef unsigned int GLuint; -typedef khronos_ssize_t GLsizeiptr; -typedef khronos_intptr_t GLintptr; -typedef unsigned int GLbitfield; -typedef int GLint; -typedef khronos_uint8_t GLubyte; -typedef unsigned char GLboolean; -typedef int GLsizei; -typedef khronos_int32_t GLclampx; -#define GL_VERSION_ES_CL_1_0 1 -#define GL_VERSION_ES_CM_1_1 1 -#define GL_VERSION_ES_CL_1_1 1 -#define GL_DEPTH_BUFFER_BIT 0x00000100 -#define GL_STENCIL_BUFFER_BIT 0x00000400 -#define GL_COLOR_BUFFER_BIT 0x00004000 -#define GL_FALSE 0 -#define GL_TRUE 1 -#define GL_POINTS 0x0000 -#define GL_LINES 0x0001 -#define GL_LINE_LOOP 0x0002 -#define GL_LINE_STRIP 0x0003 -#define GL_TRIANGLES 0x0004 -#define GL_TRIANGLE_STRIP 0x0005 -#define GL_TRIANGLE_FAN 0x0006 -#define GL_NEVER 0x0200 -#define GL_LESS 0x0201 -#define GL_EQUAL 0x0202 -#define GL_LEQUAL 0x0203 -#define GL_GREATER 0x0204 -#define GL_NOTEQUAL 0x0205 -#define GL_GEQUAL 0x0206 -#define GL_ALWAYS 0x0207 -#define GL_ZERO 0 -#define GL_ONE 1 -#define GL_SRC_COLOR 0x0300 -#define GL_ONE_MINUS_SRC_COLOR 0x0301 -#define GL_SRC_ALPHA 0x0302 -#define GL_ONE_MINUS_SRC_ALPHA 0x0303 -#define GL_DST_ALPHA 0x0304 -#define GL_ONE_MINUS_DST_ALPHA 0x0305 -#define GL_DST_COLOR 0x0306 -#define GL_ONE_MINUS_DST_COLOR 0x0307 -#define GL_SRC_ALPHA_SATURATE 0x0308 -#define GL_CLIP_PLANE0 0x3000 -#define GL_CLIP_PLANE1 0x3001 -#define GL_CLIP_PLANE2 0x3002 -#define GL_CLIP_PLANE3 0x3003 -#define GL_CLIP_PLANE4 0x3004 -#define GL_CLIP_PLANE5 0x3005 -#define GL_FRONT 0x0404 -#define GL_BACK 0x0405 -#define GL_FRONT_AND_BACK 0x0408 -#define GL_FOG 0x0B60 -#define GL_LIGHTING 0x0B50 -#define GL_TEXTURE_2D 0x0DE1 -#define GL_CULL_FACE 0x0B44 -#define GL_ALPHA_TEST 0x0BC0 -#define GL_BLEND 0x0BE2 -#define GL_COLOR_LOGIC_OP 0x0BF2 -#define GL_DITHER 0x0BD0 -#define GL_STENCIL_TEST 0x0B90 -#define GL_DEPTH_TEST 0x0B71 -#define GL_POINT_SMOOTH 0x0B10 -#define GL_LINE_SMOOTH 0x0B20 -#define GL_SCISSOR_TEST 0x0C11 -#define GL_COLOR_MATERIAL 0x0B57 -#define GL_NORMALIZE 0x0BA1 -#define GL_RESCALE_NORMAL 0x803A -#define GL_VERTEX_ARRAY 0x8074 -#define GL_NORMAL_ARRAY 0x8075 -#define GL_COLOR_ARRAY 0x8076 -#define GL_TEXTURE_COORD_ARRAY 0x8078 -#define GL_MULTISAMPLE 0x809D -#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE 0x809F -#define GL_SAMPLE_COVERAGE 0x80A0 -#define GL_NO_ERROR 0 -#define GL_INVALID_ENUM 0x0500 -#define GL_INVALID_VALUE 0x0501 -#define GL_INVALID_OPERATION 0x0502 -#define GL_STACK_OVERFLOW 0x0503 -#define GL_STACK_UNDERFLOW 0x0504 -#define GL_OUT_OF_MEMORY 0x0505 -#define GL_EXP 0x0800 -#define GL_EXP2 0x0801 -#define GL_FOG_DENSITY 0x0B62 -#define GL_FOG_START 0x0B63 -#define GL_FOG_END 0x0B64 -#define GL_FOG_MODE 0x0B65 -#define GL_FOG_COLOR 0x0B66 -#define GL_CW 0x0900 -#define GL_CCW 0x0901 -#define GL_CURRENT_COLOR 0x0B00 -#define GL_CURRENT_NORMAL 0x0B02 -#define GL_CURRENT_TEXTURE_COORDS 0x0B03 -#define GL_POINT_SIZE 0x0B11 -#define GL_POINT_SIZE_MIN 0x8126 -#define GL_POINT_SIZE_MAX 0x8127 -#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 -#define GL_POINT_DISTANCE_ATTENUATION 0x8129 -#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 -#define GL_LINE_WIDTH 0x0B21 -#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 -#define GL_ALIASED_POINT_SIZE_RANGE 0x846D -#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E -#define GL_CULL_FACE_MODE 0x0B45 -#define GL_FRONT_FACE 0x0B46 -#define GL_SHADE_MODEL 0x0B54 -#define GL_DEPTH_RANGE 0x0B70 -#define GL_DEPTH_WRITEMASK 0x0B72 -#define GL_DEPTH_CLEAR_VALUE 0x0B73 -#define GL_DEPTH_FUNC 0x0B74 -#define GL_STENCIL_CLEAR_VALUE 0x0B91 -#define GL_STENCIL_FUNC 0x0B92 -#define GL_STENCIL_VALUE_MASK 0x0B93 -#define GL_STENCIL_FAIL 0x0B94 -#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 -#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 -#define GL_STENCIL_REF 0x0B97 -#define GL_STENCIL_WRITEMASK 0x0B98 -#define GL_MATRIX_MODE 0x0BA0 -#define GL_VIEWPORT 0x0BA2 -#define GL_MODELVIEW_STACK_DEPTH 0x0BA3 -#define GL_PROJECTION_STACK_DEPTH 0x0BA4 -#define GL_TEXTURE_STACK_DEPTH 0x0BA5 -#define GL_MODELVIEW_MATRIX 0x0BA6 -#define GL_PROJECTION_MATRIX 0x0BA7 -#define GL_TEXTURE_MATRIX 0x0BA8 -#define GL_ALPHA_TEST_FUNC 0x0BC1 -#define GL_ALPHA_TEST_REF 0x0BC2 -#define GL_BLEND_DST 0x0BE0 -#define GL_BLEND_SRC 0x0BE1 -#define GL_LOGIC_OP_MODE 0x0BF0 -#define GL_SCISSOR_BOX 0x0C10 -#define GL_COLOR_CLEAR_VALUE 0x0C22 -#define GL_COLOR_WRITEMASK 0x0C23 -#define GL_MAX_LIGHTS 0x0D31 -#define GL_MAX_CLIP_PLANES 0x0D32 -#define GL_MAX_TEXTURE_SIZE 0x0D33 -#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36 -#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38 -#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39 -#define GL_MAX_VIEWPORT_DIMS 0x0D3A -#define GL_MAX_TEXTURE_UNITS 0x84E2 -#define GL_SUBPIXEL_BITS 0x0D50 -#define GL_RED_BITS 0x0D52 -#define GL_GREEN_BITS 0x0D53 -#define GL_BLUE_BITS 0x0D54 -#define GL_ALPHA_BITS 0x0D55 -#define GL_DEPTH_BITS 0x0D56 -#define GL_STENCIL_BITS 0x0D57 -#define GL_POLYGON_OFFSET_UNITS 0x2A00 -#define GL_POLYGON_OFFSET_FILL 0x8037 -#define GL_POLYGON_OFFSET_FACTOR 0x8038 -#define GL_TEXTURE_BINDING_2D 0x8069 -#define GL_VERTEX_ARRAY_SIZE 0x807A -#define GL_VERTEX_ARRAY_TYPE 0x807B -#define GL_VERTEX_ARRAY_STRIDE 0x807C -#define GL_NORMAL_ARRAY_TYPE 0x807E -#define GL_NORMAL_ARRAY_STRIDE 0x807F -#define GL_COLOR_ARRAY_SIZE 0x8081 -#define GL_COLOR_ARRAY_TYPE 0x8082 -#define GL_COLOR_ARRAY_STRIDE 0x8083 -#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088 -#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089 -#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A -#define GL_VERTEX_ARRAY_POINTER 0x808E -#define GL_NORMAL_ARRAY_POINTER 0x808F -#define GL_COLOR_ARRAY_POINTER 0x8090 -#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092 -#define GL_SAMPLE_BUFFERS 0x80A8 -#define GL_SAMPLES 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT 0x80AB -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 -#define GL_DONT_CARE 0x1100 -#define GL_FASTEST 0x1101 -#define GL_NICEST 0x1102 -#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50 -#define GL_POINT_SMOOTH_HINT 0x0C51 -#define GL_LINE_SMOOTH_HINT 0x0C52 -#define GL_FOG_HINT 0x0C54 -#define GL_GENERATE_MIPMAP_HINT 0x8192 -#define GL_LIGHT_MODEL_AMBIENT 0x0B53 -#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52 -#define GL_AMBIENT 0x1200 -#define GL_DIFFUSE 0x1201 -#define GL_SPECULAR 0x1202 -#define GL_POSITION 0x1203 -#define GL_SPOT_DIRECTION 0x1204 -#define GL_SPOT_EXPONENT 0x1205 -#define GL_SPOT_CUTOFF 0x1206 -#define GL_CONSTANT_ATTENUATION 0x1207 -#define GL_LINEAR_ATTENUATION 0x1208 -#define GL_QUADRATIC_ATTENUATION 0x1209 -#define GL_BYTE 0x1400 -#define GL_UNSIGNED_BYTE 0x1401 -#define GL_SHORT 0x1402 -#define GL_UNSIGNED_SHORT 0x1403 -#define GL_FLOAT 0x1406 -#define GL_FIXED 0x140C -#define GL_CLEAR 0x1500 -#define GL_AND 0x1501 -#define GL_AND_REVERSE 0x1502 -#define GL_COPY 0x1503 -#define GL_AND_INVERTED 0x1504 -#define GL_NOOP 0x1505 -#define GL_XOR 0x1506 -#define GL_OR 0x1507 -#define GL_NOR 0x1508 -#define GL_EQUIV 0x1509 -#define GL_INVERT 0x150A -#define GL_OR_REVERSE 0x150B -#define GL_COPY_INVERTED 0x150C -#define GL_OR_INVERTED 0x150D -#define GL_NAND 0x150E -#define GL_SET 0x150F -#define GL_EMISSION 0x1600 -#define GL_SHININESS 0x1601 -#define GL_AMBIENT_AND_DIFFUSE 0x1602 -#define GL_MODELVIEW 0x1700 -#define GL_PROJECTION 0x1701 -#define GL_TEXTURE 0x1702 -#define GL_ALPHA 0x1906 -#define GL_RGB 0x1907 -#define GL_RGBA 0x1908 -#define GL_LUMINANCE 0x1909 -#define GL_LUMINANCE_ALPHA 0x190A -#define GL_UNPACK_ALIGNMENT 0x0CF5 -#define GL_PACK_ALIGNMENT 0x0D05 -#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 -#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 -#define GL_UNSIGNED_SHORT_5_6_5 0x8363 -#define GL_FLAT 0x1D00 -#define GL_SMOOTH 0x1D01 -#define GL_KEEP 0x1E00 -#define GL_REPLACE 0x1E01 -#define GL_INCR 0x1E02 -#define GL_DECR 0x1E03 -#define GL_VENDOR 0x1F00 -#define GL_RENDERER 0x1F01 -#define GL_VERSION 0x1F02 -#define GL_EXTENSIONS 0x1F03 -#define GL_MODULATE 0x2100 -#define GL_DECAL 0x2101 -#define GL_ADD 0x0104 -#define GL_TEXTURE_ENV_MODE 0x2200 -#define GL_TEXTURE_ENV_COLOR 0x2201 -#define GL_TEXTURE_ENV 0x2300 -#define GL_NEAREST 0x2600 -#define GL_LINEAR 0x2601 -#define GL_NEAREST_MIPMAP_NEAREST 0x2700 -#define GL_LINEAR_MIPMAP_NEAREST 0x2701 -#define GL_NEAREST_MIPMAP_LINEAR 0x2702 -#define GL_LINEAR_MIPMAP_LINEAR 0x2703 -#define GL_TEXTURE_MAG_FILTER 0x2800 -#define GL_TEXTURE_MIN_FILTER 0x2801 -#define GL_TEXTURE_WRAP_S 0x2802 -#define GL_TEXTURE_WRAP_T 0x2803 -#define GL_GENERATE_MIPMAP 0x8191 -#define GL_TEXTURE0 0x84C0 -#define GL_TEXTURE1 0x84C1 -#define GL_TEXTURE2 0x84C2 -#define GL_TEXTURE3 0x84C3 -#define GL_TEXTURE4 0x84C4 -#define GL_TEXTURE5 0x84C5 -#define GL_TEXTURE6 0x84C6 -#define GL_TEXTURE7 0x84C7 -#define GL_TEXTURE8 0x84C8 -#define GL_TEXTURE9 0x84C9 -#define GL_TEXTURE10 0x84CA -#define GL_TEXTURE11 0x84CB -#define GL_TEXTURE12 0x84CC -#define GL_TEXTURE13 0x84CD -#define GL_TEXTURE14 0x84CE -#define GL_TEXTURE15 0x84CF -#define GL_TEXTURE16 0x84D0 -#define GL_TEXTURE17 0x84D1 -#define GL_TEXTURE18 0x84D2 -#define GL_TEXTURE19 0x84D3 -#define GL_TEXTURE20 0x84D4 -#define GL_TEXTURE21 0x84D5 -#define GL_TEXTURE22 0x84D6 -#define GL_TEXTURE23 0x84D7 -#define GL_TEXTURE24 0x84D8 -#define GL_TEXTURE25 0x84D9 -#define GL_TEXTURE26 0x84DA -#define GL_TEXTURE27 0x84DB -#define GL_TEXTURE28 0x84DC -#define GL_TEXTURE29 0x84DD -#define GL_TEXTURE30 0x84DE -#define GL_TEXTURE31 0x84DF -#define GL_ACTIVE_TEXTURE 0x84E0 -#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 -#define GL_REPEAT 0x2901 -#define GL_CLAMP_TO_EDGE 0x812F -#define GL_LIGHT0 0x4000 -#define GL_LIGHT1 0x4001 -#define GL_LIGHT2 0x4002 -#define GL_LIGHT3 0x4003 -#define GL_LIGHT4 0x4004 -#define GL_LIGHT5 0x4005 -#define GL_LIGHT6 0x4006 -#define GL_LIGHT7 0x4007 -#define GL_ARRAY_BUFFER 0x8892 -#define GL_ELEMENT_ARRAY_BUFFER 0x8893 -#define GL_ARRAY_BUFFER_BINDING 0x8894 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 -#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896 -#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897 -#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898 -#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A -#define GL_STATIC_DRAW 0x88E4 -#define GL_DYNAMIC_DRAW 0x88E8 -#define GL_BUFFER_SIZE 0x8764 -#define GL_BUFFER_USAGE 0x8765 -#define GL_SUBTRACT 0x84E7 -#define GL_COMBINE 0x8570 -#define GL_COMBINE_RGB 0x8571 -#define GL_COMBINE_ALPHA 0x8572 -#define GL_RGB_SCALE 0x8573 -#define GL_ADD_SIGNED 0x8574 -#define GL_INTERPOLATE 0x8575 -#define GL_CONSTANT 0x8576 -#define GL_PRIMARY_COLOR 0x8577 -#define GL_PREVIOUS 0x8578 -#define GL_OPERAND0_RGB 0x8590 -#define GL_OPERAND1_RGB 0x8591 -#define GL_OPERAND2_RGB 0x8592 -#define GL_OPERAND0_ALPHA 0x8598 -#define GL_OPERAND1_ALPHA 0x8599 -#define GL_OPERAND2_ALPHA 0x859A -#define GL_ALPHA_SCALE 0x0D1C -#define GL_SRC0_RGB 0x8580 -#define GL_SRC1_RGB 0x8581 -#define GL_SRC2_RGB 0x8582 -#define GL_SRC0_ALPHA 0x8588 -#define GL_SRC1_ALPHA 0x8589 -#define GL_SRC2_ALPHA 0x858A -#define GL_DOT3_RGB 0x86AE -#define GL_DOT3_RGBA 0x86AF -GL_API void GL_APIENTRY glAlphaFunc (GLenum func, GLfloat ref); -GL_API void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -GL_API void GL_APIENTRY glClearDepthf (GLfloat d); -GL_API void GL_APIENTRY glClipPlanef (GLenum p, const GLfloat *eqn); -GL_API void GL_APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -GL_API void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f); -GL_API void GL_APIENTRY glFogf (GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glFogfv (GLenum pname, const GLfloat *params); -GL_API void GL_APIENTRY glFrustumf (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); -GL_API void GL_APIENTRY glGetClipPlanef (GLenum plane, GLfloat *equation); -GL_API void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data); -GL_API void GL_APIENTRY glGetLightfv (GLenum light, GLenum pname, GLfloat *params); -GL_API void GL_APIENTRY glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params); -GL_API void GL_APIENTRY glGetTexEnvfv (GLenum target, GLenum pname, GLfloat *params); -GL_API void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); -GL_API void GL_APIENTRY glLightModelf (GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glLightModelfv (GLenum pname, const GLfloat *params); -GL_API void GL_APIENTRY glLightf (GLenum light, GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params); -GL_API void GL_APIENTRY glLineWidth (GLfloat width); -GL_API void GL_APIENTRY glLoadMatrixf (const GLfloat *m); -GL_API void GL_APIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params); -GL_API void GL_APIENTRY glMultMatrixf (const GLfloat *m); -GL_API void GL_APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -GL_API void GL_APIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz); -GL_API void GL_APIENTRY glOrthof (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); -GL_API void GL_APIENTRY glPointParameterf (GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params); -GL_API void GL_APIENTRY glPointSize (GLfloat size); -GL_API void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); -GL_API void GL_APIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z); -GL_API void GL_APIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z); -GL_API void GL_APIENTRY glTexEnvf (GLenum target, GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params); -GL_API void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); -GL_API void GL_APIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z); -GL_API void GL_APIENTRY glActiveTexture (GLenum texture); -GL_API void GL_APIENTRY glAlphaFuncx (GLenum func, GLfixed ref); -GL_API void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); -GL_API void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); -GL_API void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); -GL_API void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage); -GL_API void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); -GL_API void GL_APIENTRY glClear (GLbitfield mask); -GL_API void GL_APIENTRY glClearColorx (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); -GL_API void GL_APIENTRY glClearDepthx (GLfixed depth); -GL_API void GL_APIENTRY glClearStencil (GLint s); -GL_API void GL_APIENTRY glClientActiveTexture (GLenum texture); -GL_API void GL_APIENTRY glClipPlanex (GLenum plane, const GLfixed *equation); -GL_API void GL_APIENTRY glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); -GL_API void GL_APIENTRY glColor4x (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); -GL_API void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -GL_API void GL_APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const void *pointer); -GL_API void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); -GL_API void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); -GL_API void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GL_API void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GL_API void GL_APIENTRY glCullFace (GLenum mode); -GL_API void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); -GL_API void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures); -GL_API void GL_APIENTRY glDepthFunc (GLenum func); -GL_API void GL_APIENTRY glDepthMask (GLboolean flag); -GL_API void GL_APIENTRY glDepthRangex (GLfixed n, GLfixed f); -GL_API void GL_APIENTRY glDisable (GLenum cap); -GL_API void GL_APIENTRY glDisableClientState (GLenum array); -GL_API void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); -GL_API void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices); -GL_API void GL_APIENTRY glEnable (GLenum cap); -GL_API void GL_APIENTRY glEnableClientState (GLenum array); -GL_API void GL_APIENTRY glFinish (void); -GL_API void GL_APIENTRY glFlush (void); -GL_API void GL_APIENTRY glFogx (GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glFogxv (GLenum pname, const GLfixed *param); -GL_API void GL_APIENTRY glFrontFace (GLenum mode); -GL_API void GL_APIENTRY glFrustumx (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f); -GL_API void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data); -GL_API void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); -GL_API void GL_APIENTRY glGetClipPlanex (GLenum plane, GLfixed *equation); -GL_API void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); -GL_API void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures); -GL_API GLenum GL_APIENTRY glGetError (void); -GL_API void GL_APIENTRY glGetFixedv (GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data); -GL_API void GL_APIENTRY glGetLightxv (GLenum light, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetMaterialxv (GLenum face, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetPointerv (GLenum pname, void **params); -GL_API const GLubyte *GL_APIENTRY glGetString (GLenum name); -GL_API void GL_APIENTRY glGetTexEnviv (GLenum target, GLenum pname, GLint *params); -GL_API void GL_APIENTRY glGetTexEnvxv (GLenum target, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); -GL_API void GL_APIENTRY glGetTexParameterxv (GLenum target, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glHint (GLenum target, GLenum mode); -GL_API GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); -GL_API GLboolean GL_APIENTRY glIsEnabled (GLenum cap); -GL_API GLboolean GL_APIENTRY glIsTexture (GLuint texture); -GL_API void GL_APIENTRY glLightModelx (GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glLightModelxv (GLenum pname, const GLfixed *param); -GL_API void GL_APIENTRY glLightx (GLenum light, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glLightxv (GLenum light, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glLineWidthx (GLfixed width); -GL_API void GL_APIENTRY glLoadIdentity (void); -GL_API void GL_APIENTRY glLoadMatrixx (const GLfixed *m); -GL_API void GL_APIENTRY glLogicOp (GLenum opcode); -GL_API void GL_APIENTRY glMaterialx (GLenum face, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glMaterialxv (GLenum face, GLenum pname, const GLfixed *param); -GL_API void GL_APIENTRY glMatrixMode (GLenum mode); -GL_API void GL_APIENTRY glMultMatrixx (const GLfixed *m); -GL_API void GL_APIENTRY glMultiTexCoord4x (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q); -GL_API void GL_APIENTRY glNormal3x (GLfixed nx, GLfixed ny, GLfixed nz); -GL_API void GL_APIENTRY glNormalPointer (GLenum type, GLsizei stride, const void *pointer); -GL_API void GL_APIENTRY glOrthox (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f); -GL_API void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); -GL_API void GL_APIENTRY glPointParameterx (GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glPointParameterxv (GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glPointSizex (GLfixed size); -GL_API void GL_APIENTRY glPolygonOffsetx (GLfixed factor, GLfixed units); -GL_API void GL_APIENTRY glPopMatrix (void); -GL_API void GL_APIENTRY glPushMatrix (void); -GL_API void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); -GL_API void GL_APIENTRY glRotatex (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); -GL_API void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); -GL_API void GL_APIENTRY glSampleCoveragex (GLclampx value, GLboolean invert); -GL_API void GL_APIENTRY glScalex (GLfixed x, GLfixed y, GLfixed z); -GL_API void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); -GL_API void GL_APIENTRY glShadeModel (GLenum mode); -GL_API void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); -GL_API void GL_APIENTRY glStencilMask (GLuint mask); -GL_API void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); -GL_API void GL_APIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const void *pointer); -GL_API void GL_APIENTRY glTexEnvi (GLenum target, GLenum pname, GLint param); -GL_API void GL_APIENTRY glTexEnvx (GLenum target, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glTexEnviv (GLenum target, GLenum pname, const GLint *params); -GL_API void GL_APIENTRY glTexEnvxv (GLenum target, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); -GL_API void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); -GL_API void GL_APIENTRY glTexParameterx (GLenum target, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params); -GL_API void GL_APIENTRY glTexParameterxv (GLenum target, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -GL_API void GL_APIENTRY glTranslatex (GLfixed x, GLfixed y, GLfixed z); -GL_API void GL_APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const void *pointer); -GL_API void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); -#endif /* GL_VERSION_ES_CM_1_0 */ - -#ifndef GL_OES_compressed_paletted_texture -#define GL_OES_compressed_paletted_texture 1 -#define GL_PALETTE4_RGB8_OES 0x8B90 -#define GL_PALETTE4_RGBA8_OES 0x8B91 -#define GL_PALETTE4_R5_G6_B5_OES 0x8B92 -#define GL_PALETTE4_RGBA4_OES 0x8B93 -#define GL_PALETTE4_RGB5_A1_OES 0x8B94 -#define GL_PALETTE8_RGB8_OES 0x8B95 -#define GL_PALETTE8_RGBA8_OES 0x8B96 -#define GL_PALETTE8_R5_G6_B5_OES 0x8B97 -#define GL_PALETTE8_RGBA4_OES 0x8B98 -#define GL_PALETTE8_RGB5_A1_OES 0x8B99 -#endif /* GL_OES_compressed_paletted_texture */ - -#ifndef GL_OES_point_size_array -#define GL_OES_point_size_array 1 -#define GL_POINT_SIZE_ARRAY_OES 0x8B9C -#define GL_POINT_SIZE_ARRAY_TYPE_OES 0x898A -#define GL_POINT_SIZE_ARRAY_STRIDE_OES 0x898B -#define GL_POINT_SIZE_ARRAY_POINTER_OES 0x898C -#define GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES 0x8B9F -GL_API void GL_APIENTRY glPointSizePointerOES (GLenum type, GLsizei stride, const void *pointer); -#endif /* GL_OES_point_size_array */ - -#ifndef GL_OES_point_sprite -#define GL_OES_point_sprite 1 -#define GL_POINT_SPRITE_OES 0x8861 -#define GL_COORD_REPLACE_OES 0x8862 -#endif /* GL_OES_point_sprite */ - -#ifndef GL_OES_read_format -#define GL_OES_read_format 1 -#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B -#endif /* GL_OES_read_format */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/emscripten/include/pvrsdk/GLES/glext.h b/emscripten/include/pvrsdk/GLES/glext.h deleted file mode 100644 index 1026f29a..00000000 --- a/emscripten/include/pvrsdk/GLES/glext.h +++ /dev/null @@ -1,951 +0,0 @@ -#ifndef __glext_h_ -#define __glext_h_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2013-2017 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in 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, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER 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. -*/ -/* -** This header is generated from the Khronos OpenGL / OpenGL ES XML -** API Registry. The current version of the Registry, generator scripts -** used to make the header, and the header can be found at -** https://github.com/KhronosGroup/OpenGL-Registry -*/ - -#ifndef GL_APIENTRYP -#define GL_APIENTRYP GL_APIENTRY* -#endif - -/* Generated on date 20170209 */ - -/* Generated C header for: - * API: gles1 - * Profile: common - * Versions considered: .* - * Versions emitted: _nomatch_^ - * Default extensions included: gles1 - * Additional extensions included: _nomatch_^ - * Extensions removed: ^(GL_OES_read_format|GL_OES_compressed_paletted_texture|GL_OES_point_size_array|GL_OES_point_sprite)$ - */ - -#ifndef GL_OES_EGL_image -#define GL_OES_EGL_image 1 -typedef void *GLeglImageOES; -typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); -typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); -GL_API void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image); -#endif -#endif /* GL_OES_EGL_image */ - -#ifndef GL_OES_EGL_image_external -#define GL_OES_EGL_image_external 1 -#define GL_TEXTURE_EXTERNAL_OES 0x8D65 -#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67 -#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68 -#endif /* GL_OES_EGL_image_external */ - -#ifndef GL_OES_blend_equation_separate -#define GL_OES_blend_equation_separate 1 -#define GL_BLEND_EQUATION_RGB_OES 0x8009 -#define GL_BLEND_EQUATION_ALPHA_OES 0x883D -typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEOESPROC) (GLenum modeRGB, GLenum modeAlpha); -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glBlendEquationSeparateOES (GLenum modeRGB, GLenum modeAlpha); -#endif -#endif /* GL_OES_blend_equation_separate */ - -#ifndef GL_OES_blend_func_separate -#define GL_OES_blend_func_separate 1 -#define GL_BLEND_DST_RGB_OES 0x80C8 -#define GL_BLEND_SRC_RGB_OES 0x80C9 -#define GL_BLEND_DST_ALPHA_OES 0x80CA -#define GL_BLEND_SRC_ALPHA_OES 0x80CB -typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEOESPROC) (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glBlendFuncSeparateOES (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -#endif -#endif /* GL_OES_blend_func_separate */ - -#ifndef GL_OES_blend_subtract -#define GL_OES_blend_subtract 1 -#define GL_BLEND_EQUATION_OES 0x8009 -#define GL_FUNC_ADD_OES 0x8006 -#define GL_FUNC_SUBTRACT_OES 0x800A -#define GL_FUNC_REVERSE_SUBTRACT_OES 0x800B -typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONOESPROC) (GLenum mode); -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glBlendEquationOES (GLenum mode); -#endif -#endif /* GL_OES_blend_subtract */ - -#ifndef GL_OES_byte_coordinates -#define GL_OES_byte_coordinates 1 -typedef khronos_int8_t GLbyte; -#endif /* GL_OES_byte_coordinates */ - -#ifndef GL_OES_compressed_ETC1_RGB8_sub_texture -#define GL_OES_compressed_ETC1_RGB8_sub_texture 1 -#endif /* GL_OES_compressed_ETC1_RGB8_sub_texture */ - -#ifndef GL_OES_compressed_ETC1_RGB8_texture -#define GL_OES_compressed_ETC1_RGB8_texture 1 -#define GL_ETC1_RGB8_OES 0x8D64 -#endif /* GL_OES_compressed_ETC1_RGB8_texture */ - -#ifndef GL_OES_depth24 -#define GL_OES_depth24 1 -#define GL_DEPTH_COMPONENT24_OES 0x81A6 -#endif /* GL_OES_depth24 */ - -#ifndef GL_OES_depth32 -#define GL_OES_depth32 1 -#define GL_DEPTH_COMPONENT32_OES 0x81A7 -#endif /* GL_OES_depth32 */ - -#ifndef GL_OES_draw_texture -#define GL_OES_draw_texture 1 -typedef short GLshort; -#define GL_TEXTURE_CROP_RECT_OES 0x8B9D -typedef void (GL_APIENTRYP PFNGLDRAWTEXSOESPROC) (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height); -typedef void (GL_APIENTRYP PFNGLDRAWTEXIOESPROC) (GLint x, GLint y, GLint z, GLint width, GLint height); -typedef void (GL_APIENTRYP PFNGLDRAWTEXXOESPROC) (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height); -typedef void (GL_APIENTRYP PFNGLDRAWTEXSVOESPROC) (const GLshort *coords); -typedef void (GL_APIENTRYP PFNGLDRAWTEXIVOESPROC) (const GLint *coords); -typedef void (GL_APIENTRYP PFNGLDRAWTEXXVOESPROC) (const GLfixed *coords); -typedef void (GL_APIENTRYP PFNGLDRAWTEXFOESPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height); -typedef void (GL_APIENTRYP PFNGLDRAWTEXFVOESPROC) (const GLfloat *coords); -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glDrawTexsOES (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height); -GL_API void GL_APIENTRY glDrawTexiOES (GLint x, GLint y, GLint z, GLint width, GLint height); -GL_API void GL_APIENTRY glDrawTexxOES (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height); -GL_API void GL_APIENTRY glDrawTexsvOES (const GLshort *coords); -GL_API void GL_APIENTRY glDrawTexivOES (const GLint *coords); -GL_API void GL_APIENTRY glDrawTexxvOES (const GLfixed *coords); -GL_API void GL_APIENTRY glDrawTexfOES (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height); -GL_API void GL_APIENTRY glDrawTexfvOES (const GLfloat *coords); -#endif -#endif /* GL_OES_draw_texture */ - -#ifndef GL_OES_element_index_uint -#define GL_OES_element_index_uint 1 -#define GL_UNSIGNED_INT 0x1405 -#endif /* GL_OES_element_index_uint */ - -#ifndef GL_OES_extended_matrix_palette -#define GL_OES_extended_matrix_palette 1 -#endif /* GL_OES_extended_matrix_palette */ - -#ifndef GL_OES_fbo_render_mipmap -#define GL_OES_fbo_render_mipmap 1 -#endif /* GL_OES_fbo_render_mipmap */ - -#ifndef GL_OES_fixed_point -#define GL_OES_fixed_point 1 -#define GL_FIXED_OES 0x140C -typedef void (GL_APIENTRYP PFNGLALPHAFUNCXOESPROC) (GLenum func, GLfixed ref); -typedef void (GL_APIENTRYP PFNGLCLEARCOLORXOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); -typedef void (GL_APIENTRYP PFNGLCLEARDEPTHXOESPROC) (GLfixed depth); -typedef void (GL_APIENTRYP PFNGLCLIPPLANEXOESPROC) (GLenum plane, const GLfixed *equation); -typedef void (GL_APIENTRYP PFNGLCOLOR4XOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); -typedef void (GL_APIENTRYP PFNGLDEPTHRANGEXOESPROC) (GLfixed n, GLfixed f); -typedef void (GL_APIENTRYP PFNGLFOGXOESPROC) (GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLFOGXVOESPROC) (GLenum pname, const GLfixed *param); -typedef void (GL_APIENTRYP PFNGLFRUSTUMXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f); -typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEXOESPROC) (GLenum plane, GLfixed *equation); -typedef void (GL_APIENTRYP PFNGLGETFIXEDVOESPROC) (GLenum pname, GLfixed *params); -typedef void (GL_APIENTRYP PFNGLGETTEXENVXVOESPROC) (GLenum target, GLenum pname, GLfixed *params); -typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params); -typedef void (GL_APIENTRYP PFNGLLIGHTMODELXOESPROC) (GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLLIGHTMODELXVOESPROC) (GLenum pname, const GLfixed *param); -typedef void (GL_APIENTRYP PFNGLLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLLIGHTXVOESPROC) (GLenum light, GLenum pname, const GLfixed *params); -typedef void (GL_APIENTRYP PFNGLLINEWIDTHXOESPROC) (GLfixed width); -typedef void (GL_APIENTRYP PFNGLLOADMATRIXXOESPROC) (const GLfixed *m); -typedef void (GL_APIENTRYP PFNGLMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLMATERIALXVOESPROC) (GLenum face, GLenum pname, const GLfixed *param); -typedef void (GL_APIENTRYP PFNGLMULTMATRIXXOESPROC) (const GLfixed *m); -typedef void (GL_APIENTRYP PFNGLMULTITEXCOORD4XOESPROC) (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q); -typedef void (GL_APIENTRYP PFNGLNORMAL3XOESPROC) (GLfixed nx, GLfixed ny, GLfixed nz); -typedef void (GL_APIENTRYP PFNGLORTHOXOESPROC) (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f); -typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, const GLfixed *params); -typedef void (GL_APIENTRYP PFNGLPOINTSIZEXOESPROC) (GLfixed size); -typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, GLfixed units); -typedef void (GL_APIENTRYP PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); -typedef void (GL_APIENTRYP PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, GLfixed z); -typedef void (GL_APIENTRYP PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params); -typedef void (GL_APIENTRYP PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, GLfixed z); -typedef void (GL_APIENTRYP PFNGLGETLIGHTXVOESPROC) (GLenum light, GLenum pname, GLfixed *params); -typedef void (GL_APIENTRYP PFNGLGETMATERIALXVOESPROC) (GLenum face, GLenum pname, GLfixed *params); -typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXOESPROC) (GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEXOESPROC) (GLclampx value, GLboolean invert); -typedef void (GL_APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params); -typedef void (GL_APIENTRYP PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params); -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glAlphaFuncxOES (GLenum func, GLfixed ref); -GL_API void GL_APIENTRY glClearColorxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); -GL_API void GL_APIENTRY glClearDepthxOES (GLfixed depth); -GL_API void GL_APIENTRY glClipPlanexOES (GLenum plane, const GLfixed *equation); -GL_API void GL_APIENTRY glColor4xOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); -GL_API void GL_APIENTRY glDepthRangexOES (GLfixed n, GLfixed f); -GL_API void GL_APIENTRY glFogxOES (GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glFogxvOES (GLenum pname, const GLfixed *param); -GL_API void GL_APIENTRY glFrustumxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f); -GL_API void GL_APIENTRY glGetClipPlanexOES (GLenum plane, GLfixed *equation); -GL_API void GL_APIENTRY glGetFixedvOES (GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetTexEnvxvOES (GLenum target, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetTexParameterxvOES (GLenum target, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glLightModelxOES (GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glLightModelxvOES (GLenum pname, const GLfixed *param); -GL_API void GL_APIENTRY glLightxOES (GLenum light, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glLightxvOES (GLenum light, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glLineWidthxOES (GLfixed width); -GL_API void GL_APIENTRY glLoadMatrixxOES (const GLfixed *m); -GL_API void GL_APIENTRY glMaterialxOES (GLenum face, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *param); -GL_API void GL_APIENTRY glMultMatrixxOES (const GLfixed *m); -GL_API void GL_APIENTRY glMultiTexCoord4xOES (GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q); -GL_API void GL_APIENTRY glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz); -GL_API void GL_APIENTRY glOrthoxOES (GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f); -GL_API void GL_APIENTRY glPointParameterxvOES (GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glPointSizexOES (GLfixed size); -GL_API void GL_APIENTRY glPolygonOffsetxOES (GLfixed factor, GLfixed units); -GL_API void GL_APIENTRY glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); -GL_API void GL_APIENTRY glScalexOES (GLfixed x, GLfixed y, GLfixed z); -GL_API void GL_APIENTRY glTexEnvxOES (GLenum target, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glTexParameterxOES (GLenum target, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glTranslatexOES (GLfixed x, GLfixed y, GLfixed z); -GL_API void GL_APIENTRY glGetLightxvOES (GLenum light, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetMaterialxvOES (GLenum face, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glPointParameterxOES (GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glSampleCoveragexOES (GLclampx value, GLboolean invert); -GL_API void GL_APIENTRY glGetTexGenxvOES (GLenum coord, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glTexGenxOES (GLenum coord, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glTexGenxvOES (GLenum coord, GLenum pname, const GLfixed *params); -#endif -#endif /* GL_OES_fixed_point */ - -#ifndef GL_OES_framebuffer_object -#define GL_OES_framebuffer_object 1 -#define GL_NONE_OES 0 -#define GL_FRAMEBUFFER_OES 0x8D40 -#define GL_RENDERBUFFER_OES 0x8D41 -#define GL_RGBA4_OES 0x8056 -#define GL_RGB5_A1_OES 0x8057 -#define GL_RGB565_OES 0x8D62 -#define GL_DEPTH_COMPONENT16_OES 0x81A5 -#define GL_RENDERBUFFER_WIDTH_OES 0x8D42 -#define GL_RENDERBUFFER_HEIGHT_OES 0x8D43 -#define GL_RENDERBUFFER_INTERNAL_FORMAT_OES 0x8D44 -#define GL_RENDERBUFFER_RED_SIZE_OES 0x8D50 -#define GL_RENDERBUFFER_GREEN_SIZE_OES 0x8D51 -#define GL_RENDERBUFFER_BLUE_SIZE_OES 0x8D52 -#define GL_RENDERBUFFER_ALPHA_SIZE_OES 0x8D53 -#define GL_RENDERBUFFER_DEPTH_SIZE_OES 0x8D54 -#define GL_RENDERBUFFER_STENCIL_SIZE_OES 0x8D55 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES 0x8CD2 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES 0x8CD3 -#define GL_COLOR_ATTACHMENT0_OES 0x8CE0 -#define GL_DEPTH_ATTACHMENT_OES 0x8D00 -#define GL_STENCIL_ATTACHMENT_OES 0x8D20 -#define GL_FRAMEBUFFER_COMPLETE_OES 0x8CD5 -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES 0x8CD9 -#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES 0x8CDA -#define GL_FRAMEBUFFER_UNSUPPORTED_OES 0x8CDD -#define GL_FRAMEBUFFER_BINDING_OES 0x8CA6 -#define GL_RENDERBUFFER_BINDING_OES 0x8CA7 -#define GL_MAX_RENDERBUFFER_SIZE_OES 0x84E8 -#define GL_INVALID_FRAMEBUFFER_OPERATION_OES 0x0506 -typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFEROESPROC) (GLuint renderbuffer); -typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFEROESPROC) (GLenum target, GLuint renderbuffer); -typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSOESPROC) (GLsizei n, const GLuint *renderbuffers); -typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSOESPROC) (GLsizei n, GLuint *renderbuffers); -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVOESPROC) (GLenum target, GLenum pname, GLint *params); -typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFEROESPROC) (GLuint framebuffer); -typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFEROESPROC) (GLenum target, GLuint framebuffer); -typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSOESPROC) (GLsizei n, const GLuint *framebuffers); -typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSOESPROC) (GLsizei n, GLuint *framebuffers); -typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSOESPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEROESPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPOESPROC) (GLenum target); -#ifdef GL_GLEXT_PROTOTYPES -GL_API GLboolean GL_APIENTRY glIsRenderbufferOES (GLuint renderbuffer); -GL_API void GL_APIENTRY glBindRenderbufferOES (GLenum target, GLuint renderbuffer); -GL_API void GL_APIENTRY glDeleteRenderbuffersOES (GLsizei n, const GLuint *renderbuffers); -GL_API void GL_APIENTRY glGenRenderbuffersOES (GLsizei n, GLuint *renderbuffers); -GL_API void GL_APIENTRY glRenderbufferStorageOES (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -GL_API void GL_APIENTRY glGetRenderbufferParameterivOES (GLenum target, GLenum pname, GLint *params); -GL_API GLboolean GL_APIENTRY glIsFramebufferOES (GLuint framebuffer); -GL_API void GL_APIENTRY glBindFramebufferOES (GLenum target, GLuint framebuffer); -GL_API void GL_APIENTRY glDeleteFramebuffersOES (GLsizei n, const GLuint *framebuffers); -GL_API void GL_APIENTRY glGenFramebuffersOES (GLsizei n, GLuint *framebuffers); -GL_API GLenum GL_APIENTRY glCheckFramebufferStatusOES (GLenum target); -GL_API void GL_APIENTRY glFramebufferRenderbufferOES (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GL_API void GL_APIENTRY glFramebufferTexture2DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GL_API void GL_APIENTRY glGetFramebufferAttachmentParameterivOES (GLenum target, GLenum attachment, GLenum pname, GLint *params); -GL_API void GL_APIENTRY glGenerateMipmapOES (GLenum target); -#endif -#endif /* GL_OES_framebuffer_object */ - -#ifndef GL_OES_mapbuffer -#define GL_OES_mapbuffer 1 -#define GL_WRITE_ONLY_OES 0x88B9 -#define GL_BUFFER_ACCESS_OES 0x88BB -#define GL_BUFFER_MAPPED_OES 0x88BC -#define GL_BUFFER_MAP_POINTER_OES 0x88BD -typedef void *(GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access); -typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void **params); -#ifdef GL_GLEXT_PROTOTYPES -GL_API void *GL_APIENTRY glMapBufferOES (GLenum target, GLenum access); -GL_API GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target); -GL_API void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, void **params); -#endif -#endif /* GL_OES_mapbuffer */ - -#ifndef GL_OES_matrix_get -#define GL_OES_matrix_get 1 -#define GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES 0x898D -#define GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES 0x898E -#define GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES 0x898F -#endif /* GL_OES_matrix_get */ - -#ifndef GL_OES_matrix_palette -#define GL_OES_matrix_palette 1 -#define GL_MAX_VERTEX_UNITS_OES 0x86A4 -#define GL_MAX_PALETTE_MATRICES_OES 0x8842 -#define GL_MATRIX_PALETTE_OES 0x8840 -#define GL_MATRIX_INDEX_ARRAY_OES 0x8844 -#define GL_WEIGHT_ARRAY_OES 0x86AD -#define GL_CURRENT_PALETTE_MATRIX_OES 0x8843 -#define GL_MATRIX_INDEX_ARRAY_SIZE_OES 0x8846 -#define GL_MATRIX_INDEX_ARRAY_TYPE_OES 0x8847 -#define GL_MATRIX_INDEX_ARRAY_STRIDE_OES 0x8848 -#define GL_MATRIX_INDEX_ARRAY_POINTER_OES 0x8849 -#define GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES 0x8B9E -#define GL_WEIGHT_ARRAY_SIZE_OES 0x86AB -#define GL_WEIGHT_ARRAY_TYPE_OES 0x86A9 -#define GL_WEIGHT_ARRAY_STRIDE_OES 0x86AA -#define GL_WEIGHT_ARRAY_POINTER_OES 0x86AC -#define GL_WEIGHT_ARRAY_BUFFER_BINDING_OES 0x889E -typedef void (GL_APIENTRYP PFNGLCURRENTPALETTEMATRIXOESPROC) (GLuint matrixpaletteindex); -typedef void (GL_APIENTRYP PFNGLLOADPALETTEFROMMODELVIEWMATRIXOESPROC) (void); -typedef void (GL_APIENTRYP PFNGLMATRIXINDEXPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer); -typedef void (GL_APIENTRYP PFNGLWEIGHTPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const void *pointer); -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glCurrentPaletteMatrixOES (GLuint matrixpaletteindex); -GL_API void GL_APIENTRY glLoadPaletteFromModelViewMatrixOES (void); -GL_API void GL_APIENTRY glMatrixIndexPointerOES (GLint size, GLenum type, GLsizei stride, const void *pointer); -GL_API void GL_APIENTRY glWeightPointerOES (GLint size, GLenum type, GLsizei stride, const void *pointer); -#endif -#endif /* GL_OES_matrix_palette */ - -#ifndef GL_OES_packed_depth_stencil -#define GL_OES_packed_depth_stencil 1 -#define GL_DEPTH_STENCIL_OES 0x84F9 -#define GL_UNSIGNED_INT_24_8_OES 0x84FA -#define GL_DEPTH24_STENCIL8_OES 0x88F0 -#endif /* GL_OES_packed_depth_stencil */ - -#ifndef GL_OES_query_matrix -#define GL_OES_query_matrix 1 -typedef GLbitfield (GL_APIENTRYP PFNGLQUERYMATRIXXOESPROC) (GLfixed *mantissa, GLint *exponent); -#ifdef GL_GLEXT_PROTOTYPES -GL_API GLbitfield GL_APIENTRY glQueryMatrixxOES (GLfixed *mantissa, GLint *exponent); -#endif -#endif /* GL_OES_query_matrix */ - -#ifndef GL_OES_required_internalformat -#define GL_OES_required_internalformat 1 -#define GL_ALPHA8_OES 0x803C -#define GL_LUMINANCE4_ALPHA4_OES 0x8043 -#define GL_LUMINANCE8_ALPHA8_OES 0x8045 -#define GL_LUMINANCE8_OES 0x8040 -#define GL_RGB8_OES 0x8051 -#define GL_RGBA8_OES 0x8058 -#define GL_RGB10_EXT 0x8052 -#define GL_RGB10_A2_EXT 0x8059 -#endif /* GL_OES_required_internalformat */ - -#ifndef GL_OES_rgb8_rgba8 -#define GL_OES_rgb8_rgba8 1 -#endif /* GL_OES_rgb8_rgba8 */ - -#ifndef GL_OES_single_precision -#define GL_OES_single_precision 1 -typedef khronos_float_t GLclampf; -typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFOESPROC) (GLclampf depth); -typedef void (GL_APIENTRYP PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat *equation); -typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFOESPROC) (GLclampf n, GLclampf f); -typedef void (GL_APIENTRYP PFNGLFRUSTUMFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); -typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEFOESPROC) (GLenum plane, GLfloat *equation); -typedef void (GL_APIENTRYP PFNGLORTHOFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glClearDepthfOES (GLclampf depth); -GL_API void GL_APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation); -GL_API void GL_APIENTRY glDepthRangefOES (GLclampf n, GLclampf f); -GL_API void GL_APIENTRY glFrustumfOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); -GL_API void GL_APIENTRY glGetClipPlanefOES (GLenum plane, GLfloat *equation); -GL_API void GL_APIENTRY glOrthofOES (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); -#endif -#endif /* GL_OES_single_precision */ - -#ifndef GL_OES_stencil1 -#define GL_OES_stencil1 1 -#define GL_STENCIL_INDEX1_OES 0x8D46 -#endif /* GL_OES_stencil1 */ - -#ifndef GL_OES_stencil4 -#define GL_OES_stencil4 1 -#define GL_STENCIL_INDEX4_OES 0x8D47 -#endif /* GL_OES_stencil4 */ - -#ifndef GL_OES_stencil8 -#define GL_OES_stencil8 1 -#define GL_STENCIL_INDEX8_OES 0x8D48 -#endif /* GL_OES_stencil8 */ - -#ifndef GL_OES_stencil_wrap -#define GL_OES_stencil_wrap 1 -#define GL_INCR_WRAP_OES 0x8507 -#define GL_DECR_WRAP_OES 0x8508 -#endif /* GL_OES_stencil_wrap */ - -#ifndef GL_OES_texture_cube_map -#define GL_OES_texture_cube_map 1 -#define GL_NORMAL_MAP_OES 0x8511 -#define GL_REFLECTION_MAP_OES 0x8512 -#define GL_TEXTURE_CUBE_MAP_OES 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP_OES 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES 0x851A -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES 0x851C -#define GL_TEXTURE_GEN_MODE_OES 0x2500 -#define GL_TEXTURE_GEN_STR_OES 0x8D60 -typedef void (GL_APIENTRYP PFNGLTEXGENFOESPROC) (GLenum coord, GLenum pname, GLfloat param); -typedef void (GL_APIENTRYP PFNGLTEXGENFVOESPROC) (GLenum coord, GLenum pname, const GLfloat *params); -typedef void (GL_APIENTRYP PFNGLTEXGENIOESPROC) (GLenum coord, GLenum pname, GLint param); -typedef void (GL_APIENTRYP PFNGLTEXGENIVOESPROC) (GLenum coord, GLenum pname, const GLint *params); -typedef void (GL_APIENTRYP PFNGLGETTEXGENFVOESPROC) (GLenum coord, GLenum pname, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETTEXGENIVOESPROC) (GLenum coord, GLenum pname, GLint *params); -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glTexGenfOES (GLenum coord, GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glTexGenfvOES (GLenum coord, GLenum pname, const GLfloat *params); -GL_API void GL_APIENTRY glTexGeniOES (GLenum coord, GLenum pname, GLint param); -GL_API void GL_APIENTRY glTexGenivOES (GLenum coord, GLenum pname, const GLint *params); -GL_API void GL_APIENTRY glGetTexGenfvOES (GLenum coord, GLenum pname, GLfloat *params); -GL_API void GL_APIENTRY glGetTexGenivOES (GLenum coord, GLenum pname, GLint *params); -#endif -#endif /* GL_OES_texture_cube_map */ - -#ifndef GL_OES_texture_env_crossbar -#define GL_OES_texture_env_crossbar 1 -#endif /* GL_OES_texture_env_crossbar */ - -#ifndef GL_OES_texture_mirrored_repeat -#define GL_OES_texture_mirrored_repeat 1 -#define GL_MIRRORED_REPEAT_OES 0x8370 -#endif /* GL_OES_texture_mirrored_repeat */ - -#ifndef GL_OES_vertex_array_object -#define GL_OES_vertex_array_object 1 -#define GL_VERTEX_ARRAY_BINDING_OES 0x85B5 -typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array); -typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays); -typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays); -typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array); -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glBindVertexArrayOES (GLuint array); -GL_API void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays); -GL_API void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays); -GL_API GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array); -#endif -#endif /* GL_OES_vertex_array_object */ - -#ifndef GL_AMD_compressed_3DC_texture -#define GL_AMD_compressed_3DC_texture 1 -#define GL_3DC_X_AMD 0x87F9 -#define GL_3DC_XY_AMD 0x87FA -#endif /* GL_AMD_compressed_3DC_texture */ - -#ifndef GL_AMD_compressed_ATC_texture -#define GL_AMD_compressed_ATC_texture 1 -#define GL_ATC_RGB_AMD 0x8C92 -#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93 -#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE -#endif /* GL_AMD_compressed_ATC_texture */ - -#ifndef GL_APPLE_copy_texture_levels -#define GL_APPLE_copy_texture_levels 1 -typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount); -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount); -#endif -#endif /* GL_APPLE_copy_texture_levels */ - -#ifndef GL_APPLE_framebuffer_multisample -#define GL_APPLE_framebuffer_multisample 1 -#define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56 -#define GL_MAX_SAMPLES_APPLE 0x8D57 -#define GL_READ_FRAMEBUFFER_APPLE 0x8CA8 -#define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9 -#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6 -#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GL_API void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void); -#endif -#endif /* GL_APPLE_framebuffer_multisample */ - -#ifndef GL_APPLE_sync -#define GL_APPLE_sync 1 -typedef struct __GLsync *GLsync; -typedef khronos_uint64_t GLuint64; -typedef khronos_int64_t GLint64; -#define GL_SYNC_OBJECT_APPLE 0x8A53 -#define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE 0x9111 -#define GL_OBJECT_TYPE_APPLE 0x9112 -#define GL_SYNC_CONDITION_APPLE 0x9113 -#define GL_SYNC_STATUS_APPLE 0x9114 -#define GL_SYNC_FLAGS_APPLE 0x9115 -#define GL_SYNC_FENCE_APPLE 0x9116 -#define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE 0x9117 -#define GL_UNSIGNALED_APPLE 0x9118 -#define GL_SIGNALED_APPLE 0x9119 -#define GL_ALREADY_SIGNALED_APPLE 0x911A -#define GL_TIMEOUT_EXPIRED_APPLE 0x911B -#define GL_CONDITION_SATISFIED_APPLE 0x911C -#define GL_WAIT_FAILED_APPLE 0x911D -#define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE 0x00000001 -#define GL_TIMEOUT_IGNORED_APPLE 0xFFFFFFFFFFFFFFFFull -typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags); -typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync); -typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync); -typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params); -typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -#ifdef GL_GLEXT_PROTOTYPES -GL_API GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags); -GL_API GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync); -GL_API void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync); -GL_API GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout); -GL_API void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout); -GL_API void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params); -GL_API void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -#endif -#endif /* GL_APPLE_sync */ - -#ifndef GL_APPLE_texture_2D_limited_npot -#define GL_APPLE_texture_2D_limited_npot 1 -#endif /* GL_APPLE_texture_2D_limited_npot */ - -#ifndef GL_APPLE_texture_format_BGRA8888 -#define GL_APPLE_texture_format_BGRA8888 1 -#define GL_BGRA_EXT 0x80E1 -#define GL_BGRA8_EXT 0x93A1 -#endif /* GL_APPLE_texture_format_BGRA8888 */ - -#ifndef GL_APPLE_texture_max_level -#define GL_APPLE_texture_max_level 1 -#define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D -#endif /* GL_APPLE_texture_max_level */ - -#ifndef GL_ARM_rgba8 -#define GL_ARM_rgba8 1 -#endif /* GL_ARM_rgba8 */ - -#ifndef GL_EXT_blend_minmax -#define GL_EXT_blend_minmax 1 -#define GL_MIN_EXT 0x8007 -#define GL_MAX_EXT 0x8008 -#endif /* GL_EXT_blend_minmax */ - -#ifndef GL_EXT_discard_framebuffer -#define GL_EXT_discard_framebuffer 1 -#define GL_COLOR_EXT 0x1800 -#define GL_DEPTH_EXT 0x1801 -#define GL_STENCIL_EXT 0x1802 -typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments); -#endif -#endif /* GL_EXT_discard_framebuffer */ - -#ifndef GL_EXT_map_buffer_range -#define GL_EXT_map_buffer_range 1 -#define GL_MAP_READ_BIT_EXT 0x0001 -#define GL_MAP_WRITE_BIT_EXT 0x0002 -#define GL_MAP_INVALIDATE_RANGE_BIT_EXT 0x0004 -#define GL_MAP_INVALIDATE_BUFFER_BIT_EXT 0x0008 -#define GL_MAP_FLUSH_EXPLICIT_BIT_EXT 0x0010 -#define GL_MAP_UNSYNCHRONIZED_BIT_EXT 0x0020 -typedef void *(GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length); -#ifdef GL_GLEXT_PROTOTYPES -GL_API void *GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -GL_API void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length); -#endif -#endif /* GL_EXT_map_buffer_range */ - -#ifndef GL_EXT_multi_draw_arrays -#define GL_EXT_multi_draw_arrays 1 -typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount); -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -GL_API void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount); -#endif -#endif /* GL_EXT_multi_draw_arrays */ - -#ifndef GL_EXT_multisampled_render_to_texture -#define GL_EXT_multisampled_render_to_texture 1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C -#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56 -#define GL_MAX_SAMPLES_EXT 0x8D57 -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GL_API void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); -#endif -#endif /* GL_EXT_multisampled_render_to_texture */ - -#ifndef GL_EXT_read_format_bgra -#define GL_EXT_read_format_bgra 1 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365 -#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366 -#endif /* GL_EXT_read_format_bgra */ - -#ifndef GL_EXT_robustness -#define GL_EXT_robustness 1 -#define GL_GUILTY_CONTEXT_RESET_EXT 0x8253 -#define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254 -#define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255 -#define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3 -#define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256 -#define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252 -#define GL_NO_RESET_NOTIFICATION_EXT 0x8261 -typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void); -typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); -typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); -#ifdef GL_GLEXT_PROTOTYPES -GL_API GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void); -GL_API void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); -GL_API void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -GL_API void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params); -#endif -#endif /* GL_EXT_robustness */ - -#ifndef GL_EXT_sRGB -#define GL_EXT_sRGB 1 -#define GL_SRGB_EXT 0x8C40 -#define GL_SRGB_ALPHA_EXT 0x8C42 -#define GL_SRGB8_ALPHA8_EXT 0x8C43 -#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210 -#endif /* GL_EXT_sRGB */ - -#ifndef GL_EXT_texture_compression_dxt1 -#define GL_EXT_texture_compression_dxt1 1 -#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 -#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 -#endif /* GL_EXT_texture_compression_dxt1 */ - -#ifndef GL_EXT_texture_filter_anisotropic -#define GL_EXT_texture_filter_anisotropic 1 -#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE -#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF -#endif /* GL_EXT_texture_filter_anisotropic */ - -#ifndef GL_EXT_texture_format_BGRA8888 -#define GL_EXT_texture_format_BGRA8888 1 -#endif /* GL_EXT_texture_format_BGRA8888 */ - -#ifndef GL_EXT_texture_lod_bias -#define GL_EXT_texture_lod_bias 1 -#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD -#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500 -#define GL_TEXTURE_LOD_BIAS_EXT 0x8501 -#endif /* GL_EXT_texture_lod_bias */ - -#ifndef GL_EXT_texture_storage -#define GL_EXT_texture_storage 1 -#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F -#define GL_ALPHA8_EXT 0x803C -#define GL_LUMINANCE8_EXT 0x8040 -#define GL_LUMINANCE8_ALPHA8_EXT 0x8045 -#define GL_RGBA32F_EXT 0x8814 -#define GL_RGB32F_EXT 0x8815 -#define GL_ALPHA32F_EXT 0x8816 -#define GL_LUMINANCE32F_EXT 0x8818 -#define GL_LUMINANCE_ALPHA32F_EXT 0x8819 -#define GL_RGBA16F_EXT 0x881A -#define GL_RGB16F_EXT 0x881B -#define GL_ALPHA16F_EXT 0x881C -#define GL_LUMINANCE16F_EXT 0x881E -#define GL_LUMINANCE_ALPHA16F_EXT 0x881F -#define GL_R8_EXT 0x8229 -#define GL_RG8_EXT 0x822B -#define GL_R32F_EXT 0x822E -#define GL_RG32F_EXT 0x8230 -#define GL_R16F_EXT 0x822D -#define GL_RG16F_EXT 0x822F -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -GL_API void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GL_API void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -GL_API void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -GL_API void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GL_API void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -#endif -#endif /* GL_EXT_texture_storage */ - -#ifndef GL_IMG_multisampled_render_to_texture -#define GL_IMG_multisampled_render_to_texture 1 -#define GL_RENDERBUFFER_SAMPLES_IMG 0x9133 -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134 -#define GL_MAX_SAMPLES_IMG 0x9135 -#define GL_TEXTURE_SAMPLES_IMG 0x9136 -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GL_API void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); -#endif -#endif /* GL_IMG_multisampled_render_to_texture */ - -#ifndef GL_IMG_read_format -#define GL_IMG_read_format 1 -#define GL_BGRA_IMG 0x80E1 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365 -#endif /* GL_IMG_read_format */ - -#ifndef GL_IMG_texture_compression_pvrtc -#define GL_IMG_texture_compression_pvrtc 1 -#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00 -#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01 -#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02 -#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03 -#endif /* GL_IMG_texture_compression_pvrtc */ - -#ifndef GL_IMG_texture_env_enhanced_fixed_function -#define GL_IMG_texture_env_enhanced_fixed_function 1 -#define GL_MODULATE_COLOR_IMG 0x8C04 -#define GL_RECIP_ADD_SIGNED_ALPHA_IMG 0x8C05 -#define GL_TEXTURE_ALPHA_MODULATE_IMG 0x8C06 -#define GL_FACTOR_ALPHA_MODULATE_IMG 0x8C07 -#define GL_FRAGMENT_ALPHA_MODULATE_IMG 0x8C08 -#define GL_ADD_BLEND_IMG 0x8C09 -#define GL_DOT3_RGBA_IMG 0x86AF -#endif /* GL_IMG_texture_env_enhanced_fixed_function */ - -#ifndef GL_IMG_user_clip_plane -#define GL_IMG_user_clip_plane 1 -#define GL_CLIP_PLANE0_IMG 0x3000 -#define GL_CLIP_PLANE1_IMG 0x3001 -#define GL_CLIP_PLANE2_IMG 0x3002 -#define GL_CLIP_PLANE3_IMG 0x3003 -#define GL_CLIP_PLANE4_IMG 0x3004 -#define GL_CLIP_PLANE5_IMG 0x3005 -#define GL_MAX_CLIP_PLANES_IMG 0x0D32 -typedef void (GL_APIENTRYP PFNGLCLIPPLANEFIMGPROC) (GLenum p, const GLfloat *eqn); -typedef void (GL_APIENTRYP PFNGLCLIPPLANEXIMGPROC) (GLenum p, const GLfixed *eqn); -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glClipPlanefIMG (GLenum p, const GLfloat *eqn); -GL_API void GL_APIENTRY glClipPlanexIMG (GLenum p, const GLfixed *eqn); -#endif -#endif /* GL_IMG_user_clip_plane */ - -#ifndef GL_NV_fence -#define GL_NV_fence 1 -#define GL_ALL_COMPLETED_NV 0x84F2 -#define GL_FENCE_STATUS_NV 0x84F3 -#define GL_FENCE_CONDITION_NV 0x84F4 -typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); -typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); -typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); -typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); -typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); -typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences); -GL_API void GL_APIENTRY glGenFencesNV (GLsizei n, GLuint *fences); -GL_API GLboolean GL_APIENTRY glIsFenceNV (GLuint fence); -GL_API GLboolean GL_APIENTRY glTestFenceNV (GLuint fence); -GL_API void GL_APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params); -GL_API void GL_APIENTRY glFinishFenceNV (GLuint fence); -GL_API void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition); -#endif -#endif /* GL_NV_fence */ - -#ifndef GL_QCOM_driver_control -#define GL_QCOM_driver_control 1 -typedef char GLchar; -typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls); -typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); -typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); -typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls); -GL_API void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); -GL_API void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl); -GL_API void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl); -#endif -#endif /* GL_QCOM_driver_control */ - -#ifndef GL_QCOM_extended_get -#define GL_QCOM_extended_get 1 -#define GL_TEXTURE_WIDTH_QCOM 0x8BD2 -#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3 -#define GL_TEXTURE_DEPTH_QCOM 0x8BD4 -#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5 -#define GL_TEXTURE_FORMAT_QCOM 0x8BD6 -#define GL_TEXTURE_TYPE_QCOM 0x8BD7 -#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8 -#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9 -#define GL_TEXTURE_TARGET_QCOM 0x8BDA -#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB -#define GL_STATE_RESTORE 0x8BDC -typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures); -typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param); -typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels); -typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, void **params); -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures); -GL_API void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); -GL_API void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); -GL_API void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); -GL_API void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); -GL_API void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param); -GL_API void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels); -GL_API void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, void **params); -#endif -#endif /* GL_QCOM_extended_get */ - -#ifndef GL_QCOM_extended_get2 -#define GL_QCOM_extended_get2 1 -typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders); -typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms); -typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program); -typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length); -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders); -GL_API void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms); -GL_API GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program); -GL_API void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length); -#endif -#endif /* GL_QCOM_extended_get2 */ - -#ifndef GL_QCOM_perfmon_global_mode -#define GL_QCOM_perfmon_global_mode 1 -#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0 -#endif /* GL_QCOM_perfmon_global_mode */ - -#ifndef GL_QCOM_tiled_rendering -#define GL_QCOM_tiled_rendering 1 -#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001 -#define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002 -#define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004 -#define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008 -#define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010 -#define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020 -#define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040 -#define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080 -#define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100 -#define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200 -#define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400 -#define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800 -#define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000 -#define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000 -#define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000 -#define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000 -#define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000 -#define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000 -#define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000 -#define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000 -#define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000 -#define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000 -#define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000 -#define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000 -#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000 -#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000 -#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000 -#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000 -#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000 -#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000 -#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000 -#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000 -typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); -typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask); -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); -GL_API void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask); -#endif -#endif /* GL_QCOM_tiled_rendering */ - -#ifndef GL_QCOM_writeonly_rendering -#define GL_QCOM_writeonly_rendering 1 -#define GL_WRITEONLY_RENDERING_QCOM 0x8823 -#endif /* GL_QCOM_writeonly_rendering */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/emscripten/include/pvrsdk/GLES/glplatform.h b/emscripten/include/pvrsdk/GLES/glplatform.h deleted file mode 100644 index 16060a9a..00000000 --- a/emscripten/include/pvrsdk/GLES/glplatform.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef __glplatform_h_ -#define __glplatform_h_ - -/* -** Copyright (c) 2017 The Khronos Group Inc. -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -/* Platform-specific types and definitions for OpenGL ES 1.X gl.h - * - * Adopters may modify khrplatform.h and this file to suit their platform. - * Please contribute modifications back to Khronos as pull requests on the - * public github repository: - * https://github.com/KhronosGroup/OpenGL-Registry - */ - -#include - -#ifndef GL_API -#define GL_API KHRONOS_APICALL -#endif - -#ifndef GL_APIENTRY -#define GL_APIENTRY KHRONOS_APIENTRY -#endif - -#endif /* __glplatform_h_ */ diff --git a/emscripten/include/pvrsdk/GLES2/gl2.h b/emscripten/include/pvrsdk/GLES2/gl2.h deleted file mode 100644 index dabe010b..00000000 --- a/emscripten/include/pvrsdk/GLES2/gl2.h +++ /dev/null @@ -1,675 +0,0 @@ -#ifndef __gl2_h_ -#define __gl2_h_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2013-2017 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in 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, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER 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. -*/ -/* -** This header is generated from the Khronos OpenGL / OpenGL ES XML -** API Registry. The current version of the Registry, generator scripts -** used to make the header, and the header can be found at -** https://github.com/KhronosGroup/OpenGL-Registry -*/ - -#include "GLES2/gl2platform.h" - -#ifndef GL_APIENTRYP -#define GL_APIENTRYP GL_APIENTRY* -#endif - -#ifndef GL_GLES_PROTOTYPES -#define GL_GLES_PROTOTYPES 1 -#endif - -/* Generated on date 20170209 */ - -/* Generated C header for: - * API: gles2 - * Profile: common - * Versions considered: 2\.[0-9] - * Versions emitted: .* - * Default extensions included: None - * Additional extensions included: _nomatch_^ - * Extensions removed: _nomatch_^ - */ - -#ifndef GL_ES_VERSION_2_0 -#define GL_ES_VERSION_2_0 1 -#include "KHR/khrplatform.h" -typedef khronos_int8_t GLbyte; -typedef khronos_float_t GLclampf; -typedef khronos_int32_t GLfixed; -typedef short GLshort; -typedef unsigned short GLushort; -typedef void GLvoid; -typedef struct __GLsync *GLsync; -typedef khronos_int64_t GLint64; -typedef khronos_uint64_t GLuint64; -typedef unsigned int GLenum; -typedef unsigned int GLuint; -typedef char GLchar; -typedef khronos_float_t GLfloat; -typedef khronos_ssize_t GLsizeiptr; -typedef khronos_intptr_t GLintptr; -typedef unsigned int GLbitfield; -typedef int GLint; -typedef unsigned char GLboolean; -typedef int GLsizei; -typedef khronos_uint8_t GLubyte; -#define GL_DEPTH_BUFFER_BIT 0x00000100 -#define GL_STENCIL_BUFFER_BIT 0x00000400 -#define GL_COLOR_BUFFER_BIT 0x00004000 -#define GL_FALSE 0 -#define GL_TRUE 1 -#define GL_POINTS 0x0000 -#define GL_LINES 0x0001 -#define GL_LINE_LOOP 0x0002 -#define GL_LINE_STRIP 0x0003 -#define GL_TRIANGLES 0x0004 -#define GL_TRIANGLE_STRIP 0x0005 -#define GL_TRIANGLE_FAN 0x0006 -#define GL_ZERO 0 -#define GL_ONE 1 -#define GL_SRC_COLOR 0x0300 -#define GL_ONE_MINUS_SRC_COLOR 0x0301 -#define GL_SRC_ALPHA 0x0302 -#define GL_ONE_MINUS_SRC_ALPHA 0x0303 -#define GL_DST_ALPHA 0x0304 -#define GL_ONE_MINUS_DST_ALPHA 0x0305 -#define GL_DST_COLOR 0x0306 -#define GL_ONE_MINUS_DST_COLOR 0x0307 -#define GL_SRC_ALPHA_SATURATE 0x0308 -#define GL_FUNC_ADD 0x8006 -#define GL_BLEND_EQUATION 0x8009 -#define GL_BLEND_EQUATION_RGB 0x8009 -#define GL_BLEND_EQUATION_ALPHA 0x883D -#define GL_FUNC_SUBTRACT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT 0x800B -#define GL_BLEND_DST_RGB 0x80C8 -#define GL_BLEND_SRC_RGB 0x80C9 -#define GL_BLEND_DST_ALPHA 0x80CA -#define GL_BLEND_SRC_ALPHA 0x80CB -#define GL_CONSTANT_COLOR 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 -#define GL_CONSTANT_ALPHA 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 -#define GL_BLEND_COLOR 0x8005 -#define GL_ARRAY_BUFFER 0x8892 -#define GL_ELEMENT_ARRAY_BUFFER 0x8893 -#define GL_ARRAY_BUFFER_BINDING 0x8894 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 -#define GL_STREAM_DRAW 0x88E0 -#define GL_STATIC_DRAW 0x88E4 -#define GL_DYNAMIC_DRAW 0x88E8 -#define GL_BUFFER_SIZE 0x8764 -#define GL_BUFFER_USAGE 0x8765 -#define GL_CURRENT_VERTEX_ATTRIB 0x8626 -#define GL_FRONT 0x0404 -#define GL_BACK 0x0405 -#define GL_FRONT_AND_BACK 0x0408 -#define GL_TEXTURE_2D 0x0DE1 -#define GL_CULL_FACE 0x0B44 -#define GL_BLEND 0x0BE2 -#define GL_DITHER 0x0BD0 -#define GL_STENCIL_TEST 0x0B90 -#define GL_DEPTH_TEST 0x0B71 -#define GL_SCISSOR_TEST 0x0C11 -#define GL_POLYGON_OFFSET_FILL 0x8037 -#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E -#define GL_SAMPLE_COVERAGE 0x80A0 -#define GL_NO_ERROR 0 -#define GL_INVALID_ENUM 0x0500 -#define GL_INVALID_VALUE 0x0501 -#define GL_INVALID_OPERATION 0x0502 -#define GL_OUT_OF_MEMORY 0x0505 -#define GL_CW 0x0900 -#define GL_CCW 0x0901 -#define GL_LINE_WIDTH 0x0B21 -#define GL_ALIASED_POINT_SIZE_RANGE 0x846D -#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E -#define GL_CULL_FACE_MODE 0x0B45 -#define GL_FRONT_FACE 0x0B46 -#define GL_DEPTH_RANGE 0x0B70 -#define GL_DEPTH_WRITEMASK 0x0B72 -#define GL_DEPTH_CLEAR_VALUE 0x0B73 -#define GL_DEPTH_FUNC 0x0B74 -#define GL_STENCIL_CLEAR_VALUE 0x0B91 -#define GL_STENCIL_FUNC 0x0B92 -#define GL_STENCIL_FAIL 0x0B94 -#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 -#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 -#define GL_STENCIL_REF 0x0B97 -#define GL_STENCIL_VALUE_MASK 0x0B93 -#define GL_STENCIL_WRITEMASK 0x0B98 -#define GL_STENCIL_BACK_FUNC 0x8800 -#define GL_STENCIL_BACK_FAIL 0x8801 -#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 -#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 -#define GL_STENCIL_BACK_REF 0x8CA3 -#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 -#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 -#define GL_VIEWPORT 0x0BA2 -#define GL_SCISSOR_BOX 0x0C10 -#define GL_COLOR_CLEAR_VALUE 0x0C22 -#define GL_COLOR_WRITEMASK 0x0C23 -#define GL_UNPACK_ALIGNMENT 0x0CF5 -#define GL_PACK_ALIGNMENT 0x0D05 -#define GL_MAX_TEXTURE_SIZE 0x0D33 -#define GL_MAX_VIEWPORT_DIMS 0x0D3A -#define GL_SUBPIXEL_BITS 0x0D50 -#define GL_RED_BITS 0x0D52 -#define GL_GREEN_BITS 0x0D53 -#define GL_BLUE_BITS 0x0D54 -#define GL_ALPHA_BITS 0x0D55 -#define GL_DEPTH_BITS 0x0D56 -#define GL_STENCIL_BITS 0x0D57 -#define GL_POLYGON_OFFSET_UNITS 0x2A00 -#define GL_POLYGON_OFFSET_FACTOR 0x8038 -#define GL_TEXTURE_BINDING_2D 0x8069 -#define GL_SAMPLE_BUFFERS 0x80A8 -#define GL_SAMPLES 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT 0x80AB -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 -#define GL_DONT_CARE 0x1100 -#define GL_FASTEST 0x1101 -#define GL_NICEST 0x1102 -#define GL_GENERATE_MIPMAP_HINT 0x8192 -#define GL_BYTE 0x1400 -#define GL_UNSIGNED_BYTE 0x1401 -#define GL_SHORT 0x1402 -#define GL_UNSIGNED_SHORT 0x1403 -#define GL_INT 0x1404 -#define GL_UNSIGNED_INT 0x1405 -#define GL_FLOAT 0x1406 -#define GL_FIXED 0x140C -#define GL_DEPTH_COMPONENT 0x1902 -#define GL_ALPHA 0x1906 -#define GL_RGB 0x1907 -#define GL_RGBA 0x1908 -#define GL_LUMINANCE 0x1909 -#define GL_LUMINANCE_ALPHA 0x190A -#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 -#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 -#define GL_UNSIGNED_SHORT_5_6_5 0x8363 -#define GL_FRAGMENT_SHADER 0x8B30 -#define GL_VERTEX_SHADER 0x8B31 -#define GL_MAX_VERTEX_ATTRIBS 0x8869 -#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB -#define GL_MAX_VARYING_VECTORS 0x8DFC -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D -#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C -#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 -#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD -#define GL_SHADER_TYPE 0x8B4F -#define GL_DELETE_STATUS 0x8B80 -#define GL_LINK_STATUS 0x8B82 -#define GL_VALIDATE_STATUS 0x8B83 -#define GL_ATTACHED_SHADERS 0x8B85 -#define GL_ACTIVE_UNIFORMS 0x8B86 -#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 -#define GL_ACTIVE_ATTRIBUTES 0x8B89 -#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A -#define GL_SHADING_LANGUAGE_VERSION 0x8B8C -#define GL_CURRENT_PROGRAM 0x8B8D -#define GL_NEVER 0x0200 -#define GL_LESS 0x0201 -#define GL_EQUAL 0x0202 -#define GL_LEQUAL 0x0203 -#define GL_GREATER 0x0204 -#define GL_NOTEQUAL 0x0205 -#define GL_GEQUAL 0x0206 -#define GL_ALWAYS 0x0207 -#define GL_KEEP 0x1E00 -#define GL_REPLACE 0x1E01 -#define GL_INCR 0x1E02 -#define GL_DECR 0x1E03 -#define GL_INVERT 0x150A -#define GL_INCR_WRAP 0x8507 -#define GL_DECR_WRAP 0x8508 -#define GL_VENDOR 0x1F00 -#define GL_RENDERER 0x1F01 -#define GL_VERSION 0x1F02 -#define GL_EXTENSIONS 0x1F03 -#define GL_NEAREST 0x2600 -#define GL_LINEAR 0x2601 -#define GL_NEAREST_MIPMAP_NEAREST 0x2700 -#define GL_LINEAR_MIPMAP_NEAREST 0x2701 -#define GL_NEAREST_MIPMAP_LINEAR 0x2702 -#define GL_LINEAR_MIPMAP_LINEAR 0x2703 -#define GL_TEXTURE_MAG_FILTER 0x2800 -#define GL_TEXTURE_MIN_FILTER 0x2801 -#define GL_TEXTURE_WRAP_S 0x2802 -#define GL_TEXTURE_WRAP_T 0x2803 -#define GL_TEXTURE 0x1702 -#define GL_TEXTURE_CUBE_MAP 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C -#define GL_TEXTURE0 0x84C0 -#define GL_TEXTURE1 0x84C1 -#define GL_TEXTURE2 0x84C2 -#define GL_TEXTURE3 0x84C3 -#define GL_TEXTURE4 0x84C4 -#define GL_TEXTURE5 0x84C5 -#define GL_TEXTURE6 0x84C6 -#define GL_TEXTURE7 0x84C7 -#define GL_TEXTURE8 0x84C8 -#define GL_TEXTURE9 0x84C9 -#define GL_TEXTURE10 0x84CA -#define GL_TEXTURE11 0x84CB -#define GL_TEXTURE12 0x84CC -#define GL_TEXTURE13 0x84CD -#define GL_TEXTURE14 0x84CE -#define GL_TEXTURE15 0x84CF -#define GL_TEXTURE16 0x84D0 -#define GL_TEXTURE17 0x84D1 -#define GL_TEXTURE18 0x84D2 -#define GL_TEXTURE19 0x84D3 -#define GL_TEXTURE20 0x84D4 -#define GL_TEXTURE21 0x84D5 -#define GL_TEXTURE22 0x84D6 -#define GL_TEXTURE23 0x84D7 -#define GL_TEXTURE24 0x84D8 -#define GL_TEXTURE25 0x84D9 -#define GL_TEXTURE26 0x84DA -#define GL_TEXTURE27 0x84DB -#define GL_TEXTURE28 0x84DC -#define GL_TEXTURE29 0x84DD -#define GL_TEXTURE30 0x84DE -#define GL_TEXTURE31 0x84DF -#define GL_ACTIVE_TEXTURE 0x84E0 -#define GL_REPEAT 0x2901 -#define GL_CLAMP_TO_EDGE 0x812F -#define GL_MIRRORED_REPEAT 0x8370 -#define GL_FLOAT_VEC2 0x8B50 -#define GL_FLOAT_VEC3 0x8B51 -#define GL_FLOAT_VEC4 0x8B52 -#define GL_INT_VEC2 0x8B53 -#define GL_INT_VEC3 0x8B54 -#define GL_INT_VEC4 0x8B55 -#define GL_BOOL 0x8B56 -#define GL_BOOL_VEC2 0x8B57 -#define GL_BOOL_VEC3 0x8B58 -#define GL_BOOL_VEC4 0x8B59 -#define GL_FLOAT_MAT2 0x8B5A -#define GL_FLOAT_MAT3 0x8B5B -#define GL_FLOAT_MAT4 0x8B5C -#define GL_SAMPLER_2D 0x8B5E -#define GL_SAMPLER_CUBE 0x8B60 -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A -#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 -#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F -#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B -#define GL_COMPILE_STATUS 0x8B81 -#define GL_INFO_LOG_LENGTH 0x8B84 -#define GL_SHADER_SOURCE_LENGTH 0x8B88 -#define GL_SHADER_COMPILER 0x8DFA -#define GL_SHADER_BINARY_FORMATS 0x8DF8 -#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 -#define GL_LOW_FLOAT 0x8DF0 -#define GL_MEDIUM_FLOAT 0x8DF1 -#define GL_HIGH_FLOAT 0x8DF2 -#define GL_LOW_INT 0x8DF3 -#define GL_MEDIUM_INT 0x8DF4 -#define GL_HIGH_INT 0x8DF5 -#define GL_FRAMEBUFFER 0x8D40 -#define GL_RENDERBUFFER 0x8D41 -#define GL_RGBA4 0x8056 -#define GL_RGB5_A1 0x8057 -#define GL_RGB565 0x8D62 -#define GL_DEPTH_COMPONENT16 0x81A5 -#define GL_STENCIL_INDEX8 0x8D48 -#define GL_RENDERBUFFER_WIDTH 0x8D42 -#define GL_RENDERBUFFER_HEIGHT 0x8D43 -#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 -#define GL_RENDERBUFFER_RED_SIZE 0x8D50 -#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 -#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 -#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 -#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 -#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 -#define GL_COLOR_ATTACHMENT0 0x8CE0 -#define GL_DEPTH_ATTACHMENT 0x8D00 -#define GL_STENCIL_ATTACHMENT 0x8D20 -#define GL_NONE 0 -#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 -#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD -#define GL_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_RENDERBUFFER_BINDING 0x8CA7 -#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 -#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 -typedef void (GL_APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); -typedef void (GL_APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); -typedef void (GL_APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); -typedef void (GL_APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); -typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer); -typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer); -typedef void (GL_APIENTRYP PFNGLBINDTEXTUREPROC) (GLenum target, GLuint texture); -typedef void (GL_APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); -typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); -typedef void (GL_APIENTRYP PFNGLBLENDFUNCPROC) (GLenum sfactor, GLenum dfactor); -typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -typedef void (GL_APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage); -typedef void (GL_APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); -typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLCLEARPROC) (GLbitfield mask); -typedef void (GL_APIENTRYP PFNGLCLEARCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d); -typedef void (GL_APIENTRYP PFNGLCLEARSTENCILPROC) (GLint s); -typedef void (GL_APIENTRYP PFNGLCOLORMASKPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -typedef void (GL_APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader); -typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); -typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); -typedef void (GL_APIENTRYP PFNGLCOPYTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef GLuint (GL_APIENTRYP PFNGLCREATEPROGRAMPROC) (void); -typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); -typedef void (GL_APIENTRYP PFNGLCULLFACEPROC) (GLenum mode); -typedef void (GL_APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); -typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers); -typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program); -typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers); -typedef void (GL_APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader); -typedef void (GL_APIENTRYP PFNGLDELETETEXTURESPROC) (GLsizei n, const GLuint *textures); -typedef void (GL_APIENTRYP PFNGLDEPTHFUNCPROC) (GLenum func); -typedef void (GL_APIENTRYP PFNGLDEPTHMASKPROC) (GLboolean flag); -typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f); -typedef void (GL_APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); -typedef void (GL_APIENTRYP PFNGLDISABLEPROC) (GLenum cap); -typedef void (GL_APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); -typedef void (GL_APIENTRYP PFNGLDRAWARRAYSPROC) (GLenum mode, GLint first, GLsizei count); -typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices); -typedef void (GL_APIENTRYP PFNGLENABLEPROC) (GLenum cap); -typedef void (GL_APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); -typedef void (GL_APIENTRYP PFNGLFINISHPROC) (void); -typedef void (GL_APIENTRYP PFNGLFLUSHPROC) (void); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (GL_APIENTRYP PFNGLFRONTFACEPROC) (GLenum mode); -typedef void (GL_APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); -typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); -typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); -typedef void (GL_APIENTRYP PFNGLGENTEXTURESPROC) (GLsizei n, GLuint *textures); -typedef void (GL_APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -typedef void (GL_APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); -typedef GLint (GL_APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (GL_APIENTRYP PFNGLGETBOOLEANVPROC) (GLenum pname, GLboolean *data); -typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef GLenum (GL_APIENTRYP PFNGLGETERRORPROC) (void); -typedef void (GL_APIENTRYP PFNGLGETFLOATVPROC) (GLenum pname, GLfloat *data); -typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETINTEGERVPROC) (GLenum pname, GLint *data); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (GL_APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); -typedef void (GL_APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); -typedef const GLubyte *(GL_APIENTRYP PFNGLGETSTRINGPROC) (GLenum name); -typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); -typedef GLint (GL_APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer); -typedef void (GL_APIENTRYP PFNGLHINTPROC) (GLenum target, GLenum mode); -typedef GLboolean (GL_APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer); -typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDPROC) (GLenum cap); -typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer); -typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPROC) (GLuint program); -typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer); -typedef GLboolean (GL_APIENTRYP PFNGLISSHADERPROC) (GLuint shader); -typedef GLboolean (GL_APIENTRYP PFNGLISTEXTUREPROC) (GLuint texture); -typedef void (GL_APIENTRYP PFNGLLINEWIDTHPROC) (GLfloat width); -typedef void (GL_APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program); -typedef void (GL_APIENTRYP PFNGLPIXELSTOREIPROC) (GLenum pname, GLint param); -typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETPROC) (GLfloat factor, GLfloat units); -typedef void (GL_APIENTRYP PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); -typedef void (GL_APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void); -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert); -typedef void (GL_APIENTRYP PFNGLSCISSORPROC) (GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); -typedef void (GL_APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); -typedef void (GL_APIENTRYP PFNGLSTENCILFUNCPROC) (GLenum func, GLint ref, GLuint mask); -typedef void (GL_APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask); -typedef void (GL_APIENTRYP PFNGLSTENCILMASKPROC) (GLuint mask); -typedef void (GL_APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); -typedef void (GL_APIENTRYP PFNGLSTENCILOPPROC) (GLenum fail, GLenum zfail, GLenum zpass); -typedef void (GL_APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -typedef void (GL_APIENTRYP PFNGLTEXIMAGE2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat param); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GLint param); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -typedef void (GL_APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); -typedef void (GL_APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0); -typedef void (GL_APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); -typedef void (GL_APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); -typedef void (GL_APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (GL_APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); -typedef void (GL_APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (GL_APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (GL_APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program); -typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); -typedef void (GL_APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height); -#if GL_GLES_PROTOTYPES -GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture); -GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader); -GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); -GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); -GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); -GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); -GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); -GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode); -GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); -GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); -GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage); -GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); -GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target); -GL_APICALL void GL_APIENTRY glClear (GLbitfield mask); -GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d); -GL_APICALL void GL_APIENTRY glClearStencil (GLint s); -GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader); -GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); -GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); -GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL GLuint GL_APIENTRY glCreateProgram (void); -GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type); -GL_APICALL void GL_APIENTRY glCullFace (GLenum mode); -GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); -GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); -GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program); -GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); -GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader); -GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures); -GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func); -GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag); -GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f); -GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader); -GL_APICALL void GL_APIENTRY glDisable (GLenum cap); -GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index); -GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); -GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices); -GL_APICALL void GL_APIENTRY glEnable (GLenum cap); -GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index); -GL_APICALL void GL_APIENTRY glFinish (void); -GL_APICALL void GL_APIENTRY glFlush (void); -GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode); -GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); -GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target); -GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers); -GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); -GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures); -GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); -GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name); -GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data); -GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); -GL_APICALL GLenum GL_APIENTRY glGetError (void); -GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data); -GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data); -GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); -GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); -GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name); -GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params); -GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name); -GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer); -GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode); -GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); -GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap); -GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer); -GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program); -GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer); -GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader); -GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture); -GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width); -GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program); -GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); -GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); -GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void); -GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); -GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); -GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); -GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask); -GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); -GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); -GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); -GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); -GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params); -GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0); -GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0); -GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1); -GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1); -GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); -GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUseProgram (GLuint program); -GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program); -GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x); -GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); -GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); -GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); -GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); -#endif -#endif /* GL_ES_VERSION_2_0 */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/emscripten/include/pvrsdk/GLES2/gl2ext.h b/emscripten/include/pvrsdk/GLES2/gl2ext.h deleted file mode 100644 index 2826a495..00000000 --- a/emscripten/include/pvrsdk/GLES2/gl2ext.h +++ /dev/null @@ -1,3445 +0,0 @@ -#ifndef __gl2ext_h_ -#define __gl2ext_h_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2013-2017 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in 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, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER 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. -*/ -/* -** This header is generated from the Khronos OpenGL / OpenGL ES XML -** API Registry. The current version of the Registry, generator scripts -** used to make the header, and the header can be found at -** https://github.com/KhronosGroup/OpenGL-Registry -*/ - -#ifndef GL_APIENTRYP -#define GL_APIENTRYP GL_APIENTRY* -#endif - -/* Generated on date 20170628 */ - -/* Generated C header for: - * API: gles2 - * Profile: common - * Versions considered: 2\.[0-9] - * Versions emitted: _nomatch_^ - * Default extensions included: gles2 - * Additional extensions included: _nomatch_^ - * Extensions removed: _nomatch_^ - */ - -#ifndef GL_KHR_blend_equation_advanced -#define GL_KHR_blend_equation_advanced 1 -#define GL_MULTIPLY_KHR 0x9294 -#define GL_SCREEN_KHR 0x9295 -#define GL_OVERLAY_KHR 0x9296 -#define GL_DARKEN_KHR 0x9297 -#define GL_LIGHTEN_KHR 0x9298 -#define GL_COLORDODGE_KHR 0x9299 -#define GL_COLORBURN_KHR 0x929A -#define GL_HARDLIGHT_KHR 0x929B -#define GL_SOFTLIGHT_KHR 0x929C -#define GL_DIFFERENCE_KHR 0x929E -#define GL_EXCLUSION_KHR 0x92A0 -#define GL_HSL_HUE_KHR 0x92AD -#define GL_HSL_SATURATION_KHR 0x92AE -#define GL_HSL_COLOR_KHR 0x92AF -#define GL_HSL_LUMINOSITY_KHR 0x92B0 -typedef void (GL_APIENTRYP PFNGLBLENDBARRIERKHRPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glBlendBarrierKHR (void); -#endif -#endif /* GL_KHR_blend_equation_advanced */ - -#ifndef GL_KHR_blend_equation_advanced_coherent -#define GL_KHR_blend_equation_advanced_coherent 1 -#define GL_BLEND_ADVANCED_COHERENT_KHR 0x9285 -#endif /* GL_KHR_blend_equation_advanced_coherent */ - -#ifndef GL_KHR_context_flush_control -#define GL_KHR_context_flush_control 1 -#define GL_CONTEXT_RELEASE_BEHAVIOR_KHR 0x82FB -#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR 0x82FC -#endif /* GL_KHR_context_flush_control */ - -#ifndef GL_KHR_debug -#define GL_KHR_debug 1 -typedef void (GL_APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); -#define GL_SAMPLER 0x82E6 -#define GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR 0x8242 -#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR 0x8243 -#define GL_DEBUG_CALLBACK_FUNCTION_KHR 0x8244 -#define GL_DEBUG_CALLBACK_USER_PARAM_KHR 0x8245 -#define GL_DEBUG_SOURCE_API_KHR 0x8246 -#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR 0x8247 -#define GL_DEBUG_SOURCE_SHADER_COMPILER_KHR 0x8248 -#define GL_DEBUG_SOURCE_THIRD_PARTY_KHR 0x8249 -#define GL_DEBUG_SOURCE_APPLICATION_KHR 0x824A -#define GL_DEBUG_SOURCE_OTHER_KHR 0x824B -#define GL_DEBUG_TYPE_ERROR_KHR 0x824C -#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR 0x824D -#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR 0x824E -#define GL_DEBUG_TYPE_PORTABILITY_KHR 0x824F -#define GL_DEBUG_TYPE_PERFORMANCE_KHR 0x8250 -#define GL_DEBUG_TYPE_OTHER_KHR 0x8251 -#define GL_DEBUG_TYPE_MARKER_KHR 0x8268 -#define GL_DEBUG_TYPE_PUSH_GROUP_KHR 0x8269 -#define GL_DEBUG_TYPE_POP_GROUP_KHR 0x826A -#define GL_DEBUG_SEVERITY_NOTIFICATION_KHR 0x826B -#define GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR 0x826C -#define GL_DEBUG_GROUP_STACK_DEPTH_KHR 0x826D -#define GL_BUFFER_KHR 0x82E0 -#define GL_SHADER_KHR 0x82E1 -#define GL_PROGRAM_KHR 0x82E2 -#define GL_VERTEX_ARRAY_KHR 0x8074 -#define GL_QUERY_KHR 0x82E3 -#define GL_PROGRAM_PIPELINE_KHR 0x82E4 -#define GL_SAMPLER_KHR 0x82E6 -#define GL_MAX_LABEL_LENGTH_KHR 0x82E8 -#define GL_MAX_DEBUG_MESSAGE_LENGTH_KHR 0x9143 -#define GL_MAX_DEBUG_LOGGED_MESSAGES_KHR 0x9144 -#define GL_DEBUG_LOGGED_MESSAGES_KHR 0x9145 -#define GL_DEBUG_SEVERITY_HIGH_KHR 0x9146 -#define GL_DEBUG_SEVERITY_MEDIUM_KHR 0x9147 -#define GL_DEBUG_SEVERITY_LOW_KHR 0x9148 -#define GL_DEBUG_OUTPUT_KHR 0x92E0 -#define GL_CONTEXT_FLAG_DEBUG_BIT_KHR 0x00000002 -#define GL_STACK_OVERFLOW_KHR 0x0503 -#define GL_STACK_UNDERFLOW_KHR 0x0504 -typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLKHRPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTKHRPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKKHRPROC) (GLDEBUGPROCKHR callback, const void *userParam); -typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPKHRPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message); -typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPKHRPROC) (void); -typedef void (GL_APIENTRYP PFNGLOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); -typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); -typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei length, const GLchar *label); -typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); -typedef void (GL_APIENTRYP PFNGLGETPOINTERVKHRPROC) (GLenum pname, void **params); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDebugMessageControlKHR (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -GL_APICALL void GL_APIENTRY glDebugMessageInsertKHR (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -GL_APICALL void GL_APIENTRY glDebugMessageCallbackKHR (GLDEBUGPROCKHR callback, const void *userParam); -GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLogKHR (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -GL_APICALL void GL_APIENTRY glPushDebugGroupKHR (GLenum source, GLuint id, GLsizei length, const GLchar *message); -GL_APICALL void GL_APIENTRY glPopDebugGroupKHR (void); -GL_APICALL void GL_APIENTRY glObjectLabelKHR (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); -GL_APICALL void GL_APIENTRY glGetObjectLabelKHR (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); -GL_APICALL void GL_APIENTRY glObjectPtrLabelKHR (const void *ptr, GLsizei length, const GLchar *label); -GL_APICALL void GL_APIENTRY glGetObjectPtrLabelKHR (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); -GL_APICALL void GL_APIENTRY glGetPointervKHR (GLenum pname, void **params); -#endif -#endif /* GL_KHR_debug */ - -#ifndef GL_KHR_no_error -#define GL_KHR_no_error 1 -#define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008 -#endif /* GL_KHR_no_error */ - -#ifndef GL_KHR_robust_buffer_access_behavior -#define GL_KHR_robust_buffer_access_behavior 1 -#endif /* GL_KHR_robust_buffer_access_behavior */ - -#ifndef GL_KHR_robustness -#define GL_KHR_robustness 1 -#define GL_CONTEXT_ROBUST_ACCESS_KHR 0x90F3 -#define GL_LOSE_CONTEXT_ON_RESET_KHR 0x8252 -#define GL_GUILTY_CONTEXT_RESET_KHR 0x8253 -#define GL_INNOCENT_CONTEXT_RESET_KHR 0x8254 -#define GL_UNKNOWN_CONTEXT_RESET_KHR 0x8255 -#define GL_RESET_NOTIFICATION_STRATEGY_KHR 0x8256 -#define GL_NO_RESET_NOTIFICATION_KHR 0x8261 -#define GL_CONTEXT_LOST_KHR 0x0507 -typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSKHRPROC) (void); -typedef void (GL_APIENTRYP PFNGLREADNPIXELSKHRPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); -typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVKHRPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVKHRPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETNUNIFORMUIVKHRPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusKHR (void); -GL_APICALL void GL_APIENTRY glReadnPixelsKHR (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); -GL_APICALL void GL_APIENTRY glGetnUniformfvKHR (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetnUniformivKHR (GLuint program, GLint location, GLsizei bufSize, GLint *params); -GL_APICALL void GL_APIENTRY glGetnUniformuivKHR (GLuint program, GLint location, GLsizei bufSize, GLuint *params); -#endif -#endif /* GL_KHR_robustness */ - -#ifndef GL_KHR_texture_compression_astc_hdr -#define GL_KHR_texture_compression_astc_hdr 1 -#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0 -#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1 -#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2 -#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3 -#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4 -#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5 -#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6 -#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7 -#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8 -#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9 -#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA -#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB -#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC -#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD -#endif /* GL_KHR_texture_compression_astc_hdr */ - -#ifndef GL_KHR_texture_compression_astc_ldr -#define GL_KHR_texture_compression_astc_ldr 1 -#endif /* GL_KHR_texture_compression_astc_ldr */ - -#ifndef GL_KHR_texture_compression_astc_sliced_3d -#define GL_KHR_texture_compression_astc_sliced_3d 1 -#endif /* GL_KHR_texture_compression_astc_sliced_3d */ - -#ifndef GL_OES_EGL_image -#define GL_OES_EGL_image 1 -typedef void *GLeglImageOES; -typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); -typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); -GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image); -#endif -#endif /* GL_OES_EGL_image */ - -#ifndef GL_OES_EGL_image_external -#define GL_OES_EGL_image_external 1 -#define GL_TEXTURE_EXTERNAL_OES 0x8D65 -#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67 -#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68 -#define GL_SAMPLER_EXTERNAL_OES 0x8D66 -#endif /* GL_OES_EGL_image_external */ - -#ifndef GL_OES_EGL_image_external_essl3 -#define GL_OES_EGL_image_external_essl3 1 -#endif /* GL_OES_EGL_image_external_essl3 */ - -#ifndef GL_OES_compressed_ETC1_RGB8_sub_texture -#define GL_OES_compressed_ETC1_RGB8_sub_texture 1 -#endif /* GL_OES_compressed_ETC1_RGB8_sub_texture */ - -#ifndef GL_OES_compressed_ETC1_RGB8_texture -#define GL_OES_compressed_ETC1_RGB8_texture 1 -#define GL_ETC1_RGB8_OES 0x8D64 -#endif /* GL_OES_compressed_ETC1_RGB8_texture */ - -#ifndef GL_OES_compressed_paletted_texture -#define GL_OES_compressed_paletted_texture 1 -#define GL_PALETTE4_RGB8_OES 0x8B90 -#define GL_PALETTE4_RGBA8_OES 0x8B91 -#define GL_PALETTE4_R5_G6_B5_OES 0x8B92 -#define GL_PALETTE4_RGBA4_OES 0x8B93 -#define GL_PALETTE4_RGB5_A1_OES 0x8B94 -#define GL_PALETTE8_RGB8_OES 0x8B95 -#define GL_PALETTE8_RGBA8_OES 0x8B96 -#define GL_PALETTE8_R5_G6_B5_OES 0x8B97 -#define GL_PALETTE8_RGBA4_OES 0x8B98 -#define GL_PALETTE8_RGB5_A1_OES 0x8B99 -#endif /* GL_OES_compressed_paletted_texture */ - -#ifndef GL_OES_copy_image -#define GL_OES_copy_image 1 -typedef void (GL_APIENTRYP PFNGLCOPYIMAGESUBDATAOESPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glCopyImageSubDataOES (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); -#endif -#endif /* GL_OES_copy_image */ - -#ifndef GL_OES_depth24 -#define GL_OES_depth24 1 -#define GL_DEPTH_COMPONENT24_OES 0x81A6 -#endif /* GL_OES_depth24 */ - -#ifndef GL_OES_depth32 -#define GL_OES_depth32 1 -#define GL_DEPTH_COMPONENT32_OES 0x81A7 -#endif /* GL_OES_depth32 */ - -#ifndef GL_OES_depth_texture -#define GL_OES_depth_texture 1 -#endif /* GL_OES_depth_texture */ - -#ifndef GL_OES_draw_buffers_indexed -#define GL_OES_draw_buffers_indexed 1 -#define GL_MIN 0x8007 -#define GL_MAX 0x8008 -typedef void (GL_APIENTRYP PFNGLENABLEIOESPROC) (GLenum target, GLuint index); -typedef void (GL_APIENTRYP PFNGLDISABLEIOESPROC) (GLenum target, GLuint index); -typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONIOESPROC) (GLuint buf, GLenum mode); -typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEIOESPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -typedef void (GL_APIENTRYP PFNGLBLENDFUNCIOESPROC) (GLuint buf, GLenum src, GLenum dst); -typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEIOESPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -typedef void (GL_APIENTRYP PFNGLCOLORMASKIOESPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDIOESPROC) (GLenum target, GLuint index); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glEnableiOES (GLenum target, GLuint index); -GL_APICALL void GL_APIENTRY glDisableiOES (GLenum target, GLuint index); -GL_APICALL void GL_APIENTRY glBlendEquationiOES (GLuint buf, GLenum mode); -GL_APICALL void GL_APIENTRY glBlendEquationSeparateiOES (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -GL_APICALL void GL_APIENTRY glBlendFunciOES (GLuint buf, GLenum src, GLenum dst); -GL_APICALL void GL_APIENTRY glBlendFuncSeparateiOES (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -GL_APICALL void GL_APIENTRY glColorMaskiOES (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -GL_APICALL GLboolean GL_APIENTRY glIsEnablediOES (GLenum target, GLuint index); -#endif -#endif /* GL_OES_draw_buffers_indexed */ - -#ifndef GL_OES_draw_elements_base_vertex -#define GL_OES_draw_elements_base_vertex 1 -typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXOESPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); -typedef void (GL_APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXOESPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); -typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXOESPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); -typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXOESPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, const GLint *basevertex); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDrawElementsBaseVertexOES (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); -GL_APICALL void GL_APIENTRY glDrawRangeElementsBaseVertexOES (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); -GL_APICALL void GL_APIENTRY glDrawElementsInstancedBaseVertexOES (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); -GL_APICALL void GL_APIENTRY glMultiDrawElementsBaseVertexOES (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, const GLint *basevertex); -#endif -#endif /* GL_OES_draw_elements_base_vertex */ - -#ifndef GL_OES_element_index_uint -#define GL_OES_element_index_uint 1 -#endif /* GL_OES_element_index_uint */ - -#ifndef GL_OES_fbo_render_mipmap -#define GL_OES_fbo_render_mipmap 1 -#endif /* GL_OES_fbo_render_mipmap */ - -#ifndef GL_OES_fragment_precision_high -#define GL_OES_fragment_precision_high 1 -#endif /* GL_OES_fragment_precision_high */ - -#ifndef GL_OES_geometry_point_size -#define GL_OES_geometry_point_size 1 -#endif /* GL_OES_geometry_point_size */ - -#ifndef GL_OES_geometry_shader -#define GL_OES_geometry_shader 1 -#define GL_GEOMETRY_SHADER_OES 0x8DD9 -#define GL_GEOMETRY_SHADER_BIT_OES 0x00000004 -#define GL_GEOMETRY_LINKED_VERTICES_OUT_OES 0x8916 -#define GL_GEOMETRY_LINKED_INPUT_TYPE_OES 0x8917 -#define GL_GEOMETRY_LINKED_OUTPUT_TYPE_OES 0x8918 -#define GL_GEOMETRY_SHADER_INVOCATIONS_OES 0x887F -#define GL_LAYER_PROVOKING_VERTEX_OES 0x825E -#define GL_LINES_ADJACENCY_OES 0x000A -#define GL_LINE_STRIP_ADJACENCY_OES 0x000B -#define GL_TRIANGLES_ADJACENCY_OES 0x000C -#define GL_TRIANGLE_STRIP_ADJACENCY_OES 0x000D -#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_OES 0x8DDF -#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS_OES 0x8A2C -#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_OES 0x8A32 -#define GL_MAX_GEOMETRY_INPUT_COMPONENTS_OES 0x9123 -#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS_OES 0x9124 -#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_OES 0x8DE0 -#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_OES 0x8DE1 -#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS_OES 0x8E5A -#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_OES 0x8C29 -#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_OES 0x92CF -#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS_OES 0x92D5 -#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS_OES 0x90CD -#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_OES 0x90D7 -#define GL_FIRST_VERTEX_CONVENTION_OES 0x8E4D -#define GL_LAST_VERTEX_CONVENTION_OES 0x8E4E -#define GL_UNDEFINED_VERTEX_OES 0x8260 -#define GL_PRIMITIVES_GENERATED_OES 0x8C87 -#define GL_FRAMEBUFFER_DEFAULT_LAYERS_OES 0x9312 -#define GL_MAX_FRAMEBUFFER_LAYERS_OES 0x9317 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_OES 0x8DA8 -#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_OES 0x8DA7 -#define GL_REFERENCED_BY_GEOMETRY_SHADER_OES 0x9309 -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREOESPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glFramebufferTextureOES (GLenum target, GLenum attachment, GLuint texture, GLint level); -#endif -#endif /* GL_OES_geometry_shader */ - -#ifndef GL_OES_get_program_binary -#define GL_OES_get_program_binary 1 -#define GL_PROGRAM_BINARY_LENGTH_OES 0x8741 -#define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE -#define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF -typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); -typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLint length); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); -GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const void *binary, GLint length); -#endif -#endif /* GL_OES_get_program_binary */ - -#ifndef GL_OES_gpu_shader5 -#define GL_OES_gpu_shader5 1 -#endif /* GL_OES_gpu_shader5 */ - -#ifndef GL_OES_mapbuffer -#define GL_OES_mapbuffer 1 -#define GL_WRITE_ONLY_OES 0x88B9 -#define GL_BUFFER_ACCESS_OES 0x88BB -#define GL_BUFFER_MAPPED_OES 0x88BC -#define GL_BUFFER_MAP_POINTER_OES 0x88BD -typedef void *(GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access); -typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void **params); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void *GL_APIENTRY glMapBufferOES (GLenum target, GLenum access); -GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target); -GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, void **params); -#endif -#endif /* GL_OES_mapbuffer */ - -#ifndef GL_OES_packed_depth_stencil -#define GL_OES_packed_depth_stencil 1 -#define GL_DEPTH_STENCIL_OES 0x84F9 -#define GL_UNSIGNED_INT_24_8_OES 0x84FA -#define GL_DEPTH24_STENCIL8_OES 0x88F0 -#endif /* GL_OES_packed_depth_stencil */ - -#ifndef GL_OES_primitive_bounding_box -#define GL_OES_primitive_bounding_box 1 -#define GL_PRIMITIVE_BOUNDING_BOX_OES 0x92BE -typedef void (GL_APIENTRYP PFNGLPRIMITIVEBOUNDINGBOXOESPROC) (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glPrimitiveBoundingBoxOES (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); -#endif -#endif /* GL_OES_primitive_bounding_box */ - -#ifndef GL_OES_required_internalformat -#define GL_OES_required_internalformat 1 -#define GL_ALPHA8_OES 0x803C -#define GL_DEPTH_COMPONENT16_OES 0x81A5 -#define GL_LUMINANCE4_ALPHA4_OES 0x8043 -#define GL_LUMINANCE8_ALPHA8_OES 0x8045 -#define GL_LUMINANCE8_OES 0x8040 -#define GL_RGBA4_OES 0x8056 -#define GL_RGB5_A1_OES 0x8057 -#define GL_RGB565_OES 0x8D62 -#define GL_RGB8_OES 0x8051 -#define GL_RGBA8_OES 0x8058 -#define GL_RGB10_EXT 0x8052 -#define GL_RGB10_A2_EXT 0x8059 -#endif /* GL_OES_required_internalformat */ - -#ifndef GL_OES_rgb8_rgba8 -#define GL_OES_rgb8_rgba8 1 -#endif /* GL_OES_rgb8_rgba8 */ - -#ifndef GL_OES_sample_shading -#define GL_OES_sample_shading 1 -#define GL_SAMPLE_SHADING_OES 0x8C36 -#define GL_MIN_SAMPLE_SHADING_VALUE_OES 0x8C37 -typedef void (GL_APIENTRYP PFNGLMINSAMPLESHADINGOESPROC) (GLfloat value); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glMinSampleShadingOES (GLfloat value); -#endif -#endif /* GL_OES_sample_shading */ - -#ifndef GL_OES_sample_variables -#define GL_OES_sample_variables 1 -#endif /* GL_OES_sample_variables */ - -#ifndef GL_OES_shader_image_atomic -#define GL_OES_shader_image_atomic 1 -#endif /* GL_OES_shader_image_atomic */ - -#ifndef GL_OES_shader_io_blocks -#define GL_OES_shader_io_blocks 1 -#endif /* GL_OES_shader_io_blocks */ - -#ifndef GL_OES_shader_multisample_interpolation -#define GL_OES_shader_multisample_interpolation 1 -#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_OES 0x8E5B -#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_OES 0x8E5C -#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS_OES 0x8E5D -#endif /* GL_OES_shader_multisample_interpolation */ - -#ifndef GL_OES_standard_derivatives -#define GL_OES_standard_derivatives 1 -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B -#endif /* GL_OES_standard_derivatives */ - -#ifndef GL_OES_stencil1 -#define GL_OES_stencil1 1 -#define GL_STENCIL_INDEX1_OES 0x8D46 -#endif /* GL_OES_stencil1 */ - -#ifndef GL_OES_stencil4 -#define GL_OES_stencil4 1 -#define GL_STENCIL_INDEX4_OES 0x8D47 -#endif /* GL_OES_stencil4 */ - -#ifndef GL_OES_surfaceless_context -#define GL_OES_surfaceless_context 1 -#define GL_FRAMEBUFFER_UNDEFINED_OES 0x8219 -#endif /* GL_OES_surfaceless_context */ - -#ifndef GL_OES_tessellation_point_size -#define GL_OES_tessellation_point_size 1 -#endif /* GL_OES_tessellation_point_size */ - -#ifndef GL_OES_tessellation_shader -#define GL_OES_tessellation_shader 1 -#define GL_PATCHES_OES 0x000E -#define GL_PATCH_VERTICES_OES 0x8E72 -#define GL_TESS_CONTROL_OUTPUT_VERTICES_OES 0x8E75 -#define GL_TESS_GEN_MODE_OES 0x8E76 -#define GL_TESS_GEN_SPACING_OES 0x8E77 -#define GL_TESS_GEN_VERTEX_ORDER_OES 0x8E78 -#define GL_TESS_GEN_POINT_MODE_OES 0x8E79 -#define GL_ISOLINES_OES 0x8E7A -#define GL_QUADS_OES 0x0007 -#define GL_FRACTIONAL_ODD_OES 0x8E7B -#define GL_FRACTIONAL_EVEN_OES 0x8E7C -#define GL_MAX_PATCH_VERTICES_OES 0x8E7D -#define GL_MAX_TESS_GEN_LEVEL_OES 0x8E7E -#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS_OES 0x8E7F -#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_OES 0x8E80 -#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS_OES 0x8E81 -#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS_OES 0x8E82 -#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_OES 0x8E83 -#define GL_MAX_TESS_PATCH_COMPONENTS_OES 0x8E84 -#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_OES 0x8E85 -#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_OES 0x8E86 -#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS_OES 0x8E89 -#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS_OES 0x8E8A -#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS_OES 0x886C -#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS_OES 0x886D -#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_OES 0x8E1E -#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_OES 0x8E1F -#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_OES 0x92CD -#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS_OES 0x92CE -#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS_OES 0x92D3 -#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS_OES 0x92D4 -#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS_OES 0x90CB -#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS_OES 0x90CC -#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_OES 0x90D8 -#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_OES 0x90D9 -#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED_OES 0x8221 -#define GL_IS_PER_PATCH_OES 0x92E7 -#define GL_REFERENCED_BY_TESS_CONTROL_SHADER_OES 0x9307 -#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER_OES 0x9308 -#define GL_TESS_CONTROL_SHADER_OES 0x8E88 -#define GL_TESS_EVALUATION_SHADER_OES 0x8E87 -#define GL_TESS_CONTROL_SHADER_BIT_OES 0x00000008 -#define GL_TESS_EVALUATION_SHADER_BIT_OES 0x00000010 -typedef void (GL_APIENTRYP PFNGLPATCHPARAMETERIOESPROC) (GLenum pname, GLint value); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glPatchParameteriOES (GLenum pname, GLint value); -#endif -#endif /* GL_OES_tessellation_shader */ - -#ifndef GL_OES_texture_3D -#define GL_OES_texture_3D 1 -#define GL_TEXTURE_WRAP_R_OES 0x8072 -#define GL_TEXTURE_3D_OES 0x806F -#define GL_TEXTURE_BINDING_3D_OES 0x806A -#define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073 -#define GL_SAMPLER_3D_OES 0x8B5F -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4 -typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); -typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); -GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); -GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -#endif -#endif /* GL_OES_texture_3D */ - -#ifndef GL_OES_texture_border_clamp -#define GL_OES_texture_border_clamp 1 -#define GL_TEXTURE_BORDER_COLOR_OES 0x1004 -#define GL_CLAMP_TO_BORDER_OES 0x812D -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIIVOESPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIUIVOESPROC) (GLenum target, GLenum pname, const GLuint *params); -typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIIVOESPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIUIVOESPROC) (GLenum target, GLenum pname, GLuint *params); -typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIIVOESPROC) (GLuint sampler, GLenum pname, const GLint *param); -typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIUIVOESPROC) (GLuint sampler, GLenum pname, const GLuint *param); -typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIIVOESPROC) (GLuint sampler, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVOESPROC) (GLuint sampler, GLenum pname, GLuint *params); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glTexParameterIivOES (GLenum target, GLenum pname, const GLint *params); -GL_APICALL void GL_APIENTRY glTexParameterIuivOES (GLenum target, GLenum pname, const GLuint *params); -GL_APICALL void GL_APIENTRY glGetTexParameterIivOES (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetTexParameterIuivOES (GLenum target, GLenum pname, GLuint *params); -GL_APICALL void GL_APIENTRY glSamplerParameterIivOES (GLuint sampler, GLenum pname, const GLint *param); -GL_APICALL void GL_APIENTRY glSamplerParameterIuivOES (GLuint sampler, GLenum pname, const GLuint *param); -GL_APICALL void GL_APIENTRY glGetSamplerParameterIivOES (GLuint sampler, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetSamplerParameterIuivOES (GLuint sampler, GLenum pname, GLuint *params); -#endif -#endif /* GL_OES_texture_border_clamp */ - -#ifndef GL_OES_texture_buffer -#define GL_OES_texture_buffer 1 -#define GL_TEXTURE_BUFFER_OES 0x8C2A -#define GL_TEXTURE_BUFFER_BINDING_OES 0x8C2A -#define GL_MAX_TEXTURE_BUFFER_SIZE_OES 0x8C2B -#define GL_TEXTURE_BINDING_BUFFER_OES 0x8C2C -#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_OES 0x8C2D -#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT_OES 0x919F -#define GL_SAMPLER_BUFFER_OES 0x8DC2 -#define GL_INT_SAMPLER_BUFFER_OES 0x8DD0 -#define GL_UNSIGNED_INT_SAMPLER_BUFFER_OES 0x8DD8 -#define GL_IMAGE_BUFFER_OES 0x9051 -#define GL_INT_IMAGE_BUFFER_OES 0x905C -#define GL_UNSIGNED_INT_IMAGE_BUFFER_OES 0x9067 -#define GL_TEXTURE_BUFFER_OFFSET_OES 0x919D -#define GL_TEXTURE_BUFFER_SIZE_OES 0x919E -typedef void (GL_APIENTRYP PFNGLTEXBUFFEROESPROC) (GLenum target, GLenum internalformat, GLuint buffer); -typedef void (GL_APIENTRYP PFNGLTEXBUFFERRANGEOESPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glTexBufferOES (GLenum target, GLenum internalformat, GLuint buffer); -GL_APICALL void GL_APIENTRY glTexBufferRangeOES (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); -#endif -#endif /* GL_OES_texture_buffer */ - -#ifndef GL_OES_texture_compression_astc -#define GL_OES_texture_compression_astc 1 -#define GL_COMPRESSED_RGBA_ASTC_3x3x3_OES 0x93C0 -#define GL_COMPRESSED_RGBA_ASTC_4x3x3_OES 0x93C1 -#define GL_COMPRESSED_RGBA_ASTC_4x4x3_OES 0x93C2 -#define GL_COMPRESSED_RGBA_ASTC_4x4x4_OES 0x93C3 -#define GL_COMPRESSED_RGBA_ASTC_5x4x4_OES 0x93C4 -#define GL_COMPRESSED_RGBA_ASTC_5x5x4_OES 0x93C5 -#define GL_COMPRESSED_RGBA_ASTC_5x5x5_OES 0x93C6 -#define GL_COMPRESSED_RGBA_ASTC_6x5x5_OES 0x93C7 -#define GL_COMPRESSED_RGBA_ASTC_6x6x5_OES 0x93C8 -#define GL_COMPRESSED_RGBA_ASTC_6x6x6_OES 0x93C9 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES 0x93E0 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES 0x93E1 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES 0x93E2 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES 0x93E3 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES 0x93E4 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES 0x93E5 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES 0x93E6 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES 0x93E7 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES 0x93E8 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES 0x93E9 -#endif /* GL_OES_texture_compression_astc */ - -#ifndef GL_OES_texture_cube_map_array -#define GL_OES_texture_cube_map_array 1 -#define GL_TEXTURE_CUBE_MAP_ARRAY_OES 0x9009 -#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_OES 0x900A -#define GL_SAMPLER_CUBE_MAP_ARRAY_OES 0x900C -#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_OES 0x900D -#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_OES 0x900E -#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_OES 0x900F -#define GL_IMAGE_CUBE_MAP_ARRAY_OES 0x9054 -#define GL_INT_IMAGE_CUBE_MAP_ARRAY_OES 0x905F -#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_OES 0x906A -#endif /* GL_OES_texture_cube_map_array */ - -#ifndef GL_OES_texture_float -#define GL_OES_texture_float 1 -#endif /* GL_OES_texture_float */ - -#ifndef GL_OES_texture_float_linear -#define GL_OES_texture_float_linear 1 -#endif /* GL_OES_texture_float_linear */ - -#ifndef GL_OES_texture_half_float -#define GL_OES_texture_half_float 1 -#define GL_HALF_FLOAT_OES 0x8D61 -#endif /* GL_OES_texture_half_float */ - -#ifndef GL_OES_texture_half_float_linear -#define GL_OES_texture_half_float_linear 1 -#endif /* GL_OES_texture_half_float_linear */ - -#ifndef GL_OES_texture_npot -#define GL_OES_texture_npot 1 -#endif /* GL_OES_texture_npot */ - -#ifndef GL_OES_texture_stencil8 -#define GL_OES_texture_stencil8 1 -#define GL_STENCIL_INDEX_OES 0x1901 -#define GL_STENCIL_INDEX8_OES 0x8D48 -#endif /* GL_OES_texture_stencil8 */ - -#ifndef GL_OES_texture_storage_multisample_2d_array -#define GL_OES_texture_storage_multisample_2d_array 1 -#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY_OES 0x9102 -#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY_OES 0x9105 -#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY_OES 0x910B -#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES 0x910C -#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES 0x910D -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEOESPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glTexStorage3DMultisampleOES (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -#endif -#endif /* GL_OES_texture_storage_multisample_2d_array */ - -#ifndef GL_OES_texture_view -#define GL_OES_texture_view 1 -#define GL_TEXTURE_VIEW_MIN_LEVEL_OES 0x82DB -#define GL_TEXTURE_VIEW_NUM_LEVELS_OES 0x82DC -#define GL_TEXTURE_VIEW_MIN_LAYER_OES 0x82DD -#define GL_TEXTURE_VIEW_NUM_LAYERS_OES 0x82DE -#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF -typedef void (GL_APIENTRYP PFNGLTEXTUREVIEWOESPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glTextureViewOES (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); -#endif -#endif /* GL_OES_texture_view */ - -#ifndef GL_OES_vertex_array_object -#define GL_OES_vertex_array_object 1 -#define GL_VERTEX_ARRAY_BINDING_OES 0x85B5 -typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array); -typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays); -typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays); -typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array); -GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays); -GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays); -GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array); -#endif -#endif /* GL_OES_vertex_array_object */ - -#ifndef GL_OES_vertex_half_float -#define GL_OES_vertex_half_float 1 -#endif /* GL_OES_vertex_half_float */ - -#ifndef GL_OES_vertex_type_10_10_10_2 -#define GL_OES_vertex_type_10_10_10_2 1 -#define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6 -#define GL_INT_10_10_10_2_OES 0x8DF7 -#endif /* GL_OES_vertex_type_10_10_10_2 */ - -#ifndef GL_OES_viewport_array -#define GL_OES_viewport_array 1 -#define GL_MAX_VIEWPORTS_OES 0x825B -#define GL_VIEWPORT_SUBPIXEL_BITS_OES 0x825C -#define GL_VIEWPORT_BOUNDS_RANGE_OES 0x825D -#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX_OES 0x825F -typedef void (GL_APIENTRYP PFNGLVIEWPORTARRAYVOESPROC) (GLuint first, GLsizei count, const GLfloat *v); -typedef void (GL_APIENTRYP PFNGLVIEWPORTINDEXEDFOESPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); -typedef void (GL_APIENTRYP PFNGLVIEWPORTINDEXEDFVOESPROC) (GLuint index, const GLfloat *v); -typedef void (GL_APIENTRYP PFNGLSCISSORARRAYVOESPROC) (GLuint first, GLsizei count, const GLint *v); -typedef void (GL_APIENTRYP PFNGLSCISSORINDEXEDOESPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLSCISSORINDEXEDVOESPROC) (GLuint index, const GLint *v); -typedef void (GL_APIENTRYP PFNGLDEPTHRANGEARRAYFVOESPROC) (GLuint first, GLsizei count, const GLfloat *v); -typedef void (GL_APIENTRYP PFNGLDEPTHRANGEINDEXEDFOESPROC) (GLuint index, GLfloat n, GLfloat f); -typedef void (GL_APIENTRYP PFNGLGETFLOATI_VOESPROC) (GLenum target, GLuint index, GLfloat *data); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glViewportArrayvOES (GLuint first, GLsizei count, const GLfloat *v); -GL_APICALL void GL_APIENTRY glViewportIndexedfOES (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); -GL_APICALL void GL_APIENTRY glViewportIndexedfvOES (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glScissorArrayvOES (GLuint first, GLsizei count, const GLint *v); -GL_APICALL void GL_APIENTRY glScissorIndexedOES (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glScissorIndexedvOES (GLuint index, const GLint *v); -GL_APICALL void GL_APIENTRY glDepthRangeArrayfvOES (GLuint first, GLsizei count, const GLfloat *v); -GL_APICALL void GL_APIENTRY glDepthRangeIndexedfOES (GLuint index, GLfloat n, GLfloat f); -GL_APICALL void GL_APIENTRY glGetFloati_vOES (GLenum target, GLuint index, GLfloat *data); -#endif -#endif /* GL_OES_viewport_array */ - -#ifndef GL_AMD_compressed_3DC_texture -#define GL_AMD_compressed_3DC_texture 1 -#define GL_3DC_X_AMD 0x87F9 -#define GL_3DC_XY_AMD 0x87FA -#endif /* GL_AMD_compressed_3DC_texture */ - -#ifndef GL_AMD_compressed_ATC_texture -#define GL_AMD_compressed_ATC_texture 1 -#define GL_ATC_RGB_AMD 0x8C92 -#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93 -#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE -#endif /* GL_AMD_compressed_ATC_texture */ - -#ifndef GL_AMD_performance_monitor -#define GL_AMD_performance_monitor 1 -#define GL_COUNTER_TYPE_AMD 0x8BC0 -#define GL_COUNTER_RANGE_AMD 0x8BC1 -#define GL_UNSIGNED_INT64_AMD 0x8BC2 -#define GL_PERCENTAGE_AMD 0x8BC3 -#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 -#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 -#define GL_PERFMON_RESULT_AMD 0x8BC6 -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data); -typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); -typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); -typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); -typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor); -typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups); -GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); -GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); -GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); -GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data); -GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors); -GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors); -GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); -GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor); -GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor); -GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); -#endif -#endif /* GL_AMD_performance_monitor */ - -#ifndef GL_AMD_program_binary_Z400 -#define GL_AMD_program_binary_Z400 1 -#define GL_Z400_BINARY_AMD 0x8740 -#endif /* GL_AMD_program_binary_Z400 */ - -#ifndef GL_ANDROID_extension_pack_es31a -#define GL_ANDROID_extension_pack_es31a 1 -#endif /* GL_ANDROID_extension_pack_es31a */ - -#ifndef GL_ANGLE_depth_texture -#define GL_ANGLE_depth_texture 1 -#endif /* GL_ANGLE_depth_texture */ - -#ifndef GL_ANGLE_framebuffer_blit -#define GL_ANGLE_framebuffer_blit 1 -#define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8 -#define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9 -#define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6 -#define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA -typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -#endif -#endif /* GL_ANGLE_framebuffer_blit */ - -#ifndef GL_ANGLE_framebuffer_multisample -#define GL_ANGLE_framebuffer_multisample 1 -#define GL_RENDERBUFFER_SAMPLES_ANGLE 0x8CAB -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56 -#define GL_MAX_SAMPLES_ANGLE 0x8D57 -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -#endif -#endif /* GL_ANGLE_framebuffer_multisample */ - -#ifndef GL_ANGLE_instanced_arrays -#define GL_ANGLE_instanced_arrays 1 -#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 0x88FE -typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); -GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE (GLuint index, GLuint divisor); -#endif -#endif /* GL_ANGLE_instanced_arrays */ - -#ifndef GL_ANGLE_pack_reverse_row_order -#define GL_ANGLE_pack_reverse_row_order 1 -#define GL_PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4 -#endif /* GL_ANGLE_pack_reverse_row_order */ - -#ifndef GL_ANGLE_program_binary -#define GL_ANGLE_program_binary 1 -#define GL_PROGRAM_BINARY_ANGLE 0x93A6 -#endif /* GL_ANGLE_program_binary */ - -#ifndef GL_ANGLE_texture_compression_dxt3 -#define GL_ANGLE_texture_compression_dxt3 1 -#define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2 -#endif /* GL_ANGLE_texture_compression_dxt3 */ - -#ifndef GL_ANGLE_texture_compression_dxt5 -#define GL_ANGLE_texture_compression_dxt5 1 -#define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3 -#endif /* GL_ANGLE_texture_compression_dxt5 */ - -#ifndef GL_ANGLE_texture_usage -#define GL_ANGLE_texture_usage 1 -#define GL_TEXTURE_USAGE_ANGLE 0x93A2 -#define GL_FRAMEBUFFER_ATTACHMENT_ANGLE 0x93A3 -#endif /* GL_ANGLE_texture_usage */ - -#ifndef GL_ANGLE_translated_shader_source -#define GL_ANGLE_translated_shader_source 1 -#define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0 -typedef void (GL_APIENTRYP PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source); -#endif -#endif /* GL_ANGLE_translated_shader_source */ - -#ifndef GL_APPLE_clip_distance -#define GL_APPLE_clip_distance 1 -#define GL_MAX_CLIP_DISTANCES_APPLE 0x0D32 -#define GL_CLIP_DISTANCE0_APPLE 0x3000 -#define GL_CLIP_DISTANCE1_APPLE 0x3001 -#define GL_CLIP_DISTANCE2_APPLE 0x3002 -#define GL_CLIP_DISTANCE3_APPLE 0x3003 -#define GL_CLIP_DISTANCE4_APPLE 0x3004 -#define GL_CLIP_DISTANCE5_APPLE 0x3005 -#define GL_CLIP_DISTANCE6_APPLE 0x3006 -#define GL_CLIP_DISTANCE7_APPLE 0x3007 -#endif /* GL_APPLE_clip_distance */ - -#ifndef GL_APPLE_color_buffer_packed_float -#define GL_APPLE_color_buffer_packed_float 1 -#endif /* GL_APPLE_color_buffer_packed_float */ - -#ifndef GL_APPLE_copy_texture_levels -#define GL_APPLE_copy_texture_levels 1 -typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount); -#endif -#endif /* GL_APPLE_copy_texture_levels */ - -#ifndef GL_APPLE_framebuffer_multisample -#define GL_APPLE_framebuffer_multisample 1 -#define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56 -#define GL_MAX_SAMPLES_APPLE 0x8D57 -#define GL_READ_FRAMEBUFFER_APPLE 0x8CA8 -#define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9 -#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6 -#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void); -#endif -#endif /* GL_APPLE_framebuffer_multisample */ - -#ifndef GL_APPLE_rgb_422 -#define GL_APPLE_rgb_422 1 -#define GL_RGB_422_APPLE 0x8A1F -#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA -#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB -#define GL_RGB_RAW_422_APPLE 0x8A51 -#endif /* GL_APPLE_rgb_422 */ - -#ifndef GL_APPLE_sync -#define GL_APPLE_sync 1 -#define GL_SYNC_OBJECT_APPLE 0x8A53 -#define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE 0x9111 -#define GL_OBJECT_TYPE_APPLE 0x9112 -#define GL_SYNC_CONDITION_APPLE 0x9113 -#define GL_SYNC_STATUS_APPLE 0x9114 -#define GL_SYNC_FLAGS_APPLE 0x9115 -#define GL_SYNC_FENCE_APPLE 0x9116 -#define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE 0x9117 -#define GL_UNSIGNALED_APPLE 0x9118 -#define GL_SIGNALED_APPLE 0x9119 -#define GL_ALREADY_SIGNALED_APPLE 0x911A -#define GL_TIMEOUT_EXPIRED_APPLE 0x911B -#define GL_CONDITION_SATISFIED_APPLE 0x911C -#define GL_WAIT_FAILED_APPLE 0x911D -#define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE 0x00000001 -#define GL_TIMEOUT_IGNORED_APPLE 0xFFFFFFFFFFFFFFFFull -typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags); -typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync); -typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync); -typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params); -typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags); -GL_APICALL GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync); -GL_APICALL void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync); -GL_APICALL GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout); -GL_APICALL void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout); -GL_APICALL void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params); -GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -#endif -#endif /* GL_APPLE_sync */ - -#ifndef GL_APPLE_texture_format_BGRA8888 -#define GL_APPLE_texture_format_BGRA8888 1 -#define GL_BGRA_EXT 0x80E1 -#define GL_BGRA8_EXT 0x93A1 -#endif /* GL_APPLE_texture_format_BGRA8888 */ - -#ifndef GL_APPLE_texture_max_level -#define GL_APPLE_texture_max_level 1 -#define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D -#endif /* GL_APPLE_texture_max_level */ - -#ifndef GL_APPLE_texture_packed_float -#define GL_APPLE_texture_packed_float 1 -#define GL_UNSIGNED_INT_10F_11F_11F_REV_APPLE 0x8C3B -#define GL_UNSIGNED_INT_5_9_9_9_REV_APPLE 0x8C3E -#define GL_R11F_G11F_B10F_APPLE 0x8C3A -#define GL_RGB9_E5_APPLE 0x8C3D -#endif /* GL_APPLE_texture_packed_float */ - -#ifndef GL_ARM_mali_program_binary -#define GL_ARM_mali_program_binary 1 -#define GL_MALI_PROGRAM_BINARY_ARM 0x8F61 -#endif /* GL_ARM_mali_program_binary */ - -#ifndef GL_ARM_mali_shader_binary -#define GL_ARM_mali_shader_binary 1 -#define GL_MALI_SHADER_BINARY_ARM 0x8F60 -#endif /* GL_ARM_mali_shader_binary */ - -#ifndef GL_ARM_rgba8 -#define GL_ARM_rgba8 1 -#endif /* GL_ARM_rgba8 */ - -#ifndef GL_ARM_shader_framebuffer_fetch -#define GL_ARM_shader_framebuffer_fetch 1 -#define GL_FETCH_PER_SAMPLE_ARM 0x8F65 -#define GL_FRAGMENT_SHADER_FRAMEBUFFER_FETCH_MRT_ARM 0x8F66 -#endif /* GL_ARM_shader_framebuffer_fetch */ - -#ifndef GL_ARM_shader_framebuffer_fetch_depth_stencil -#define GL_ARM_shader_framebuffer_fetch_depth_stencil 1 -#endif /* GL_ARM_shader_framebuffer_fetch_depth_stencil */ - -#ifndef GL_DMP_program_binary -#define GL_DMP_program_binary 1 -#define GL_SMAPHS30_PROGRAM_BINARY_DMP 0x9251 -#define GL_SMAPHS_PROGRAM_BINARY_DMP 0x9252 -#define GL_DMP_PROGRAM_BINARY_DMP 0x9253 -#endif /* GL_DMP_program_binary */ - -#ifndef GL_DMP_shader_binary -#define GL_DMP_shader_binary 1 -#define GL_SHADER_BINARY_DMP 0x9250 -#endif /* GL_DMP_shader_binary */ - -#ifndef GL_EXT_EGL_image_array -#define GL_EXT_EGL_image_array 1 -#endif /* GL_EXT_EGL_image_array */ - -#ifndef GL_EXT_YUV_target -#define GL_EXT_YUV_target 1 -#define GL_SAMPLER_EXTERNAL_2D_Y2Y_EXT 0x8BE7 -#endif /* GL_EXT_YUV_target */ - -#ifndef GL_EXT_base_instance -#define GL_EXT_base_instance 1 -typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEEXTPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); -typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance); -typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDrawArraysInstancedBaseInstanceEXT (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); -GL_APICALL void GL_APIENTRY glDrawElementsInstancedBaseInstanceEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance); -GL_APICALL void GL_APIENTRY glDrawElementsInstancedBaseVertexBaseInstanceEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance); -#endif -#endif /* GL_EXT_base_instance */ - -#ifndef GL_EXT_blend_func_extended -#define GL_EXT_blend_func_extended 1 -#define GL_SRC1_COLOR_EXT 0x88F9 -#define GL_SRC1_ALPHA_EXT 0x8589 -#define GL_ONE_MINUS_SRC1_COLOR_EXT 0x88FA -#define GL_ONE_MINUS_SRC1_ALPHA_EXT 0x88FB -#define GL_SRC_ALPHA_SATURATE_EXT 0x0308 -#define GL_LOCATION_INDEX_EXT 0x930F -#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS_EXT 0x88FC -typedef void (GL_APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDEXTPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); -typedef void (GL_APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name); -typedef GLint (GL_APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXEXTPROC) (GLuint program, GLenum programInterface, const GLchar *name); -typedef GLint (GL_APIENTRYP PFNGLGETFRAGDATAINDEXEXTPROC) (GLuint program, const GLchar *name); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glBindFragDataLocationIndexedEXT (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); -GL_APICALL void GL_APIENTRY glBindFragDataLocationEXT (GLuint program, GLuint color, const GLchar *name); -GL_APICALL GLint GL_APIENTRY glGetProgramResourceLocationIndexEXT (GLuint program, GLenum programInterface, const GLchar *name); -GL_APICALL GLint GL_APIENTRY glGetFragDataIndexEXT (GLuint program, const GLchar *name); -#endif -#endif /* GL_EXT_blend_func_extended */ - -#ifndef GL_EXT_blend_minmax -#define GL_EXT_blend_minmax 1 -#define GL_MIN_EXT 0x8007 -#define GL_MAX_EXT 0x8008 -#endif /* GL_EXT_blend_minmax */ - -#ifndef GL_EXT_buffer_storage -#define GL_EXT_buffer_storage 1 -#define GL_MAP_READ_BIT 0x0001 -#define GL_MAP_WRITE_BIT 0x0002 -#define GL_MAP_PERSISTENT_BIT_EXT 0x0040 -#define GL_MAP_COHERENT_BIT_EXT 0x0080 -#define GL_DYNAMIC_STORAGE_BIT_EXT 0x0100 -#define GL_CLIENT_STORAGE_BIT_EXT 0x0200 -#define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT_EXT 0x00004000 -#define GL_BUFFER_IMMUTABLE_STORAGE_EXT 0x821F -#define GL_BUFFER_STORAGE_FLAGS_EXT 0x8220 -typedef void (GL_APIENTRYP PFNGLBUFFERSTORAGEEXTPROC) (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glBufferStorageEXT (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags); -#endif -#endif /* GL_EXT_buffer_storage */ - -#ifndef GL_EXT_clear_texture -#define GL_EXT_clear_texture 1 -typedef void (GL_APIENTRYP PFNGLCLEARTEXIMAGEEXTPROC) (GLuint texture, GLint level, GLenum format, GLenum type, const void *data); -typedef void (GL_APIENTRYP PFNGLCLEARTEXSUBIMAGEEXTPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glClearTexImageEXT (GLuint texture, GLint level, GLenum format, GLenum type, const void *data); -GL_APICALL void GL_APIENTRY glClearTexSubImageEXT (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data); -#endif -#endif /* GL_EXT_clear_texture */ - -#ifndef GL_EXT_clip_cull_distance -#define GL_EXT_clip_cull_distance 1 -#define GL_MAX_CLIP_DISTANCES_EXT 0x0D32 -#define GL_MAX_CULL_DISTANCES_EXT 0x82F9 -#define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES_EXT 0x82FA -#define GL_CLIP_DISTANCE0_EXT 0x3000 -#define GL_CLIP_DISTANCE1_EXT 0x3001 -#define GL_CLIP_DISTANCE2_EXT 0x3002 -#define GL_CLIP_DISTANCE3_EXT 0x3003 -#define GL_CLIP_DISTANCE4_EXT 0x3004 -#define GL_CLIP_DISTANCE5_EXT 0x3005 -#define GL_CLIP_DISTANCE6_EXT 0x3006 -#define GL_CLIP_DISTANCE7_EXT 0x3007 -#endif /* GL_EXT_clip_cull_distance */ - -#ifndef GL_EXT_color_buffer_float -#define GL_EXT_color_buffer_float 1 -#endif /* GL_EXT_color_buffer_float */ - -#ifndef GL_EXT_color_buffer_half_float -#define GL_EXT_color_buffer_half_float 1 -#define GL_RGBA16F_EXT 0x881A -#define GL_RGB16F_EXT 0x881B -#define GL_RG16F_EXT 0x822F -#define GL_R16F_EXT 0x822D -#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT 0x8211 -#define GL_UNSIGNED_NORMALIZED_EXT 0x8C17 -#endif /* GL_EXT_color_buffer_half_float */ - -#ifndef GL_EXT_conservative_depth -#define GL_EXT_conservative_depth 1 -#endif /* GL_EXT_conservative_depth */ - -#ifndef GL_EXT_copy_image -#define GL_EXT_copy_image 1 -typedef void (GL_APIENTRYP PFNGLCOPYIMAGESUBDATAEXTPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glCopyImageSubDataEXT (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); -#endif -#endif /* GL_EXT_copy_image */ - -#ifndef GL_EXT_debug_label -#define GL_EXT_debug_label 1 -#define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F -#define GL_PROGRAM_OBJECT_EXT 0x8B40 -#define GL_SHADER_OBJECT_EXT 0x8B48 -#define GL_BUFFER_OBJECT_EXT 0x9151 -#define GL_QUERY_OBJECT_EXT 0x9153 -#define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154 -#define GL_TRANSFORM_FEEDBACK 0x8E22 -typedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label); -typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label); -GL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label); -#endif -#endif /* GL_EXT_debug_label */ - -#ifndef GL_EXT_debug_marker -#define GL_EXT_debug_marker 1 -typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker); -typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker); -typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker); -GL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker); -GL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void); -#endif -#endif /* GL_EXT_debug_marker */ - -#ifndef GL_EXT_discard_framebuffer -#define GL_EXT_discard_framebuffer 1 -#define GL_COLOR_EXT 0x1800 -#define GL_DEPTH_EXT 0x1801 -#define GL_STENCIL_EXT 0x1802 -typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments); -#endif -#endif /* GL_EXT_discard_framebuffer */ - -#ifndef GL_EXT_disjoint_timer_query -#define GL_EXT_disjoint_timer_query 1 -#define GL_QUERY_COUNTER_BITS_EXT 0x8864 -#define GL_CURRENT_QUERY_EXT 0x8865 -#define GL_QUERY_RESULT_EXT 0x8866 -#define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867 -#define GL_TIME_ELAPSED_EXT 0x88BF -#define GL_TIMESTAMP_EXT 0x8E28 -#define GL_GPU_DISJOINT_EXT 0x8FBB -typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids); -typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids); -typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id); -typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id); -typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLQUERYCOUNTEREXTPROC) (GLuint id, GLenum target); -typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTIVEXTPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params); -typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params); -typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids); -GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids); -GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id); -GL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id); -GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target); -GL_APICALL void GL_APIENTRY glQueryCounterEXT (GLuint id, GLenum target); -GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetQueryObjectivEXT (GLuint id, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params); -GL_APICALL void GL_APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params); -GL_APICALL void GL_APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params); -#endif -#endif /* GL_EXT_disjoint_timer_query */ - -#ifndef GL_EXT_draw_buffers -#define GL_EXT_draw_buffers 1 -#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF -#define GL_MAX_DRAW_BUFFERS_EXT 0x8824 -#define GL_DRAW_BUFFER0_EXT 0x8825 -#define GL_DRAW_BUFFER1_EXT 0x8826 -#define GL_DRAW_BUFFER2_EXT 0x8827 -#define GL_DRAW_BUFFER3_EXT 0x8828 -#define GL_DRAW_BUFFER4_EXT 0x8829 -#define GL_DRAW_BUFFER5_EXT 0x882A -#define GL_DRAW_BUFFER6_EXT 0x882B -#define GL_DRAW_BUFFER7_EXT 0x882C -#define GL_DRAW_BUFFER8_EXT 0x882D -#define GL_DRAW_BUFFER9_EXT 0x882E -#define GL_DRAW_BUFFER10_EXT 0x882F -#define GL_DRAW_BUFFER11_EXT 0x8830 -#define GL_DRAW_BUFFER12_EXT 0x8831 -#define GL_DRAW_BUFFER13_EXT 0x8832 -#define GL_DRAW_BUFFER14_EXT 0x8833 -#define GL_DRAW_BUFFER15_EXT 0x8834 -#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 -#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1 -#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2 -#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3 -#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4 -#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5 -#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6 -#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7 -#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8 -#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9 -#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA -#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB -#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC -#define GL_COLOR_ATTACHMENT13_EXT 0x8CED -#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE -#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF -typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSEXTPROC) (GLsizei n, const GLenum *bufs); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDrawBuffersEXT (GLsizei n, const GLenum *bufs); -#endif -#endif /* GL_EXT_draw_buffers */ - -#ifndef GL_EXT_draw_buffers_indexed -#define GL_EXT_draw_buffers_indexed 1 -typedef void (GL_APIENTRYP PFNGLENABLEIEXTPROC) (GLenum target, GLuint index); -typedef void (GL_APIENTRYP PFNGLDISABLEIEXTPROC) (GLenum target, GLuint index); -typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONIEXTPROC) (GLuint buf, GLenum mode); -typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEIEXTPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -typedef void (GL_APIENTRYP PFNGLBLENDFUNCIEXTPROC) (GLuint buf, GLenum src, GLenum dst); -typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEIEXTPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -typedef void (GL_APIENTRYP PFNGLCOLORMASKIEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDIEXTPROC) (GLenum target, GLuint index); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glEnableiEXT (GLenum target, GLuint index); -GL_APICALL void GL_APIENTRY glDisableiEXT (GLenum target, GLuint index); -GL_APICALL void GL_APIENTRY glBlendEquationiEXT (GLuint buf, GLenum mode); -GL_APICALL void GL_APIENTRY glBlendEquationSeparateiEXT (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -GL_APICALL void GL_APIENTRY glBlendFunciEXT (GLuint buf, GLenum src, GLenum dst); -GL_APICALL void GL_APIENTRY glBlendFuncSeparateiEXT (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -GL_APICALL void GL_APIENTRY glColorMaskiEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -GL_APICALL GLboolean GL_APIENTRY glIsEnablediEXT (GLenum target, GLuint index); -#endif -#endif /* GL_EXT_draw_buffers_indexed */ - -#ifndef GL_EXT_draw_elements_base_vertex -#define GL_EXT_draw_elements_base_vertex 1 -typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); -typedef void (GL_APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); -typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); -typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, const GLint *basevertex); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDrawElementsBaseVertexEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); -GL_APICALL void GL_APIENTRY glDrawRangeElementsBaseVertexEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); -GL_APICALL void GL_APIENTRY glDrawElementsInstancedBaseVertexEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); -GL_APICALL void GL_APIENTRY glMultiDrawElementsBaseVertexEXT (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount, const GLint *basevertex); -#endif -#endif /* GL_EXT_draw_elements_base_vertex */ - -#ifndef GL_EXT_draw_instanced -#define GL_EXT_draw_instanced 1 -typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount); -typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount); -GL_APICALL void GL_APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); -#endif -#endif /* GL_EXT_draw_instanced */ - -#ifndef GL_EXT_draw_transform_feedback -#define GL_EXT_draw_transform_feedback 1 -typedef void (GL_APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKEXTPROC) (GLenum mode, GLuint id); -typedef void (GL_APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDEXTPROC) (GLenum mode, GLuint id, GLsizei instancecount); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDrawTransformFeedbackEXT (GLenum mode, GLuint id); -GL_APICALL void GL_APIENTRY glDrawTransformFeedbackInstancedEXT (GLenum mode, GLuint id, GLsizei instancecount); -#endif -#endif /* GL_EXT_draw_transform_feedback */ - -#ifndef GL_EXT_external_buffer -#define GL_EXT_external_buffer 1 -typedef void *GLeglClientBufferEXT; -typedef void (GL_APIENTRYP PFNGLBUFFERSTORAGEEXTERNALEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags); -typedef void (GL_APIENTRYP PFNGLNAMEDBUFFERSTORAGEEXTERNALEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glBufferStorageExternalEXT (GLenum target, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags); -GL_APICALL void GL_APIENTRY glNamedBufferStorageExternalEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags); -#endif -#endif /* GL_EXT_external_buffer */ - -#ifndef GL_EXT_float_blend -#define GL_EXT_float_blend 1 -#endif /* GL_EXT_float_blend */ - -#ifndef GL_EXT_geometry_point_size -#define GL_EXT_geometry_point_size 1 -#endif /* GL_EXT_geometry_point_size */ - -#ifndef GL_EXT_geometry_shader -#define GL_EXT_geometry_shader 1 -#define GL_GEOMETRY_SHADER_EXT 0x8DD9 -#define GL_GEOMETRY_SHADER_BIT_EXT 0x00000004 -#define GL_GEOMETRY_LINKED_VERTICES_OUT_EXT 0x8916 -#define GL_GEOMETRY_LINKED_INPUT_TYPE_EXT 0x8917 -#define GL_GEOMETRY_LINKED_OUTPUT_TYPE_EXT 0x8918 -#define GL_GEOMETRY_SHADER_INVOCATIONS_EXT 0x887F -#define GL_LAYER_PROVOKING_VERTEX_EXT 0x825E -#define GL_LINES_ADJACENCY_EXT 0x000A -#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B -#define GL_TRIANGLES_ADJACENCY_EXT 0x000C -#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D -#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF -#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS_EXT 0x8A2C -#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8A32 -#define GL_MAX_GEOMETRY_INPUT_COMPONENTS_EXT 0x9123 -#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS_EXT 0x9124 -#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0 -#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1 -#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS_EXT 0x8E5A -#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29 -#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_EXT 0x92CF -#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS_EXT 0x92D5 -#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS_EXT 0x90CD -#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_EXT 0x90D7 -#define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D -#define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E -#define GL_UNDEFINED_VERTEX_EXT 0x8260 -#define GL_PRIMITIVES_GENERATED_EXT 0x8C87 -#define GL_FRAMEBUFFER_DEFAULT_LAYERS_EXT 0x9312 -#define GL_MAX_FRAMEBUFFER_LAYERS_EXT 0x9317 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8 -#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7 -#define GL_REFERENCED_BY_GEOMETRY_SHADER_EXT 0x9309 -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level); -#endif -#endif /* GL_EXT_geometry_shader */ - -#ifndef GL_EXT_gpu_shader5 -#define GL_EXT_gpu_shader5 1 -#endif /* GL_EXT_gpu_shader5 */ - -#ifndef GL_EXT_instanced_arrays -#define GL_EXT_instanced_arrays 1 -#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_EXT 0x88FE -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISOREXTPROC) (GLuint index, GLuint divisor); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glVertexAttribDivisorEXT (GLuint index, GLuint divisor); -#endif -#endif /* GL_EXT_instanced_arrays */ - -#ifndef GL_EXT_map_buffer_range -#define GL_EXT_map_buffer_range 1 -#define GL_MAP_READ_BIT_EXT 0x0001 -#define GL_MAP_WRITE_BIT_EXT 0x0002 -#define GL_MAP_INVALIDATE_RANGE_BIT_EXT 0x0004 -#define GL_MAP_INVALIDATE_BUFFER_BIT_EXT 0x0008 -#define GL_MAP_FLUSH_EXPLICIT_BIT_EXT 0x0010 -#define GL_MAP_UNSYNCHRONIZED_BIT_EXT 0x0020 -typedef void *(GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void *GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -GL_APICALL void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length); -#endif -#endif /* GL_EXT_map_buffer_range */ - -#ifndef GL_EXT_memory_object -#define GL_EXT_memory_object 1 -#define GL_TEXTURE_TILING_EXT 0x9580 -#define GL_DEDICATED_MEMORY_OBJECT_EXT 0x9581 -#define GL_PROTECTED_MEMORY_OBJECT_EXT 0x959B -#define GL_NUM_TILING_TYPES_EXT 0x9582 -#define GL_TILING_TYPES_EXT 0x9583 -#define GL_OPTIMAL_TILING_EXT 0x9584 -#define GL_LINEAR_TILING_EXT 0x9585 -#define GL_NUM_DEVICE_UUIDS_EXT 0x9596 -#define GL_DEVICE_UUID_EXT 0x9597 -#define GL_DRIVER_UUID_EXT 0x9598 -#define GL_UUID_SIZE_EXT 16 -typedef void (GL_APIENTRYP PFNGLGETUNSIGNEDBYTEVEXTPROC) (GLenum pname, GLubyte *data); -typedef void (GL_APIENTRYP PFNGLGETUNSIGNEDBYTEI_VEXTPROC) (GLenum target, GLuint index, GLubyte *data); -typedef void (GL_APIENTRYP PFNGLDELETEMEMORYOBJECTSEXTPROC) (GLsizei n, const GLuint *memoryObjects); -typedef GLboolean (GL_APIENTRYP PFNGLISMEMORYOBJECTEXTPROC) (GLuint memoryObject); -typedef void (GL_APIENTRYP PFNGLCREATEMEMORYOBJECTSEXTPROC) (GLsizei n, GLuint *memoryObjects); -typedef void (GL_APIENTRYP PFNGLMEMORYOBJECTPARAMETERIVEXTPROC) (GLuint memoryObject, GLenum pname, const GLint *params); -typedef void (GL_APIENTRYP PFNGLGETMEMORYOBJECTPARAMETERIVEXTPROC) (GLuint memoryObject, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLTEXSTORAGEMEM2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset); -typedef void (GL_APIENTRYP PFNGLTEXSTORAGEMEM2DMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); -typedef void (GL_APIENTRYP PFNGLTEXSTORAGEMEM3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset); -typedef void (GL_APIENTRYP PFNGLTEXSTORAGEMEM3DMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); -typedef void (GL_APIENTRYP PFNGLBUFFERSTORAGEMEMEXTPROC) (GLenum target, GLsizeiptr size, GLuint memory, GLuint64 offset); -typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGEMEM2DEXTPROC) (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset); -typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGEMEM2DMULTISAMPLEEXTPROC) (GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); -typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGEMEM3DEXTPROC) (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset); -typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGEMEM3DMULTISAMPLEEXTPROC) (GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); -typedef void (GL_APIENTRYP PFNGLNAMEDBUFFERSTORAGEMEMEXTPROC) (GLuint buffer, GLsizeiptr size, GLuint memory, GLuint64 offset); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGetUnsignedBytevEXT (GLenum pname, GLubyte *data); -GL_APICALL void GL_APIENTRY glGetUnsignedBytei_vEXT (GLenum target, GLuint index, GLubyte *data); -GL_APICALL void GL_APIENTRY glDeleteMemoryObjectsEXT (GLsizei n, const GLuint *memoryObjects); -GL_APICALL GLboolean GL_APIENTRY glIsMemoryObjectEXT (GLuint memoryObject); -GL_APICALL void GL_APIENTRY glCreateMemoryObjectsEXT (GLsizei n, GLuint *memoryObjects); -GL_APICALL void GL_APIENTRY glMemoryObjectParameterivEXT (GLuint memoryObject, GLenum pname, const GLint *params); -GL_APICALL void GL_APIENTRY glGetMemoryObjectParameterivEXT (GLuint memoryObject, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glTexStorageMem2DEXT (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset); -GL_APICALL void GL_APIENTRY glTexStorageMem2DMultisampleEXT (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); -GL_APICALL void GL_APIENTRY glTexStorageMem3DEXT (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset); -GL_APICALL void GL_APIENTRY glTexStorageMem3DMultisampleEXT (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); -GL_APICALL void GL_APIENTRY glBufferStorageMemEXT (GLenum target, GLsizeiptr size, GLuint memory, GLuint64 offset); -GL_APICALL void GL_APIENTRY glTextureStorageMem2DEXT (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset); -GL_APICALL void GL_APIENTRY glTextureStorageMem2DMultisampleEXT (GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); -GL_APICALL void GL_APIENTRY glTextureStorageMem3DEXT (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset); -GL_APICALL void GL_APIENTRY glTextureStorageMem3DMultisampleEXT (GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); -GL_APICALL void GL_APIENTRY glNamedBufferStorageMemEXT (GLuint buffer, GLsizeiptr size, GLuint memory, GLuint64 offset); -#endif -#endif /* GL_EXT_memory_object */ - -#ifndef GL_EXT_memory_object_fd -#define GL_EXT_memory_object_fd 1 -#define GL_HANDLE_TYPE_OPAQUE_FD_EXT 0x9586 -typedef void (GL_APIENTRYP PFNGLIMPORTMEMORYFDEXTPROC) (GLuint memory, GLuint64 size, GLenum handleType, GLint fd); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glImportMemoryFdEXT (GLuint memory, GLuint64 size, GLenum handleType, GLint fd); -#endif -#endif /* GL_EXT_memory_object_fd */ - -#ifndef GL_EXT_memory_object_win32 -#define GL_EXT_memory_object_win32 1 -#define GL_HANDLE_TYPE_OPAQUE_WIN32_EXT 0x9587 -#define GL_HANDLE_TYPE_OPAQUE_WIN32_KMT_EXT 0x9588 -#define GL_DEVICE_LUID_EXT 0x9599 -#define GL_DEVICE_NODE_MASK_EXT 0x959A -#define GL_LUID_SIZE_EXT 8 -#define GL_HANDLE_TYPE_D3D12_TILEPOOL_EXT 0x9589 -#define GL_HANDLE_TYPE_D3D12_RESOURCE_EXT 0x958A -#define GL_HANDLE_TYPE_D3D11_IMAGE_EXT 0x958B -#define GL_HANDLE_TYPE_D3D11_IMAGE_KMT_EXT 0x958C -typedef void (GL_APIENTRYP PFNGLIMPORTMEMORYWIN32HANDLEEXTPROC) (GLuint memory, GLuint64 size, GLenum handleType, void *handle); -typedef void (GL_APIENTRYP PFNGLIMPORTMEMORYWIN32NAMEEXTPROC) (GLuint memory, GLuint64 size, GLenum handleType, const void *name); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glImportMemoryWin32HandleEXT (GLuint memory, GLuint64 size, GLenum handleType, void *handle); -GL_APICALL void GL_APIENTRY glImportMemoryWin32NameEXT (GLuint memory, GLuint64 size, GLenum handleType, const void *name); -#endif -#endif /* GL_EXT_memory_object_win32 */ - -#ifndef GL_EXT_multi_draw_arrays -#define GL_EXT_multi_draw_arrays 1 -typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount); -#endif -#endif /* GL_EXT_multi_draw_arrays */ - -#ifndef GL_EXT_multi_draw_indirect -#define GL_EXT_multi_draw_indirect 1 -typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTEXTPROC) (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride); -typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTEXTPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glMultiDrawArraysIndirectEXT (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride); -GL_APICALL void GL_APIENTRY glMultiDrawElementsIndirectEXT (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride); -#endif -#endif /* GL_EXT_multi_draw_indirect */ - -#ifndef GL_EXT_multisampled_compatibility -#define GL_EXT_multisampled_compatibility 1 -#define GL_MULTISAMPLE_EXT 0x809D -#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F -#endif /* GL_EXT_multisampled_compatibility */ - -#ifndef GL_EXT_multisampled_render_to_texture -#define GL_EXT_multisampled_render_to_texture 1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C -#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56 -#define GL_MAX_SAMPLES_EXT 0x8D57 -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); -#endif -#endif /* GL_EXT_multisampled_render_to_texture */ - -#ifndef GL_EXT_multiview_draw_buffers -#define GL_EXT_multiview_draw_buffers 1 -#define GL_COLOR_ATTACHMENT_EXT 0x90F0 -#define GL_MULTIVIEW_EXT 0x90F1 -#define GL_DRAW_BUFFER_EXT 0x0C01 -#define GL_READ_BUFFER_EXT 0x0C02 -#define GL_MAX_MULTIVIEW_BUFFERS_EXT 0x90F2 -typedef void (GL_APIENTRYP PFNGLREADBUFFERINDEXEDEXTPROC) (GLenum src, GLint index); -typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSINDEXEDEXTPROC) (GLint n, const GLenum *location, const GLint *indices); -typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VEXTPROC) (GLenum target, GLuint index, GLint *data); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glReadBufferIndexedEXT (GLenum src, GLint index); -GL_APICALL void GL_APIENTRY glDrawBuffersIndexedEXT (GLint n, const GLenum *location, const GLint *indices); -GL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, GLint *data); -#endif -#endif /* GL_EXT_multiview_draw_buffers */ - -#ifndef GL_EXT_occlusion_query_boolean -#define GL_EXT_occlusion_query_boolean 1 -#define GL_ANY_SAMPLES_PASSED_EXT 0x8C2F -#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT 0x8D6A -#endif /* GL_EXT_occlusion_query_boolean */ - -#ifndef GL_EXT_polygon_offset_clamp -#define GL_EXT_polygon_offset_clamp 1 -#define GL_POLYGON_OFFSET_CLAMP_EXT 0x8E1B -typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETCLAMPEXTPROC) (GLfloat factor, GLfloat units, GLfloat clamp); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glPolygonOffsetClampEXT (GLfloat factor, GLfloat units, GLfloat clamp); -#endif -#endif /* GL_EXT_polygon_offset_clamp */ - -#ifndef GL_EXT_post_depth_coverage -#define GL_EXT_post_depth_coverage 1 -#endif /* GL_EXT_post_depth_coverage */ - -#ifndef GL_EXT_primitive_bounding_box -#define GL_EXT_primitive_bounding_box 1 -#define GL_PRIMITIVE_BOUNDING_BOX_EXT 0x92BE -typedef void (GL_APIENTRYP PFNGLPRIMITIVEBOUNDINGBOXEXTPROC) (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glPrimitiveBoundingBoxEXT (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); -#endif -#endif /* GL_EXT_primitive_bounding_box */ - -#ifndef GL_EXT_protected_textures -#define GL_EXT_protected_textures 1 -#define GL_CONTEXT_FLAG_PROTECTED_CONTENT_BIT_EXT 0x00000010 -#define GL_TEXTURE_PROTECTED_EXT 0x8BFA -#endif /* GL_EXT_protected_textures */ - -#ifndef GL_EXT_pvrtc_sRGB -#define GL_EXT_pvrtc_sRGB 1 -#define GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT 0x8A54 -#define GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT 0x8A55 -#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT 0x8A56 -#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT 0x8A57 -#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG 0x93F0 -#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG 0x93F1 -#endif /* GL_EXT_pvrtc_sRGB */ - -#ifndef GL_EXT_raster_multisample -#define GL_EXT_raster_multisample 1 -#define GL_RASTER_MULTISAMPLE_EXT 0x9327 -#define GL_RASTER_SAMPLES_EXT 0x9328 -#define GL_MAX_RASTER_SAMPLES_EXT 0x9329 -#define GL_RASTER_FIXED_SAMPLE_LOCATIONS_EXT 0x932A -#define GL_MULTISAMPLE_RASTERIZATION_ALLOWED_EXT 0x932B -#define GL_EFFECTIVE_RASTER_SAMPLES_EXT 0x932C -typedef void (GL_APIENTRYP PFNGLRASTERSAMPLESEXTPROC) (GLuint samples, GLboolean fixedsamplelocations); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRasterSamplesEXT (GLuint samples, GLboolean fixedsamplelocations); -#endif -#endif /* GL_EXT_raster_multisample */ - -#ifndef GL_EXT_read_format_bgra -#define GL_EXT_read_format_bgra 1 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365 -#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366 -#endif /* GL_EXT_read_format_bgra */ - -#ifndef GL_EXT_render_snorm -#define GL_EXT_render_snorm 1 -#define GL_R8_SNORM 0x8F94 -#define GL_RG8_SNORM 0x8F95 -#define GL_RGBA8_SNORM 0x8F97 -#define GL_R16_SNORM_EXT 0x8F98 -#define GL_RG16_SNORM_EXT 0x8F99 -#define GL_RGBA16_SNORM_EXT 0x8F9B -#endif /* GL_EXT_render_snorm */ - -#ifndef GL_EXT_robustness -#define GL_EXT_robustness 1 -#define GL_GUILTY_CONTEXT_RESET_EXT 0x8253 -#define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254 -#define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255 -#define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3 -#define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256 -#define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252 -#define GL_NO_RESET_NOTIFICATION_EXT 0x8261 -typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void); -typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); -typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void); -GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); -GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params); -#endif -#endif /* GL_EXT_robustness */ - -#ifndef GL_EXT_sRGB -#define GL_EXT_sRGB 1 -#define GL_SRGB_EXT 0x8C40 -#define GL_SRGB_ALPHA_EXT 0x8C42 -#define GL_SRGB8_ALPHA8_EXT 0x8C43 -#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210 -#endif /* GL_EXT_sRGB */ - -#ifndef GL_EXT_sRGB_write_control -#define GL_EXT_sRGB_write_control 1 -#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9 -#endif /* GL_EXT_sRGB_write_control */ - -#ifndef GL_EXT_semaphore -#define GL_EXT_semaphore 1 -#define GL_LAYOUT_GENERAL_EXT 0x958D -#define GL_LAYOUT_COLOR_ATTACHMENT_EXT 0x958E -#define GL_LAYOUT_DEPTH_STENCIL_ATTACHMENT_EXT 0x958F -#define GL_LAYOUT_DEPTH_STENCIL_READ_ONLY_EXT 0x9590 -#define GL_LAYOUT_SHADER_READ_ONLY_EXT 0x9591 -#define GL_LAYOUT_TRANSFER_SRC_EXT 0x9592 -#define GL_LAYOUT_TRANSFER_DST_EXT 0x9593 -typedef void (GL_APIENTRYP PFNGLGENSEMAPHORESEXTPROC) (GLsizei n, GLuint *semaphores); -typedef void (GL_APIENTRYP PFNGLDELETESEMAPHORESEXTPROC) (GLsizei n, const GLuint *semaphores); -typedef GLboolean (GL_APIENTRYP PFNGLISSEMAPHOREEXTPROC) (GLuint semaphore); -typedef void (GL_APIENTRYP PFNGLSEMAPHOREPARAMETERUI64VEXTPROC) (GLuint semaphore, GLenum pname, const GLuint64 *params); -typedef void (GL_APIENTRYP PFNGLGETSEMAPHOREPARAMETERUI64VEXTPROC) (GLuint semaphore, GLenum pname, GLuint64 *params); -typedef void (GL_APIENTRYP PFNGLWAITSEMAPHOREEXTPROC) (GLuint semaphore, GLuint numBufferBarriers, const GLuint *buffers, GLuint numTextureBarriers, const GLuint *textures, const GLenum *srcLayouts); -typedef void (GL_APIENTRYP PFNGLSIGNALSEMAPHOREEXTPROC) (GLuint semaphore, GLuint numBufferBarriers, const GLuint *buffers, GLuint numTextureBarriers, const GLuint *textures, const GLenum *dstLayouts); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGenSemaphoresEXT (GLsizei n, GLuint *semaphores); -GL_APICALL void GL_APIENTRY glDeleteSemaphoresEXT (GLsizei n, const GLuint *semaphores); -GL_APICALL GLboolean GL_APIENTRY glIsSemaphoreEXT (GLuint semaphore); -GL_APICALL void GL_APIENTRY glSemaphoreParameterui64vEXT (GLuint semaphore, GLenum pname, const GLuint64 *params); -GL_APICALL void GL_APIENTRY glGetSemaphoreParameterui64vEXT (GLuint semaphore, GLenum pname, GLuint64 *params); -GL_APICALL void GL_APIENTRY glWaitSemaphoreEXT (GLuint semaphore, GLuint numBufferBarriers, const GLuint *buffers, GLuint numTextureBarriers, const GLuint *textures, const GLenum *srcLayouts); -GL_APICALL void GL_APIENTRY glSignalSemaphoreEXT (GLuint semaphore, GLuint numBufferBarriers, const GLuint *buffers, GLuint numTextureBarriers, const GLuint *textures, const GLenum *dstLayouts); -#endif -#endif /* GL_EXT_semaphore */ - -#ifndef GL_EXT_semaphore_fd -#define GL_EXT_semaphore_fd 1 -typedef void (GL_APIENTRYP PFNGLIMPORTSEMAPHOREFDEXTPROC) (GLuint semaphore, GLenum handleType, GLint fd); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glImportSemaphoreFdEXT (GLuint semaphore, GLenum handleType, GLint fd); -#endif -#endif /* GL_EXT_semaphore_fd */ - -#ifndef GL_EXT_semaphore_win32 -#define GL_EXT_semaphore_win32 1 -#define GL_HANDLE_TYPE_D3D12_FENCE_EXT 0x9594 -#define GL_D3D12_FENCE_VALUE_EXT 0x9595 -typedef void (GL_APIENTRYP PFNGLIMPORTSEMAPHOREWIN32HANDLEEXTPROC) (GLuint semaphore, GLenum handleType, void *handle); -typedef void (GL_APIENTRYP PFNGLIMPORTSEMAPHOREWIN32NAMEEXTPROC) (GLuint semaphore, GLenum handleType, const void *name); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glImportSemaphoreWin32HandleEXT (GLuint semaphore, GLenum handleType, void *handle); -GL_APICALL void GL_APIENTRY glImportSemaphoreWin32NameEXT (GLuint semaphore, GLenum handleType, const void *name); -#endif -#endif /* GL_EXT_semaphore_win32 */ - -#ifndef GL_EXT_separate_shader_objects -#define GL_EXT_separate_shader_objects 1 -#define GL_ACTIVE_PROGRAM_EXT 0x8259 -#define GL_VERTEX_SHADER_BIT_EXT 0x00000001 -#define GL_FRAGMENT_SHADER_BIT_EXT 0x00000002 -#define GL_ALL_SHADER_BITS_EXT 0xFFFFFFFF -#define GL_PROGRAM_SEPARABLE_EXT 0x8258 -#define GL_PROGRAM_PIPELINE_BINDING_EXT 0x825A -typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program); -typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline); -typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings); -typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines); -typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params); -typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline); -typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program); -typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program); -GL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline); -GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings); -GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines); -GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines); -GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params); -GL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline); -GL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value); -GL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0); -GL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0); -GL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1); -GL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1); -GL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -GL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program); -GL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline); -GL_APICALL void GL_APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0); -GL_APICALL void GL_APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1); -GL_APICALL void GL_APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -GL_APICALL void GL_APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GL_APICALL void GL_APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -#endif -#endif /* GL_EXT_separate_shader_objects */ - -#ifndef GL_EXT_shader_framebuffer_fetch -#define GL_EXT_shader_framebuffer_fetch 1 -#define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT 0x8A52 -#endif /* GL_EXT_shader_framebuffer_fetch */ - -#ifndef GL_EXT_shader_group_vote -#define GL_EXT_shader_group_vote 1 -#endif /* GL_EXT_shader_group_vote */ - -#ifndef GL_EXT_shader_implicit_conversions -#define GL_EXT_shader_implicit_conversions 1 -#endif /* GL_EXT_shader_implicit_conversions */ - -#ifndef GL_EXT_shader_integer_mix -#define GL_EXT_shader_integer_mix 1 -#endif /* GL_EXT_shader_integer_mix */ - -#ifndef GL_EXT_shader_io_blocks -#define GL_EXT_shader_io_blocks 1 -#endif /* GL_EXT_shader_io_blocks */ - -#ifndef GL_EXT_shader_non_constant_global_initializers -#define GL_EXT_shader_non_constant_global_initializers 1 -#endif /* GL_EXT_shader_non_constant_global_initializers */ - -#ifndef GL_EXT_shader_pixel_local_storage -#define GL_EXT_shader_pixel_local_storage 1 -#define GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT 0x8F63 -#define GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_SIZE_EXT 0x8F67 -#define GL_SHADER_PIXEL_LOCAL_STORAGE_EXT 0x8F64 -#endif /* GL_EXT_shader_pixel_local_storage */ - -#ifndef GL_EXT_shader_pixel_local_storage2 -#define GL_EXT_shader_pixel_local_storage2 1 -#define GL_MAX_SHADER_COMBINED_LOCAL_STORAGE_FAST_SIZE_EXT 0x9650 -#define GL_MAX_SHADER_COMBINED_LOCAL_STORAGE_SIZE_EXT 0x9651 -#define GL_FRAMEBUFFER_INCOMPLETE_INSUFFICIENT_SHADER_COMBINED_LOCAL_STORAGE_EXT 0x9652 -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERPIXELLOCALSTORAGESIZEEXTPROC) (GLuint target, GLsizei size); -typedef GLsizei (GL_APIENTRYP PFNGLGETFRAMEBUFFERPIXELLOCALSTORAGESIZEEXTPROC) (GLuint target); -typedef void (GL_APIENTRYP PFNGLCLEARPIXELLOCALSTORAGEUIEXTPROC) (GLsizei offset, GLsizei n, const GLuint *values); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glFramebufferPixelLocalStorageSizeEXT (GLuint target, GLsizei size); -GL_APICALL GLsizei GL_APIENTRY glGetFramebufferPixelLocalStorageSizeEXT (GLuint target); -GL_APICALL void GL_APIENTRY glClearPixelLocalStorageuiEXT (GLsizei offset, GLsizei n, const GLuint *values); -#endif -#endif /* GL_EXT_shader_pixel_local_storage2 */ - -#ifndef GL_EXT_shader_texture_lod -#define GL_EXT_shader_texture_lod 1 -#endif /* GL_EXT_shader_texture_lod */ - -#ifndef GL_EXT_shadow_samplers -#define GL_EXT_shadow_samplers 1 -#define GL_TEXTURE_COMPARE_MODE_EXT 0x884C -#define GL_TEXTURE_COMPARE_FUNC_EXT 0x884D -#define GL_COMPARE_REF_TO_TEXTURE_EXT 0x884E -#define GL_SAMPLER_2D_SHADOW_EXT 0x8B62 -#endif /* GL_EXT_shadow_samplers */ - -#ifndef GL_EXT_sparse_texture -#define GL_EXT_sparse_texture 1 -#define GL_TEXTURE_SPARSE_EXT 0x91A6 -#define GL_VIRTUAL_PAGE_SIZE_INDEX_EXT 0x91A7 -#define GL_NUM_SPARSE_LEVELS_EXT 0x91AA -#define GL_NUM_VIRTUAL_PAGE_SIZES_EXT 0x91A8 -#define GL_VIRTUAL_PAGE_SIZE_X_EXT 0x9195 -#define GL_VIRTUAL_PAGE_SIZE_Y_EXT 0x9196 -#define GL_VIRTUAL_PAGE_SIZE_Z_EXT 0x9197 -#define GL_TEXTURE_2D_ARRAY 0x8C1A -#define GL_TEXTURE_3D 0x806F -#define GL_MAX_SPARSE_TEXTURE_SIZE_EXT 0x9198 -#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_EXT 0x9199 -#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_EXT 0x919A -#define GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_EXT 0x91A9 -typedef void (GL_APIENTRYP PFNGLTEXPAGECOMMITMENTEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glTexPageCommitmentEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); -#endif -#endif /* GL_EXT_sparse_texture */ - -#ifndef GL_EXT_sparse_texture2 -#define GL_EXT_sparse_texture2 1 -#endif /* GL_EXT_sparse_texture2 */ - -#ifndef GL_EXT_tessellation_point_size -#define GL_EXT_tessellation_point_size 1 -#endif /* GL_EXT_tessellation_point_size */ - -#ifndef GL_EXT_tessellation_shader -#define GL_EXT_tessellation_shader 1 -#define GL_PATCHES_EXT 0x000E -#define GL_PATCH_VERTICES_EXT 0x8E72 -#define GL_TESS_CONTROL_OUTPUT_VERTICES_EXT 0x8E75 -#define GL_TESS_GEN_MODE_EXT 0x8E76 -#define GL_TESS_GEN_SPACING_EXT 0x8E77 -#define GL_TESS_GEN_VERTEX_ORDER_EXT 0x8E78 -#define GL_TESS_GEN_POINT_MODE_EXT 0x8E79 -#define GL_ISOLINES_EXT 0x8E7A -#define GL_QUADS_EXT 0x0007 -#define GL_FRACTIONAL_ODD_EXT 0x8E7B -#define GL_FRACTIONAL_EVEN_EXT 0x8E7C -#define GL_MAX_PATCH_VERTICES_EXT 0x8E7D -#define GL_MAX_TESS_GEN_LEVEL_EXT 0x8E7E -#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS_EXT 0x8E7F -#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT 0x8E80 -#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS_EXT 0x8E81 -#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS_EXT 0x8E82 -#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_EXT 0x8E83 -#define GL_MAX_TESS_PATCH_COMPONENTS_EXT 0x8E84 -#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_EXT 0x8E85 -#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_EXT 0x8E86 -#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS_EXT 0x8E89 -#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS_EXT 0x8E8A -#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS_EXT 0x886C -#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS_EXT 0x886D -#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_EXT 0x8E1E -#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT 0x8E1F -#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_EXT 0x92CD -#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS_EXT 0x92CE -#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS_EXT 0x92D3 -#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS_EXT 0x92D4 -#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS_EXT 0x90CB -#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS_EXT 0x90CC -#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_EXT 0x90D8 -#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_EXT 0x90D9 -#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221 -#define GL_IS_PER_PATCH_EXT 0x92E7 -#define GL_REFERENCED_BY_TESS_CONTROL_SHADER_EXT 0x9307 -#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER_EXT 0x9308 -#define GL_TESS_CONTROL_SHADER_EXT 0x8E88 -#define GL_TESS_EVALUATION_SHADER_EXT 0x8E87 -#define GL_TESS_CONTROL_SHADER_BIT_EXT 0x00000008 -#define GL_TESS_EVALUATION_SHADER_BIT_EXT 0x00000010 -typedef void (GL_APIENTRYP PFNGLPATCHPARAMETERIEXTPROC) (GLenum pname, GLint value); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glPatchParameteriEXT (GLenum pname, GLint value); -#endif -#endif /* GL_EXT_tessellation_shader */ - -#ifndef GL_EXT_texture_border_clamp -#define GL_EXT_texture_border_clamp 1 -#define GL_TEXTURE_BORDER_COLOR_EXT 0x1004 -#define GL_CLAMP_TO_BORDER_EXT 0x812D -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params); -typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params); -typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIIVEXTPROC) (GLuint sampler, GLenum pname, const GLint *param); -typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIUIVEXTPROC) (GLuint sampler, GLenum pname, const GLuint *param); -typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIIVEXTPROC) (GLuint sampler, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVEXTPROC) (GLuint sampler, GLenum pname, GLuint *params); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params); -GL_APICALL void GL_APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params); -GL_APICALL void GL_APIENTRY glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params); -GL_APICALL void GL_APIENTRY glSamplerParameterIivEXT (GLuint sampler, GLenum pname, const GLint *param); -GL_APICALL void GL_APIENTRY glSamplerParameterIuivEXT (GLuint sampler, GLenum pname, const GLuint *param); -GL_APICALL void GL_APIENTRY glGetSamplerParameterIivEXT (GLuint sampler, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetSamplerParameterIuivEXT (GLuint sampler, GLenum pname, GLuint *params); -#endif -#endif /* GL_EXT_texture_border_clamp */ - -#ifndef GL_EXT_texture_buffer -#define GL_EXT_texture_buffer 1 -#define GL_TEXTURE_BUFFER_EXT 0x8C2A -#define GL_TEXTURE_BUFFER_BINDING_EXT 0x8C2A -#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B -#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C -#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D -#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT_EXT 0x919F -#define GL_SAMPLER_BUFFER_EXT 0x8DC2 -#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0 -#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8 -#define GL_IMAGE_BUFFER_EXT 0x9051 -#define GL_INT_IMAGE_BUFFER_EXT 0x905C -#define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT 0x9067 -#define GL_TEXTURE_BUFFER_OFFSET_EXT 0x919D -#define GL_TEXTURE_BUFFER_SIZE_EXT 0x919E -typedef void (GL_APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer); -typedef void (GL_APIENTRYP PFNGLTEXBUFFERRANGEEXTPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer); -GL_APICALL void GL_APIENTRY glTexBufferRangeEXT (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); -#endif -#endif /* GL_EXT_texture_buffer */ - -#ifndef GL_EXT_texture_compression_astc_decode_mode -#define GL_EXT_texture_compression_astc_decode_mode 1 -#define GL_TEXTURE_ASTC_DECODE_PRECISION_EXT 0x8F69 -#endif /* GL_EXT_texture_compression_astc_decode_mode */ - -#ifndef GL_EXT_texture_compression_dxt1 -#define GL_EXT_texture_compression_dxt1 1 -#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 -#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 -#endif /* GL_EXT_texture_compression_dxt1 */ - -#ifndef GL_EXT_texture_compression_s3tc -#define GL_EXT_texture_compression_s3tc 1 -#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 -#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 -#endif /* GL_EXT_texture_compression_s3tc */ - -#ifndef GL_EXT_texture_cube_map_array -#define GL_EXT_texture_cube_map_array 1 -#define GL_TEXTURE_CUBE_MAP_ARRAY_EXT 0x9009 -#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_EXT 0x900A -#define GL_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900C -#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_EXT 0x900D -#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900E -#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900F -#define GL_IMAGE_CUBE_MAP_ARRAY_EXT 0x9054 -#define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x905F -#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A -#endif /* GL_EXT_texture_cube_map_array */ - -#ifndef GL_EXT_texture_filter_anisotropic -#define GL_EXT_texture_filter_anisotropic 1 -#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE -#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF -#endif /* GL_EXT_texture_filter_anisotropic */ - -#ifndef GL_EXT_texture_filter_minmax -#define GL_EXT_texture_filter_minmax 1 -#endif /* GL_EXT_texture_filter_minmax */ - -#ifndef GL_EXT_texture_format_BGRA8888 -#define GL_EXT_texture_format_BGRA8888 1 -#endif /* GL_EXT_texture_format_BGRA8888 */ - -#ifndef GL_EXT_texture_norm16 -#define GL_EXT_texture_norm16 1 -#define GL_R16_EXT 0x822A -#define GL_RG16_EXT 0x822C -#define GL_RGBA16_EXT 0x805B -#define GL_RGB16_EXT 0x8054 -#define GL_RGB16_SNORM_EXT 0x8F9A -#endif /* GL_EXT_texture_norm16 */ - -#ifndef GL_EXT_texture_rg -#define GL_EXT_texture_rg 1 -#define GL_RED_EXT 0x1903 -#define GL_RG_EXT 0x8227 -#define GL_R8_EXT 0x8229 -#define GL_RG8_EXT 0x822B -#endif /* GL_EXT_texture_rg */ - -#ifndef GL_EXT_texture_sRGB_R8 -#define GL_EXT_texture_sRGB_R8 1 -#define GL_SR8_EXT 0x8FBD -#endif /* GL_EXT_texture_sRGB_R8 */ - -#ifndef GL_EXT_texture_sRGB_RG8 -#define GL_EXT_texture_sRGB_RG8 1 -#define GL_SRG8_EXT 0x8FBE -#endif /* GL_EXT_texture_sRGB_RG8 */ - -#ifndef GL_EXT_texture_sRGB_decode -#define GL_EXT_texture_sRGB_decode 1 -#define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48 -#define GL_DECODE_EXT 0x8A49 -#define GL_SKIP_DECODE_EXT 0x8A4A -#endif /* GL_EXT_texture_sRGB_decode */ - -#ifndef GL_EXT_texture_storage -#define GL_EXT_texture_storage 1 -#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F -#define GL_ALPHA8_EXT 0x803C -#define GL_LUMINANCE8_EXT 0x8040 -#define GL_LUMINANCE8_ALPHA8_EXT 0x8045 -#define GL_RGBA32F_EXT 0x8814 -#define GL_RGB32F_EXT 0x8815 -#define GL_ALPHA32F_EXT 0x8816 -#define GL_LUMINANCE32F_EXT 0x8818 -#define GL_LUMINANCE_ALPHA32F_EXT 0x8819 -#define GL_ALPHA16F_EXT 0x881C -#define GL_LUMINANCE16F_EXT 0x881E -#define GL_LUMINANCE_ALPHA16F_EXT 0x881F -#define GL_R32F_EXT 0x822E -#define GL_RG32F_EXT 0x8230 -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -GL_APICALL void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -GL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -#endif -#endif /* GL_EXT_texture_storage */ - -#ifndef GL_EXT_texture_type_2_10_10_10_REV -#define GL_EXT_texture_type_2_10_10_10_REV 1 -#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368 -#endif /* GL_EXT_texture_type_2_10_10_10_REV */ - -#ifndef GL_EXT_texture_view -#define GL_EXT_texture_view 1 -#define GL_TEXTURE_VIEW_MIN_LEVEL_EXT 0x82DB -#define GL_TEXTURE_VIEW_NUM_LEVELS_EXT 0x82DC -#define GL_TEXTURE_VIEW_MIN_LAYER_EXT 0x82DD -#define GL_TEXTURE_VIEW_NUM_LAYERS_EXT 0x82DE -typedef void (GL_APIENTRYP PFNGLTEXTUREVIEWEXTPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glTextureViewEXT (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); -#endif -#endif /* GL_EXT_texture_view */ - -#ifndef GL_EXT_unpack_subimage -#define GL_EXT_unpack_subimage 1 -#define GL_UNPACK_ROW_LENGTH_EXT 0x0CF2 -#define GL_UNPACK_SKIP_ROWS_EXT 0x0CF3 -#define GL_UNPACK_SKIP_PIXELS_EXT 0x0CF4 -#endif /* GL_EXT_unpack_subimage */ - -#ifndef GL_EXT_win32_keyed_mutex -#define GL_EXT_win32_keyed_mutex 1 -typedef GLboolean (GL_APIENTRYP PFNGLACQUIREKEYEDMUTEXWIN32EXTPROC) (GLuint memory, GLuint64 key, GLuint timeout); -typedef GLboolean (GL_APIENTRYP PFNGLRELEASEKEYEDMUTEXWIN32EXTPROC) (GLuint memory, GLuint64 key); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL GLboolean GL_APIENTRY glAcquireKeyedMutexWin32EXT (GLuint memory, GLuint64 key, GLuint timeout); -GL_APICALL GLboolean GL_APIENTRY glReleaseKeyedMutexWin32EXT (GLuint memory, GLuint64 key); -#endif -#endif /* GL_EXT_win32_keyed_mutex */ - -#ifndef GL_EXT_window_rectangles -#define GL_EXT_window_rectangles 1 -#define GL_INCLUSIVE_EXT 0x8F10 -#define GL_EXCLUSIVE_EXT 0x8F11 -#define GL_WINDOW_RECTANGLE_EXT 0x8F12 -#define GL_WINDOW_RECTANGLE_MODE_EXT 0x8F13 -#define GL_MAX_WINDOW_RECTANGLES_EXT 0x8F14 -#define GL_NUM_WINDOW_RECTANGLES_EXT 0x8F15 -typedef void (GL_APIENTRYP PFNGLWINDOWRECTANGLESEXTPROC) (GLenum mode, GLsizei count, const GLint *box); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glWindowRectanglesEXT (GLenum mode, GLsizei count, const GLint *box); -#endif -#endif /* GL_EXT_window_rectangles */ - -#ifndef GL_FJ_shader_binary_GCCSO -#define GL_FJ_shader_binary_GCCSO 1 -#define GL_GCCSO_SHADER_BINARY_FJ 0x9260 -#endif /* GL_FJ_shader_binary_GCCSO */ - -#ifndef GL_IMG_bindless_texture -#define GL_IMG_bindless_texture 1 -typedef GLuint64 (GL_APIENTRYP PFNGLGETTEXTUREHANDLEIMGPROC) (GLuint texture); -typedef GLuint64 (GL_APIENTRYP PFNGLGETTEXTURESAMPLERHANDLEIMGPROC) (GLuint texture, GLuint sampler); -typedef void (GL_APIENTRYP PFNGLUNIFORMHANDLEUI64IMGPROC) (GLint location, GLuint64 value); -typedef void (GL_APIENTRYP PFNGLUNIFORMHANDLEUI64VIMGPROC) (GLint location, GLsizei count, const GLuint64 *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64IMGPROC) (GLuint program, GLint location, GLuint64 value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VIMGPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL GLuint64 GL_APIENTRY glGetTextureHandleIMG (GLuint texture); -GL_APICALL GLuint64 GL_APIENTRY glGetTextureSamplerHandleIMG (GLuint texture, GLuint sampler); -GL_APICALL void GL_APIENTRY glUniformHandleui64IMG (GLint location, GLuint64 value); -GL_APICALL void GL_APIENTRY glUniformHandleui64vIMG (GLint location, GLsizei count, const GLuint64 *value); -GL_APICALL void GL_APIENTRY glProgramUniformHandleui64IMG (GLuint program, GLint location, GLuint64 value); -GL_APICALL void GL_APIENTRY glProgramUniformHandleui64vIMG (GLuint program, GLint location, GLsizei count, const GLuint64 *values); -#endif -#endif /* GL_IMG_bindless_texture */ - -#ifndef GL_IMG_framebuffer_downsample -#define GL_IMG_framebuffer_downsample 1 -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_AND_DOWNSAMPLE_IMG 0x913C -#define GL_NUM_DOWNSAMPLE_SCALES_IMG 0x913D -#define GL_DOWNSAMPLE_SCALES_IMG 0x913E -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SCALE_IMG 0x913F -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DDOWNSAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint xscale, GLint yscale); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERDOWNSAMPLEIMGPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer, GLint xscale, GLint yscale); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glFramebufferTexture2DDownsampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint xscale, GLint yscale); -GL_APICALL void GL_APIENTRY glFramebufferTextureLayerDownsampleIMG (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer, GLint xscale, GLint yscale); -#endif -#endif /* GL_IMG_framebuffer_downsample */ - -#ifndef GL_IMG_multisampled_render_to_texture -#define GL_IMG_multisampled_render_to_texture 1 -#define GL_RENDERBUFFER_SAMPLES_IMG 0x9133 -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134 -#define GL_MAX_SAMPLES_IMG 0x9135 -#define GL_TEXTURE_SAMPLES_IMG 0x9136 -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); -#endif -#endif /* GL_IMG_multisampled_render_to_texture */ - -#ifndef GL_IMG_program_binary -#define GL_IMG_program_binary 1 -#define GL_SGX_PROGRAM_BINARY_IMG 0x9130 -#endif /* GL_IMG_program_binary */ - -#ifndef GL_IMG_read_format -#define GL_IMG_read_format 1 -#define GL_BGRA_IMG 0x80E1 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365 -#endif /* GL_IMG_read_format */ - -#ifndef GL_IMG_shader_binary -#define GL_IMG_shader_binary 1 -#define GL_SGX_BINARY_IMG 0x8C0A -#endif /* GL_IMG_shader_binary */ - -#ifndef GL_IMG_texture_compression_pvrtc -#define GL_IMG_texture_compression_pvrtc 1 -#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00 -#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01 -#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02 -#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03 -#endif /* GL_IMG_texture_compression_pvrtc */ - -#ifndef GL_IMG_texture_compression_pvrtc2 -#define GL_IMG_texture_compression_pvrtc2 1 -#define GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG 0x9137 -#define GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG 0x9138 -#endif /* GL_IMG_texture_compression_pvrtc2 */ - -#ifndef GL_IMG_texture_filter_cubic -#define GL_IMG_texture_filter_cubic 1 -#define GL_CUBIC_IMG 0x9139 -#define GL_CUBIC_MIPMAP_NEAREST_IMG 0x913A -#define GL_CUBIC_MIPMAP_LINEAR_IMG 0x913B -#endif /* GL_IMG_texture_filter_cubic */ - -#ifndef GL_INTEL_conservative_rasterization -#define GL_INTEL_conservative_rasterization 1 -#define GL_CONSERVATIVE_RASTERIZATION_INTEL 0x83FE -#endif /* GL_INTEL_conservative_rasterization */ - -#ifndef GL_INTEL_framebuffer_CMAA -#define GL_INTEL_framebuffer_CMAA 1 -typedef void (GL_APIENTRYP PFNGLAPPLYFRAMEBUFFERATTACHMENTCMAAINTELPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glApplyFramebufferAttachmentCMAAINTEL (void); -#endif -#endif /* GL_INTEL_framebuffer_CMAA */ - -#ifndef GL_INTEL_performance_query -#define GL_INTEL_performance_query 1 -#define GL_PERFQUERY_SINGLE_CONTEXT_INTEL 0x00000000 -#define GL_PERFQUERY_GLOBAL_CONTEXT_INTEL 0x00000001 -#define GL_PERFQUERY_WAIT_INTEL 0x83FB -#define GL_PERFQUERY_FLUSH_INTEL 0x83FA -#define GL_PERFQUERY_DONOT_FLUSH_INTEL 0x83F9 -#define GL_PERFQUERY_COUNTER_EVENT_INTEL 0x94F0 -#define GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL 0x94F1 -#define GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL 0x94F2 -#define GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL 0x94F3 -#define GL_PERFQUERY_COUNTER_RAW_INTEL 0x94F4 -#define GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL 0x94F5 -#define GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL 0x94F8 -#define GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL 0x94F9 -#define GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL 0x94FA -#define GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL 0x94FB -#define GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL 0x94FC -#define GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL 0x94FD -#define GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL 0x94FE -#define GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL 0x94FF -#define GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL 0x9500 -typedef void (GL_APIENTRYP PFNGLBEGINPERFQUERYINTELPROC) (GLuint queryHandle); -typedef void (GL_APIENTRYP PFNGLCREATEPERFQUERYINTELPROC) (GLuint queryId, GLuint *queryHandle); -typedef void (GL_APIENTRYP PFNGLDELETEPERFQUERYINTELPROC) (GLuint queryHandle); -typedef void (GL_APIENTRYP PFNGLENDPERFQUERYINTELPROC) (GLuint queryHandle); -typedef void (GL_APIENTRYP PFNGLGETFIRSTPERFQUERYIDINTELPROC) (GLuint *queryId); -typedef void (GL_APIENTRYP PFNGLGETNEXTPERFQUERYIDINTELPROC) (GLuint queryId, GLuint *nextQueryId); -typedef void (GL_APIENTRYP PFNGLGETPERFCOUNTERINFOINTELPROC) (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue); -typedef void (GL_APIENTRYP PFNGLGETPERFQUERYDATAINTELPROC) (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten); -typedef void (GL_APIENTRYP PFNGLGETPERFQUERYIDBYNAMEINTELPROC) (GLchar *queryName, GLuint *queryId); -typedef void (GL_APIENTRYP PFNGLGETPERFQUERYINFOINTELPROC) (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glBeginPerfQueryINTEL (GLuint queryHandle); -GL_APICALL void GL_APIENTRY glCreatePerfQueryINTEL (GLuint queryId, GLuint *queryHandle); -GL_APICALL void GL_APIENTRY glDeletePerfQueryINTEL (GLuint queryHandle); -GL_APICALL void GL_APIENTRY glEndPerfQueryINTEL (GLuint queryHandle); -GL_APICALL void GL_APIENTRY glGetFirstPerfQueryIdINTEL (GLuint *queryId); -GL_APICALL void GL_APIENTRY glGetNextPerfQueryIdINTEL (GLuint queryId, GLuint *nextQueryId); -GL_APICALL void GL_APIENTRY glGetPerfCounterInfoINTEL (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue); -GL_APICALL void GL_APIENTRY glGetPerfQueryDataINTEL (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten); -GL_APICALL void GL_APIENTRY glGetPerfQueryIdByNameINTEL (GLchar *queryName, GLuint *queryId); -GL_APICALL void GL_APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask); -#endif -#endif /* GL_INTEL_performance_query */ - -#ifndef GL_MESA_shader_integer_functions -#define GL_MESA_shader_integer_functions 1 -#endif /* GL_MESA_shader_integer_functions */ - -#ifndef GL_NVX_blend_equation_advanced_multi_draw_buffers -#define GL_NVX_blend_equation_advanced_multi_draw_buffers 1 -#endif /* GL_NVX_blend_equation_advanced_multi_draw_buffers */ - -#ifndef GL_NV_bindless_texture -#define GL_NV_bindless_texture 1 -typedef GLuint64 (GL_APIENTRYP PFNGLGETTEXTUREHANDLENVPROC) (GLuint texture); -typedef GLuint64 (GL_APIENTRYP PFNGLGETTEXTURESAMPLERHANDLENVPROC) (GLuint texture, GLuint sampler); -typedef void (GL_APIENTRYP PFNGLMAKETEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle); -typedef void (GL_APIENTRYP PFNGLMAKETEXTUREHANDLENONRESIDENTNVPROC) (GLuint64 handle); -typedef GLuint64 (GL_APIENTRYP PFNGLGETIMAGEHANDLENVPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); -typedef void (GL_APIENTRYP PFNGLMAKEIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle, GLenum access); -typedef void (GL_APIENTRYP PFNGLMAKEIMAGEHANDLENONRESIDENTNVPROC) (GLuint64 handle); -typedef void (GL_APIENTRYP PFNGLUNIFORMHANDLEUI64NVPROC) (GLint location, GLuint64 value); -typedef void (GL_APIENTRYP PFNGLUNIFORMHANDLEUI64VNVPROC) (GLint location, GLsizei count, const GLuint64 *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64NVPROC) (GLuint program, GLint location, GLuint64 value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMHANDLEUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 *values); -typedef GLboolean (GL_APIENTRYP PFNGLISTEXTUREHANDLERESIDENTNVPROC) (GLuint64 handle); -typedef GLboolean (GL_APIENTRYP PFNGLISIMAGEHANDLERESIDENTNVPROC) (GLuint64 handle); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL GLuint64 GL_APIENTRY glGetTextureHandleNV (GLuint texture); -GL_APICALL GLuint64 GL_APIENTRY glGetTextureSamplerHandleNV (GLuint texture, GLuint sampler); -GL_APICALL void GL_APIENTRY glMakeTextureHandleResidentNV (GLuint64 handle); -GL_APICALL void GL_APIENTRY glMakeTextureHandleNonResidentNV (GLuint64 handle); -GL_APICALL GLuint64 GL_APIENTRY glGetImageHandleNV (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); -GL_APICALL void GL_APIENTRY glMakeImageHandleResidentNV (GLuint64 handle, GLenum access); -GL_APICALL void GL_APIENTRY glMakeImageHandleNonResidentNV (GLuint64 handle); -GL_APICALL void GL_APIENTRY glUniformHandleui64NV (GLint location, GLuint64 value); -GL_APICALL void GL_APIENTRY glUniformHandleui64vNV (GLint location, GLsizei count, const GLuint64 *value); -GL_APICALL void GL_APIENTRY glProgramUniformHandleui64NV (GLuint program, GLint location, GLuint64 value); -GL_APICALL void GL_APIENTRY glProgramUniformHandleui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64 *values); -GL_APICALL GLboolean GL_APIENTRY glIsTextureHandleResidentNV (GLuint64 handle); -GL_APICALL GLboolean GL_APIENTRY glIsImageHandleResidentNV (GLuint64 handle); -#endif -#endif /* GL_NV_bindless_texture */ - -#ifndef GL_NV_blend_equation_advanced -#define GL_NV_blend_equation_advanced 1 -#define GL_BLEND_OVERLAP_NV 0x9281 -#define GL_BLEND_PREMULTIPLIED_SRC_NV 0x9280 -#define GL_BLUE_NV 0x1905 -#define GL_COLORBURN_NV 0x929A -#define GL_COLORDODGE_NV 0x9299 -#define GL_CONJOINT_NV 0x9284 -#define GL_CONTRAST_NV 0x92A1 -#define GL_DARKEN_NV 0x9297 -#define GL_DIFFERENCE_NV 0x929E -#define GL_DISJOINT_NV 0x9283 -#define GL_DST_ATOP_NV 0x928F -#define GL_DST_IN_NV 0x928B -#define GL_DST_NV 0x9287 -#define GL_DST_OUT_NV 0x928D -#define GL_DST_OVER_NV 0x9289 -#define GL_EXCLUSION_NV 0x92A0 -#define GL_GREEN_NV 0x1904 -#define GL_HARDLIGHT_NV 0x929B -#define GL_HARDMIX_NV 0x92A9 -#define GL_HSL_COLOR_NV 0x92AF -#define GL_HSL_HUE_NV 0x92AD -#define GL_HSL_LUMINOSITY_NV 0x92B0 -#define GL_HSL_SATURATION_NV 0x92AE -#define GL_INVERT_OVG_NV 0x92B4 -#define GL_INVERT_RGB_NV 0x92A3 -#define GL_LIGHTEN_NV 0x9298 -#define GL_LINEARBURN_NV 0x92A5 -#define GL_LINEARDODGE_NV 0x92A4 -#define GL_LINEARLIGHT_NV 0x92A7 -#define GL_MINUS_CLAMPED_NV 0x92B3 -#define GL_MINUS_NV 0x929F -#define GL_MULTIPLY_NV 0x9294 -#define GL_OVERLAY_NV 0x9296 -#define GL_PINLIGHT_NV 0x92A8 -#define GL_PLUS_CLAMPED_ALPHA_NV 0x92B2 -#define GL_PLUS_CLAMPED_NV 0x92B1 -#define GL_PLUS_DARKER_NV 0x9292 -#define GL_PLUS_NV 0x9291 -#define GL_RED_NV 0x1903 -#define GL_SCREEN_NV 0x9295 -#define GL_SOFTLIGHT_NV 0x929C -#define GL_SRC_ATOP_NV 0x928E -#define GL_SRC_IN_NV 0x928A -#define GL_SRC_NV 0x9286 -#define GL_SRC_OUT_NV 0x928C -#define GL_SRC_OVER_NV 0x9288 -#define GL_UNCORRELATED_NV 0x9282 -#define GL_VIVIDLIGHT_NV 0x92A6 -#define GL_XOR_NV 0x1506 -typedef void (GL_APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value); -typedef void (GL_APIENTRYP PFNGLBLENDBARRIERNVPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glBlendParameteriNV (GLenum pname, GLint value); -GL_APICALL void GL_APIENTRY glBlendBarrierNV (void); -#endif -#endif /* GL_NV_blend_equation_advanced */ - -#ifndef GL_NV_blend_equation_advanced_coherent -#define GL_NV_blend_equation_advanced_coherent 1 -#define GL_BLEND_ADVANCED_COHERENT_NV 0x9285 -#endif /* GL_NV_blend_equation_advanced_coherent */ - -#ifndef GL_NV_conditional_render -#define GL_NV_conditional_render 1 -#define GL_QUERY_WAIT_NV 0x8E13 -#define GL_QUERY_NO_WAIT_NV 0x8E14 -#define GL_QUERY_BY_REGION_WAIT_NV 0x8E15 -#define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16 -typedef void (GL_APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode); -typedef void (GL_APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glBeginConditionalRenderNV (GLuint id, GLenum mode); -GL_APICALL void GL_APIENTRY glEndConditionalRenderNV (void); -#endif -#endif /* GL_NV_conditional_render */ - -#ifndef GL_NV_conservative_raster -#define GL_NV_conservative_raster 1 -#define GL_CONSERVATIVE_RASTERIZATION_NV 0x9346 -#define GL_SUBPIXEL_PRECISION_BIAS_X_BITS_NV 0x9347 -#define GL_SUBPIXEL_PRECISION_BIAS_Y_BITS_NV 0x9348 -#define GL_MAX_SUBPIXEL_PRECISION_BIAS_BITS_NV 0x9349 -typedef void (GL_APIENTRYP PFNGLSUBPIXELPRECISIONBIASNVPROC) (GLuint xbits, GLuint ybits); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glSubpixelPrecisionBiasNV (GLuint xbits, GLuint ybits); -#endif -#endif /* GL_NV_conservative_raster */ - -#ifndef GL_NV_conservative_raster_pre_snap_triangles -#define GL_NV_conservative_raster_pre_snap_triangles 1 -#define GL_CONSERVATIVE_RASTER_MODE_NV 0x954D -#define GL_CONSERVATIVE_RASTER_MODE_POST_SNAP_NV 0x954E -#define GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_TRIANGLES_NV 0x954F -typedef void (GL_APIENTRYP PFNGLCONSERVATIVERASTERPARAMETERINVPROC) (GLenum pname, GLint param); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glConservativeRasterParameteriNV (GLenum pname, GLint param); -#endif -#endif /* GL_NV_conservative_raster_pre_snap_triangles */ - -#ifndef GL_NV_copy_buffer -#define GL_NV_copy_buffer 1 -#define GL_COPY_READ_BUFFER_NV 0x8F36 -#define GL_COPY_WRITE_BUFFER_NV 0x8F37 -typedef void (GL_APIENTRYP PFNGLCOPYBUFFERSUBDATANVPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glCopyBufferSubDataNV (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -#endif -#endif /* GL_NV_copy_buffer */ - -#ifndef GL_NV_coverage_sample -#define GL_NV_coverage_sample 1 -#define GL_COVERAGE_COMPONENT_NV 0x8ED0 -#define GL_COVERAGE_COMPONENT4_NV 0x8ED1 -#define GL_COVERAGE_ATTACHMENT_NV 0x8ED2 -#define GL_COVERAGE_BUFFERS_NV 0x8ED3 -#define GL_COVERAGE_SAMPLES_NV 0x8ED4 -#define GL_COVERAGE_ALL_FRAGMENTS_NV 0x8ED5 -#define GL_COVERAGE_EDGE_FRAGMENTS_NV 0x8ED6 -#define GL_COVERAGE_AUTOMATIC_NV 0x8ED7 -#define GL_COVERAGE_BUFFER_BIT_NV 0x00008000 -typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask); -typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask); -GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation); -#endif -#endif /* GL_NV_coverage_sample */ - -#ifndef GL_NV_depth_nonlinear -#define GL_NV_depth_nonlinear 1 -#define GL_DEPTH_COMPONENT16_NONLINEAR_NV 0x8E2C -#endif /* GL_NV_depth_nonlinear */ - -#ifndef GL_NV_draw_buffers -#define GL_NV_draw_buffers 1 -#define GL_MAX_DRAW_BUFFERS_NV 0x8824 -#define GL_DRAW_BUFFER0_NV 0x8825 -#define GL_DRAW_BUFFER1_NV 0x8826 -#define GL_DRAW_BUFFER2_NV 0x8827 -#define GL_DRAW_BUFFER3_NV 0x8828 -#define GL_DRAW_BUFFER4_NV 0x8829 -#define GL_DRAW_BUFFER5_NV 0x882A -#define GL_DRAW_BUFFER6_NV 0x882B -#define GL_DRAW_BUFFER7_NV 0x882C -#define GL_DRAW_BUFFER8_NV 0x882D -#define GL_DRAW_BUFFER9_NV 0x882E -#define GL_DRAW_BUFFER10_NV 0x882F -#define GL_DRAW_BUFFER11_NV 0x8830 -#define GL_DRAW_BUFFER12_NV 0x8831 -#define GL_DRAW_BUFFER13_NV 0x8832 -#define GL_DRAW_BUFFER14_NV 0x8833 -#define GL_DRAW_BUFFER15_NV 0x8834 -#define GL_COLOR_ATTACHMENT0_NV 0x8CE0 -#define GL_COLOR_ATTACHMENT1_NV 0x8CE1 -#define GL_COLOR_ATTACHMENT2_NV 0x8CE2 -#define GL_COLOR_ATTACHMENT3_NV 0x8CE3 -#define GL_COLOR_ATTACHMENT4_NV 0x8CE4 -#define GL_COLOR_ATTACHMENT5_NV 0x8CE5 -#define GL_COLOR_ATTACHMENT6_NV 0x8CE6 -#define GL_COLOR_ATTACHMENT7_NV 0x8CE7 -#define GL_COLOR_ATTACHMENT8_NV 0x8CE8 -#define GL_COLOR_ATTACHMENT9_NV 0x8CE9 -#define GL_COLOR_ATTACHMENT10_NV 0x8CEA -#define GL_COLOR_ATTACHMENT11_NV 0x8CEB -#define GL_COLOR_ATTACHMENT12_NV 0x8CEC -#define GL_COLOR_ATTACHMENT13_NV 0x8CED -#define GL_COLOR_ATTACHMENT14_NV 0x8CEE -#define GL_COLOR_ATTACHMENT15_NV 0x8CEF -typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs); -#endif -#endif /* GL_NV_draw_buffers */ - -#ifndef GL_NV_draw_instanced -#define GL_NV_draw_instanced 1 -typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDNVPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDNVPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDrawArraysInstancedNV (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -GL_APICALL void GL_APIENTRY glDrawElementsInstancedNV (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount); -#endif -#endif /* GL_NV_draw_instanced */ - -#ifndef GL_NV_draw_vulkan_image -#define GL_NV_draw_vulkan_image 1 -typedef void (GL_APIENTRY *GLVULKANPROCNV)(void); -typedef void (GL_APIENTRYP PFNGLDRAWVKIMAGENVPROC) (GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1); -typedef GLVULKANPROCNV (GL_APIENTRYP PFNGLGETVKPROCADDRNVPROC) (const GLchar *name); -typedef void (GL_APIENTRYP PFNGLWAITVKSEMAPHORENVPROC) (GLuint64 vkSemaphore); -typedef void (GL_APIENTRYP PFNGLSIGNALVKSEMAPHORENVPROC) (GLuint64 vkSemaphore); -typedef void (GL_APIENTRYP PFNGLSIGNALVKFENCENVPROC) (GLuint64 vkFence); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDrawVkImageNV (GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1); -GL_APICALL GLVULKANPROCNV GL_APIENTRY glGetVkProcAddrNV (const GLchar *name); -GL_APICALL void GL_APIENTRY glWaitVkSemaphoreNV (GLuint64 vkSemaphore); -GL_APICALL void GL_APIENTRY glSignalVkSemaphoreNV (GLuint64 vkSemaphore); -GL_APICALL void GL_APIENTRY glSignalVkFenceNV (GLuint64 vkFence); -#endif -#endif /* GL_NV_draw_vulkan_image */ - -#ifndef GL_NV_explicit_attrib_location -#define GL_NV_explicit_attrib_location 1 -#endif /* GL_NV_explicit_attrib_location */ - -#ifndef GL_NV_fbo_color_attachments -#define GL_NV_fbo_color_attachments 1 -#define GL_MAX_COLOR_ATTACHMENTS_NV 0x8CDF -#endif /* GL_NV_fbo_color_attachments */ - -#ifndef GL_NV_fence -#define GL_NV_fence 1 -#define GL_ALL_COMPLETED_NV 0x84F2 -#define GL_FENCE_STATUS_NV 0x84F3 -#define GL_FENCE_CONDITION_NV 0x84F4 -typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); -typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); -typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); -typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); -typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); -typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences); -GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei n, GLuint *fences); -GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint fence); -GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint fence); -GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint fence); -GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition); -#endif -#endif /* GL_NV_fence */ - -#ifndef GL_NV_fill_rectangle -#define GL_NV_fill_rectangle 1 -#define GL_FILL_RECTANGLE_NV 0x933C -#endif /* GL_NV_fill_rectangle */ - -#ifndef GL_NV_fragment_coverage_to_color -#define GL_NV_fragment_coverage_to_color 1 -#define GL_FRAGMENT_COVERAGE_TO_COLOR_NV 0x92DD -#define GL_FRAGMENT_COVERAGE_COLOR_NV 0x92DE -typedef void (GL_APIENTRYP PFNGLFRAGMENTCOVERAGECOLORNVPROC) (GLuint color); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glFragmentCoverageColorNV (GLuint color); -#endif -#endif /* GL_NV_fragment_coverage_to_color */ - -#ifndef GL_NV_fragment_shader_interlock -#define GL_NV_fragment_shader_interlock 1 -#endif /* GL_NV_fragment_shader_interlock */ - -#ifndef GL_NV_framebuffer_blit -#define GL_NV_framebuffer_blit 1 -#define GL_READ_FRAMEBUFFER_NV 0x8CA8 -#define GL_DRAW_FRAMEBUFFER_NV 0x8CA9 -#define GL_DRAW_FRAMEBUFFER_BINDING_NV 0x8CA6 -#define GL_READ_FRAMEBUFFER_BINDING_NV 0x8CAA -typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERNVPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glBlitFramebufferNV (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -#endif -#endif /* GL_NV_framebuffer_blit */ - -#ifndef GL_NV_framebuffer_mixed_samples -#define GL_NV_framebuffer_mixed_samples 1 -#define GL_COVERAGE_MODULATION_TABLE_NV 0x9331 -#define GL_COLOR_SAMPLES_NV 0x8E20 -#define GL_DEPTH_SAMPLES_NV 0x932D -#define GL_STENCIL_SAMPLES_NV 0x932E -#define GL_MIXED_DEPTH_SAMPLES_SUPPORTED_NV 0x932F -#define GL_MIXED_STENCIL_SAMPLES_SUPPORTED_NV 0x9330 -#define GL_COVERAGE_MODULATION_NV 0x9332 -#define GL_COVERAGE_MODULATION_TABLE_SIZE_NV 0x9333 -typedef void (GL_APIENTRYP PFNGLCOVERAGEMODULATIONTABLENVPROC) (GLsizei n, const GLfloat *v); -typedef void (GL_APIENTRYP PFNGLGETCOVERAGEMODULATIONTABLENVPROC) (GLsizei bufsize, GLfloat *v); -typedef void (GL_APIENTRYP PFNGLCOVERAGEMODULATIONNVPROC) (GLenum components); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glCoverageModulationTableNV (GLsizei n, const GLfloat *v); -GL_APICALL void GL_APIENTRY glGetCoverageModulationTableNV (GLsizei bufsize, GLfloat *v); -GL_APICALL void GL_APIENTRY glCoverageModulationNV (GLenum components); -#endif -#endif /* GL_NV_framebuffer_mixed_samples */ - -#ifndef GL_NV_framebuffer_multisample -#define GL_NV_framebuffer_multisample 1 -#define GL_RENDERBUFFER_SAMPLES_NV 0x8CAB -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV 0x8D56 -#define GL_MAX_SAMPLES_NV 0x8D57 -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLENVPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleNV (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -#endif -#endif /* GL_NV_framebuffer_multisample */ - -#ifndef GL_NV_generate_mipmap_sRGB -#define GL_NV_generate_mipmap_sRGB 1 -#endif /* GL_NV_generate_mipmap_sRGB */ - -#ifndef GL_NV_geometry_shader_passthrough -#define GL_NV_geometry_shader_passthrough 1 -#endif /* GL_NV_geometry_shader_passthrough */ - -#ifndef GL_NV_gpu_shader5 -#define GL_NV_gpu_shader5 1 -typedef khronos_int64_t GLint64EXT; -typedef khronos_uint64_t GLuint64EXT; -#define GL_INT64_NV 0x140E -#define GL_UNSIGNED_INT64_NV 0x140F -#define GL_INT8_NV 0x8FE0 -#define GL_INT8_VEC2_NV 0x8FE1 -#define GL_INT8_VEC3_NV 0x8FE2 -#define GL_INT8_VEC4_NV 0x8FE3 -#define GL_INT16_NV 0x8FE4 -#define GL_INT16_VEC2_NV 0x8FE5 -#define GL_INT16_VEC3_NV 0x8FE6 -#define GL_INT16_VEC4_NV 0x8FE7 -#define GL_INT64_VEC2_NV 0x8FE9 -#define GL_INT64_VEC3_NV 0x8FEA -#define GL_INT64_VEC4_NV 0x8FEB -#define GL_UNSIGNED_INT8_NV 0x8FEC -#define GL_UNSIGNED_INT8_VEC2_NV 0x8FED -#define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE -#define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF -#define GL_UNSIGNED_INT16_NV 0x8FF0 -#define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1 -#define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2 -#define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3 -#define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5 -#define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6 -#define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7 -#define GL_FLOAT16_NV 0x8FF8 -#define GL_FLOAT16_VEC2_NV 0x8FF9 -#define GL_FLOAT16_VEC3_NV 0x8FFA -#define GL_FLOAT16_VEC4_NV 0x8FFB -#define GL_PATCHES 0x000E -typedef void (GL_APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x); -typedef void (GL_APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y); -typedef void (GL_APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); -typedef void (GL_APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -typedef void (GL_APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x); -typedef void (GL_APIENTRYP PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y); -typedef void (GL_APIENTRYP PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -typedef void (GL_APIENTRYP PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -typedef void (GL_APIENTRYP PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (GL_APIENTRYP PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glUniform1i64NV (GLint location, GLint64EXT x); -GL_APICALL void GL_APIENTRY glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y); -GL_APICALL void GL_APIENTRY glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); -GL_APICALL void GL_APIENTRY glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -GL_APICALL void GL_APIENTRY glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value); -GL_APICALL void GL_APIENTRY glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value); -GL_APICALL void GL_APIENTRY glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value); -GL_APICALL void GL_APIENTRY glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value); -GL_APICALL void GL_APIENTRY glUniform1ui64NV (GLint location, GLuint64EXT x); -GL_APICALL void GL_APIENTRY glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y); -GL_APICALL void GL_APIENTRY glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -GL_APICALL void GL_APIENTRY glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -GL_APICALL void GL_APIENTRY glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GL_APICALL void GL_APIENTRY glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GL_APICALL void GL_APIENTRY glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GL_APICALL void GL_APIENTRY glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GL_APICALL void GL_APIENTRY glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params); -GL_APICALL void GL_APIENTRY glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x); -GL_APICALL void GL_APIENTRY glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); -GL_APICALL void GL_APIENTRY glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); -GL_APICALL void GL_APIENTRY glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -GL_APICALL void GL_APIENTRY glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -GL_APICALL void GL_APIENTRY glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -GL_APICALL void GL_APIENTRY glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -GL_APICALL void GL_APIENTRY glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -GL_APICALL void GL_APIENTRY glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x); -GL_APICALL void GL_APIENTRY glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); -GL_APICALL void GL_APIENTRY glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -GL_APICALL void GL_APIENTRY glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -GL_APICALL void GL_APIENTRY glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -GL_APICALL void GL_APIENTRY glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -GL_APICALL void GL_APIENTRY glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -GL_APICALL void GL_APIENTRY glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -#endif -#endif /* GL_NV_gpu_shader5 */ - -#ifndef GL_NV_image_formats -#define GL_NV_image_formats 1 -#endif /* GL_NV_image_formats */ - -#ifndef GL_NV_instanced_arrays -#define GL_NV_instanced_arrays 1 -#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_NV 0x88FE -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORNVPROC) (GLuint index, GLuint divisor); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glVertexAttribDivisorNV (GLuint index, GLuint divisor); -#endif -#endif /* GL_NV_instanced_arrays */ - -#ifndef GL_NV_internalformat_sample_query -#define GL_NV_internalformat_sample_query 1 -#define GL_TEXTURE_2D_MULTISAMPLE 0x9100 -#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102 -#define GL_MULTISAMPLES_NV 0x9371 -#define GL_SUPERSAMPLE_SCALE_X_NV 0x9372 -#define GL_SUPERSAMPLE_SCALE_Y_NV 0x9373 -#define GL_CONFORMANT_NV 0x9374 -typedef void (GL_APIENTRYP PFNGLGETINTERNALFORMATSAMPLEIVNVPROC) (GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei bufSize, GLint *params); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGetInternalformatSampleivNV (GLenum target, GLenum internalformat, GLsizei samples, GLenum pname, GLsizei bufSize, GLint *params); -#endif -#endif /* GL_NV_internalformat_sample_query */ - -#ifndef GL_NV_non_square_matrices -#define GL_NV_non_square_matrices 1 -#define GL_FLOAT_MAT2x3_NV 0x8B65 -#define GL_FLOAT_MAT2x4_NV 0x8B66 -#define GL_FLOAT_MAT3x2_NV 0x8B67 -#define GL_FLOAT_MAT3x4_NV 0x8B68 -#define GL_FLOAT_MAT4x2_NV 0x8B69 -#define GL_FLOAT_MAT4x3_NV 0x8B6A -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X3FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X2FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X4FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X2FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X4FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X3FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glUniformMatrix2x3fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix3x2fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix2x4fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix4x2fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix3x4fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix4x3fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -#endif -#endif /* GL_NV_non_square_matrices */ - -#ifndef GL_NV_path_rendering -#define GL_NV_path_rendering 1 -#define GL_PATH_FORMAT_SVG_NV 0x9070 -#define GL_PATH_FORMAT_PS_NV 0x9071 -#define GL_STANDARD_FONT_NAME_NV 0x9072 -#define GL_SYSTEM_FONT_NAME_NV 0x9073 -#define GL_FILE_NAME_NV 0x9074 -#define GL_PATH_STROKE_WIDTH_NV 0x9075 -#define GL_PATH_END_CAPS_NV 0x9076 -#define GL_PATH_INITIAL_END_CAP_NV 0x9077 -#define GL_PATH_TERMINAL_END_CAP_NV 0x9078 -#define GL_PATH_JOIN_STYLE_NV 0x9079 -#define GL_PATH_MITER_LIMIT_NV 0x907A -#define GL_PATH_DASH_CAPS_NV 0x907B -#define GL_PATH_INITIAL_DASH_CAP_NV 0x907C -#define GL_PATH_TERMINAL_DASH_CAP_NV 0x907D -#define GL_PATH_DASH_OFFSET_NV 0x907E -#define GL_PATH_CLIENT_LENGTH_NV 0x907F -#define GL_PATH_FILL_MODE_NV 0x9080 -#define GL_PATH_FILL_MASK_NV 0x9081 -#define GL_PATH_FILL_COVER_MODE_NV 0x9082 -#define GL_PATH_STROKE_COVER_MODE_NV 0x9083 -#define GL_PATH_STROKE_MASK_NV 0x9084 -#define GL_COUNT_UP_NV 0x9088 -#define GL_COUNT_DOWN_NV 0x9089 -#define GL_PATH_OBJECT_BOUNDING_BOX_NV 0x908A -#define GL_CONVEX_HULL_NV 0x908B -#define GL_BOUNDING_BOX_NV 0x908D -#define GL_TRANSLATE_X_NV 0x908E -#define GL_TRANSLATE_Y_NV 0x908F -#define GL_TRANSLATE_2D_NV 0x9090 -#define GL_TRANSLATE_3D_NV 0x9091 -#define GL_AFFINE_2D_NV 0x9092 -#define GL_AFFINE_3D_NV 0x9094 -#define GL_TRANSPOSE_AFFINE_2D_NV 0x9096 -#define GL_TRANSPOSE_AFFINE_3D_NV 0x9098 -#define GL_UTF8_NV 0x909A -#define GL_UTF16_NV 0x909B -#define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C -#define GL_PATH_COMMAND_COUNT_NV 0x909D -#define GL_PATH_COORD_COUNT_NV 0x909E -#define GL_PATH_DASH_ARRAY_COUNT_NV 0x909F -#define GL_PATH_COMPUTED_LENGTH_NV 0x90A0 -#define GL_PATH_FILL_BOUNDING_BOX_NV 0x90A1 -#define GL_PATH_STROKE_BOUNDING_BOX_NV 0x90A2 -#define GL_SQUARE_NV 0x90A3 -#define GL_ROUND_NV 0x90A4 -#define GL_TRIANGULAR_NV 0x90A5 -#define GL_BEVEL_NV 0x90A6 -#define GL_MITER_REVERT_NV 0x90A7 -#define GL_MITER_TRUNCATE_NV 0x90A8 -#define GL_SKIP_MISSING_GLYPH_NV 0x90A9 -#define GL_USE_MISSING_GLYPH_NV 0x90AA -#define GL_PATH_ERROR_POSITION_NV 0x90AB -#define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD -#define GL_ADJACENT_PAIRS_NV 0x90AE -#define GL_FIRST_TO_REST_NV 0x90AF -#define GL_PATH_GEN_MODE_NV 0x90B0 -#define GL_PATH_GEN_COEFF_NV 0x90B1 -#define GL_PATH_GEN_COMPONENTS_NV 0x90B3 -#define GL_PATH_STENCIL_FUNC_NV 0x90B7 -#define GL_PATH_STENCIL_REF_NV 0x90B8 -#define GL_PATH_STENCIL_VALUE_MASK_NV 0x90B9 -#define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD -#define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE -#define GL_PATH_COVER_DEPTH_FUNC_NV 0x90BF -#define GL_PATH_DASH_OFFSET_RESET_NV 0x90B4 -#define GL_MOVE_TO_RESETS_NV 0x90B5 -#define GL_MOVE_TO_CONTINUES_NV 0x90B6 -#define GL_CLOSE_PATH_NV 0x00 -#define GL_MOVE_TO_NV 0x02 -#define GL_RELATIVE_MOVE_TO_NV 0x03 -#define GL_LINE_TO_NV 0x04 -#define GL_RELATIVE_LINE_TO_NV 0x05 -#define GL_HORIZONTAL_LINE_TO_NV 0x06 -#define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07 -#define GL_VERTICAL_LINE_TO_NV 0x08 -#define GL_RELATIVE_VERTICAL_LINE_TO_NV 0x09 -#define GL_QUADRATIC_CURVE_TO_NV 0x0A -#define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B -#define GL_CUBIC_CURVE_TO_NV 0x0C -#define GL_RELATIVE_CUBIC_CURVE_TO_NV 0x0D -#define GL_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0E -#define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F -#define GL_SMOOTH_CUBIC_CURVE_TO_NV 0x10 -#define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11 -#define GL_SMALL_CCW_ARC_TO_NV 0x12 -#define GL_RELATIVE_SMALL_CCW_ARC_TO_NV 0x13 -#define GL_SMALL_CW_ARC_TO_NV 0x14 -#define GL_RELATIVE_SMALL_CW_ARC_TO_NV 0x15 -#define GL_LARGE_CCW_ARC_TO_NV 0x16 -#define GL_RELATIVE_LARGE_CCW_ARC_TO_NV 0x17 -#define GL_LARGE_CW_ARC_TO_NV 0x18 -#define GL_RELATIVE_LARGE_CW_ARC_TO_NV 0x19 -#define GL_RESTART_PATH_NV 0xF0 -#define GL_DUP_FIRST_CUBIC_CURVE_TO_NV 0xF2 -#define GL_DUP_LAST_CUBIC_CURVE_TO_NV 0xF4 -#define GL_RECT_NV 0xF6 -#define GL_CIRCULAR_CCW_ARC_TO_NV 0xF8 -#define GL_CIRCULAR_CW_ARC_TO_NV 0xFA -#define GL_CIRCULAR_TANGENT_ARC_TO_NV 0xFC -#define GL_ARC_TO_NV 0xFE -#define GL_RELATIVE_ARC_TO_NV 0xFF -#define GL_BOLD_BIT_NV 0x01 -#define GL_ITALIC_BIT_NV 0x02 -#define GL_GLYPH_WIDTH_BIT_NV 0x01 -#define GL_GLYPH_HEIGHT_BIT_NV 0x02 -#define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04 -#define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08 -#define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10 -#define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20 -#define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40 -#define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80 -#define GL_GLYPH_HAS_KERNING_BIT_NV 0x100 -#define GL_FONT_X_MIN_BOUNDS_BIT_NV 0x00010000 -#define GL_FONT_Y_MIN_BOUNDS_BIT_NV 0x00020000 -#define GL_FONT_X_MAX_BOUNDS_BIT_NV 0x00040000 -#define GL_FONT_Y_MAX_BOUNDS_BIT_NV 0x00080000 -#define GL_FONT_UNITS_PER_EM_BIT_NV 0x00100000 -#define GL_FONT_ASCENDER_BIT_NV 0x00200000 -#define GL_FONT_DESCENDER_BIT_NV 0x00400000 -#define GL_FONT_HEIGHT_BIT_NV 0x00800000 -#define GL_FONT_MAX_ADVANCE_WIDTH_BIT_NV 0x01000000 -#define GL_FONT_MAX_ADVANCE_HEIGHT_BIT_NV 0x02000000 -#define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000 -#define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000 -#define GL_FONT_HAS_KERNING_BIT_NV 0x10000000 -#define GL_ROUNDED_RECT_NV 0xE8 -#define GL_RELATIVE_ROUNDED_RECT_NV 0xE9 -#define GL_ROUNDED_RECT2_NV 0xEA -#define GL_RELATIVE_ROUNDED_RECT2_NV 0xEB -#define GL_ROUNDED_RECT4_NV 0xEC -#define GL_RELATIVE_ROUNDED_RECT4_NV 0xED -#define GL_ROUNDED_RECT8_NV 0xEE -#define GL_RELATIVE_ROUNDED_RECT8_NV 0xEF -#define GL_RELATIVE_RECT_NV 0xF7 -#define GL_FONT_GLYPHS_AVAILABLE_NV 0x9368 -#define GL_FONT_TARGET_UNAVAILABLE_NV 0x9369 -#define GL_FONT_UNAVAILABLE_NV 0x936A -#define GL_FONT_UNINTELLIGIBLE_NV 0x936B -#define GL_CONIC_CURVE_TO_NV 0x1A -#define GL_RELATIVE_CONIC_CURVE_TO_NV 0x1B -#define GL_FONT_NUM_GLYPH_INDICES_BIT_NV 0x20000000 -#define GL_STANDARD_FONT_FORMAT_NV 0x936C -#define GL_PATH_PROJECTION_NV 0x1701 -#define GL_PATH_MODELVIEW_NV 0x1700 -#define GL_PATH_MODELVIEW_STACK_DEPTH_NV 0x0BA3 -#define GL_PATH_MODELVIEW_MATRIX_NV 0x0BA6 -#define GL_PATH_MAX_MODELVIEW_STACK_DEPTH_NV 0x0D36 -#define GL_PATH_TRANSPOSE_MODELVIEW_MATRIX_NV 0x84E3 -#define GL_PATH_PROJECTION_STACK_DEPTH_NV 0x0BA4 -#define GL_PATH_PROJECTION_MATRIX_NV 0x0BA7 -#define GL_PATH_MAX_PROJECTION_STACK_DEPTH_NV 0x0D38 -#define GL_PATH_TRANSPOSE_PROJECTION_MATRIX_NV 0x84E4 -#define GL_FRAGMENT_INPUT_NV 0x936D -typedef GLuint (GL_APIENTRYP PFNGLGENPATHSNVPROC) (GLsizei range); -typedef void (GL_APIENTRYP PFNGLDELETEPATHSNVPROC) (GLuint path, GLsizei range); -typedef GLboolean (GL_APIENTRYP PFNGLISPATHNVPROC) (GLuint path); -typedef void (GL_APIENTRYP PFNGLPATHCOMMANDSNVPROC) (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); -typedef void (GL_APIENTRYP PFNGLPATHCOORDSNVPROC) (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords); -typedef void (GL_APIENTRYP PFNGLPATHSUBCOMMANDSNVPROC) (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); -typedef void (GL_APIENTRYP PFNGLPATHSUBCOORDSNVPROC) (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords); -typedef void (GL_APIENTRYP PFNGLPATHSTRINGNVPROC) (GLuint path, GLenum format, GLsizei length, const void *pathString); -typedef void (GL_APIENTRYP PFNGLPATHGLYPHSNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -typedef void (GL_APIENTRYP PFNGLPATHGLYPHRANGENVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -typedef void (GL_APIENTRYP PFNGLWEIGHTPATHSNVPROC) (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights); -typedef void (GL_APIENTRYP PFNGLCOPYPATHNVPROC) (GLuint resultPath, GLuint srcPath); -typedef void (GL_APIENTRYP PFNGLINTERPOLATEPATHSNVPROC) (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight); -typedef void (GL_APIENTRYP PFNGLTRANSFORMPATHNVPROC) (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues); -typedef void (GL_APIENTRYP PFNGLPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, const GLint *value); -typedef void (GL_APIENTRYP PFNGLPATHPARAMETERINVPROC) (GLuint path, GLenum pname, GLint value); -typedef void (GL_APIENTRYP PFNGLPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPATHPARAMETERFNVPROC) (GLuint path, GLenum pname, GLfloat value); -typedef void (GL_APIENTRYP PFNGLPATHDASHARRAYNVPROC) (GLuint path, GLsizei dashCount, const GLfloat *dashArray); -typedef void (GL_APIENTRYP PFNGLPATHSTENCILFUNCNVPROC) (GLenum func, GLint ref, GLuint mask); -typedef void (GL_APIENTRYP PFNGLPATHSTENCILDEPTHOFFSETNVPROC) (GLfloat factor, GLfloat units); -typedef void (GL_APIENTRYP PFNGLSTENCILFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask); -typedef void (GL_APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask); -typedef void (GL_APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues); -typedef void (GL_APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues); -typedef void (GL_APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum func); -typedef void (GL_APIENTRYP PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode); -typedef void (GL_APIENTRYP PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode); -typedef void (GL_APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -typedef void (GL_APIENTRYP PFNGLCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -typedef void (GL_APIENTRYP PFNGLGETPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, GLint *value); -typedef void (GL_APIENTRYP PFNGLGETPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, GLfloat *value); -typedef void (GL_APIENTRYP PFNGLGETPATHCOMMANDSNVPROC) (GLuint path, GLubyte *commands); -typedef void (GL_APIENTRYP PFNGLGETPATHCOORDSNVPROC) (GLuint path, GLfloat *coords); -typedef void (GL_APIENTRYP PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfloat *dashArray); -typedef void (GL_APIENTRYP PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics); -typedef void (GL_APIENTRYP PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics); -typedef void (GL_APIENTRYP PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing); -typedef GLboolean (GL_APIENTRYP PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y); -typedef GLboolean (GL_APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y); -typedef GLfloat (GL_APIENTRYP PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments); -typedef GLboolean (GL_APIENTRYP PFNGLPOINTALONGPATHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY); -typedef void (GL_APIENTRYP PFNGLMATRIXLOAD3X2FNVPROC) (GLenum matrixMode, const GLfloat *m); -typedef void (GL_APIENTRYP PFNGLMATRIXLOAD3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); -typedef void (GL_APIENTRYP PFNGLMATRIXLOADTRANSPOSE3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); -typedef void (GL_APIENTRYP PFNGLMATRIXMULT3X2FNVPROC) (GLenum matrixMode, const GLfloat *m); -typedef void (GL_APIENTRYP PFNGLMATRIXMULT3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); -typedef void (GL_APIENTRYP PFNGLMATRIXMULTTRANSPOSE3X3FNVPROC) (GLenum matrixMode, const GLfloat *m); -typedef void (GL_APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode); -typedef void (GL_APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask, GLenum coverMode); -typedef void (GL_APIENTRYP PFNGLSTENCILTHENCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -typedef void (GL_APIENTRYP PFNGLSTENCILTHENCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -typedef GLenum (GL_APIENTRYP PFNGLPATHGLYPHINDEXRANGENVPROC) (GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint baseAndCount[2]); -typedef GLenum (GL_APIENTRYP PFNGLPATHGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -typedef GLenum (GL_APIENTRYP PFNGLPATHMEMORYGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -typedef void (GL_APIENTRYP PFNGLPROGRAMPATHFRAGMENTINPUTGENNVPROC) (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMRESOURCEFVNVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLfloat *params); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL GLuint GL_APIENTRY glGenPathsNV (GLsizei range); -GL_APICALL void GL_APIENTRY glDeletePathsNV (GLuint path, GLsizei range); -GL_APICALL GLboolean GL_APIENTRY glIsPathNV (GLuint path); -GL_APICALL void GL_APIENTRY glPathCommandsNV (GLuint path, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); -GL_APICALL void GL_APIENTRY glPathCoordsNV (GLuint path, GLsizei numCoords, GLenum coordType, const void *coords); -GL_APICALL void GL_APIENTRY glPathSubCommandsNV (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte *commands, GLsizei numCoords, GLenum coordType, const void *coords); -GL_APICALL void GL_APIENTRY glPathSubCoordsNV (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void *coords); -GL_APICALL void GL_APIENTRY glPathStringNV (GLuint path, GLenum format, GLsizei length, const void *pathString); -GL_APICALL void GL_APIENTRY glPathGlyphsNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const void *charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -GL_APICALL void GL_APIENTRY glPathGlyphRangeNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -GL_APICALL void GL_APIENTRY glWeightPathsNV (GLuint resultPath, GLsizei numPaths, const GLuint *paths, const GLfloat *weights); -GL_APICALL void GL_APIENTRY glCopyPathNV (GLuint resultPath, GLuint srcPath); -GL_APICALL void GL_APIENTRY glInterpolatePathsNV (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight); -GL_APICALL void GL_APIENTRY glTransformPathNV (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat *transformValues); -GL_APICALL void GL_APIENTRY glPathParameterivNV (GLuint path, GLenum pname, const GLint *value); -GL_APICALL void GL_APIENTRY glPathParameteriNV (GLuint path, GLenum pname, GLint value); -GL_APICALL void GL_APIENTRY glPathParameterfvNV (GLuint path, GLenum pname, const GLfloat *value); -GL_APICALL void GL_APIENTRY glPathParameterfNV (GLuint path, GLenum pname, GLfloat value); -GL_APICALL void GL_APIENTRY glPathDashArrayNV (GLuint path, GLsizei dashCount, const GLfloat *dashArray); -GL_APICALL void GL_APIENTRY glPathStencilFuncNV (GLenum func, GLint ref, GLuint mask); -GL_APICALL void GL_APIENTRY glPathStencilDepthOffsetNV (GLfloat factor, GLfloat units); -GL_APICALL void GL_APIENTRY glStencilFillPathNV (GLuint path, GLenum fillMode, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilStrokePathNV (GLuint path, GLint reference, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues); -GL_APICALL void GL_APIENTRY glStencilStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues); -GL_APICALL void GL_APIENTRY glPathCoverDepthFuncNV (GLenum func); -GL_APICALL void GL_APIENTRY glCoverFillPathNV (GLuint path, GLenum coverMode); -GL_APICALL void GL_APIENTRY glCoverStrokePathNV (GLuint path, GLenum coverMode); -GL_APICALL void GL_APIENTRY glCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -GL_APICALL void GL_APIENTRY glCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -GL_APICALL void GL_APIENTRY glGetPathParameterivNV (GLuint path, GLenum pname, GLint *value); -GL_APICALL void GL_APIENTRY glGetPathParameterfvNV (GLuint path, GLenum pname, GLfloat *value); -GL_APICALL void GL_APIENTRY glGetPathCommandsNV (GLuint path, GLubyte *commands); -GL_APICALL void GL_APIENTRY glGetPathCoordsNV (GLuint path, GLfloat *coords); -GL_APICALL void GL_APIENTRY glGetPathDashArrayNV (GLuint path, GLfloat *dashArray); -GL_APICALL void GL_APIENTRY glGetPathMetricsNV (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics); -GL_APICALL void GL_APIENTRY glGetPathMetricRangeNV (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics); -GL_APICALL void GL_APIENTRY glGetPathSpacingNV (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing); -GL_APICALL GLboolean GL_APIENTRY glIsPointInFillPathNV (GLuint path, GLuint mask, GLfloat x, GLfloat y); -GL_APICALL GLboolean GL_APIENTRY glIsPointInStrokePathNV (GLuint path, GLfloat x, GLfloat y); -GL_APICALL GLfloat GL_APIENTRY glGetPathLengthNV (GLuint path, GLsizei startSegment, GLsizei numSegments); -GL_APICALL GLboolean GL_APIENTRY glPointAlongPathNV (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat *x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY); -GL_APICALL void GL_APIENTRY glMatrixLoad3x2fNV (GLenum matrixMode, const GLfloat *m); -GL_APICALL void GL_APIENTRY glMatrixLoad3x3fNV (GLenum matrixMode, const GLfloat *m); -GL_APICALL void GL_APIENTRY glMatrixLoadTranspose3x3fNV (GLenum matrixMode, const GLfloat *m); -GL_APICALL void GL_APIENTRY glMatrixMult3x2fNV (GLenum matrixMode, const GLfloat *m); -GL_APICALL void GL_APIENTRY glMatrixMult3x3fNV (GLenum matrixMode, const GLfloat *m); -GL_APICALL void GL_APIENTRY glMatrixMultTranspose3x3fNV (GLenum matrixMode, const GLfloat *m); -GL_APICALL void GL_APIENTRY glStencilThenCoverFillPathNV (GLuint path, GLenum fillMode, GLuint mask, GLenum coverMode); -GL_APICALL void GL_APIENTRY glStencilThenCoverStrokePathNV (GLuint path, GLint reference, GLuint mask, GLenum coverMode); -GL_APICALL void GL_APIENTRY glStencilThenCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -GL_APICALL void GL_APIENTRY glStencilThenCoverStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); -GL_APICALL GLenum GL_APIENTRY glPathGlyphIndexRangeNV (GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint baseAndCount[2]); -GL_APICALL GLenum GL_APIENTRY glPathGlyphIndexArrayNV (GLuint firstPathName, GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -GL_APICALL GLenum GL_APIENTRY glPathMemoryGlyphIndexArrayNV (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale); -GL_APICALL void GL_APIENTRY glProgramPathFragmentInputGenNV (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs); -GL_APICALL void GL_APIENTRY glGetProgramResourcefvNV (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLfloat *params); -#endif -#endif /* GL_NV_path_rendering */ - -#ifndef GL_NV_path_rendering_shared_edge -#define GL_NV_path_rendering_shared_edge 1 -#define GL_SHARED_EDGE_NV 0xC0 -#endif /* GL_NV_path_rendering_shared_edge */ - -#ifndef GL_NV_polygon_mode -#define GL_NV_polygon_mode 1 -#define GL_POLYGON_MODE_NV 0x0B40 -#define GL_POLYGON_OFFSET_POINT_NV 0x2A01 -#define GL_POLYGON_OFFSET_LINE_NV 0x2A02 -#define GL_POINT_NV 0x1B00 -#define GL_LINE_NV 0x1B01 -#define GL_FILL_NV 0x1B02 -typedef void (GL_APIENTRYP PFNGLPOLYGONMODENVPROC) (GLenum face, GLenum mode); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glPolygonModeNV (GLenum face, GLenum mode); -#endif -#endif /* GL_NV_polygon_mode */ - -#ifndef GL_NV_read_buffer -#define GL_NV_read_buffer 1 -#define GL_READ_BUFFER_NV 0x0C02 -typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode); -#endif -#endif /* GL_NV_read_buffer */ - -#ifndef GL_NV_read_buffer_front -#define GL_NV_read_buffer_front 1 -#endif /* GL_NV_read_buffer_front */ - -#ifndef GL_NV_read_depth -#define GL_NV_read_depth 1 -#endif /* GL_NV_read_depth */ - -#ifndef GL_NV_read_depth_stencil -#define GL_NV_read_depth_stencil 1 -#endif /* GL_NV_read_depth_stencil */ - -#ifndef GL_NV_read_stencil -#define GL_NV_read_stencil 1 -#endif /* GL_NV_read_stencil */ - -#ifndef GL_NV_sRGB_formats -#define GL_NV_sRGB_formats 1 -#define GL_SLUMINANCE_NV 0x8C46 -#define GL_SLUMINANCE_ALPHA_NV 0x8C44 -#define GL_SRGB8_NV 0x8C41 -#define GL_SLUMINANCE8_NV 0x8C47 -#define GL_SLUMINANCE8_ALPHA8_NV 0x8C45 -#define GL_COMPRESSED_SRGB_S3TC_DXT1_NV 0x8C4C -#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV 0x8C4D -#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV 0x8C4E -#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV 0x8C4F -#define GL_ETC1_SRGB8_NV 0x88EE -#endif /* GL_NV_sRGB_formats */ - -#ifndef GL_NV_sample_locations -#define GL_NV_sample_locations 1 -#define GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV 0x933D -#define GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV 0x933E -#define GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV 0x933F -#define GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV 0x9340 -#define GL_SAMPLE_LOCATION_NV 0x8E50 -#define GL_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9341 -#define GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV 0x9342 -#define GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV 0x9343 -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLenum target, GLuint start, GLsizei count, const GLfloat *v); -typedef void (GL_APIENTRYP PFNGLNAMEDFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); -typedef void (GL_APIENTRYP PFNGLRESOLVEDEPTHVALUESNVPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glFramebufferSampleLocationsfvNV (GLenum target, GLuint start, GLsizei count, const GLfloat *v); -GL_APICALL void GL_APIENTRY glNamedFramebufferSampleLocationsfvNV (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); -GL_APICALL void GL_APIENTRY glResolveDepthValuesNV (void); -#endif -#endif /* GL_NV_sample_locations */ - -#ifndef GL_NV_sample_mask_override_coverage -#define GL_NV_sample_mask_override_coverage 1 -#endif /* GL_NV_sample_mask_override_coverage */ - -#ifndef GL_NV_shader_atomic_fp16_vector -#define GL_NV_shader_atomic_fp16_vector 1 -#endif /* GL_NV_shader_atomic_fp16_vector */ - -#ifndef GL_NV_shader_noperspective_interpolation -#define GL_NV_shader_noperspective_interpolation 1 -#endif /* GL_NV_shader_noperspective_interpolation */ - -#ifndef GL_NV_shadow_samplers_array -#define GL_NV_shadow_samplers_array 1 -#define GL_SAMPLER_2D_ARRAY_SHADOW_NV 0x8DC4 -#endif /* GL_NV_shadow_samplers_array */ - -#ifndef GL_NV_shadow_samplers_cube -#define GL_NV_shadow_samplers_cube 1 -#define GL_SAMPLER_CUBE_SHADOW_NV 0x8DC5 -#endif /* GL_NV_shadow_samplers_cube */ - -#ifndef GL_NV_texture_border_clamp -#define GL_NV_texture_border_clamp 1 -#define GL_TEXTURE_BORDER_COLOR_NV 0x1004 -#define GL_CLAMP_TO_BORDER_NV 0x812D -#endif /* GL_NV_texture_border_clamp */ - -#ifndef GL_NV_texture_compression_s3tc_update -#define GL_NV_texture_compression_s3tc_update 1 -#endif /* GL_NV_texture_compression_s3tc_update */ - -#ifndef GL_NV_texture_npot_2D_mipmap -#define GL_NV_texture_npot_2D_mipmap 1 -#endif /* GL_NV_texture_npot_2D_mipmap */ - -#ifndef GL_NV_viewport_array -#define GL_NV_viewport_array 1 -#define GL_MAX_VIEWPORTS_NV 0x825B -#define GL_VIEWPORT_SUBPIXEL_BITS_NV 0x825C -#define GL_VIEWPORT_BOUNDS_RANGE_NV 0x825D -#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX_NV 0x825F -typedef void (GL_APIENTRYP PFNGLVIEWPORTARRAYVNVPROC) (GLuint first, GLsizei count, const GLfloat *v); -typedef void (GL_APIENTRYP PFNGLVIEWPORTINDEXEDFNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); -typedef void (GL_APIENTRYP PFNGLVIEWPORTINDEXEDFVNVPROC) (GLuint index, const GLfloat *v); -typedef void (GL_APIENTRYP PFNGLSCISSORARRAYVNVPROC) (GLuint first, GLsizei count, const GLint *v); -typedef void (GL_APIENTRYP PFNGLSCISSORINDEXEDNVPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLSCISSORINDEXEDVNVPROC) (GLuint index, const GLint *v); -typedef void (GL_APIENTRYP PFNGLDEPTHRANGEARRAYFVNVPROC) (GLuint first, GLsizei count, const GLfloat *v); -typedef void (GL_APIENTRYP PFNGLDEPTHRANGEINDEXEDFNVPROC) (GLuint index, GLfloat n, GLfloat f); -typedef void (GL_APIENTRYP PFNGLGETFLOATI_VNVPROC) (GLenum target, GLuint index, GLfloat *data); -typedef void (GL_APIENTRYP PFNGLENABLEINVPROC) (GLenum target, GLuint index); -typedef void (GL_APIENTRYP PFNGLDISABLEINVPROC) (GLenum target, GLuint index); -typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDINVPROC) (GLenum target, GLuint index); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glViewportArrayvNV (GLuint first, GLsizei count, const GLfloat *v); -GL_APICALL void GL_APIENTRY glViewportIndexedfNV (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); -GL_APICALL void GL_APIENTRY glViewportIndexedfvNV (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glScissorArrayvNV (GLuint first, GLsizei count, const GLint *v); -GL_APICALL void GL_APIENTRY glScissorIndexedNV (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glScissorIndexedvNV (GLuint index, const GLint *v); -GL_APICALL void GL_APIENTRY glDepthRangeArrayfvNV (GLuint first, GLsizei count, const GLfloat *v); -GL_APICALL void GL_APIENTRY glDepthRangeIndexedfNV (GLuint index, GLfloat n, GLfloat f); -GL_APICALL void GL_APIENTRY glGetFloati_vNV (GLenum target, GLuint index, GLfloat *data); -GL_APICALL void GL_APIENTRY glEnableiNV (GLenum target, GLuint index); -GL_APICALL void GL_APIENTRY glDisableiNV (GLenum target, GLuint index); -GL_APICALL GLboolean GL_APIENTRY glIsEnablediNV (GLenum target, GLuint index); -#endif -#endif /* GL_NV_viewport_array */ - -#ifndef GL_NV_viewport_array2 -#define GL_NV_viewport_array2 1 -#endif /* GL_NV_viewport_array2 */ - -#ifndef GL_NV_viewport_swizzle -#define GL_NV_viewport_swizzle 1 -#define GL_VIEWPORT_SWIZZLE_POSITIVE_X_NV 0x9350 -#define GL_VIEWPORT_SWIZZLE_NEGATIVE_X_NV 0x9351 -#define GL_VIEWPORT_SWIZZLE_POSITIVE_Y_NV 0x9352 -#define GL_VIEWPORT_SWIZZLE_NEGATIVE_Y_NV 0x9353 -#define GL_VIEWPORT_SWIZZLE_POSITIVE_Z_NV 0x9354 -#define GL_VIEWPORT_SWIZZLE_NEGATIVE_Z_NV 0x9355 -#define GL_VIEWPORT_SWIZZLE_POSITIVE_W_NV 0x9356 -#define GL_VIEWPORT_SWIZZLE_NEGATIVE_W_NV 0x9357 -#define GL_VIEWPORT_SWIZZLE_X_NV 0x9358 -#define GL_VIEWPORT_SWIZZLE_Y_NV 0x9359 -#define GL_VIEWPORT_SWIZZLE_Z_NV 0x935A -#define GL_VIEWPORT_SWIZZLE_W_NV 0x935B -typedef void (GL_APIENTRYP PFNGLVIEWPORTSWIZZLENVPROC) (GLuint index, GLenum swizzlex, GLenum swizzley, GLenum swizzlez, GLenum swizzlew); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glViewportSwizzleNV (GLuint index, GLenum swizzlex, GLenum swizzley, GLenum swizzlez, GLenum swizzlew); -#endif -#endif /* GL_NV_viewport_swizzle */ - -#ifndef GL_OVR_multiview -#define GL_OVR_multiview 1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR 0x9630 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR 0x9632 -#define GL_MAX_VIEWS_OVR 0x9631 -#define GL_FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR 0x9633 -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glFramebufferTextureMultiviewOVR (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews); -#endif -#endif /* GL_OVR_multiview */ - -#ifndef GL_OVR_multiview2 -#define GL_OVR_multiview2 1 -#endif /* GL_OVR_multiview2 */ - -#ifndef GL_OVR_multiview_multisampled_render_to_texture -#define GL_OVR_multiview_multisampled_render_to_texture 1 -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREMULTISAMPLEMULTIVIEWOVRPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLsizei samples, GLint baseViewIndex, GLsizei numViews); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glFramebufferTextureMultisampleMultiviewOVR (GLenum target, GLenum attachment, GLuint texture, GLint level, GLsizei samples, GLint baseViewIndex, GLsizei numViews); -#endif -#endif /* GL_OVR_multiview_multisampled_render_to_texture */ - -#ifndef GL_QCOM_alpha_test -#define GL_QCOM_alpha_test 1 -#define GL_ALPHA_TEST_QCOM 0x0BC0 -#define GL_ALPHA_TEST_FUNC_QCOM 0x0BC1 -#define GL_ALPHA_TEST_REF_QCOM 0x0BC2 -typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref); -#endif -#endif /* GL_QCOM_alpha_test */ - -#ifndef GL_QCOM_binning_control -#define GL_QCOM_binning_control 1 -#define GL_BINNING_CONTROL_HINT_QCOM 0x8FB0 -#define GL_CPU_OPTIMIZED_QCOM 0x8FB1 -#define GL_GPU_OPTIMIZED_QCOM 0x8FB2 -#define GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM 0x8FB3 -#endif /* GL_QCOM_binning_control */ - -#ifndef GL_QCOM_driver_control -#define GL_QCOM_driver_control 1 -typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls); -typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); -typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); -typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls); -GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); -GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl); -GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl); -#endif -#endif /* GL_QCOM_driver_control */ - -#ifndef GL_QCOM_extended_get -#define GL_QCOM_extended_get 1 -#define GL_TEXTURE_WIDTH_QCOM 0x8BD2 -#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3 -#define GL_TEXTURE_DEPTH_QCOM 0x8BD4 -#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5 -#define GL_TEXTURE_FORMAT_QCOM 0x8BD6 -#define GL_TEXTURE_TYPE_QCOM 0x8BD7 -#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8 -#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9 -#define GL_TEXTURE_TARGET_QCOM 0x8BDA -#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB -#define GL_STATE_RESTORE 0x8BDC -typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures); -typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param); -typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels); -typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, void **params); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures); -GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); -GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); -GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); -GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels); -GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, void **params); -#endif -#endif /* GL_QCOM_extended_get */ - -#ifndef GL_QCOM_extended_get2 -#define GL_QCOM_extended_get2 1 -typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders); -typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms); -typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program); -typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders); -GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms); -GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program); -GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length); -#endif -#endif /* GL_QCOM_extended_get2 */ - -#ifndef GL_QCOM_framebuffer_foveated -#define GL_QCOM_framebuffer_foveated 1 -#define GL_FOVEATION_ENABLE_BIT_QCOM 0x00000001 -#define GL_FOVEATION_SCALED_BIN_METHOD_BIT_QCOM 0x00000002 -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERFOVEATIONCONFIGQCOMPROC) (GLuint framebuffer, GLuint numLayers, GLuint focalPointsPerLayer, GLuint requestedFeatures, GLuint *providedFeatures); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERFOVEATIONPARAMETERSQCOMPROC) (GLuint framebuffer, GLuint layer, GLuint focalPoint, GLfloat focalX, GLfloat focalY, GLfloat gainX, GLfloat gainY, GLfloat foveaArea); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glFramebufferFoveationConfigQCOM (GLuint framebuffer, GLuint numLayers, GLuint focalPointsPerLayer, GLuint requestedFeatures, GLuint *providedFeatures); -GL_APICALL void GL_APIENTRY glFramebufferFoveationParametersQCOM (GLuint framebuffer, GLuint layer, GLuint focalPoint, GLfloat focalX, GLfloat focalY, GLfloat gainX, GLfloat gainY, GLfloat foveaArea); -#endif -#endif /* GL_QCOM_framebuffer_foveated */ - -#ifndef GL_QCOM_perfmon_global_mode -#define GL_QCOM_perfmon_global_mode 1 -#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0 -#endif /* GL_QCOM_perfmon_global_mode */ - -#ifndef GL_QCOM_shader_framebuffer_fetch_noncoherent -#define GL_QCOM_shader_framebuffer_fetch_noncoherent 1 -#define GL_FRAMEBUFFER_FETCH_NONCOHERENT_QCOM 0x96A2 -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERFETCHBARRIERQCOMPROC) (void); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glFramebufferFetchBarrierQCOM (void); -#endif -#endif /* GL_QCOM_shader_framebuffer_fetch_noncoherent */ - -#ifndef GL_QCOM_tiled_rendering -#define GL_QCOM_tiled_rendering 1 -#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001 -#define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002 -#define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004 -#define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008 -#define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010 -#define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020 -#define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040 -#define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080 -#define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100 -#define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200 -#define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400 -#define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800 -#define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000 -#define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000 -#define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000 -#define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000 -#define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000 -#define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000 -#define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000 -#define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000 -#define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000 -#define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000 -#define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000 -#define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000 -#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000 -#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000 -#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000 -#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000 -#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000 -#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000 -#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000 -#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000 -typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); -typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); -GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask); -#endif -#endif /* GL_QCOM_tiled_rendering */ - -#ifndef GL_QCOM_writeonly_rendering -#define GL_QCOM_writeonly_rendering 1 -#define GL_WRITEONLY_RENDERING_QCOM 0x8823 -#endif /* GL_QCOM_writeonly_rendering */ - -#ifndef GL_VIV_shader_binary -#define GL_VIV_shader_binary 1 -#define GL_SHADER_BINARY_VIV 0x8FC4 -#endif /* GL_VIV_shader_binary */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/emscripten/include/pvrsdk/GLES2/gl2platform.h b/emscripten/include/pvrsdk/GLES2/gl2platform.h deleted file mode 100644 index 8b7e9d82..00000000 --- a/emscripten/include/pvrsdk/GLES2/gl2platform.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef __gl2platform_h_ -#define __gl2platform_h_ - -/* -** Copyright (c) 2017 The Khronos Group Inc. -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h - * - * Adopters may modify khrplatform.h and this file to suit their platform. - * Please contribute modifications back to Khronos as pull requests on the - * public github repository: - * https://github.com/KhronosGroup/OpenGL-Registry - */ - -#include "KHR/khrplatform.h" - -#ifndef GL_APICALL -#define GL_APICALL KHRONOS_APICALL -#endif - -#ifndef GL_APIENTRY -#define GL_APIENTRY KHRONOS_APIENTRY -#endif - -#endif /* __gl2platform_h_ */ diff --git a/emscripten/include/pvrsdk/GLES3/gl3.h b/emscripten/include/pvrsdk/GLES3/gl3.h deleted file mode 100644 index d29f4307..00000000 --- a/emscripten/include/pvrsdk/GLES3/gl3.h +++ /dev/null @@ -1,1211 +0,0 @@ -#ifndef __gl3_h_ -#define __gl3_h_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2013-2017 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in 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, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER 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. -*/ -/* -** This header is generated from the Khronos OpenGL / OpenGL ES XML -** API Registry. The current version of the Registry, generator scripts -** used to make the header, and the header can be found at -** https://github.com/KhronosGroup/OpenGL-Registry -*/ - -#include - -#ifndef GL_APIENTRYP -#define GL_APIENTRYP GL_APIENTRY* -#endif - -#ifndef GL_GLES_PROTOTYPES -#define GL_GLES_PROTOTYPES 1 -#endif - -/* Generated on date 20170209 */ - -/* Generated C header for: - * API: gles2 - * Profile: common - * Versions considered: 2\.[0-9]|3\.0 - * Versions emitted: .* - * Default extensions included: None - * Additional extensions included: _nomatch_^ - * Extensions removed: _nomatch_^ - */ - -#ifndef GL_ES_VERSION_2_0 -#define GL_ES_VERSION_2_0 1 -#include -typedef khronos_int8_t GLbyte; -typedef khronos_float_t GLclampf; -typedef khronos_int32_t GLfixed; -typedef short GLshort; -typedef unsigned short GLushort; -typedef void GLvoid; -typedef struct __GLsync *GLsync; -typedef khronos_int64_t GLint64; -typedef khronos_uint64_t GLuint64; -typedef unsigned int GLenum; -typedef unsigned int GLuint; -typedef char GLchar; -typedef khronos_float_t GLfloat; -typedef khronos_ssize_t GLsizeiptr; -typedef khronos_intptr_t GLintptr; -typedef unsigned int GLbitfield; -typedef int GLint; -typedef unsigned char GLboolean; -typedef int GLsizei; -typedef khronos_uint8_t GLubyte; -#define GL_DEPTH_BUFFER_BIT 0x00000100 -#define GL_STENCIL_BUFFER_BIT 0x00000400 -#define GL_COLOR_BUFFER_BIT 0x00004000 -#define GL_FALSE 0 -#define GL_TRUE 1 -#define GL_POINTS 0x0000 -#define GL_LINES 0x0001 -#define GL_LINE_LOOP 0x0002 -#define GL_LINE_STRIP 0x0003 -#define GL_TRIANGLES 0x0004 -#define GL_TRIANGLE_STRIP 0x0005 -#define GL_TRIANGLE_FAN 0x0006 -#define GL_ZERO 0 -#define GL_ONE 1 -#define GL_SRC_COLOR 0x0300 -#define GL_ONE_MINUS_SRC_COLOR 0x0301 -#define GL_SRC_ALPHA 0x0302 -#define GL_ONE_MINUS_SRC_ALPHA 0x0303 -#define GL_DST_ALPHA 0x0304 -#define GL_ONE_MINUS_DST_ALPHA 0x0305 -#define GL_DST_COLOR 0x0306 -#define GL_ONE_MINUS_DST_COLOR 0x0307 -#define GL_SRC_ALPHA_SATURATE 0x0308 -#define GL_FUNC_ADD 0x8006 -#define GL_BLEND_EQUATION 0x8009 -#define GL_BLEND_EQUATION_RGB 0x8009 -#define GL_BLEND_EQUATION_ALPHA 0x883D -#define GL_FUNC_SUBTRACT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT 0x800B -#define GL_BLEND_DST_RGB 0x80C8 -#define GL_BLEND_SRC_RGB 0x80C9 -#define GL_BLEND_DST_ALPHA 0x80CA -#define GL_BLEND_SRC_ALPHA 0x80CB -#define GL_CONSTANT_COLOR 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 -#define GL_CONSTANT_ALPHA 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 -#define GL_BLEND_COLOR 0x8005 -#define GL_ARRAY_BUFFER 0x8892 -#define GL_ELEMENT_ARRAY_BUFFER 0x8893 -#define GL_ARRAY_BUFFER_BINDING 0x8894 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 -#define GL_STREAM_DRAW 0x88E0 -#define GL_STATIC_DRAW 0x88E4 -#define GL_DYNAMIC_DRAW 0x88E8 -#define GL_BUFFER_SIZE 0x8764 -#define GL_BUFFER_USAGE 0x8765 -#define GL_CURRENT_VERTEX_ATTRIB 0x8626 -#define GL_FRONT 0x0404 -#define GL_BACK 0x0405 -#define GL_FRONT_AND_BACK 0x0408 -#define GL_TEXTURE_2D 0x0DE1 -#define GL_CULL_FACE 0x0B44 -#define GL_BLEND 0x0BE2 -#define GL_DITHER 0x0BD0 -#define GL_STENCIL_TEST 0x0B90 -#define GL_DEPTH_TEST 0x0B71 -#define GL_SCISSOR_TEST 0x0C11 -#define GL_POLYGON_OFFSET_FILL 0x8037 -#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E -#define GL_SAMPLE_COVERAGE 0x80A0 -#define GL_NO_ERROR 0 -#define GL_INVALID_ENUM 0x0500 -#define GL_INVALID_VALUE 0x0501 -#define GL_INVALID_OPERATION 0x0502 -#define GL_OUT_OF_MEMORY 0x0505 -#define GL_CW 0x0900 -#define GL_CCW 0x0901 -#define GL_LINE_WIDTH 0x0B21 -#define GL_ALIASED_POINT_SIZE_RANGE 0x846D -#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E -#define GL_CULL_FACE_MODE 0x0B45 -#define GL_FRONT_FACE 0x0B46 -#define GL_DEPTH_RANGE 0x0B70 -#define GL_DEPTH_WRITEMASK 0x0B72 -#define GL_DEPTH_CLEAR_VALUE 0x0B73 -#define GL_DEPTH_FUNC 0x0B74 -#define GL_STENCIL_CLEAR_VALUE 0x0B91 -#define GL_STENCIL_FUNC 0x0B92 -#define GL_STENCIL_FAIL 0x0B94 -#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 -#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 -#define GL_STENCIL_REF 0x0B97 -#define GL_STENCIL_VALUE_MASK 0x0B93 -#define GL_STENCIL_WRITEMASK 0x0B98 -#define GL_STENCIL_BACK_FUNC 0x8800 -#define GL_STENCIL_BACK_FAIL 0x8801 -#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 -#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 -#define GL_STENCIL_BACK_REF 0x8CA3 -#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 -#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 -#define GL_VIEWPORT 0x0BA2 -#define GL_SCISSOR_BOX 0x0C10 -#define GL_COLOR_CLEAR_VALUE 0x0C22 -#define GL_COLOR_WRITEMASK 0x0C23 -#define GL_UNPACK_ALIGNMENT 0x0CF5 -#define GL_PACK_ALIGNMENT 0x0D05 -#define GL_MAX_TEXTURE_SIZE 0x0D33 -#define GL_MAX_VIEWPORT_DIMS 0x0D3A -#define GL_SUBPIXEL_BITS 0x0D50 -#define GL_RED_BITS 0x0D52 -#define GL_GREEN_BITS 0x0D53 -#define GL_BLUE_BITS 0x0D54 -#define GL_ALPHA_BITS 0x0D55 -#define GL_DEPTH_BITS 0x0D56 -#define GL_STENCIL_BITS 0x0D57 -#define GL_POLYGON_OFFSET_UNITS 0x2A00 -#define GL_POLYGON_OFFSET_FACTOR 0x8038 -#define GL_TEXTURE_BINDING_2D 0x8069 -#define GL_SAMPLE_BUFFERS 0x80A8 -#define GL_SAMPLES 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT 0x80AB -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 -#define GL_DONT_CARE 0x1100 -#define GL_FASTEST 0x1101 -#define GL_NICEST 0x1102 -#define GL_GENERATE_MIPMAP_HINT 0x8192 -#define GL_BYTE 0x1400 -#define GL_UNSIGNED_BYTE 0x1401 -#define GL_SHORT 0x1402 -#define GL_UNSIGNED_SHORT 0x1403 -#define GL_INT 0x1404 -#define GL_UNSIGNED_INT 0x1405 -#define GL_FLOAT 0x1406 -#define GL_FIXED 0x140C -#define GL_DEPTH_COMPONENT 0x1902 -#define GL_ALPHA 0x1906 -#define GL_RGB 0x1907 -#define GL_RGBA 0x1908 -#define GL_LUMINANCE 0x1909 -#define GL_LUMINANCE_ALPHA 0x190A -#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 -#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 -#define GL_UNSIGNED_SHORT_5_6_5 0x8363 -#define GL_FRAGMENT_SHADER 0x8B30 -#define GL_VERTEX_SHADER 0x8B31 -#define GL_MAX_VERTEX_ATTRIBS 0x8869 -#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB -#define GL_MAX_VARYING_VECTORS 0x8DFC -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D -#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C -#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 -#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD -#define GL_SHADER_TYPE 0x8B4F -#define GL_DELETE_STATUS 0x8B80 -#define GL_LINK_STATUS 0x8B82 -#define GL_VALIDATE_STATUS 0x8B83 -#define GL_ATTACHED_SHADERS 0x8B85 -#define GL_ACTIVE_UNIFORMS 0x8B86 -#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 -#define GL_ACTIVE_ATTRIBUTES 0x8B89 -#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A -#define GL_SHADING_LANGUAGE_VERSION 0x8B8C -#define GL_CURRENT_PROGRAM 0x8B8D -#define GL_NEVER 0x0200 -#define GL_LESS 0x0201 -#define GL_EQUAL 0x0202 -#define GL_LEQUAL 0x0203 -#define GL_GREATER 0x0204 -#define GL_NOTEQUAL 0x0205 -#define GL_GEQUAL 0x0206 -#define GL_ALWAYS 0x0207 -#define GL_KEEP 0x1E00 -#define GL_REPLACE 0x1E01 -#define GL_INCR 0x1E02 -#define GL_DECR 0x1E03 -#define GL_INVERT 0x150A -#define GL_INCR_WRAP 0x8507 -#define GL_DECR_WRAP 0x8508 -#define GL_VENDOR 0x1F00 -#define GL_RENDERER 0x1F01 -#define GL_VERSION 0x1F02 -#define GL_EXTENSIONS 0x1F03 -#define GL_NEAREST 0x2600 -#define GL_LINEAR 0x2601 -#define GL_NEAREST_MIPMAP_NEAREST 0x2700 -#define GL_LINEAR_MIPMAP_NEAREST 0x2701 -#define GL_NEAREST_MIPMAP_LINEAR 0x2702 -#define GL_LINEAR_MIPMAP_LINEAR 0x2703 -#define GL_TEXTURE_MAG_FILTER 0x2800 -#define GL_TEXTURE_MIN_FILTER 0x2801 -#define GL_TEXTURE_WRAP_S 0x2802 -#define GL_TEXTURE_WRAP_T 0x2803 -#define GL_TEXTURE 0x1702 -#define GL_TEXTURE_CUBE_MAP 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C -#define GL_TEXTURE0 0x84C0 -#define GL_TEXTURE1 0x84C1 -#define GL_TEXTURE2 0x84C2 -#define GL_TEXTURE3 0x84C3 -#define GL_TEXTURE4 0x84C4 -#define GL_TEXTURE5 0x84C5 -#define GL_TEXTURE6 0x84C6 -#define GL_TEXTURE7 0x84C7 -#define GL_TEXTURE8 0x84C8 -#define GL_TEXTURE9 0x84C9 -#define GL_TEXTURE10 0x84CA -#define GL_TEXTURE11 0x84CB -#define GL_TEXTURE12 0x84CC -#define GL_TEXTURE13 0x84CD -#define GL_TEXTURE14 0x84CE -#define GL_TEXTURE15 0x84CF -#define GL_TEXTURE16 0x84D0 -#define GL_TEXTURE17 0x84D1 -#define GL_TEXTURE18 0x84D2 -#define GL_TEXTURE19 0x84D3 -#define GL_TEXTURE20 0x84D4 -#define GL_TEXTURE21 0x84D5 -#define GL_TEXTURE22 0x84D6 -#define GL_TEXTURE23 0x84D7 -#define GL_TEXTURE24 0x84D8 -#define GL_TEXTURE25 0x84D9 -#define GL_TEXTURE26 0x84DA -#define GL_TEXTURE27 0x84DB -#define GL_TEXTURE28 0x84DC -#define GL_TEXTURE29 0x84DD -#define GL_TEXTURE30 0x84DE -#define GL_TEXTURE31 0x84DF -#define GL_ACTIVE_TEXTURE 0x84E0 -#define GL_REPEAT 0x2901 -#define GL_CLAMP_TO_EDGE 0x812F -#define GL_MIRRORED_REPEAT 0x8370 -#define GL_FLOAT_VEC2 0x8B50 -#define GL_FLOAT_VEC3 0x8B51 -#define GL_FLOAT_VEC4 0x8B52 -#define GL_INT_VEC2 0x8B53 -#define GL_INT_VEC3 0x8B54 -#define GL_INT_VEC4 0x8B55 -#define GL_BOOL 0x8B56 -#define GL_BOOL_VEC2 0x8B57 -#define GL_BOOL_VEC3 0x8B58 -#define GL_BOOL_VEC4 0x8B59 -#define GL_FLOAT_MAT2 0x8B5A -#define GL_FLOAT_MAT3 0x8B5B -#define GL_FLOAT_MAT4 0x8B5C -#define GL_SAMPLER_2D 0x8B5E -#define GL_SAMPLER_CUBE 0x8B60 -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A -#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 -#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F -#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B -#define GL_COMPILE_STATUS 0x8B81 -#define GL_INFO_LOG_LENGTH 0x8B84 -#define GL_SHADER_SOURCE_LENGTH 0x8B88 -#define GL_SHADER_COMPILER 0x8DFA -#define GL_SHADER_BINARY_FORMATS 0x8DF8 -#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 -#define GL_LOW_FLOAT 0x8DF0 -#define GL_MEDIUM_FLOAT 0x8DF1 -#define GL_HIGH_FLOAT 0x8DF2 -#define GL_LOW_INT 0x8DF3 -#define GL_MEDIUM_INT 0x8DF4 -#define GL_HIGH_INT 0x8DF5 -#define GL_FRAMEBUFFER 0x8D40 -#define GL_RENDERBUFFER 0x8D41 -#define GL_RGBA4 0x8056 -#define GL_RGB5_A1 0x8057 -#define GL_RGB565 0x8D62 -#define GL_DEPTH_COMPONENT16 0x81A5 -#define GL_STENCIL_INDEX8 0x8D48 -#define GL_RENDERBUFFER_WIDTH 0x8D42 -#define GL_RENDERBUFFER_HEIGHT 0x8D43 -#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 -#define GL_RENDERBUFFER_RED_SIZE 0x8D50 -#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 -#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 -#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 -#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 -#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 -#define GL_COLOR_ATTACHMENT0 0x8CE0 -#define GL_DEPTH_ATTACHMENT 0x8D00 -#define GL_STENCIL_ATTACHMENT 0x8D20 -#define GL_NONE 0 -#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 -#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD -#define GL_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_RENDERBUFFER_BINDING 0x8CA7 -#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 -#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 -typedef void (GL_APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); -typedef void (GL_APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); -typedef void (GL_APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); -typedef void (GL_APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); -typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer); -typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer); -typedef void (GL_APIENTRYP PFNGLBINDTEXTUREPROC) (GLenum target, GLuint texture); -typedef void (GL_APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); -typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); -typedef void (GL_APIENTRYP PFNGLBLENDFUNCPROC) (GLenum sfactor, GLenum dfactor); -typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -typedef void (GL_APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage); -typedef void (GL_APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); -typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLCLEARPROC) (GLbitfield mask); -typedef void (GL_APIENTRYP PFNGLCLEARCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d); -typedef void (GL_APIENTRYP PFNGLCLEARSTENCILPROC) (GLint s); -typedef void (GL_APIENTRYP PFNGLCOLORMASKPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -typedef void (GL_APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader); -typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); -typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); -typedef void (GL_APIENTRYP PFNGLCOPYTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef GLuint (GL_APIENTRYP PFNGLCREATEPROGRAMPROC) (void); -typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); -typedef void (GL_APIENTRYP PFNGLCULLFACEPROC) (GLenum mode); -typedef void (GL_APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); -typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers); -typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program); -typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers); -typedef void (GL_APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader); -typedef void (GL_APIENTRYP PFNGLDELETETEXTURESPROC) (GLsizei n, const GLuint *textures); -typedef void (GL_APIENTRYP PFNGLDEPTHFUNCPROC) (GLenum func); -typedef void (GL_APIENTRYP PFNGLDEPTHMASKPROC) (GLboolean flag); -typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f); -typedef void (GL_APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); -typedef void (GL_APIENTRYP PFNGLDISABLEPROC) (GLenum cap); -typedef void (GL_APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); -typedef void (GL_APIENTRYP PFNGLDRAWARRAYSPROC) (GLenum mode, GLint first, GLsizei count); -typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices); -typedef void (GL_APIENTRYP PFNGLENABLEPROC) (GLenum cap); -typedef void (GL_APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); -typedef void (GL_APIENTRYP PFNGLFINISHPROC) (void); -typedef void (GL_APIENTRYP PFNGLFLUSHPROC) (void); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (GL_APIENTRYP PFNGLFRONTFACEPROC) (GLenum mode); -typedef void (GL_APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); -typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); -typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); -typedef void (GL_APIENTRYP PFNGLGENTEXTURESPROC) (GLsizei n, GLuint *textures); -typedef void (GL_APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -typedef void (GL_APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); -typedef GLint (GL_APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (GL_APIENTRYP PFNGLGETBOOLEANVPROC) (GLenum pname, GLboolean *data); -typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef GLenum (GL_APIENTRYP PFNGLGETERRORPROC) (void); -typedef void (GL_APIENTRYP PFNGLGETFLOATVPROC) (GLenum pname, GLfloat *data); -typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETINTEGERVPROC) (GLenum pname, GLint *data); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (GL_APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); -typedef void (GL_APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); -typedef const GLubyte *(GL_APIENTRYP PFNGLGETSTRINGPROC) (GLenum name); -typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); -typedef GLint (GL_APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer); -typedef void (GL_APIENTRYP PFNGLHINTPROC) (GLenum target, GLenum mode); -typedef GLboolean (GL_APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer); -typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDPROC) (GLenum cap); -typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer); -typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPROC) (GLuint program); -typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer); -typedef GLboolean (GL_APIENTRYP PFNGLISSHADERPROC) (GLuint shader); -typedef GLboolean (GL_APIENTRYP PFNGLISTEXTUREPROC) (GLuint texture); -typedef void (GL_APIENTRYP PFNGLLINEWIDTHPROC) (GLfloat width); -typedef void (GL_APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program); -typedef void (GL_APIENTRYP PFNGLPIXELSTOREIPROC) (GLenum pname, GLint param); -typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETPROC) (GLfloat factor, GLfloat units); -typedef void (GL_APIENTRYP PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); -typedef void (GL_APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void); -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert); -typedef void (GL_APIENTRYP PFNGLSCISSORPROC) (GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); -typedef void (GL_APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); -typedef void (GL_APIENTRYP PFNGLSTENCILFUNCPROC) (GLenum func, GLint ref, GLuint mask); -typedef void (GL_APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask); -typedef void (GL_APIENTRYP PFNGLSTENCILMASKPROC) (GLuint mask); -typedef void (GL_APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); -typedef void (GL_APIENTRYP PFNGLSTENCILOPPROC) (GLenum fail, GLenum zfail, GLenum zpass); -typedef void (GL_APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -typedef void (GL_APIENTRYP PFNGLTEXIMAGE2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat param); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GLint param); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -typedef void (GL_APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); -typedef void (GL_APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0); -typedef void (GL_APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); -typedef void (GL_APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); -typedef void (GL_APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (GL_APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); -typedef void (GL_APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (GL_APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (GL_APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program); -typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); -typedef void (GL_APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height); -#if GL_GLES_PROTOTYPES -GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture); -GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader); -GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); -GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); -GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); -GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); -GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); -GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode); -GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); -GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); -GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage); -GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); -GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target); -GL_APICALL void GL_APIENTRY glClear (GLbitfield mask); -GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d); -GL_APICALL void GL_APIENTRY glClearStencil (GLint s); -GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader); -GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); -GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); -GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL GLuint GL_APIENTRY glCreateProgram (void); -GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type); -GL_APICALL void GL_APIENTRY glCullFace (GLenum mode); -GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); -GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); -GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program); -GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); -GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader); -GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures); -GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func); -GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag); -GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f); -GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader); -GL_APICALL void GL_APIENTRY glDisable (GLenum cap); -GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index); -GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); -GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices); -GL_APICALL void GL_APIENTRY glEnable (GLenum cap); -GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index); -GL_APICALL void GL_APIENTRY glFinish (void); -GL_APICALL void GL_APIENTRY glFlush (void); -GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode); -GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); -GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target); -GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers); -GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); -GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures); -GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); -GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name); -GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data); -GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); -GL_APICALL GLenum GL_APIENTRY glGetError (void); -GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data); -GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data); -GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); -GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); -GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name); -GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params); -GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name); -GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer); -GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode); -GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); -GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap); -GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer); -GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program); -GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer); -GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader); -GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture); -GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width); -GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program); -GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); -GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); -GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void); -GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); -GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); -GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); -GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask); -GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); -GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); -GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); -GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); -GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params); -GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0); -GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0); -GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1); -GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1); -GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); -GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUseProgram (GLuint program); -GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program); -GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x); -GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); -GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); -GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); -GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); -#endif -#endif /* GL_ES_VERSION_2_0 */ - -#ifndef GL_ES_VERSION_3_0 -#define GL_ES_VERSION_3_0 1 -typedef unsigned short GLhalf; -#define GL_READ_BUFFER 0x0C02 -#define GL_UNPACK_ROW_LENGTH 0x0CF2 -#define GL_UNPACK_SKIP_ROWS 0x0CF3 -#define GL_UNPACK_SKIP_PIXELS 0x0CF4 -#define GL_PACK_ROW_LENGTH 0x0D02 -#define GL_PACK_SKIP_ROWS 0x0D03 -#define GL_PACK_SKIP_PIXELS 0x0D04 -#define GL_COLOR 0x1800 -#define GL_DEPTH 0x1801 -#define GL_STENCIL 0x1802 -#define GL_RED 0x1903 -#define GL_RGB8 0x8051 -#define GL_RGBA8 0x8058 -#define GL_RGB10_A2 0x8059 -#define GL_TEXTURE_BINDING_3D 0x806A -#define GL_UNPACK_SKIP_IMAGES 0x806D -#define GL_UNPACK_IMAGE_HEIGHT 0x806E -#define GL_TEXTURE_3D 0x806F -#define GL_TEXTURE_WRAP_R 0x8072 -#define GL_MAX_3D_TEXTURE_SIZE 0x8073 -#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 -#define GL_MAX_ELEMENTS_VERTICES 0x80E8 -#define GL_MAX_ELEMENTS_INDICES 0x80E9 -#define GL_TEXTURE_MIN_LOD 0x813A -#define GL_TEXTURE_MAX_LOD 0x813B -#define GL_TEXTURE_BASE_LEVEL 0x813C -#define GL_TEXTURE_MAX_LEVEL 0x813D -#define GL_MIN 0x8007 -#define GL_MAX 0x8008 -#define GL_DEPTH_COMPONENT24 0x81A6 -#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD -#define GL_TEXTURE_COMPARE_MODE 0x884C -#define GL_TEXTURE_COMPARE_FUNC 0x884D -#define GL_CURRENT_QUERY 0x8865 -#define GL_QUERY_RESULT 0x8866 -#define GL_QUERY_RESULT_AVAILABLE 0x8867 -#define GL_BUFFER_MAPPED 0x88BC -#define GL_BUFFER_MAP_POINTER 0x88BD -#define GL_STREAM_READ 0x88E1 -#define GL_STREAM_COPY 0x88E2 -#define GL_STATIC_READ 0x88E5 -#define GL_STATIC_COPY 0x88E6 -#define GL_DYNAMIC_READ 0x88E9 -#define GL_DYNAMIC_COPY 0x88EA -#define GL_MAX_DRAW_BUFFERS 0x8824 -#define GL_DRAW_BUFFER0 0x8825 -#define GL_DRAW_BUFFER1 0x8826 -#define GL_DRAW_BUFFER2 0x8827 -#define GL_DRAW_BUFFER3 0x8828 -#define GL_DRAW_BUFFER4 0x8829 -#define GL_DRAW_BUFFER5 0x882A -#define GL_DRAW_BUFFER6 0x882B -#define GL_DRAW_BUFFER7 0x882C -#define GL_DRAW_BUFFER8 0x882D -#define GL_DRAW_BUFFER9 0x882E -#define GL_DRAW_BUFFER10 0x882F -#define GL_DRAW_BUFFER11 0x8830 -#define GL_DRAW_BUFFER12 0x8831 -#define GL_DRAW_BUFFER13 0x8832 -#define GL_DRAW_BUFFER14 0x8833 -#define GL_DRAW_BUFFER15 0x8834 -#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 -#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A -#define GL_SAMPLER_3D 0x8B5F -#define GL_SAMPLER_2D_SHADOW 0x8B62 -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B -#define GL_PIXEL_PACK_BUFFER 0x88EB -#define GL_PIXEL_UNPACK_BUFFER 0x88EC -#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED -#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF -#define GL_FLOAT_MAT2x3 0x8B65 -#define GL_FLOAT_MAT2x4 0x8B66 -#define GL_FLOAT_MAT3x2 0x8B67 -#define GL_FLOAT_MAT3x4 0x8B68 -#define GL_FLOAT_MAT4x2 0x8B69 -#define GL_FLOAT_MAT4x3 0x8B6A -#define GL_SRGB 0x8C40 -#define GL_SRGB8 0x8C41 -#define GL_SRGB8_ALPHA8 0x8C43 -#define GL_COMPARE_REF_TO_TEXTURE 0x884E -#define GL_MAJOR_VERSION 0x821B -#define GL_MINOR_VERSION 0x821C -#define GL_NUM_EXTENSIONS 0x821D -#define GL_RGBA32F 0x8814 -#define GL_RGB32F 0x8815 -#define GL_RGBA16F 0x881A -#define GL_RGB16F 0x881B -#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD -#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF -#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 -#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 -#define GL_MAX_VARYING_COMPONENTS 0x8B4B -#define GL_TEXTURE_2D_ARRAY 0x8C1A -#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D -#define GL_R11F_G11F_B10F 0x8C3A -#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B -#define GL_RGB9_E5 0x8C3D -#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E -#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 -#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 -#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 -#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 -#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 -#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 -#define GL_RASTERIZER_DISCARD 0x8C89 -#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B -#define GL_INTERLEAVED_ATTRIBS 0x8C8C -#define GL_SEPARATE_ATTRIBS 0x8C8D -#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E -#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F -#define GL_RGBA32UI 0x8D70 -#define GL_RGB32UI 0x8D71 -#define GL_RGBA16UI 0x8D76 -#define GL_RGB16UI 0x8D77 -#define GL_RGBA8UI 0x8D7C -#define GL_RGB8UI 0x8D7D -#define GL_RGBA32I 0x8D82 -#define GL_RGB32I 0x8D83 -#define GL_RGBA16I 0x8D88 -#define GL_RGB16I 0x8D89 -#define GL_RGBA8I 0x8D8E -#define GL_RGB8I 0x8D8F -#define GL_RED_INTEGER 0x8D94 -#define GL_RGB_INTEGER 0x8D98 -#define GL_RGBA_INTEGER 0x8D99 -#define GL_SAMPLER_2D_ARRAY 0x8DC1 -#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 -#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 -#define GL_UNSIGNED_INT_VEC2 0x8DC6 -#define GL_UNSIGNED_INT_VEC3 0x8DC7 -#define GL_UNSIGNED_INT_VEC4 0x8DC8 -#define GL_INT_SAMPLER_2D 0x8DCA -#define GL_INT_SAMPLER_3D 0x8DCB -#define GL_INT_SAMPLER_CUBE 0x8DCC -#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF -#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 -#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 -#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 -#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 -#define GL_BUFFER_ACCESS_FLAGS 0x911F -#define GL_BUFFER_MAP_LENGTH 0x9120 -#define GL_BUFFER_MAP_OFFSET 0x9121 -#define GL_DEPTH_COMPONENT32F 0x8CAC -#define GL_DEPTH32F_STENCIL8 0x8CAD -#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD -#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 -#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 -#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 -#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 -#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 -#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 -#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 -#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 -#define GL_FRAMEBUFFER_DEFAULT 0x8218 -#define GL_FRAMEBUFFER_UNDEFINED 0x8219 -#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A -#define GL_DEPTH_STENCIL 0x84F9 -#define GL_UNSIGNED_INT_24_8 0x84FA -#define GL_DEPTH24_STENCIL8 0x88F0 -#define GL_UNSIGNED_NORMALIZED 0x8C17 -#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_READ_FRAMEBUFFER 0x8CA8 -#define GL_DRAW_FRAMEBUFFER 0x8CA9 -#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA -#define GL_RENDERBUFFER_SAMPLES 0x8CAB -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 -#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF -#define GL_COLOR_ATTACHMENT1 0x8CE1 -#define GL_COLOR_ATTACHMENT2 0x8CE2 -#define GL_COLOR_ATTACHMENT3 0x8CE3 -#define GL_COLOR_ATTACHMENT4 0x8CE4 -#define GL_COLOR_ATTACHMENT5 0x8CE5 -#define GL_COLOR_ATTACHMENT6 0x8CE6 -#define GL_COLOR_ATTACHMENT7 0x8CE7 -#define GL_COLOR_ATTACHMENT8 0x8CE8 -#define GL_COLOR_ATTACHMENT9 0x8CE9 -#define GL_COLOR_ATTACHMENT10 0x8CEA -#define GL_COLOR_ATTACHMENT11 0x8CEB -#define GL_COLOR_ATTACHMENT12 0x8CEC -#define GL_COLOR_ATTACHMENT13 0x8CED -#define GL_COLOR_ATTACHMENT14 0x8CEE -#define GL_COLOR_ATTACHMENT15 0x8CEF -#define GL_COLOR_ATTACHMENT16 0x8CF0 -#define GL_COLOR_ATTACHMENT17 0x8CF1 -#define GL_COLOR_ATTACHMENT18 0x8CF2 -#define GL_COLOR_ATTACHMENT19 0x8CF3 -#define GL_COLOR_ATTACHMENT20 0x8CF4 -#define GL_COLOR_ATTACHMENT21 0x8CF5 -#define GL_COLOR_ATTACHMENT22 0x8CF6 -#define GL_COLOR_ATTACHMENT23 0x8CF7 -#define GL_COLOR_ATTACHMENT24 0x8CF8 -#define GL_COLOR_ATTACHMENT25 0x8CF9 -#define GL_COLOR_ATTACHMENT26 0x8CFA -#define GL_COLOR_ATTACHMENT27 0x8CFB -#define GL_COLOR_ATTACHMENT28 0x8CFC -#define GL_COLOR_ATTACHMENT29 0x8CFD -#define GL_COLOR_ATTACHMENT30 0x8CFE -#define GL_COLOR_ATTACHMENT31 0x8CFF -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 -#define GL_MAX_SAMPLES 0x8D57 -#define GL_HALF_FLOAT 0x140B -#define GL_MAP_READ_BIT 0x0001 -#define GL_MAP_WRITE_BIT 0x0002 -#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 -#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 -#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 -#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 -#define GL_RG 0x8227 -#define GL_RG_INTEGER 0x8228 -#define GL_R8 0x8229 -#define GL_RG8 0x822B -#define GL_R16F 0x822D -#define GL_R32F 0x822E -#define GL_RG16F 0x822F -#define GL_RG32F 0x8230 -#define GL_R8I 0x8231 -#define GL_R8UI 0x8232 -#define GL_R16I 0x8233 -#define GL_R16UI 0x8234 -#define GL_R32I 0x8235 -#define GL_R32UI 0x8236 -#define GL_RG8I 0x8237 -#define GL_RG8UI 0x8238 -#define GL_RG16I 0x8239 -#define GL_RG16UI 0x823A -#define GL_RG32I 0x823B -#define GL_RG32UI 0x823C -#define GL_VERTEX_ARRAY_BINDING 0x85B5 -#define GL_R8_SNORM 0x8F94 -#define GL_RG8_SNORM 0x8F95 -#define GL_RGB8_SNORM 0x8F96 -#define GL_RGBA8_SNORM 0x8F97 -#define GL_SIGNED_NORMALIZED 0x8F9C -#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 -#define GL_COPY_READ_BUFFER 0x8F36 -#define GL_COPY_WRITE_BUFFER 0x8F37 -#define GL_COPY_READ_BUFFER_BINDING 0x8F36 -#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 -#define GL_UNIFORM_BUFFER 0x8A11 -#define GL_UNIFORM_BUFFER_BINDING 0x8A28 -#define GL_UNIFORM_BUFFER_START 0x8A29 -#define GL_UNIFORM_BUFFER_SIZE 0x8A2A -#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B -#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D -#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E -#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F -#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 -#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 -#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 -#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 -#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 -#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 -#define GL_UNIFORM_TYPE 0x8A37 -#define GL_UNIFORM_SIZE 0x8A38 -#define GL_UNIFORM_NAME_LENGTH 0x8A39 -#define GL_UNIFORM_BLOCK_INDEX 0x8A3A -#define GL_UNIFORM_OFFSET 0x8A3B -#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C -#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D -#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E -#define GL_UNIFORM_BLOCK_BINDING 0x8A3F -#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 -#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 -#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 -#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 -#define GL_INVALID_INDEX 0xFFFFFFFFu -#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 -#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 -#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 -#define GL_OBJECT_TYPE 0x9112 -#define GL_SYNC_CONDITION 0x9113 -#define GL_SYNC_STATUS 0x9114 -#define GL_SYNC_FLAGS 0x9115 -#define GL_SYNC_FENCE 0x9116 -#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 -#define GL_UNSIGNALED 0x9118 -#define GL_SIGNALED 0x9119 -#define GL_ALREADY_SIGNALED 0x911A -#define GL_TIMEOUT_EXPIRED 0x911B -#define GL_CONDITION_SATISFIED 0x911C -#define GL_WAIT_FAILED 0x911D -#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 -#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull -#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE -#define GL_ANY_SAMPLES_PASSED 0x8C2F -#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A -#define GL_SAMPLER_BINDING 0x8919 -#define GL_RGB10_A2UI 0x906F -#define GL_TEXTURE_SWIZZLE_R 0x8E42 -#define GL_TEXTURE_SWIZZLE_G 0x8E43 -#define GL_TEXTURE_SWIZZLE_B 0x8E44 -#define GL_TEXTURE_SWIZZLE_A 0x8E45 -#define GL_GREEN 0x1904 -#define GL_BLUE 0x1905 -#define GL_INT_2_10_10_10_REV 0x8D9F -#define GL_TRANSFORM_FEEDBACK 0x8E22 -#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 -#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 -#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 -#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 -#define GL_PROGRAM_BINARY_LENGTH 0x8741 -#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE -#define GL_PROGRAM_BINARY_FORMATS 0x87FF -#define GL_COMPRESSED_R11_EAC 0x9270 -#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 -#define GL_COMPRESSED_RG11_EAC 0x9272 -#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 -#define GL_COMPRESSED_RGB8_ETC2 0x9274 -#define GL_COMPRESSED_SRGB8_ETC2 0x9275 -#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 -#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 -#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 -#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 -#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F -#define GL_MAX_ELEMENT_INDEX 0x8D6B -#define GL_NUM_SAMPLE_COUNTS 0x9380 -#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF -typedef void (GL_APIENTRYP PFNGLREADBUFFERPROC) (GLenum src); -typedef void (GL_APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); -typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); -typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); -typedef void (GL_APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); -typedef void (GL_APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids); -typedef GLboolean (GL_APIENTRYP PFNGLISQUERYPROC) (GLuint id); -typedef void (GL_APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); -typedef void (GL_APIENTRYP PFNGLENDQUERYPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params); -typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, void **params); -typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -typedef void *(GL_APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length); -typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array); -typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays); -typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); -typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array); -typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data); -typedef void (GL_APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode); -typedef void (GL_APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void); -typedef void (GL_APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (GL_APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer); -typedef void (GL_APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); -typedef void (GL_APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); -typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v); -typedef void (GL_APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params); -typedef GLint (GL_APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (GL_APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0); -typedef void (GL_APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1); -typedef void (GL_APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (GL_APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (GL_APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value); -typedef void (GL_APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); -typedef const GLubyte *(GL_APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index); -typedef void (GL_APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -typedef void (GL_APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); -typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); -typedef GLuint (GL_APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName); -typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); -typedef void (GL_APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); -typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); -typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); -typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags); -typedef GLboolean (GL_APIENTRYP PFNGLISSYNCPROC) (GLsync sync); -typedef void (GL_APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync); -typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (GL_APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (GL_APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *data); -typedef void (GL_APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -typedef void (GL_APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data); -typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params); -typedef void (GL_APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers); -typedef void (GL_APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers); -typedef GLboolean (GL_APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler); -typedef void (GL_APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler); -typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param); -typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param); -typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param); -typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param); -typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor); -typedef void (GL_APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id); -typedef void (GL_APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids); -typedef void (GL_APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids); -typedef GLboolean (GL_APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id); -typedef void (GL_APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void); -typedef void (GL_APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); -typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); -typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value); -typedef void (GL_APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); -typedef void (GL_APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -typedef void (GL_APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); -#if GL_GLES_PROTOTYPES -GL_APICALL void GL_APIENTRY glReadBuffer (GLenum src); -GL_APICALL void GL_APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); -GL_APICALL void GL_APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -GL_APICALL void GL_APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -GL_APICALL void GL_APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); -GL_APICALL void GL_APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); -GL_APICALL void GL_APIENTRY glGenQueries (GLsizei n, GLuint *ids); -GL_APICALL void GL_APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids); -GL_APICALL GLboolean GL_APIENTRY glIsQuery (GLuint id); -GL_APICALL void GL_APIENTRY glBeginQuery (GLenum target, GLuint id); -GL_APICALL void GL_APIENTRY glEndQuery (GLenum target); -GL_APICALL void GL_APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params); -GL_APICALL GLboolean GL_APIENTRY glUnmapBuffer (GLenum target); -GL_APICALL void GL_APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params); -GL_APICALL void GL_APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs); -GL_APICALL void GL_APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -GL_APICALL void *GL_APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -GL_APICALL void GL_APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length); -GL_APICALL void GL_APIENTRY glBindVertexArray (GLuint array); -GL_APICALL void GL_APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays); -GL_APICALL void GL_APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays); -GL_APICALL GLboolean GL_APIENTRY glIsVertexArray (GLuint array); -GL_APICALL void GL_APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data); -GL_APICALL void GL_APIENTRY glBeginTransformFeedback (GLenum primitiveMode); -GL_APICALL void GL_APIENTRY glEndTransformFeedback (void); -GL_APICALL void GL_APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -GL_APICALL void GL_APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer); -GL_APICALL void GL_APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); -GL_APICALL void GL_APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -GL_APICALL void GL_APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); -GL_APICALL void GL_APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params); -GL_APICALL void GL_APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w); -GL_APICALL void GL_APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GL_APICALL void GL_APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v); -GL_APICALL void GL_APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v); -GL_APICALL void GL_APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params); -GL_APICALL GLint GL_APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name); -GL_APICALL void GL_APIENTRY glUniform1ui (GLint location, GLuint v0); -GL_APICALL void GL_APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1); -GL_APICALL void GL_APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2); -GL_APICALL void GL_APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GL_APICALL void GL_APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value); -GL_APICALL void GL_APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value); -GL_APICALL void GL_APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value); -GL_APICALL void GL_APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); -GL_APICALL const GLubyte *GL_APIENTRY glGetStringi (GLenum name, GLuint index); -GL_APICALL void GL_APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -GL_APICALL void GL_APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); -GL_APICALL void GL_APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); -GL_APICALL GLuint GL_APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName); -GL_APICALL void GL_APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); -GL_APICALL void GL_APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); -GL_APICALL void GL_APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); -GL_APICALL void GL_APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); -GL_APICALL GLsync GL_APIENTRY glFenceSync (GLenum condition, GLbitfield flags); -GL_APICALL GLboolean GL_APIENTRY glIsSync (GLsync sync); -GL_APICALL void GL_APIENTRY glDeleteSync (GLsync sync); -GL_APICALL GLenum GL_APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); -GL_APICALL void GL_APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); -GL_APICALL void GL_APIENTRY glGetInteger64v (GLenum pname, GLint64 *data); -GL_APICALL void GL_APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -GL_APICALL void GL_APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data); -GL_APICALL void GL_APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params); -GL_APICALL void GL_APIENTRY glGenSamplers (GLsizei count, GLuint *samplers); -GL_APICALL void GL_APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers); -GL_APICALL GLboolean GL_APIENTRY glIsSampler (GLuint sampler); -GL_APICALL void GL_APIENTRY glBindSampler (GLuint unit, GLuint sampler); -GL_APICALL void GL_APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param); -GL_APICALL void GL_APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param); -GL_APICALL void GL_APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param); -GL_APICALL void GL_APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params); -GL_APICALL void GL_APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor); -GL_APICALL void GL_APIENTRY glBindTransformFeedback (GLenum target, GLuint id); -GL_APICALL void GL_APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids); -GL_APICALL void GL_APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids); -GL_APICALL GLboolean GL_APIENTRY glIsTransformFeedback (GLuint id); -GL_APICALL void GL_APIENTRY glPauseTransformFeedback (void); -GL_APICALL void GL_APIENTRY glResumeTransformFeedback (void); -GL_APICALL void GL_APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); -GL_APICALL void GL_APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); -GL_APICALL void GL_APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value); -GL_APICALL void GL_APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments); -GL_APICALL void GL_APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -GL_APICALL void GL_APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); -#endif -#endif /* GL_ES_VERSION_3_0 */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/emscripten/include/pvrsdk/GLES3/gl31.h b/emscripten/include/pvrsdk/GLES3/gl31.h deleted file mode 100644 index 64409bba..00000000 --- a/emscripten/include/pvrsdk/GLES3/gl31.h +++ /dev/null @@ -1,1528 +0,0 @@ -#ifndef __gl31_h_ -#define __gl31_h_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2013-2016 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in 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, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER 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. -*/ -/* -** This header is generated from the Khronos OpenGL / OpenGL ES XML -** API Registry. The current version of the Registry, generator scripts -** used to make the header, and the header can be found at -** http://www.opengl.org/registry/ -** -** Khronos $Revision$ on $Date$ -*/ - -#include - -#ifndef GL_APIENTRYP -#define GL_APIENTRYP GL_APIENTRY* -#endif - -#ifdef GL_PROTOTYPES -#define GL_GLES_PROTOTYPES 1 -#endif - -/* Generated on date 20161024 */ - -/* Generated C header for: - * API: gles2 - * Profile: common - * Versions considered: 2\.[0-9]|3\.[01] - * Versions emitted: .* - * Default extensions included: None - * Additional extensions included: _nomatch_^ - * Extensions removed: _nomatch_^ - */ - -#ifndef GL_ES_VERSION_2_0 -#define GL_ES_VERSION_2_0 1 -#include -typedef khronos_int8_t GLbyte; -typedef khronos_float_t GLclampf; -typedef khronos_int32_t GLfixed; -typedef short GLshort; -typedef unsigned short GLushort; -typedef void GLvoid; -typedef struct __GLsync *GLsync; -typedef khronos_int64_t GLint64; -typedef khronos_uint64_t GLuint64; -typedef unsigned int GLenum; -typedef unsigned int GLuint; -typedef char GLchar; -typedef khronos_float_t GLfloat; -typedef khronos_ssize_t GLsizeiptr; -typedef khronos_intptr_t GLintptr; -typedef unsigned int GLbitfield; -typedef int GLint; -typedef unsigned char GLboolean; -typedef int GLsizei; -typedef khronos_uint8_t GLubyte; -#define GL_DEPTH_BUFFER_BIT 0x00000100 -#define GL_STENCIL_BUFFER_BIT 0x00000400 -#define GL_COLOR_BUFFER_BIT 0x00004000 -#define GL_FALSE 0 -#define GL_TRUE 1 -#define GL_POINTS 0x0000 -#define GL_LINES 0x0001 -#define GL_LINE_LOOP 0x0002 -#define GL_LINE_STRIP 0x0003 -#define GL_TRIANGLES 0x0004 -#define GL_TRIANGLE_STRIP 0x0005 -#define GL_TRIANGLE_FAN 0x0006 -#define GL_ZERO 0 -#define GL_ONE 1 -#define GL_SRC_COLOR 0x0300 -#define GL_ONE_MINUS_SRC_COLOR 0x0301 -#define GL_SRC_ALPHA 0x0302 -#define GL_ONE_MINUS_SRC_ALPHA 0x0303 -#define GL_DST_ALPHA 0x0304 -#define GL_ONE_MINUS_DST_ALPHA 0x0305 -#define GL_DST_COLOR 0x0306 -#define GL_ONE_MINUS_DST_COLOR 0x0307 -#define GL_SRC_ALPHA_SATURATE 0x0308 -#define GL_FUNC_ADD 0x8006 -#define GL_BLEND_EQUATION 0x8009 -#define GL_BLEND_EQUATION_RGB 0x8009 -#define GL_BLEND_EQUATION_ALPHA 0x883D -#define GL_FUNC_SUBTRACT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT 0x800B -#define GL_BLEND_DST_RGB 0x80C8 -#define GL_BLEND_SRC_RGB 0x80C9 -#define GL_BLEND_DST_ALPHA 0x80CA -#define GL_BLEND_SRC_ALPHA 0x80CB -#define GL_CONSTANT_COLOR 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 -#define GL_CONSTANT_ALPHA 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 -#define GL_BLEND_COLOR 0x8005 -#define GL_ARRAY_BUFFER 0x8892 -#define GL_ELEMENT_ARRAY_BUFFER 0x8893 -#define GL_ARRAY_BUFFER_BINDING 0x8894 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 -#define GL_STREAM_DRAW 0x88E0 -#define GL_STATIC_DRAW 0x88E4 -#define GL_DYNAMIC_DRAW 0x88E8 -#define GL_BUFFER_SIZE 0x8764 -#define GL_BUFFER_USAGE 0x8765 -#define GL_CURRENT_VERTEX_ATTRIB 0x8626 -#define GL_FRONT 0x0404 -#define GL_BACK 0x0405 -#define GL_FRONT_AND_BACK 0x0408 -#define GL_TEXTURE_2D 0x0DE1 -#define GL_CULL_FACE 0x0B44 -#define GL_BLEND 0x0BE2 -#define GL_DITHER 0x0BD0 -#define GL_STENCIL_TEST 0x0B90 -#define GL_DEPTH_TEST 0x0B71 -#define GL_SCISSOR_TEST 0x0C11 -#define GL_POLYGON_OFFSET_FILL 0x8037 -#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E -#define GL_SAMPLE_COVERAGE 0x80A0 -#define GL_NO_ERROR 0 -#define GL_INVALID_ENUM 0x0500 -#define GL_INVALID_VALUE 0x0501 -#define GL_INVALID_OPERATION 0x0502 -#define GL_OUT_OF_MEMORY 0x0505 -#define GL_CW 0x0900 -#define GL_CCW 0x0901 -#define GL_LINE_WIDTH 0x0B21 -#define GL_ALIASED_POINT_SIZE_RANGE 0x846D -#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E -#define GL_CULL_FACE_MODE 0x0B45 -#define GL_FRONT_FACE 0x0B46 -#define GL_DEPTH_RANGE 0x0B70 -#define GL_DEPTH_WRITEMASK 0x0B72 -#define GL_DEPTH_CLEAR_VALUE 0x0B73 -#define GL_DEPTH_FUNC 0x0B74 -#define GL_STENCIL_CLEAR_VALUE 0x0B91 -#define GL_STENCIL_FUNC 0x0B92 -#define GL_STENCIL_FAIL 0x0B94 -#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 -#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 -#define GL_STENCIL_REF 0x0B97 -#define GL_STENCIL_VALUE_MASK 0x0B93 -#define GL_STENCIL_WRITEMASK 0x0B98 -#define GL_STENCIL_BACK_FUNC 0x8800 -#define GL_STENCIL_BACK_FAIL 0x8801 -#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 -#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 -#define GL_STENCIL_BACK_REF 0x8CA3 -#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 -#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 -#define GL_VIEWPORT 0x0BA2 -#define GL_SCISSOR_BOX 0x0C10 -#define GL_COLOR_CLEAR_VALUE 0x0C22 -#define GL_COLOR_WRITEMASK 0x0C23 -#define GL_UNPACK_ALIGNMENT 0x0CF5 -#define GL_PACK_ALIGNMENT 0x0D05 -#define GL_MAX_TEXTURE_SIZE 0x0D33 -#define GL_MAX_VIEWPORT_DIMS 0x0D3A -#define GL_SUBPIXEL_BITS 0x0D50 -#define GL_RED_BITS 0x0D52 -#define GL_GREEN_BITS 0x0D53 -#define GL_BLUE_BITS 0x0D54 -#define GL_ALPHA_BITS 0x0D55 -#define GL_DEPTH_BITS 0x0D56 -#define GL_STENCIL_BITS 0x0D57 -#define GL_POLYGON_OFFSET_UNITS 0x2A00 -#define GL_POLYGON_OFFSET_FACTOR 0x8038 -#define GL_TEXTURE_BINDING_2D 0x8069 -#define GL_SAMPLE_BUFFERS 0x80A8 -#define GL_SAMPLES 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT 0x80AB -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 -#define GL_DONT_CARE 0x1100 -#define GL_FASTEST 0x1101 -#define GL_NICEST 0x1102 -#define GL_GENERATE_MIPMAP_HINT 0x8192 -#define GL_BYTE 0x1400 -#define GL_UNSIGNED_BYTE 0x1401 -#define GL_SHORT 0x1402 -#define GL_UNSIGNED_SHORT 0x1403 -#define GL_INT 0x1404 -#define GL_UNSIGNED_INT 0x1405 -#define GL_FLOAT 0x1406 -#define GL_FIXED 0x140C -#define GL_DEPTH_COMPONENT 0x1902 -#define GL_ALPHA 0x1906 -#define GL_RGB 0x1907 -#define GL_RGBA 0x1908 -#define GL_LUMINANCE 0x1909 -#define GL_LUMINANCE_ALPHA 0x190A -#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 -#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 -#define GL_UNSIGNED_SHORT_5_6_5 0x8363 -#define GL_FRAGMENT_SHADER 0x8B30 -#define GL_VERTEX_SHADER 0x8B31 -#define GL_MAX_VERTEX_ATTRIBS 0x8869 -#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB -#define GL_MAX_VARYING_VECTORS 0x8DFC -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D -#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C -#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 -#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD -#define GL_SHADER_TYPE 0x8B4F -#define GL_DELETE_STATUS 0x8B80 -#define GL_LINK_STATUS 0x8B82 -#define GL_VALIDATE_STATUS 0x8B83 -#define GL_ATTACHED_SHADERS 0x8B85 -#define GL_ACTIVE_UNIFORMS 0x8B86 -#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 -#define GL_ACTIVE_ATTRIBUTES 0x8B89 -#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A -#define GL_SHADING_LANGUAGE_VERSION 0x8B8C -#define GL_CURRENT_PROGRAM 0x8B8D -#define GL_NEVER 0x0200 -#define GL_LESS 0x0201 -#define GL_EQUAL 0x0202 -#define GL_LEQUAL 0x0203 -#define GL_GREATER 0x0204 -#define GL_NOTEQUAL 0x0205 -#define GL_GEQUAL 0x0206 -#define GL_ALWAYS 0x0207 -#define GL_KEEP 0x1E00 -#define GL_REPLACE 0x1E01 -#define GL_INCR 0x1E02 -#define GL_DECR 0x1E03 -#define GL_INVERT 0x150A -#define GL_INCR_WRAP 0x8507 -#define GL_DECR_WRAP 0x8508 -#define GL_VENDOR 0x1F00 -#define GL_RENDERER 0x1F01 -#define GL_VERSION 0x1F02 -#define GL_EXTENSIONS 0x1F03 -#define GL_NEAREST 0x2600 -#define GL_LINEAR 0x2601 -#define GL_NEAREST_MIPMAP_NEAREST 0x2700 -#define GL_LINEAR_MIPMAP_NEAREST 0x2701 -#define GL_NEAREST_MIPMAP_LINEAR 0x2702 -#define GL_LINEAR_MIPMAP_LINEAR 0x2703 -#define GL_TEXTURE_MAG_FILTER 0x2800 -#define GL_TEXTURE_MIN_FILTER 0x2801 -#define GL_TEXTURE_WRAP_S 0x2802 -#define GL_TEXTURE_WRAP_T 0x2803 -#define GL_TEXTURE 0x1702 -#define GL_TEXTURE_CUBE_MAP 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C -#define GL_TEXTURE0 0x84C0 -#define GL_TEXTURE1 0x84C1 -#define GL_TEXTURE2 0x84C2 -#define GL_TEXTURE3 0x84C3 -#define GL_TEXTURE4 0x84C4 -#define GL_TEXTURE5 0x84C5 -#define GL_TEXTURE6 0x84C6 -#define GL_TEXTURE7 0x84C7 -#define GL_TEXTURE8 0x84C8 -#define GL_TEXTURE9 0x84C9 -#define GL_TEXTURE10 0x84CA -#define GL_TEXTURE11 0x84CB -#define GL_TEXTURE12 0x84CC -#define GL_TEXTURE13 0x84CD -#define GL_TEXTURE14 0x84CE -#define GL_TEXTURE15 0x84CF -#define GL_TEXTURE16 0x84D0 -#define GL_TEXTURE17 0x84D1 -#define GL_TEXTURE18 0x84D2 -#define GL_TEXTURE19 0x84D3 -#define GL_TEXTURE20 0x84D4 -#define GL_TEXTURE21 0x84D5 -#define GL_TEXTURE22 0x84D6 -#define GL_TEXTURE23 0x84D7 -#define GL_TEXTURE24 0x84D8 -#define GL_TEXTURE25 0x84D9 -#define GL_TEXTURE26 0x84DA -#define GL_TEXTURE27 0x84DB -#define GL_TEXTURE28 0x84DC -#define GL_TEXTURE29 0x84DD -#define GL_TEXTURE30 0x84DE -#define GL_TEXTURE31 0x84DF -#define GL_ACTIVE_TEXTURE 0x84E0 -#define GL_REPEAT 0x2901 -#define GL_CLAMP_TO_EDGE 0x812F -#define GL_MIRRORED_REPEAT 0x8370 -#define GL_FLOAT_VEC2 0x8B50 -#define GL_FLOAT_VEC3 0x8B51 -#define GL_FLOAT_VEC4 0x8B52 -#define GL_INT_VEC2 0x8B53 -#define GL_INT_VEC3 0x8B54 -#define GL_INT_VEC4 0x8B55 -#define GL_BOOL 0x8B56 -#define GL_BOOL_VEC2 0x8B57 -#define GL_BOOL_VEC3 0x8B58 -#define GL_BOOL_VEC4 0x8B59 -#define GL_FLOAT_MAT2 0x8B5A -#define GL_FLOAT_MAT3 0x8B5B -#define GL_FLOAT_MAT4 0x8B5C -#define GL_SAMPLER_2D 0x8B5E -#define GL_SAMPLER_CUBE 0x8B60 -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A -#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 -#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F -#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B -#define GL_COMPILE_STATUS 0x8B81 -#define GL_INFO_LOG_LENGTH 0x8B84 -#define GL_SHADER_SOURCE_LENGTH 0x8B88 -#define GL_SHADER_COMPILER 0x8DFA -#define GL_SHADER_BINARY_FORMATS 0x8DF8 -#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 -#define GL_LOW_FLOAT 0x8DF0 -#define GL_MEDIUM_FLOAT 0x8DF1 -#define GL_HIGH_FLOAT 0x8DF2 -#define GL_LOW_INT 0x8DF3 -#define GL_MEDIUM_INT 0x8DF4 -#define GL_HIGH_INT 0x8DF5 -#define GL_FRAMEBUFFER 0x8D40 -#define GL_RENDERBUFFER 0x8D41 -#define GL_RGBA4 0x8056 -#define GL_RGB5_A1 0x8057 -#define GL_RGB565 0x8D62 -#define GL_DEPTH_COMPONENT16 0x81A5 -#define GL_STENCIL_INDEX8 0x8D48 -#define GL_RENDERBUFFER_WIDTH 0x8D42 -#define GL_RENDERBUFFER_HEIGHT 0x8D43 -#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 -#define GL_RENDERBUFFER_RED_SIZE 0x8D50 -#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 -#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 -#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 -#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 -#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 -#define GL_COLOR_ATTACHMENT0 0x8CE0 -#define GL_DEPTH_ATTACHMENT 0x8D00 -#define GL_STENCIL_ATTACHMENT 0x8D20 -#define GL_NONE 0 -#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 -#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD -#define GL_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_RENDERBUFFER_BINDING 0x8CA7 -#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 -#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 -typedef void (GL_APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); -typedef void (GL_APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); -typedef void (GL_APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); -typedef void (GL_APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); -typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer); -typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer); -typedef void (GL_APIENTRYP PFNGLBINDTEXTUREPROC) (GLenum target, GLuint texture); -typedef void (GL_APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); -typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); -typedef void (GL_APIENTRYP PFNGLBLENDFUNCPROC) (GLenum sfactor, GLenum dfactor); -typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -typedef void (GL_APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage); -typedef void (GL_APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); -typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLCLEARPROC) (GLbitfield mask); -typedef void (GL_APIENTRYP PFNGLCLEARCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d); -typedef void (GL_APIENTRYP PFNGLCLEARSTENCILPROC) (GLint s); -typedef void (GL_APIENTRYP PFNGLCOLORMASKPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -typedef void (GL_APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader); -typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); -typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); -typedef void (GL_APIENTRYP PFNGLCOPYTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef GLuint (GL_APIENTRYP PFNGLCREATEPROGRAMPROC) (void); -typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); -typedef void (GL_APIENTRYP PFNGLCULLFACEPROC) (GLenum mode); -typedef void (GL_APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); -typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers); -typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program); -typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers); -typedef void (GL_APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader); -typedef void (GL_APIENTRYP PFNGLDELETETEXTURESPROC) (GLsizei n, const GLuint *textures); -typedef void (GL_APIENTRYP PFNGLDEPTHFUNCPROC) (GLenum func); -typedef void (GL_APIENTRYP PFNGLDEPTHMASKPROC) (GLboolean flag); -typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f); -typedef void (GL_APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); -typedef void (GL_APIENTRYP PFNGLDISABLEPROC) (GLenum cap); -typedef void (GL_APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); -typedef void (GL_APIENTRYP PFNGLDRAWARRAYSPROC) (GLenum mode, GLint first, GLsizei count); -typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices); -typedef void (GL_APIENTRYP PFNGLENABLEPROC) (GLenum cap); -typedef void (GL_APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); -typedef void (GL_APIENTRYP PFNGLFINISHPROC) (void); -typedef void (GL_APIENTRYP PFNGLFLUSHPROC) (void); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (GL_APIENTRYP PFNGLFRONTFACEPROC) (GLenum mode); -typedef void (GL_APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); -typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); -typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); -typedef void (GL_APIENTRYP PFNGLGENTEXTURESPROC) (GLsizei n, GLuint *textures); -typedef void (GL_APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -typedef void (GL_APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); -typedef GLint (GL_APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (GL_APIENTRYP PFNGLGETBOOLEANVPROC) (GLenum pname, GLboolean *data); -typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef GLenum (GL_APIENTRYP PFNGLGETERRORPROC) (void); -typedef void (GL_APIENTRYP PFNGLGETFLOATVPROC) (GLenum pname, GLfloat *data); -typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETINTEGERVPROC) (GLenum pname, GLint *data); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (GL_APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); -typedef void (GL_APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); -typedef const GLubyte *(GL_APIENTRYP PFNGLGETSTRINGPROC) (GLenum name); -typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); -typedef GLint (GL_APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer); -typedef void (GL_APIENTRYP PFNGLHINTPROC) (GLenum target, GLenum mode); -typedef GLboolean (GL_APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer); -typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDPROC) (GLenum cap); -typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer); -typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPROC) (GLuint program); -typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer); -typedef GLboolean (GL_APIENTRYP PFNGLISSHADERPROC) (GLuint shader); -typedef GLboolean (GL_APIENTRYP PFNGLISTEXTUREPROC) (GLuint texture); -typedef void (GL_APIENTRYP PFNGLLINEWIDTHPROC) (GLfloat width); -typedef void (GL_APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program); -typedef void (GL_APIENTRYP PFNGLPIXELSTOREIPROC) (GLenum pname, GLint param); -typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETPROC) (GLfloat factor, GLfloat units); -typedef void (GL_APIENTRYP PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); -typedef void (GL_APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void); -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert); -typedef void (GL_APIENTRYP PFNGLSCISSORPROC) (GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); -typedef void (GL_APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); -typedef void (GL_APIENTRYP PFNGLSTENCILFUNCPROC) (GLenum func, GLint ref, GLuint mask); -typedef void (GL_APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask); -typedef void (GL_APIENTRYP PFNGLSTENCILMASKPROC) (GLuint mask); -typedef void (GL_APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); -typedef void (GL_APIENTRYP PFNGLSTENCILOPPROC) (GLenum fail, GLenum zfail, GLenum zpass); -typedef void (GL_APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -typedef void (GL_APIENTRYP PFNGLTEXIMAGE2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat param); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GLint param); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -typedef void (GL_APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); -typedef void (GL_APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0); -typedef void (GL_APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); -typedef void (GL_APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); -typedef void (GL_APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (GL_APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); -typedef void (GL_APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (GL_APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (GL_APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program); -typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); -typedef void (GL_APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height); -#if GL_GLES_PROTOTYPES -GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture); -GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader); -GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); -GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); -GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); -GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); -GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); -GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode); -GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); -GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); -GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage); -GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); -GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target); -GL_APICALL void GL_APIENTRY glClear (GLbitfield mask); -GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d); -GL_APICALL void GL_APIENTRY glClearStencil (GLint s); -GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader); -GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); -GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); -GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL GLuint GL_APIENTRY glCreateProgram (void); -GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type); -GL_APICALL void GL_APIENTRY glCullFace (GLenum mode); -GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); -GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); -GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program); -GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); -GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader); -GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures); -GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func); -GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag); -GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f); -GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader); -GL_APICALL void GL_APIENTRY glDisable (GLenum cap); -GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index); -GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); -GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices); -GL_APICALL void GL_APIENTRY glEnable (GLenum cap); -GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index); -GL_APICALL void GL_APIENTRY glFinish (void); -GL_APICALL void GL_APIENTRY glFlush (void); -GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode); -GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); -GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target); -GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers); -GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); -GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures); -GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); -GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name); -GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data); -GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); -GL_APICALL GLenum GL_APIENTRY glGetError (void); -GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data); -GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data); -GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); -GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); -GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name); -GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params); -GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name); -GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer); -GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode); -GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); -GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap); -GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer); -GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program); -GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer); -GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader); -GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture); -GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width); -GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program); -GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); -GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); -GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void); -GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); -GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); -GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); -GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask); -GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); -GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); -GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); -GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); -GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params); -GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0); -GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0); -GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1); -GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1); -GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); -GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUseProgram (GLuint program); -GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program); -GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x); -GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); -GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); -GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); -GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); -#endif -#endif /* GL_ES_VERSION_2_0 */ - -#ifndef GL_ES_VERSION_3_0 -#define GL_ES_VERSION_3_0 1 -typedef unsigned short GLhalf; -#define GL_READ_BUFFER 0x0C02 -#define GL_UNPACK_ROW_LENGTH 0x0CF2 -#define GL_UNPACK_SKIP_ROWS 0x0CF3 -#define GL_UNPACK_SKIP_PIXELS 0x0CF4 -#define GL_PACK_ROW_LENGTH 0x0D02 -#define GL_PACK_SKIP_ROWS 0x0D03 -#define GL_PACK_SKIP_PIXELS 0x0D04 -#define GL_COLOR 0x1800 -#define GL_DEPTH 0x1801 -#define GL_STENCIL 0x1802 -#define GL_RED 0x1903 -#define GL_RGB8 0x8051 -#define GL_RGBA8 0x8058 -#define GL_RGB10_A2 0x8059 -#define GL_TEXTURE_BINDING_3D 0x806A -#define GL_UNPACK_SKIP_IMAGES 0x806D -#define GL_UNPACK_IMAGE_HEIGHT 0x806E -#define GL_TEXTURE_3D 0x806F -#define GL_TEXTURE_WRAP_R 0x8072 -#define GL_MAX_3D_TEXTURE_SIZE 0x8073 -#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 -#define GL_MAX_ELEMENTS_VERTICES 0x80E8 -#define GL_MAX_ELEMENTS_INDICES 0x80E9 -#define GL_TEXTURE_MIN_LOD 0x813A -#define GL_TEXTURE_MAX_LOD 0x813B -#define GL_TEXTURE_BASE_LEVEL 0x813C -#define GL_TEXTURE_MAX_LEVEL 0x813D -#define GL_MIN 0x8007 -#define GL_MAX 0x8008 -#define GL_DEPTH_COMPONENT24 0x81A6 -#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD -#define GL_TEXTURE_COMPARE_MODE 0x884C -#define GL_TEXTURE_COMPARE_FUNC 0x884D -#define GL_CURRENT_QUERY 0x8865 -#define GL_QUERY_RESULT 0x8866 -#define GL_QUERY_RESULT_AVAILABLE 0x8867 -#define GL_BUFFER_MAPPED 0x88BC -#define GL_BUFFER_MAP_POINTER 0x88BD -#define GL_STREAM_READ 0x88E1 -#define GL_STREAM_COPY 0x88E2 -#define GL_STATIC_READ 0x88E5 -#define GL_STATIC_COPY 0x88E6 -#define GL_DYNAMIC_READ 0x88E9 -#define GL_DYNAMIC_COPY 0x88EA -#define GL_MAX_DRAW_BUFFERS 0x8824 -#define GL_DRAW_BUFFER0 0x8825 -#define GL_DRAW_BUFFER1 0x8826 -#define GL_DRAW_BUFFER2 0x8827 -#define GL_DRAW_BUFFER3 0x8828 -#define GL_DRAW_BUFFER4 0x8829 -#define GL_DRAW_BUFFER5 0x882A -#define GL_DRAW_BUFFER6 0x882B -#define GL_DRAW_BUFFER7 0x882C -#define GL_DRAW_BUFFER8 0x882D -#define GL_DRAW_BUFFER9 0x882E -#define GL_DRAW_BUFFER10 0x882F -#define GL_DRAW_BUFFER11 0x8830 -#define GL_DRAW_BUFFER12 0x8831 -#define GL_DRAW_BUFFER13 0x8832 -#define GL_DRAW_BUFFER14 0x8833 -#define GL_DRAW_BUFFER15 0x8834 -#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 -#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A -#define GL_SAMPLER_3D 0x8B5F -#define GL_SAMPLER_2D_SHADOW 0x8B62 -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B -#define GL_PIXEL_PACK_BUFFER 0x88EB -#define GL_PIXEL_UNPACK_BUFFER 0x88EC -#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED -#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF -#define GL_FLOAT_MAT2x3 0x8B65 -#define GL_FLOAT_MAT2x4 0x8B66 -#define GL_FLOAT_MAT3x2 0x8B67 -#define GL_FLOAT_MAT3x4 0x8B68 -#define GL_FLOAT_MAT4x2 0x8B69 -#define GL_FLOAT_MAT4x3 0x8B6A -#define GL_SRGB 0x8C40 -#define GL_SRGB8 0x8C41 -#define GL_SRGB8_ALPHA8 0x8C43 -#define GL_COMPARE_REF_TO_TEXTURE 0x884E -#define GL_MAJOR_VERSION 0x821B -#define GL_MINOR_VERSION 0x821C -#define GL_NUM_EXTENSIONS 0x821D -#define GL_RGBA32F 0x8814 -#define GL_RGB32F 0x8815 -#define GL_RGBA16F 0x881A -#define GL_RGB16F 0x881B -#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD -#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF -#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 -#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 -#define GL_MAX_VARYING_COMPONENTS 0x8B4B -#define GL_TEXTURE_2D_ARRAY 0x8C1A -#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D -#define GL_R11F_G11F_B10F 0x8C3A -#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B -#define GL_RGB9_E5 0x8C3D -#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E -#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 -#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 -#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 -#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 -#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 -#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 -#define GL_RASTERIZER_DISCARD 0x8C89 -#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B -#define GL_INTERLEAVED_ATTRIBS 0x8C8C -#define GL_SEPARATE_ATTRIBS 0x8C8D -#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E -#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F -#define GL_RGBA32UI 0x8D70 -#define GL_RGB32UI 0x8D71 -#define GL_RGBA16UI 0x8D76 -#define GL_RGB16UI 0x8D77 -#define GL_RGBA8UI 0x8D7C -#define GL_RGB8UI 0x8D7D -#define GL_RGBA32I 0x8D82 -#define GL_RGB32I 0x8D83 -#define GL_RGBA16I 0x8D88 -#define GL_RGB16I 0x8D89 -#define GL_RGBA8I 0x8D8E -#define GL_RGB8I 0x8D8F -#define GL_RED_INTEGER 0x8D94 -#define GL_RGB_INTEGER 0x8D98 -#define GL_RGBA_INTEGER 0x8D99 -#define GL_SAMPLER_2D_ARRAY 0x8DC1 -#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 -#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 -#define GL_UNSIGNED_INT_VEC2 0x8DC6 -#define GL_UNSIGNED_INT_VEC3 0x8DC7 -#define GL_UNSIGNED_INT_VEC4 0x8DC8 -#define GL_INT_SAMPLER_2D 0x8DCA -#define GL_INT_SAMPLER_3D 0x8DCB -#define GL_INT_SAMPLER_CUBE 0x8DCC -#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF -#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 -#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 -#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 -#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 -#define GL_BUFFER_ACCESS_FLAGS 0x911F -#define GL_BUFFER_MAP_LENGTH 0x9120 -#define GL_BUFFER_MAP_OFFSET 0x9121 -#define GL_DEPTH_COMPONENT32F 0x8CAC -#define GL_DEPTH32F_STENCIL8 0x8CAD -#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD -#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 -#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 -#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 -#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 -#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 -#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 -#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 -#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 -#define GL_FRAMEBUFFER_DEFAULT 0x8218 -#define GL_FRAMEBUFFER_UNDEFINED 0x8219 -#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A -#define GL_DEPTH_STENCIL 0x84F9 -#define GL_UNSIGNED_INT_24_8 0x84FA -#define GL_DEPTH24_STENCIL8 0x88F0 -#define GL_UNSIGNED_NORMALIZED 0x8C17 -#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_READ_FRAMEBUFFER 0x8CA8 -#define GL_DRAW_FRAMEBUFFER 0x8CA9 -#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA -#define GL_RENDERBUFFER_SAMPLES 0x8CAB -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 -#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF -#define GL_COLOR_ATTACHMENT1 0x8CE1 -#define GL_COLOR_ATTACHMENT2 0x8CE2 -#define GL_COLOR_ATTACHMENT3 0x8CE3 -#define GL_COLOR_ATTACHMENT4 0x8CE4 -#define GL_COLOR_ATTACHMENT5 0x8CE5 -#define GL_COLOR_ATTACHMENT6 0x8CE6 -#define GL_COLOR_ATTACHMENT7 0x8CE7 -#define GL_COLOR_ATTACHMENT8 0x8CE8 -#define GL_COLOR_ATTACHMENT9 0x8CE9 -#define GL_COLOR_ATTACHMENT10 0x8CEA -#define GL_COLOR_ATTACHMENT11 0x8CEB -#define GL_COLOR_ATTACHMENT12 0x8CEC -#define GL_COLOR_ATTACHMENT13 0x8CED -#define GL_COLOR_ATTACHMENT14 0x8CEE -#define GL_COLOR_ATTACHMENT15 0x8CEF -#define GL_COLOR_ATTACHMENT16 0x8CF0 -#define GL_COLOR_ATTACHMENT17 0x8CF1 -#define GL_COLOR_ATTACHMENT18 0x8CF2 -#define GL_COLOR_ATTACHMENT19 0x8CF3 -#define GL_COLOR_ATTACHMENT20 0x8CF4 -#define GL_COLOR_ATTACHMENT21 0x8CF5 -#define GL_COLOR_ATTACHMENT22 0x8CF6 -#define GL_COLOR_ATTACHMENT23 0x8CF7 -#define GL_COLOR_ATTACHMENT24 0x8CF8 -#define GL_COLOR_ATTACHMENT25 0x8CF9 -#define GL_COLOR_ATTACHMENT26 0x8CFA -#define GL_COLOR_ATTACHMENT27 0x8CFB -#define GL_COLOR_ATTACHMENT28 0x8CFC -#define GL_COLOR_ATTACHMENT29 0x8CFD -#define GL_COLOR_ATTACHMENT30 0x8CFE -#define GL_COLOR_ATTACHMENT31 0x8CFF -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 -#define GL_MAX_SAMPLES 0x8D57 -#define GL_HALF_FLOAT 0x140B -#define GL_MAP_READ_BIT 0x0001 -#define GL_MAP_WRITE_BIT 0x0002 -#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 -#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 -#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 -#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 -#define GL_RG 0x8227 -#define GL_RG_INTEGER 0x8228 -#define GL_R8 0x8229 -#define GL_RG8 0x822B -#define GL_R16F 0x822D -#define GL_R32F 0x822E -#define GL_RG16F 0x822F -#define GL_RG32F 0x8230 -#define GL_R8I 0x8231 -#define GL_R8UI 0x8232 -#define GL_R16I 0x8233 -#define GL_R16UI 0x8234 -#define GL_R32I 0x8235 -#define GL_R32UI 0x8236 -#define GL_RG8I 0x8237 -#define GL_RG8UI 0x8238 -#define GL_RG16I 0x8239 -#define GL_RG16UI 0x823A -#define GL_RG32I 0x823B -#define GL_RG32UI 0x823C -#define GL_VERTEX_ARRAY_BINDING 0x85B5 -#define GL_R8_SNORM 0x8F94 -#define GL_RG8_SNORM 0x8F95 -#define GL_RGB8_SNORM 0x8F96 -#define GL_RGBA8_SNORM 0x8F97 -#define GL_SIGNED_NORMALIZED 0x8F9C -#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 -#define GL_COPY_READ_BUFFER 0x8F36 -#define GL_COPY_WRITE_BUFFER 0x8F37 -#define GL_COPY_READ_BUFFER_BINDING 0x8F36 -#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 -#define GL_UNIFORM_BUFFER 0x8A11 -#define GL_UNIFORM_BUFFER_BINDING 0x8A28 -#define GL_UNIFORM_BUFFER_START 0x8A29 -#define GL_UNIFORM_BUFFER_SIZE 0x8A2A -#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B -#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D -#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E -#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F -#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 -#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 -#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 -#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 -#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 -#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 -#define GL_UNIFORM_TYPE 0x8A37 -#define GL_UNIFORM_SIZE 0x8A38 -#define GL_UNIFORM_NAME_LENGTH 0x8A39 -#define GL_UNIFORM_BLOCK_INDEX 0x8A3A -#define GL_UNIFORM_OFFSET 0x8A3B -#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C -#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D -#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E -#define GL_UNIFORM_BLOCK_BINDING 0x8A3F -#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 -#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 -#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 -#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 -#define GL_INVALID_INDEX 0xFFFFFFFFu -#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 -#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 -#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 -#define GL_OBJECT_TYPE 0x9112 -#define GL_SYNC_CONDITION 0x9113 -#define GL_SYNC_STATUS 0x9114 -#define GL_SYNC_FLAGS 0x9115 -#define GL_SYNC_FENCE 0x9116 -#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 -#define GL_UNSIGNALED 0x9118 -#define GL_SIGNALED 0x9119 -#define GL_ALREADY_SIGNALED 0x911A -#define GL_TIMEOUT_EXPIRED 0x911B -#define GL_CONDITION_SATISFIED 0x911C -#define GL_WAIT_FAILED 0x911D -#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 -#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull -#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE -#define GL_ANY_SAMPLES_PASSED 0x8C2F -#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A -#define GL_SAMPLER_BINDING 0x8919 -#define GL_RGB10_A2UI 0x906F -#define GL_TEXTURE_SWIZZLE_R 0x8E42 -#define GL_TEXTURE_SWIZZLE_G 0x8E43 -#define GL_TEXTURE_SWIZZLE_B 0x8E44 -#define GL_TEXTURE_SWIZZLE_A 0x8E45 -#define GL_GREEN 0x1904 -#define GL_BLUE 0x1905 -#define GL_INT_2_10_10_10_REV 0x8D9F -#define GL_TRANSFORM_FEEDBACK 0x8E22 -#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 -#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 -#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 -#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 -#define GL_PROGRAM_BINARY_LENGTH 0x8741 -#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE -#define GL_PROGRAM_BINARY_FORMATS 0x87FF -#define GL_COMPRESSED_R11_EAC 0x9270 -#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 -#define GL_COMPRESSED_RG11_EAC 0x9272 -#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 -#define GL_COMPRESSED_RGB8_ETC2 0x9274 -#define GL_COMPRESSED_SRGB8_ETC2 0x9275 -#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 -#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 -#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 -#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 -#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F -#define GL_MAX_ELEMENT_INDEX 0x8D6B -#define GL_NUM_SAMPLE_COUNTS 0x9380 -#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF -typedef void (GL_APIENTRYP PFNGLREADBUFFERPROC) (GLenum src); -typedef void (GL_APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); -typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); -typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); -typedef void (GL_APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); -typedef void (GL_APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids); -typedef GLboolean (GL_APIENTRYP PFNGLISQUERYPROC) (GLuint id); -typedef void (GL_APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); -typedef void (GL_APIENTRYP PFNGLENDQUERYPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params); -typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, void **params); -typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -typedef void *(GL_APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length); -typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array); -typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays); -typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); -typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array); -typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data); -typedef void (GL_APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode); -typedef void (GL_APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void); -typedef void (GL_APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (GL_APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer); -typedef void (GL_APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); -typedef void (GL_APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); -typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v); -typedef void (GL_APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params); -typedef GLint (GL_APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (GL_APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0); -typedef void (GL_APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1); -typedef void (GL_APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (GL_APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (GL_APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value); -typedef void (GL_APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); -typedef const GLubyte *(GL_APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index); -typedef void (GL_APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -typedef void (GL_APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); -typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); -typedef GLuint (GL_APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName); -typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); -typedef void (GL_APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); -typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); -typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); -typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags); -typedef GLboolean (GL_APIENTRYP PFNGLISSYNCPROC) (GLsync sync); -typedef void (GL_APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync); -typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (GL_APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (GL_APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *data); -typedef void (GL_APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -typedef void (GL_APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data); -typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params); -typedef void (GL_APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers); -typedef void (GL_APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers); -typedef GLboolean (GL_APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler); -typedef void (GL_APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler); -typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param); -typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param); -typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param); -typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param); -typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor); -typedef void (GL_APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id); -typedef void (GL_APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids); -typedef void (GL_APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids); -typedef GLboolean (GL_APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id); -typedef void (GL_APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void); -typedef void (GL_APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); -typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); -typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value); -typedef void (GL_APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); -typedef void (GL_APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -typedef void (GL_APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); -#if GL_GLES_PROTOTYPES -GL_APICALL void GL_APIENTRY glReadBuffer (GLenum src); -GL_APICALL void GL_APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); -GL_APICALL void GL_APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -GL_APICALL void GL_APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -GL_APICALL void GL_APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); -GL_APICALL void GL_APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); -GL_APICALL void GL_APIENTRY glGenQueries (GLsizei n, GLuint *ids); -GL_APICALL void GL_APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids); -GL_APICALL GLboolean GL_APIENTRY glIsQuery (GLuint id); -GL_APICALL void GL_APIENTRY glBeginQuery (GLenum target, GLuint id); -GL_APICALL void GL_APIENTRY glEndQuery (GLenum target); -GL_APICALL void GL_APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params); -GL_APICALL GLboolean GL_APIENTRY glUnmapBuffer (GLenum target); -GL_APICALL void GL_APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params); -GL_APICALL void GL_APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs); -GL_APICALL void GL_APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -GL_APICALL void *GL_APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -GL_APICALL void GL_APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length); -GL_APICALL void GL_APIENTRY glBindVertexArray (GLuint array); -GL_APICALL void GL_APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays); -GL_APICALL void GL_APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays); -GL_APICALL GLboolean GL_APIENTRY glIsVertexArray (GLuint array); -GL_APICALL void GL_APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data); -GL_APICALL void GL_APIENTRY glBeginTransformFeedback (GLenum primitiveMode); -GL_APICALL void GL_APIENTRY glEndTransformFeedback (void); -GL_APICALL void GL_APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -GL_APICALL void GL_APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer); -GL_APICALL void GL_APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); -GL_APICALL void GL_APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -GL_APICALL void GL_APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); -GL_APICALL void GL_APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params); -GL_APICALL void GL_APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w); -GL_APICALL void GL_APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GL_APICALL void GL_APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v); -GL_APICALL void GL_APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v); -GL_APICALL void GL_APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params); -GL_APICALL GLint GL_APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name); -GL_APICALL void GL_APIENTRY glUniform1ui (GLint location, GLuint v0); -GL_APICALL void GL_APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1); -GL_APICALL void GL_APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2); -GL_APICALL void GL_APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GL_APICALL void GL_APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value); -GL_APICALL void GL_APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value); -GL_APICALL void GL_APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value); -GL_APICALL void GL_APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); -GL_APICALL const GLubyte *GL_APIENTRY glGetStringi (GLenum name, GLuint index); -GL_APICALL void GL_APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -GL_APICALL void GL_APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); -GL_APICALL void GL_APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); -GL_APICALL GLuint GL_APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName); -GL_APICALL void GL_APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); -GL_APICALL void GL_APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); -GL_APICALL void GL_APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); -GL_APICALL void GL_APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); -GL_APICALL GLsync GL_APIENTRY glFenceSync (GLenum condition, GLbitfield flags); -GL_APICALL GLboolean GL_APIENTRY glIsSync (GLsync sync); -GL_APICALL void GL_APIENTRY glDeleteSync (GLsync sync); -GL_APICALL GLenum GL_APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); -GL_APICALL void GL_APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); -GL_APICALL void GL_APIENTRY glGetInteger64v (GLenum pname, GLint64 *data); -GL_APICALL void GL_APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -GL_APICALL void GL_APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data); -GL_APICALL void GL_APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params); -GL_APICALL void GL_APIENTRY glGenSamplers (GLsizei count, GLuint *samplers); -GL_APICALL void GL_APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers); -GL_APICALL GLboolean GL_APIENTRY glIsSampler (GLuint sampler); -GL_APICALL void GL_APIENTRY glBindSampler (GLuint unit, GLuint sampler); -GL_APICALL void GL_APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param); -GL_APICALL void GL_APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param); -GL_APICALL void GL_APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param); -GL_APICALL void GL_APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params); -GL_APICALL void GL_APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor); -GL_APICALL void GL_APIENTRY glBindTransformFeedback (GLenum target, GLuint id); -GL_APICALL void GL_APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids); -GL_APICALL void GL_APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids); -GL_APICALL GLboolean GL_APIENTRY glIsTransformFeedback (GLuint id); -GL_APICALL void GL_APIENTRY glPauseTransformFeedback (void); -GL_APICALL void GL_APIENTRY glResumeTransformFeedback (void); -GL_APICALL void GL_APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); -GL_APICALL void GL_APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); -GL_APICALL void GL_APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value); -GL_APICALL void GL_APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments); -GL_APICALL void GL_APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -GL_APICALL void GL_APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); -#endif -#endif /* GL_ES_VERSION_3_0 */ - -#ifndef GL_ES_VERSION_3_1 -#define GL_ES_VERSION_3_1 1 -#define GL_COMPUTE_SHADER 0x91B9 -#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB -#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC -#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD -#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262 -#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263 -#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264 -#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265 -#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266 -#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB -#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE -#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF -#define GL_COMPUTE_WORK_GROUP_SIZE 0x8267 -#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE -#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF -#define GL_COMPUTE_SHADER_BIT 0x00000020 -#define GL_DRAW_INDIRECT_BUFFER 0x8F3F -#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43 -#define GL_MAX_UNIFORM_LOCATIONS 0x826E -#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310 -#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311 -#define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313 -#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314 -#define GL_MAX_FRAMEBUFFER_WIDTH 0x9315 -#define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316 -#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318 -#define GL_UNIFORM 0x92E1 -#define GL_UNIFORM_BLOCK 0x92E2 -#define GL_PROGRAM_INPUT 0x92E3 -#define GL_PROGRAM_OUTPUT 0x92E4 -#define GL_BUFFER_VARIABLE 0x92E5 -#define GL_SHADER_STORAGE_BLOCK 0x92E6 -#define GL_ATOMIC_COUNTER_BUFFER 0x92C0 -#define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4 -#define GL_ACTIVE_RESOURCES 0x92F5 -#define GL_MAX_NAME_LENGTH 0x92F6 -#define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7 -#define GL_NAME_LENGTH 0x92F9 -#define GL_TYPE 0x92FA -#define GL_ARRAY_SIZE 0x92FB -#define GL_OFFSET 0x92FC -#define GL_BLOCK_INDEX 0x92FD -#define GL_ARRAY_STRIDE 0x92FE -#define GL_MATRIX_STRIDE 0x92FF -#define GL_IS_ROW_MAJOR 0x9300 -#define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301 -#define GL_BUFFER_BINDING 0x9302 -#define GL_BUFFER_DATA_SIZE 0x9303 -#define GL_NUM_ACTIVE_VARIABLES 0x9304 -#define GL_ACTIVE_VARIABLES 0x9305 -#define GL_REFERENCED_BY_VERTEX_SHADER 0x9306 -#define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A -#define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B -#define GL_TOP_LEVEL_ARRAY_SIZE 0x930C -#define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D -#define GL_LOCATION 0x930E -#define GL_VERTEX_SHADER_BIT 0x00000001 -#define GL_FRAGMENT_SHADER_BIT 0x00000002 -#define GL_ALL_SHADER_BITS 0xFFFFFFFF -#define GL_PROGRAM_SEPARABLE 0x8258 -#define GL_ACTIVE_PROGRAM 0x8259 -#define GL_PROGRAM_PIPELINE_BINDING 0x825A -#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1 -#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2 -#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3 -#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC -#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0 -#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1 -#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2 -#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6 -#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7 -#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8 -#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC -#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9 -#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB -#define GL_MAX_IMAGE_UNITS 0x8F38 -#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA -#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE -#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF -#define GL_IMAGE_BINDING_NAME 0x8F3A -#define GL_IMAGE_BINDING_LEVEL 0x8F3B -#define GL_IMAGE_BINDING_LAYERED 0x8F3C -#define GL_IMAGE_BINDING_LAYER 0x8F3D -#define GL_IMAGE_BINDING_ACCESS 0x8F3E -#define GL_IMAGE_BINDING_FORMAT 0x906E -#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001 -#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002 -#define GL_UNIFORM_BARRIER_BIT 0x00000004 -#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008 -#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020 -#define GL_COMMAND_BARRIER_BIT 0x00000040 -#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080 -#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100 -#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200 -#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400 -#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800 -#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000 -#define GL_ALL_BARRIER_BITS 0xFFFFFFFF -#define GL_IMAGE_2D 0x904D -#define GL_IMAGE_3D 0x904E -#define GL_IMAGE_CUBE 0x9050 -#define GL_IMAGE_2D_ARRAY 0x9053 -#define GL_INT_IMAGE_2D 0x9058 -#define GL_INT_IMAGE_3D 0x9059 -#define GL_INT_IMAGE_CUBE 0x905B -#define GL_INT_IMAGE_2D_ARRAY 0x905E -#define GL_UNSIGNED_INT_IMAGE_2D 0x9063 -#define GL_UNSIGNED_INT_IMAGE_3D 0x9064 -#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066 -#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069 -#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7 -#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8 -#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9 -#define GL_READ_ONLY 0x88B8 -#define GL_WRITE_ONLY 0x88B9 -#define GL_READ_WRITE 0x88BA -#define GL_SHADER_STORAGE_BUFFER 0x90D2 -#define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3 -#define GL_SHADER_STORAGE_BUFFER_START 0x90D4 -#define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5 -#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6 -#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA -#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB -#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC -#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD -#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE -#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF -#define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000 -#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39 -#define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA -#define GL_STENCIL_INDEX 0x1901 -#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E -#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F -#define GL_SAMPLE_POSITION 0x8E50 -#define GL_SAMPLE_MASK 0x8E51 -#define GL_SAMPLE_MASK_VALUE 0x8E52 -#define GL_TEXTURE_2D_MULTISAMPLE 0x9100 -#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59 -#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E -#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F -#define GL_MAX_INTEGER_SAMPLES 0x9110 -#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104 -#define GL_TEXTURE_SAMPLES 0x9106 -#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107 -#define GL_TEXTURE_WIDTH 0x1000 -#define GL_TEXTURE_HEIGHT 0x1001 -#define GL_TEXTURE_DEPTH 0x8071 -#define GL_TEXTURE_INTERNAL_FORMAT 0x1003 -#define GL_TEXTURE_RED_SIZE 0x805C -#define GL_TEXTURE_GREEN_SIZE 0x805D -#define GL_TEXTURE_BLUE_SIZE 0x805E -#define GL_TEXTURE_ALPHA_SIZE 0x805F -#define GL_TEXTURE_DEPTH_SIZE 0x884A -#define GL_TEXTURE_STENCIL_SIZE 0x88F1 -#define GL_TEXTURE_SHARED_SIZE 0x8C3F -#define GL_TEXTURE_RED_TYPE 0x8C10 -#define GL_TEXTURE_GREEN_TYPE 0x8C11 -#define GL_TEXTURE_BLUE_TYPE 0x8C12 -#define GL_TEXTURE_ALPHA_TYPE 0x8C13 -#define GL_TEXTURE_DEPTH_TYPE 0x8C16 -#define GL_TEXTURE_COMPRESSED 0x86A1 -#define GL_SAMPLER_2D_MULTISAMPLE 0x9108 -#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109 -#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A -#define GL_VERTEX_ATTRIB_BINDING 0x82D4 -#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5 -#define GL_VERTEX_BINDING_DIVISOR 0x82D6 -#define GL_VERTEX_BINDING_OFFSET 0x82D7 -#define GL_VERTEX_BINDING_STRIDE 0x82D8 -#define GL_VERTEX_BINDING_BUFFER 0x8F4F -#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9 -#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA -#define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5 -typedef void (GL_APIENTRYP PFNGLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); -typedef void (GL_APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC) (GLintptr indirect); -typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect); -typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC) (GLenum target, GLenum pname, GLint param); -typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC) (GLuint program, GLenum programInterface, GLenum pname, GLint *params); -typedef GLuint (GL_APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params); -typedef GLint (GL_APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar *name); -typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program); -typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program); -typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar *const*strings); -typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline); -typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines); -typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines); -typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (GL_APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); -typedef void (GL_APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data); -typedef void (GL_APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers); -typedef void (GL_APIENTRYP PFNGLMEMORYBARRIERBYREGIONPROC) (GLbitfield barriers); -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -typedef void (GL_APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val); -typedef void (GL_APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint maskNumber, GLbitfield mask); -typedef void (GL_APIENTRYP PFNGLGETTEXLEVELPARAMETERIVPROC) (GLenum target, GLint level, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETTEXLEVELPARAMETERFVPROC) (GLenum target, GLint level, GLenum pname, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLBINDVERTEXBUFFERPROC) (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC) (GLuint attribindex, GLuint bindingindex); -typedef void (GL_APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC) (GLuint bindingindex, GLuint divisor); -#if GL_GLES_PROTOTYPES -GL_APICALL void GL_APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); -GL_APICALL void GL_APIENTRY glDispatchComputeIndirect (GLintptr indirect); -GL_APICALL void GL_APIENTRY glDrawArraysIndirect (GLenum mode, const void *indirect); -GL_APICALL void GL_APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect); -GL_APICALL void GL_APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params); -GL_APICALL GLuint GL_APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name); -GL_APICALL void GL_APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); -GL_APICALL void GL_APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params); -GL_APICALL GLint GL_APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name); -GL_APICALL void GL_APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program); -GL_APICALL void GL_APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program); -GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar *const*strings); -GL_APICALL void GL_APIENTRY glBindProgramPipeline (GLuint pipeline); -GL_APICALL void GL_APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines); -GL_APICALL void GL_APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines); -GL_APICALL GLboolean GL_APIENTRY glIsProgramPipeline (GLuint pipeline); -GL_APICALL void GL_APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0); -GL_APICALL void GL_APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1); -GL_APICALL void GL_APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -GL_APICALL void GL_APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GL_APICALL void GL_APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0); -GL_APICALL void GL_APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1); -GL_APICALL void GL_APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -GL_APICALL void GL_APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GL_APICALL void GL_APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0); -GL_APICALL void GL_APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1); -GL_APICALL void GL_APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GL_APICALL void GL_APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GL_APICALL void GL_APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glValidateProgramPipeline (GLuint pipeline); -GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GL_APICALL void GL_APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); -GL_APICALL void GL_APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data); -GL_APICALL void GL_APIENTRY glMemoryBarrier (GLbitfield barriers); -GL_APICALL void GL_APIENTRY glMemoryBarrierByRegion (GLbitfield barriers); -GL_APICALL void GL_APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -GL_APICALL void GL_APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val); -GL_APICALL void GL_APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask); -GL_APICALL void GL_APIENTRY glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params); -GL_APICALL void GL_APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); -GL_APICALL void GL_APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); -GL_APICALL void GL_APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -GL_APICALL void GL_APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex); -GL_APICALL void GL_APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor); -#endif -#endif /* GL_ES_VERSION_3_1 */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/emscripten/include/pvrsdk/GLES3/gl32.h b/emscripten/include/pvrsdk/GLES3/gl32.h deleted file mode 100644 index 4930d6fe..00000000 --- a/emscripten/include/pvrsdk/GLES3/gl32.h +++ /dev/null @@ -1,1825 +0,0 @@ -#ifndef __gl32_h_ -#define __gl32_h_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2013-2015 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in 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, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER 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. -*/ -/* -** This header is generated from the Khronos OpenGL / OpenGL ES XML -** API Registry. The current version of the Registry, generator scripts -** used to make the header, and the header can be found at -** http://www.opengl.org/registry/ -** -** Khronos $Revision$ on $Date$ -*/ - -#include "GLES3/gl3platform.h" - -#ifndef GL_APIENTRYP -#define GL_APIENTRYP GL_APIENTRY* -#endif - -/* Generated on date 20150809 */ - -/* Generated C header for: - * API: gles2 - * Profile: common - * Versions considered: 2\.[0-9]|3\.[012] - * Versions emitted: .* - * Default extensions included: None - * Additional extensions included: _nomatch_^ - * Extensions removed: _nomatch_^ - */ - -#ifndef GL_ES_VERSION_2_0 -#define GL_ES_VERSION_2_0 1 -#include -typedef khronos_int8_t GLbyte; -typedef khronos_float_t GLclampf; -typedef khronos_int32_t GLfixed; -typedef short GLshort; -typedef unsigned short GLushort; -typedef void GLvoid; -typedef struct __GLsync *GLsync; -typedef khronos_int64_t GLint64; -typedef khronos_uint64_t GLuint64; -typedef unsigned int GLenum; -typedef unsigned int GLuint; -typedef char GLchar; -typedef khronos_float_t GLfloat; -typedef khronos_ssize_t GLsizeiptr; -typedef khronos_intptr_t GLintptr; -typedef unsigned int GLbitfield; -typedef int GLint; -typedef unsigned char GLboolean; -typedef int GLsizei; -typedef khronos_uint8_t GLubyte; -#define GL_DEPTH_BUFFER_BIT 0x00000100 -#define GL_STENCIL_BUFFER_BIT 0x00000400 -#define GL_COLOR_BUFFER_BIT 0x00004000 -#define GL_FALSE 0 -#define GL_TRUE 1 -#define GL_POINTS 0x0000 -#define GL_LINES 0x0001 -#define GL_LINE_LOOP 0x0002 -#define GL_LINE_STRIP 0x0003 -#define GL_TRIANGLES 0x0004 -#define GL_TRIANGLE_STRIP 0x0005 -#define GL_TRIANGLE_FAN 0x0006 -#define GL_ZERO 0 -#define GL_ONE 1 -#define GL_SRC_COLOR 0x0300 -#define GL_ONE_MINUS_SRC_COLOR 0x0301 -#define GL_SRC_ALPHA 0x0302 -#define GL_ONE_MINUS_SRC_ALPHA 0x0303 -#define GL_DST_ALPHA 0x0304 -#define GL_ONE_MINUS_DST_ALPHA 0x0305 -#define GL_DST_COLOR 0x0306 -#define GL_ONE_MINUS_DST_COLOR 0x0307 -#define GL_SRC_ALPHA_SATURATE 0x0308 -#define GL_FUNC_ADD 0x8006 -#define GL_BLEND_EQUATION 0x8009 -#define GL_BLEND_EQUATION_RGB 0x8009 -#define GL_BLEND_EQUATION_ALPHA 0x883D -#define GL_FUNC_SUBTRACT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT 0x800B -#define GL_BLEND_DST_RGB 0x80C8 -#define GL_BLEND_SRC_RGB 0x80C9 -#define GL_BLEND_DST_ALPHA 0x80CA -#define GL_BLEND_SRC_ALPHA 0x80CB -#define GL_CONSTANT_COLOR 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 -#define GL_CONSTANT_ALPHA 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 -#define GL_BLEND_COLOR 0x8005 -#define GL_ARRAY_BUFFER 0x8892 -#define GL_ELEMENT_ARRAY_BUFFER 0x8893 -#define GL_ARRAY_BUFFER_BINDING 0x8894 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 -#define GL_STREAM_DRAW 0x88E0 -#define GL_STATIC_DRAW 0x88E4 -#define GL_DYNAMIC_DRAW 0x88E8 -#define GL_BUFFER_SIZE 0x8764 -#define GL_BUFFER_USAGE 0x8765 -#define GL_CURRENT_VERTEX_ATTRIB 0x8626 -#define GL_FRONT 0x0404 -#define GL_BACK 0x0405 -#define GL_FRONT_AND_BACK 0x0408 -#define GL_TEXTURE_2D 0x0DE1 -#define GL_CULL_FACE 0x0B44 -#define GL_BLEND 0x0BE2 -#define GL_DITHER 0x0BD0 -#define GL_STENCIL_TEST 0x0B90 -#define GL_DEPTH_TEST 0x0B71 -#define GL_SCISSOR_TEST 0x0C11 -#define GL_POLYGON_OFFSET_FILL 0x8037 -#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E -#define GL_SAMPLE_COVERAGE 0x80A0 -#define GL_NO_ERROR 0 -#define GL_INVALID_ENUM 0x0500 -#define GL_INVALID_VALUE 0x0501 -#define GL_INVALID_OPERATION 0x0502 -#define GL_OUT_OF_MEMORY 0x0505 -#define GL_CW 0x0900 -#define GL_CCW 0x0901 -#define GL_LINE_WIDTH 0x0B21 -#define GL_ALIASED_POINT_SIZE_RANGE 0x846D -#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E -#define GL_CULL_FACE_MODE 0x0B45 -#define GL_FRONT_FACE 0x0B46 -#define GL_DEPTH_RANGE 0x0B70 -#define GL_DEPTH_WRITEMASK 0x0B72 -#define GL_DEPTH_CLEAR_VALUE 0x0B73 -#define GL_DEPTH_FUNC 0x0B74 -#define GL_STENCIL_CLEAR_VALUE 0x0B91 -#define GL_STENCIL_FUNC 0x0B92 -#define GL_STENCIL_FAIL 0x0B94 -#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 -#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 -#define GL_STENCIL_REF 0x0B97 -#define GL_STENCIL_VALUE_MASK 0x0B93 -#define GL_STENCIL_WRITEMASK 0x0B98 -#define GL_STENCIL_BACK_FUNC 0x8800 -#define GL_STENCIL_BACK_FAIL 0x8801 -#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 -#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 -#define GL_STENCIL_BACK_REF 0x8CA3 -#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 -#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 -#define GL_VIEWPORT 0x0BA2 -#define GL_SCISSOR_BOX 0x0C10 -#define GL_COLOR_CLEAR_VALUE 0x0C22 -#define GL_COLOR_WRITEMASK 0x0C23 -#define GL_UNPACK_ALIGNMENT 0x0CF5 -#define GL_PACK_ALIGNMENT 0x0D05 -#define GL_MAX_TEXTURE_SIZE 0x0D33 -#define GL_MAX_VIEWPORT_DIMS 0x0D3A -#define GL_SUBPIXEL_BITS 0x0D50 -#define GL_RED_BITS 0x0D52 -#define GL_GREEN_BITS 0x0D53 -#define GL_BLUE_BITS 0x0D54 -#define GL_ALPHA_BITS 0x0D55 -#define GL_DEPTH_BITS 0x0D56 -#define GL_STENCIL_BITS 0x0D57 -#define GL_POLYGON_OFFSET_UNITS 0x2A00 -#define GL_POLYGON_OFFSET_FACTOR 0x8038 -#define GL_TEXTURE_BINDING_2D 0x8069 -#define GL_SAMPLE_BUFFERS 0x80A8 -#define GL_SAMPLES 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT 0x80AB -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 -#define GL_DONT_CARE 0x1100 -#define GL_FASTEST 0x1101 -#define GL_NICEST 0x1102 -#define GL_GENERATE_MIPMAP_HINT 0x8192 -#define GL_BYTE 0x1400 -#define GL_UNSIGNED_BYTE 0x1401 -#define GL_SHORT 0x1402 -#define GL_UNSIGNED_SHORT 0x1403 -#define GL_INT 0x1404 -#define GL_UNSIGNED_INT 0x1405 -#define GL_FLOAT 0x1406 -#define GL_FIXED 0x140C -#define GL_DEPTH_COMPONENT 0x1902 -#define GL_ALPHA 0x1906 -#define GL_RGB 0x1907 -#define GL_RGBA 0x1908 -#define GL_LUMINANCE 0x1909 -#define GL_LUMINANCE_ALPHA 0x190A -#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 -#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 -#define GL_UNSIGNED_SHORT_5_6_5 0x8363 -#define GL_FRAGMENT_SHADER 0x8B30 -#define GL_VERTEX_SHADER 0x8B31 -#define GL_MAX_VERTEX_ATTRIBS 0x8869 -#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB -#define GL_MAX_VARYING_VECTORS 0x8DFC -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D -#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C -#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 -#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD -#define GL_SHADER_TYPE 0x8B4F -#define GL_DELETE_STATUS 0x8B80 -#define GL_LINK_STATUS 0x8B82 -#define GL_VALIDATE_STATUS 0x8B83 -#define GL_ATTACHED_SHADERS 0x8B85 -#define GL_ACTIVE_UNIFORMS 0x8B86 -#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 -#define GL_ACTIVE_ATTRIBUTES 0x8B89 -#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A -#define GL_SHADING_LANGUAGE_VERSION 0x8B8C -#define GL_CURRENT_PROGRAM 0x8B8D -#define GL_NEVER 0x0200 -#define GL_LESS 0x0201 -#define GL_EQUAL 0x0202 -#define GL_LEQUAL 0x0203 -#define GL_GREATER 0x0204 -#define GL_NOTEQUAL 0x0205 -#define GL_GEQUAL 0x0206 -#define GL_ALWAYS 0x0207 -#define GL_KEEP 0x1E00 -#define GL_REPLACE 0x1E01 -#define GL_INCR 0x1E02 -#define GL_DECR 0x1E03 -#define GL_INVERT 0x150A -#define GL_INCR_WRAP 0x8507 -#define GL_DECR_WRAP 0x8508 -#define GL_VENDOR 0x1F00 -#define GL_RENDERER 0x1F01 -#define GL_VERSION 0x1F02 -#define GL_EXTENSIONS 0x1F03 -#define GL_NEAREST 0x2600 -#define GL_LINEAR 0x2601 -#define GL_NEAREST_MIPMAP_NEAREST 0x2700 -#define GL_LINEAR_MIPMAP_NEAREST 0x2701 -#define GL_NEAREST_MIPMAP_LINEAR 0x2702 -#define GL_LINEAR_MIPMAP_LINEAR 0x2703 -#define GL_TEXTURE_MAG_FILTER 0x2800 -#define GL_TEXTURE_MIN_FILTER 0x2801 -#define GL_TEXTURE_WRAP_S 0x2802 -#define GL_TEXTURE_WRAP_T 0x2803 -#define GL_TEXTURE 0x1702 -#define GL_TEXTURE_CUBE_MAP 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C -#define GL_TEXTURE0 0x84C0 -#define GL_TEXTURE1 0x84C1 -#define GL_TEXTURE2 0x84C2 -#define GL_TEXTURE3 0x84C3 -#define GL_TEXTURE4 0x84C4 -#define GL_TEXTURE5 0x84C5 -#define GL_TEXTURE6 0x84C6 -#define GL_TEXTURE7 0x84C7 -#define GL_TEXTURE8 0x84C8 -#define GL_TEXTURE9 0x84C9 -#define GL_TEXTURE10 0x84CA -#define GL_TEXTURE11 0x84CB -#define GL_TEXTURE12 0x84CC -#define GL_TEXTURE13 0x84CD -#define GL_TEXTURE14 0x84CE -#define GL_TEXTURE15 0x84CF -#define GL_TEXTURE16 0x84D0 -#define GL_TEXTURE17 0x84D1 -#define GL_TEXTURE18 0x84D2 -#define GL_TEXTURE19 0x84D3 -#define GL_TEXTURE20 0x84D4 -#define GL_TEXTURE21 0x84D5 -#define GL_TEXTURE22 0x84D6 -#define GL_TEXTURE23 0x84D7 -#define GL_TEXTURE24 0x84D8 -#define GL_TEXTURE25 0x84D9 -#define GL_TEXTURE26 0x84DA -#define GL_TEXTURE27 0x84DB -#define GL_TEXTURE28 0x84DC -#define GL_TEXTURE29 0x84DD -#define GL_TEXTURE30 0x84DE -#define GL_TEXTURE31 0x84DF -#define GL_ACTIVE_TEXTURE 0x84E0 -#define GL_REPEAT 0x2901 -#define GL_CLAMP_TO_EDGE 0x812F -#define GL_MIRRORED_REPEAT 0x8370 -#define GL_FLOAT_VEC2 0x8B50 -#define GL_FLOAT_VEC3 0x8B51 -#define GL_FLOAT_VEC4 0x8B52 -#define GL_INT_VEC2 0x8B53 -#define GL_INT_VEC3 0x8B54 -#define GL_INT_VEC4 0x8B55 -#define GL_BOOL 0x8B56 -#define GL_BOOL_VEC2 0x8B57 -#define GL_BOOL_VEC3 0x8B58 -#define GL_BOOL_VEC4 0x8B59 -#define GL_FLOAT_MAT2 0x8B5A -#define GL_FLOAT_MAT3 0x8B5B -#define GL_FLOAT_MAT4 0x8B5C -#define GL_SAMPLER_2D 0x8B5E -#define GL_SAMPLER_CUBE 0x8B60 -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A -#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 -#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F -#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B -#define GL_COMPILE_STATUS 0x8B81 -#define GL_INFO_LOG_LENGTH 0x8B84 -#define GL_SHADER_SOURCE_LENGTH 0x8B88 -#define GL_SHADER_COMPILER 0x8DFA -#define GL_SHADER_BINARY_FORMATS 0x8DF8 -#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 -#define GL_LOW_FLOAT 0x8DF0 -#define GL_MEDIUM_FLOAT 0x8DF1 -#define GL_HIGH_FLOAT 0x8DF2 -#define GL_LOW_INT 0x8DF3 -#define GL_MEDIUM_INT 0x8DF4 -#define GL_HIGH_INT 0x8DF5 -#define GL_FRAMEBUFFER 0x8D40 -#define GL_RENDERBUFFER 0x8D41 -#define GL_RGBA4 0x8056 -#define GL_RGB5_A1 0x8057 -#define GL_RGB565 0x8D62 -#define GL_DEPTH_COMPONENT16 0x81A5 -#define GL_STENCIL_INDEX8 0x8D48 -#define GL_RENDERBUFFER_WIDTH 0x8D42 -#define GL_RENDERBUFFER_HEIGHT 0x8D43 -#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 -#define GL_RENDERBUFFER_RED_SIZE 0x8D50 -#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 -#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 -#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 -#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 -#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 -#define GL_COLOR_ATTACHMENT0 0x8CE0 -#define GL_DEPTH_ATTACHMENT 0x8D00 -#define GL_STENCIL_ATTACHMENT 0x8D20 -#define GL_NONE 0 -#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 -#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD -#define GL_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_RENDERBUFFER_BINDING 0x8CA7 -#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 -#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 -typedef void (GL_APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); -typedef void (GL_APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); -typedef void (GL_APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); -typedef void (GL_APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); -typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer); -typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer); -typedef void (GL_APIENTRYP PFNGLBINDTEXTUREPROC) (GLenum target, GLuint texture); -typedef void (GL_APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); -typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); -typedef void (GL_APIENTRYP PFNGLBLENDFUNCPROC) (GLenum sfactor, GLenum dfactor); -typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -typedef void (GL_APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage); -typedef void (GL_APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); -typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLCLEARPROC) (GLbitfield mask); -typedef void (GL_APIENTRYP PFNGLCLEARCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d); -typedef void (GL_APIENTRYP PFNGLCLEARSTENCILPROC) (GLint s); -typedef void (GL_APIENTRYP PFNGLCOLORMASKPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -typedef void (GL_APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader); -typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); -typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); -typedef void (GL_APIENTRYP PFNGLCOPYTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef GLuint (GL_APIENTRYP PFNGLCREATEPROGRAMPROC) (void); -typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); -typedef void (GL_APIENTRYP PFNGLCULLFACEPROC) (GLenum mode); -typedef void (GL_APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); -typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers); -typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program); -typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers); -typedef void (GL_APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader); -typedef void (GL_APIENTRYP PFNGLDELETETEXTURESPROC) (GLsizei n, const GLuint *textures); -typedef void (GL_APIENTRYP PFNGLDEPTHFUNCPROC) (GLenum func); -typedef void (GL_APIENTRYP PFNGLDEPTHMASKPROC) (GLboolean flag); -typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f); -typedef void (GL_APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); -typedef void (GL_APIENTRYP PFNGLDISABLEPROC) (GLenum cap); -typedef void (GL_APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); -typedef void (GL_APIENTRYP PFNGLDRAWARRAYSPROC) (GLenum mode, GLint first, GLsizei count); -typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices); -typedef void (GL_APIENTRYP PFNGLENABLEPROC) (GLenum cap); -typedef void (GL_APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); -typedef void (GL_APIENTRYP PFNGLFINISHPROC) (void); -typedef void (GL_APIENTRYP PFNGLFLUSHPROC) (void); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (GL_APIENTRYP PFNGLFRONTFACEPROC) (GLenum mode); -typedef void (GL_APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); -typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); -typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); -typedef void (GL_APIENTRYP PFNGLGENTEXTURESPROC) (GLsizei n, GLuint *textures); -typedef void (GL_APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -typedef void (GL_APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); -typedef GLint (GL_APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (GL_APIENTRYP PFNGLGETBOOLEANVPROC) (GLenum pname, GLboolean *data); -typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef GLenum (GL_APIENTRYP PFNGLGETERRORPROC) (void); -typedef void (GL_APIENTRYP PFNGLGETFLOATVPROC) (GLenum pname, GLfloat *data); -typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETINTEGERVPROC) (GLenum pname, GLint *data); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (GL_APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); -typedef void (GL_APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); -typedef const GLubyte *(GL_APIENTRYP PFNGLGETSTRINGPROC) (GLenum name); -typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); -typedef GLint (GL_APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer); -typedef void (GL_APIENTRYP PFNGLHINTPROC) (GLenum target, GLenum mode); -typedef GLboolean (GL_APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer); -typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDPROC) (GLenum cap); -typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer); -typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPROC) (GLuint program); -typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer); -typedef GLboolean (GL_APIENTRYP PFNGLISSHADERPROC) (GLuint shader); -typedef GLboolean (GL_APIENTRYP PFNGLISTEXTUREPROC) (GLuint texture); -typedef void (GL_APIENTRYP PFNGLLINEWIDTHPROC) (GLfloat width); -typedef void (GL_APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program); -typedef void (GL_APIENTRYP PFNGLPIXELSTOREIPROC) (GLenum pname, GLint param); -typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETPROC) (GLfloat factor, GLfloat units); -typedef void (GL_APIENTRYP PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); -typedef void (GL_APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void); -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert); -typedef void (GL_APIENTRYP PFNGLSCISSORPROC) (GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); -typedef void (GL_APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); -typedef void (GL_APIENTRYP PFNGLSTENCILFUNCPROC) (GLenum func, GLint ref, GLuint mask); -typedef void (GL_APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask); -typedef void (GL_APIENTRYP PFNGLSTENCILMASKPROC) (GLuint mask); -typedef void (GL_APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); -typedef void (GL_APIENTRYP PFNGLSTENCILOPPROC) (GLenum fail, GLenum zfail, GLenum zpass); -typedef void (GL_APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -typedef void (GL_APIENTRYP PFNGLTEXIMAGE2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat param); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GLint param); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -typedef void (GL_APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); -typedef void (GL_APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0); -typedef void (GL_APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); -typedef void (GL_APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); -typedef void (GL_APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (GL_APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); -typedef void (GL_APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (GL_APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (GL_APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program); -typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); -typedef void (GL_APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture); -GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader); -GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); -GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); -GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); -GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); -GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); -GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode); -GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); -GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); -GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage); -GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); -GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target); -GL_APICALL void GL_APIENTRY glClear (GLbitfield mask); -GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d); -GL_APICALL void GL_APIENTRY glClearStencil (GLint s); -GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader); -GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); -GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); -GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL GLuint GL_APIENTRY glCreateProgram (void); -GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type); -GL_APICALL void GL_APIENTRY glCullFace (GLenum mode); -GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); -GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); -GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program); -GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); -GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader); -GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures); -GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func); -GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag); -GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f); -GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader); -GL_APICALL void GL_APIENTRY glDisable (GLenum cap); -GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index); -GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); -GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices); -GL_APICALL void GL_APIENTRY glEnable (GLenum cap); -GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index); -GL_APICALL void GL_APIENTRY glFinish (void); -GL_APICALL void GL_APIENTRY glFlush (void); -GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode); -GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); -GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target); -GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers); -GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); -GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures); -GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); -GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name); -GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data); -GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); -GL_APICALL GLenum GL_APIENTRY glGetError (void); -GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data); -GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data); -GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); -GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); -GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name); -GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params); -GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name); -GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer); -GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode); -GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); -GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap); -GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer); -GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program); -GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer); -GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader); -GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture); -GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width); -GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program); -GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); -GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); -GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void); -GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); -GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); -GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); -GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask); -GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); -GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); -GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); -GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); -GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params); -GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); -GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0); -GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0); -GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1); -GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1); -GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); -GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUseProgram (GLuint program); -GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program); -GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x); -GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); -GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); -GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v); -GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); -GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); -#endif -#endif /* GL_ES_VERSION_2_0 */ - -#ifndef GL_ES_VERSION_3_0 -#define GL_ES_VERSION_3_0 1 -typedef unsigned short GLhalf; -#define GL_READ_BUFFER 0x0C02 -#define GL_UNPACK_ROW_LENGTH 0x0CF2 -#define GL_UNPACK_SKIP_ROWS 0x0CF3 -#define GL_UNPACK_SKIP_PIXELS 0x0CF4 -#define GL_PACK_ROW_LENGTH 0x0D02 -#define GL_PACK_SKIP_ROWS 0x0D03 -#define GL_PACK_SKIP_PIXELS 0x0D04 -#define GL_COLOR 0x1800 -#define GL_DEPTH 0x1801 -#define GL_STENCIL 0x1802 -#define GL_RED 0x1903 -#define GL_RGB8 0x8051 -#define GL_RGBA8 0x8058 -#define GL_RGB10_A2 0x8059 -#define GL_TEXTURE_BINDING_3D 0x806A -#define GL_UNPACK_SKIP_IMAGES 0x806D -#define GL_UNPACK_IMAGE_HEIGHT 0x806E -#define GL_TEXTURE_3D 0x806F -#define GL_TEXTURE_WRAP_R 0x8072 -#define GL_MAX_3D_TEXTURE_SIZE 0x8073 -#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 -#define GL_MAX_ELEMENTS_VERTICES 0x80E8 -#define GL_MAX_ELEMENTS_INDICES 0x80E9 -#define GL_TEXTURE_MIN_LOD 0x813A -#define GL_TEXTURE_MAX_LOD 0x813B -#define GL_TEXTURE_BASE_LEVEL 0x813C -#define GL_TEXTURE_MAX_LEVEL 0x813D -#define GL_MIN 0x8007 -#define GL_MAX 0x8008 -#define GL_DEPTH_COMPONENT24 0x81A6 -#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD -#define GL_TEXTURE_COMPARE_MODE 0x884C -#define GL_TEXTURE_COMPARE_FUNC 0x884D -#define GL_CURRENT_QUERY 0x8865 -#define GL_QUERY_RESULT 0x8866 -#define GL_QUERY_RESULT_AVAILABLE 0x8867 -#define GL_BUFFER_MAPPED 0x88BC -#define GL_BUFFER_MAP_POINTER 0x88BD -#define GL_STREAM_READ 0x88E1 -#define GL_STREAM_COPY 0x88E2 -#define GL_STATIC_READ 0x88E5 -#define GL_STATIC_COPY 0x88E6 -#define GL_DYNAMIC_READ 0x88E9 -#define GL_DYNAMIC_COPY 0x88EA -#define GL_MAX_DRAW_BUFFERS 0x8824 -#define GL_DRAW_BUFFER0 0x8825 -#define GL_DRAW_BUFFER1 0x8826 -#define GL_DRAW_BUFFER2 0x8827 -#define GL_DRAW_BUFFER3 0x8828 -#define GL_DRAW_BUFFER4 0x8829 -#define GL_DRAW_BUFFER5 0x882A -#define GL_DRAW_BUFFER6 0x882B -#define GL_DRAW_BUFFER7 0x882C -#define GL_DRAW_BUFFER8 0x882D -#define GL_DRAW_BUFFER9 0x882E -#define GL_DRAW_BUFFER10 0x882F -#define GL_DRAW_BUFFER11 0x8830 -#define GL_DRAW_BUFFER12 0x8831 -#define GL_DRAW_BUFFER13 0x8832 -#define GL_DRAW_BUFFER14 0x8833 -#define GL_DRAW_BUFFER15 0x8834 -#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 -#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A -#define GL_SAMPLER_3D 0x8B5F -#define GL_SAMPLER_2D_SHADOW 0x8B62 -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B -#define GL_PIXEL_PACK_BUFFER 0x88EB -#define GL_PIXEL_UNPACK_BUFFER 0x88EC -#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED -#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF -#define GL_FLOAT_MAT2x3 0x8B65 -#define GL_FLOAT_MAT2x4 0x8B66 -#define GL_FLOAT_MAT3x2 0x8B67 -#define GL_FLOAT_MAT3x4 0x8B68 -#define GL_FLOAT_MAT4x2 0x8B69 -#define GL_FLOAT_MAT4x3 0x8B6A -#define GL_SRGB 0x8C40 -#define GL_SRGB8 0x8C41 -#define GL_SRGB8_ALPHA8 0x8C43 -#define GL_COMPARE_REF_TO_TEXTURE 0x884E -#define GL_MAJOR_VERSION 0x821B -#define GL_MINOR_VERSION 0x821C -#define GL_NUM_EXTENSIONS 0x821D -#define GL_RGBA32F 0x8814 -#define GL_RGB32F 0x8815 -#define GL_RGBA16F 0x881A -#define GL_RGB16F 0x881B -#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD -#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF -#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 -#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 -#define GL_MAX_VARYING_COMPONENTS 0x8B4B -#define GL_TEXTURE_2D_ARRAY 0x8C1A -#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D -#define GL_R11F_G11F_B10F 0x8C3A -#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B -#define GL_RGB9_E5 0x8C3D -#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E -#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 -#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 -#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 -#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 -#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 -#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 -#define GL_RASTERIZER_DISCARD 0x8C89 -#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B -#define GL_INTERLEAVED_ATTRIBS 0x8C8C -#define GL_SEPARATE_ATTRIBS 0x8C8D -#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E -#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F -#define GL_RGBA32UI 0x8D70 -#define GL_RGB32UI 0x8D71 -#define GL_RGBA16UI 0x8D76 -#define GL_RGB16UI 0x8D77 -#define GL_RGBA8UI 0x8D7C -#define GL_RGB8UI 0x8D7D -#define GL_RGBA32I 0x8D82 -#define GL_RGB32I 0x8D83 -#define GL_RGBA16I 0x8D88 -#define GL_RGB16I 0x8D89 -#define GL_RGBA8I 0x8D8E -#define GL_RGB8I 0x8D8F -#define GL_RED_INTEGER 0x8D94 -#define GL_RGB_INTEGER 0x8D98 -#define GL_RGBA_INTEGER 0x8D99 -#define GL_SAMPLER_2D_ARRAY 0x8DC1 -#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 -#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 -#define GL_UNSIGNED_INT_VEC2 0x8DC6 -#define GL_UNSIGNED_INT_VEC3 0x8DC7 -#define GL_UNSIGNED_INT_VEC4 0x8DC8 -#define GL_INT_SAMPLER_2D 0x8DCA -#define GL_INT_SAMPLER_3D 0x8DCB -#define GL_INT_SAMPLER_CUBE 0x8DCC -#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF -#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 -#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 -#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 -#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 -#define GL_BUFFER_ACCESS_FLAGS 0x911F -#define GL_BUFFER_MAP_LENGTH 0x9120 -#define GL_BUFFER_MAP_OFFSET 0x9121 -#define GL_DEPTH_COMPONENT32F 0x8CAC -#define GL_DEPTH32F_STENCIL8 0x8CAD -#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD -#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 -#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 -#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 -#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 -#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 -#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 -#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 -#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 -#define GL_FRAMEBUFFER_DEFAULT 0x8218 -#define GL_FRAMEBUFFER_UNDEFINED 0x8219 -#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A -#define GL_DEPTH_STENCIL 0x84F9 -#define GL_UNSIGNED_INT_24_8 0x84FA -#define GL_DEPTH24_STENCIL8 0x88F0 -#define GL_UNSIGNED_NORMALIZED 0x8C17 -#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_READ_FRAMEBUFFER 0x8CA8 -#define GL_DRAW_FRAMEBUFFER 0x8CA9 -#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA -#define GL_RENDERBUFFER_SAMPLES 0x8CAB -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 -#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF -#define GL_COLOR_ATTACHMENT1 0x8CE1 -#define GL_COLOR_ATTACHMENT2 0x8CE2 -#define GL_COLOR_ATTACHMENT3 0x8CE3 -#define GL_COLOR_ATTACHMENT4 0x8CE4 -#define GL_COLOR_ATTACHMENT5 0x8CE5 -#define GL_COLOR_ATTACHMENT6 0x8CE6 -#define GL_COLOR_ATTACHMENT7 0x8CE7 -#define GL_COLOR_ATTACHMENT8 0x8CE8 -#define GL_COLOR_ATTACHMENT9 0x8CE9 -#define GL_COLOR_ATTACHMENT10 0x8CEA -#define GL_COLOR_ATTACHMENT11 0x8CEB -#define GL_COLOR_ATTACHMENT12 0x8CEC -#define GL_COLOR_ATTACHMENT13 0x8CED -#define GL_COLOR_ATTACHMENT14 0x8CEE -#define GL_COLOR_ATTACHMENT15 0x8CEF -#define GL_COLOR_ATTACHMENT16 0x8CF0 -#define GL_COLOR_ATTACHMENT17 0x8CF1 -#define GL_COLOR_ATTACHMENT18 0x8CF2 -#define GL_COLOR_ATTACHMENT19 0x8CF3 -#define GL_COLOR_ATTACHMENT20 0x8CF4 -#define GL_COLOR_ATTACHMENT21 0x8CF5 -#define GL_COLOR_ATTACHMENT22 0x8CF6 -#define GL_COLOR_ATTACHMENT23 0x8CF7 -#define GL_COLOR_ATTACHMENT24 0x8CF8 -#define GL_COLOR_ATTACHMENT25 0x8CF9 -#define GL_COLOR_ATTACHMENT26 0x8CFA -#define GL_COLOR_ATTACHMENT27 0x8CFB -#define GL_COLOR_ATTACHMENT28 0x8CFC -#define GL_COLOR_ATTACHMENT29 0x8CFD -#define GL_COLOR_ATTACHMENT30 0x8CFE -#define GL_COLOR_ATTACHMENT31 0x8CFF -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 -#define GL_MAX_SAMPLES 0x8D57 -#define GL_HALF_FLOAT 0x140B -#define GL_MAP_READ_BIT 0x0001 -#define GL_MAP_WRITE_BIT 0x0002 -#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 -#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 -#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 -#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 -#define GL_RG 0x8227 -#define GL_RG_INTEGER 0x8228 -#define GL_R8 0x8229 -#define GL_RG8 0x822B -#define GL_R16F 0x822D -#define GL_R32F 0x822E -#define GL_RG16F 0x822F -#define GL_RG32F 0x8230 -#define GL_R8I 0x8231 -#define GL_R8UI 0x8232 -#define GL_R16I 0x8233 -#define GL_R16UI 0x8234 -#define GL_R32I 0x8235 -#define GL_R32UI 0x8236 -#define GL_RG8I 0x8237 -#define GL_RG8UI 0x8238 -#define GL_RG16I 0x8239 -#define GL_RG16UI 0x823A -#define GL_RG32I 0x823B -#define GL_RG32UI 0x823C -#define GL_VERTEX_ARRAY_BINDING 0x85B5 -#define GL_R8_SNORM 0x8F94 -#define GL_RG8_SNORM 0x8F95 -#define GL_RGB8_SNORM 0x8F96 -#define GL_RGBA8_SNORM 0x8F97 -#define GL_SIGNED_NORMALIZED 0x8F9C -#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 -#define GL_COPY_READ_BUFFER 0x8F36 -#define GL_COPY_WRITE_BUFFER 0x8F37 -#define GL_COPY_READ_BUFFER_BINDING 0x8F36 -#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 -#define GL_UNIFORM_BUFFER 0x8A11 -#define GL_UNIFORM_BUFFER_BINDING 0x8A28 -#define GL_UNIFORM_BUFFER_START 0x8A29 -#define GL_UNIFORM_BUFFER_SIZE 0x8A2A -#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B -#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D -#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E -#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F -#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 -#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 -#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 -#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 -#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 -#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 -#define GL_UNIFORM_TYPE 0x8A37 -#define GL_UNIFORM_SIZE 0x8A38 -#define GL_UNIFORM_NAME_LENGTH 0x8A39 -#define GL_UNIFORM_BLOCK_INDEX 0x8A3A -#define GL_UNIFORM_OFFSET 0x8A3B -#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C -#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D -#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E -#define GL_UNIFORM_BLOCK_BINDING 0x8A3F -#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 -#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 -#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 -#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 -#define GL_INVALID_INDEX 0xFFFFFFFFu -#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 -#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 -#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 -#define GL_OBJECT_TYPE 0x9112 -#define GL_SYNC_CONDITION 0x9113 -#define GL_SYNC_STATUS 0x9114 -#define GL_SYNC_FLAGS 0x9115 -#define GL_SYNC_FENCE 0x9116 -#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 -#define GL_UNSIGNALED 0x9118 -#define GL_SIGNALED 0x9119 -#define GL_ALREADY_SIGNALED 0x911A -#define GL_TIMEOUT_EXPIRED 0x911B -#define GL_CONDITION_SATISFIED 0x911C -#define GL_WAIT_FAILED 0x911D -#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 -#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull -#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE -#define GL_ANY_SAMPLES_PASSED 0x8C2F -#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A -#define GL_SAMPLER_BINDING 0x8919 -#define GL_RGB10_A2UI 0x906F -#define GL_TEXTURE_SWIZZLE_R 0x8E42 -#define GL_TEXTURE_SWIZZLE_G 0x8E43 -#define GL_TEXTURE_SWIZZLE_B 0x8E44 -#define GL_TEXTURE_SWIZZLE_A 0x8E45 -#define GL_GREEN 0x1904 -#define GL_BLUE 0x1905 -#define GL_INT_2_10_10_10_REV 0x8D9F -#define GL_TRANSFORM_FEEDBACK 0x8E22 -#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 -#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 -#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 -#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 -#define GL_PROGRAM_BINARY_LENGTH 0x8741 -#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE -#define GL_PROGRAM_BINARY_FORMATS 0x87FF -#define GL_COMPRESSED_R11_EAC 0x9270 -#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 -#define GL_COMPRESSED_RG11_EAC 0x9272 -#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 -#define GL_COMPRESSED_RGB8_ETC2 0x9274 -#define GL_COMPRESSED_SRGB8_ETC2 0x9275 -#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 -#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 -#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 -#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 -#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F -#define GL_MAX_ELEMENT_INDEX 0x8D6B -#define GL_NUM_SAMPLE_COUNTS 0x9380 -#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF -typedef void (GL_APIENTRYP PFNGLREADBUFFERPROC) (GLenum src); -typedef void (GL_APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); -typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); -typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); -typedef void (GL_APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); -typedef void (GL_APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids); -typedef GLboolean (GL_APIENTRYP PFNGLISQUERYPROC) (GLuint id); -typedef void (GL_APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); -typedef void (GL_APIENTRYP PFNGLENDQUERYPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params); -typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, void **params); -typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -typedef void *(GL_APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length); -typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array); -typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays); -typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); -typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array); -typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data); -typedef void (GL_APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode); -typedef void (GL_APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void); -typedef void (GL_APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (GL_APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer); -typedef void (GL_APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); -typedef void (GL_APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); -typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v); -typedef void (GL_APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params); -typedef GLint (GL_APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (GL_APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0); -typedef void (GL_APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1); -typedef void (GL_APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (GL_APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (GL_APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value); -typedef void (GL_APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); -typedef const GLubyte *(GL_APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index); -typedef void (GL_APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -typedef void (GL_APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); -typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); -typedef GLuint (GL_APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName); -typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); -typedef void (GL_APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); -typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); -typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); -typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags); -typedef GLboolean (GL_APIENTRYP PFNGLISSYNCPROC) (GLsync sync); -typedef void (GL_APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync); -typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (GL_APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (GL_APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *data); -typedef void (GL_APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -typedef void (GL_APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data); -typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params); -typedef void (GL_APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers); -typedef void (GL_APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers); -typedef GLboolean (GL_APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler); -typedef void (GL_APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler); -typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param); -typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param); -typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param); -typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param); -typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor); -typedef void (GL_APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id); -typedef void (GL_APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids); -typedef void (GL_APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids); -typedef GLboolean (GL_APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id); -typedef void (GL_APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void); -typedef void (GL_APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); -typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); -typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value); -typedef void (GL_APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); -typedef void (GL_APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -typedef void (GL_APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glReadBuffer (GLenum src); -GL_APICALL void GL_APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); -GL_APICALL void GL_APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); -GL_APICALL void GL_APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); -GL_APICALL void GL_APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); -GL_APICALL void GL_APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); -GL_APICALL void GL_APIENTRY glGenQueries (GLsizei n, GLuint *ids); -GL_APICALL void GL_APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids); -GL_APICALL GLboolean GL_APIENTRY glIsQuery (GLuint id); -GL_APICALL void GL_APIENTRY glBeginQuery (GLenum target, GLuint id); -GL_APICALL void GL_APIENTRY glEndQuery (GLenum target); -GL_APICALL void GL_APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params); -GL_APICALL GLboolean GL_APIENTRY glUnmapBuffer (GLenum target); -GL_APICALL void GL_APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params); -GL_APICALL void GL_APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs); -GL_APICALL void GL_APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -GL_APICALL void *GL_APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -GL_APICALL void GL_APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length); -GL_APICALL void GL_APIENTRY glBindVertexArray (GLuint array); -GL_APICALL void GL_APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays); -GL_APICALL void GL_APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays); -GL_APICALL GLboolean GL_APIENTRY glIsVertexArray (GLuint array); -GL_APICALL void GL_APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data); -GL_APICALL void GL_APIENTRY glBeginTransformFeedback (GLenum primitiveMode); -GL_APICALL void GL_APIENTRY glEndTransformFeedback (void); -GL_APICALL void GL_APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -GL_APICALL void GL_APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer); -GL_APICALL void GL_APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); -GL_APICALL void GL_APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -GL_APICALL void GL_APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); -GL_APICALL void GL_APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params); -GL_APICALL void GL_APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w); -GL_APICALL void GL_APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GL_APICALL void GL_APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v); -GL_APICALL void GL_APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v); -GL_APICALL void GL_APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params); -GL_APICALL GLint GL_APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name); -GL_APICALL void GL_APIENTRY glUniform1ui (GLint location, GLuint v0); -GL_APICALL void GL_APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1); -GL_APICALL void GL_APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2); -GL_APICALL void GL_APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GL_APICALL void GL_APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value); -GL_APICALL void GL_APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value); -GL_APICALL void GL_APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value); -GL_APICALL void GL_APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); -GL_APICALL const GLubyte *GL_APIENTRY glGetStringi (GLenum name, GLuint index); -GL_APICALL void GL_APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -GL_APICALL void GL_APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); -GL_APICALL void GL_APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); -GL_APICALL GLuint GL_APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName); -GL_APICALL void GL_APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); -GL_APICALL void GL_APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); -GL_APICALL void GL_APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); -GL_APICALL void GL_APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); -GL_APICALL GLsync GL_APIENTRY glFenceSync (GLenum condition, GLbitfield flags); -GL_APICALL GLboolean GL_APIENTRY glIsSync (GLsync sync); -GL_APICALL void GL_APIENTRY glDeleteSync (GLsync sync); -GL_APICALL GLenum GL_APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); -GL_APICALL void GL_APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); -GL_APICALL void GL_APIENTRY glGetInteger64v (GLenum pname, GLint64 *data); -GL_APICALL void GL_APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -GL_APICALL void GL_APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data); -GL_APICALL void GL_APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params); -GL_APICALL void GL_APIENTRY glGenSamplers (GLsizei count, GLuint *samplers); -GL_APICALL void GL_APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers); -GL_APICALL GLboolean GL_APIENTRY glIsSampler (GLuint sampler); -GL_APICALL void GL_APIENTRY glBindSampler (GLuint unit, GLuint sampler); -GL_APICALL void GL_APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param); -GL_APICALL void GL_APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param); -GL_APICALL void GL_APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param); -GL_APICALL void GL_APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params); -GL_APICALL void GL_APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor); -GL_APICALL void GL_APIENTRY glBindTransformFeedback (GLenum target, GLuint id); -GL_APICALL void GL_APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids); -GL_APICALL void GL_APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids); -GL_APICALL GLboolean GL_APIENTRY glIsTransformFeedback (GLuint id); -GL_APICALL void GL_APIENTRY glPauseTransformFeedback (void); -GL_APICALL void GL_APIENTRY glResumeTransformFeedback (void); -GL_APICALL void GL_APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); -GL_APICALL void GL_APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); -GL_APICALL void GL_APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value); -GL_APICALL void GL_APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments); -GL_APICALL void GL_APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -GL_APICALL void GL_APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); -#endif -#endif /* GL_ES_VERSION_3_0 */ - -#ifndef GL_ES_VERSION_3_1 -#define GL_ES_VERSION_3_1 1 -#define GL_COMPUTE_SHADER 0x91B9 -#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB -#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC -#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD -#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262 -#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263 -#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264 -#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265 -#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266 -#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB -#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE -#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF -#define GL_COMPUTE_WORK_GROUP_SIZE 0x8267 -#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE -#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF -#define GL_COMPUTE_SHADER_BIT 0x00000020 -#define GL_DRAW_INDIRECT_BUFFER 0x8F3F -#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43 -#define GL_MAX_UNIFORM_LOCATIONS 0x826E -#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310 -#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311 -#define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313 -#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314 -#define GL_MAX_FRAMEBUFFER_WIDTH 0x9315 -#define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316 -#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318 -#define GL_UNIFORM 0x92E1 -#define GL_UNIFORM_BLOCK 0x92E2 -#define GL_PROGRAM_INPUT 0x92E3 -#define GL_PROGRAM_OUTPUT 0x92E4 -#define GL_BUFFER_VARIABLE 0x92E5 -#define GL_SHADER_STORAGE_BLOCK 0x92E6 -#define GL_ATOMIC_COUNTER_BUFFER 0x92C0 -#define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4 -#define GL_ACTIVE_RESOURCES 0x92F5 -#define GL_MAX_NAME_LENGTH 0x92F6 -#define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7 -#define GL_NAME_LENGTH 0x92F9 -#define GL_TYPE 0x92FA -#define GL_ARRAY_SIZE 0x92FB -#define GL_OFFSET 0x92FC -#define GL_BLOCK_INDEX 0x92FD -#define GL_ARRAY_STRIDE 0x92FE -#define GL_MATRIX_STRIDE 0x92FF -#define GL_IS_ROW_MAJOR 0x9300 -#define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301 -#define GL_BUFFER_BINDING 0x9302 -#define GL_BUFFER_DATA_SIZE 0x9303 -#define GL_NUM_ACTIVE_VARIABLES 0x9304 -#define GL_ACTIVE_VARIABLES 0x9305 -#define GL_REFERENCED_BY_VERTEX_SHADER 0x9306 -#define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A -#define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B -#define GL_TOP_LEVEL_ARRAY_SIZE 0x930C -#define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D -#define GL_LOCATION 0x930E -#define GL_VERTEX_SHADER_BIT 0x00000001 -#define GL_FRAGMENT_SHADER_BIT 0x00000002 -#define GL_ALL_SHADER_BITS 0xFFFFFFFF -#define GL_PROGRAM_SEPARABLE 0x8258 -#define GL_ACTIVE_PROGRAM 0x8259 -#define GL_PROGRAM_PIPELINE_BINDING 0x825A -#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1 -#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2 -#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3 -#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC -#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0 -#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1 -#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2 -#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6 -#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7 -#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8 -#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC -#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9 -#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB -#define GL_MAX_IMAGE_UNITS 0x8F38 -#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA -#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE -#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF -#define GL_IMAGE_BINDING_NAME 0x8F3A -#define GL_IMAGE_BINDING_LEVEL 0x8F3B -#define GL_IMAGE_BINDING_LAYERED 0x8F3C -#define GL_IMAGE_BINDING_LAYER 0x8F3D -#define GL_IMAGE_BINDING_ACCESS 0x8F3E -#define GL_IMAGE_BINDING_FORMAT 0x906E -#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001 -#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002 -#define GL_UNIFORM_BARRIER_BIT 0x00000004 -#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008 -#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020 -#define GL_COMMAND_BARRIER_BIT 0x00000040 -#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080 -#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100 -#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200 -#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400 -#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800 -#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000 -#define GL_ALL_BARRIER_BITS 0xFFFFFFFF -#define GL_IMAGE_2D 0x904D -#define GL_IMAGE_3D 0x904E -#define GL_IMAGE_CUBE 0x9050 -#define GL_IMAGE_2D_ARRAY 0x9053 -#define GL_INT_IMAGE_2D 0x9058 -#define GL_INT_IMAGE_3D 0x9059 -#define GL_INT_IMAGE_CUBE 0x905B -#define GL_INT_IMAGE_2D_ARRAY 0x905E -#define GL_UNSIGNED_INT_IMAGE_2D 0x9063 -#define GL_UNSIGNED_INT_IMAGE_3D 0x9064 -#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066 -#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069 -#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7 -#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8 -#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9 -#define GL_READ_ONLY 0x88B8 -#define GL_WRITE_ONLY 0x88B9 -#define GL_READ_WRITE 0x88BA -#define GL_SHADER_STORAGE_BUFFER 0x90D2 -#define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3 -#define GL_SHADER_STORAGE_BUFFER_START 0x90D4 -#define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5 -#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6 -#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA -#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB -#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC -#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD -#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE -#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF -#define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000 -#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39 -#define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA -#define GL_STENCIL_INDEX 0x1901 -#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E -#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F -#define GL_SAMPLE_POSITION 0x8E50 -#define GL_SAMPLE_MASK 0x8E51 -#define GL_SAMPLE_MASK_VALUE 0x8E52 -#define GL_TEXTURE_2D_MULTISAMPLE 0x9100 -#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59 -#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E -#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F -#define GL_MAX_INTEGER_SAMPLES 0x9110 -#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104 -#define GL_TEXTURE_SAMPLES 0x9106 -#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107 -#define GL_TEXTURE_WIDTH 0x1000 -#define GL_TEXTURE_HEIGHT 0x1001 -#define GL_TEXTURE_DEPTH 0x8071 -#define GL_TEXTURE_INTERNAL_FORMAT 0x1003 -#define GL_TEXTURE_RED_SIZE 0x805C -#define GL_TEXTURE_GREEN_SIZE 0x805D -#define GL_TEXTURE_BLUE_SIZE 0x805E -#define GL_TEXTURE_ALPHA_SIZE 0x805F -#define GL_TEXTURE_DEPTH_SIZE 0x884A -#define GL_TEXTURE_STENCIL_SIZE 0x88F1 -#define GL_TEXTURE_SHARED_SIZE 0x8C3F -#define GL_TEXTURE_RED_TYPE 0x8C10 -#define GL_TEXTURE_GREEN_TYPE 0x8C11 -#define GL_TEXTURE_BLUE_TYPE 0x8C12 -#define GL_TEXTURE_ALPHA_TYPE 0x8C13 -#define GL_TEXTURE_DEPTH_TYPE 0x8C16 -#define GL_TEXTURE_COMPRESSED 0x86A1 -#define GL_SAMPLER_2D_MULTISAMPLE 0x9108 -#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109 -#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A -#define GL_VERTEX_ATTRIB_BINDING 0x82D4 -#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5 -#define GL_VERTEX_BINDING_DIVISOR 0x82D6 -#define GL_VERTEX_BINDING_OFFSET 0x82D7 -#define GL_VERTEX_BINDING_STRIDE 0x82D8 -#define GL_VERTEX_BINDING_BUFFER 0x8F4F -#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9 -#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA -#define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5 -typedef void (GL_APIENTRYP PFNGLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); -typedef void (GL_APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC) (GLintptr indirect); -typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect); -typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC) (GLenum target, GLenum pname, GLint param); -typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC) (GLuint program, GLenum programInterface, GLenum pname, GLint *params); -typedef GLuint (GL_APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params); -typedef GLint (GL_APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar *name); -typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program); -typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program); -typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar *const*strings); -typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline); -typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines); -typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines); -typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline); -typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (GL_APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); -typedef void (GL_APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data); -typedef void (GL_APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers); -typedef void (GL_APIENTRYP PFNGLMEMORYBARRIERBYREGIONPROC) (GLbitfield barriers); -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -typedef void (GL_APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val); -typedef void (GL_APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint maskNumber, GLbitfield mask); -typedef void (GL_APIENTRYP PFNGLGETTEXLEVELPARAMETERIVPROC) (GLenum target, GLint level, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETTEXLEVELPARAMETERFVPROC) (GLenum target, GLint level, GLenum pname, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLBINDVERTEXBUFFERPROC) (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC) (GLuint attribindex, GLuint bindingindex); -typedef void (GL_APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC) (GLuint bindingindex, GLuint divisor); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); -GL_APICALL void GL_APIENTRY glDispatchComputeIndirect (GLintptr indirect); -GL_APICALL void GL_APIENTRY glDrawArraysIndirect (GLenum mode, const void *indirect); -GL_APICALL void GL_APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect); -GL_APICALL void GL_APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params); -GL_APICALL GLuint GL_APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name); -GL_APICALL void GL_APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); -GL_APICALL void GL_APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params); -GL_APICALL GLint GL_APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name); -GL_APICALL void GL_APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program); -GL_APICALL void GL_APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program); -GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar *const*strings); -GL_APICALL void GL_APIENTRY glBindProgramPipeline (GLuint pipeline); -GL_APICALL void GL_APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines); -GL_APICALL void GL_APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines); -GL_APICALL GLboolean GL_APIENTRY glIsProgramPipeline (GLuint pipeline); -GL_APICALL void GL_APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0); -GL_APICALL void GL_APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1); -GL_APICALL void GL_APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -GL_APICALL void GL_APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GL_APICALL void GL_APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0); -GL_APICALL void GL_APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1); -GL_APICALL void GL_APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -GL_APICALL void GL_APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GL_APICALL void GL_APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0); -GL_APICALL void GL_APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1); -GL_APICALL void GL_APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GL_APICALL void GL_APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GL_APICALL void GL_APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GL_APICALL void GL_APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GL_APICALL void GL_APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GL_APICALL void GL_APIENTRY glValidateProgramPipeline (GLuint pipeline); -GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GL_APICALL void GL_APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); -GL_APICALL void GL_APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data); -GL_APICALL void GL_APIENTRY glMemoryBarrier (GLbitfield barriers); -GL_APICALL void GL_APIENTRY glMemoryBarrierByRegion (GLbitfield barriers); -GL_APICALL void GL_APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -GL_APICALL void GL_APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val); -GL_APICALL void GL_APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask); -GL_APICALL void GL_APIENTRY glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params); -GL_APICALL void GL_APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); -GL_APICALL void GL_APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); -GL_APICALL void GL_APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); -GL_APICALL void GL_APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex); -GL_APICALL void GL_APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor); -#endif -#endif /* GL_ES_VERSION_3_1 */ - -#ifndef GL_ES_VERSION_3_2 -#define GL_ES_VERSION_3_2 1 -typedef void (GL_APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); -#define GL_MULTISAMPLE_LINE_WIDTH_RANGE 0x9381 -#define GL_MULTISAMPLE_LINE_WIDTH_GRANULARITY 0x9382 -#define GL_MULTIPLY 0x9294 -#define GL_SCREEN 0x9295 -#define GL_OVERLAY 0x9296 -#define GL_DARKEN 0x9297 -#define GL_LIGHTEN 0x9298 -#define GL_COLORDODGE 0x9299 -#define GL_COLORBURN 0x929A -#define GL_HARDLIGHT 0x929B -#define GL_SOFTLIGHT 0x929C -#define GL_DIFFERENCE 0x929E -#define GL_EXCLUSION 0x92A0 -#define GL_HSL_HUE 0x92AD -#define GL_HSL_SATURATION 0x92AE -#define GL_HSL_COLOR 0x92AF -#define GL_HSL_LUMINOSITY 0x92B0 -#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242 -#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243 -#define GL_DEBUG_CALLBACK_FUNCTION 0x8244 -#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245 -#define GL_DEBUG_SOURCE_API 0x8246 -#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247 -#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248 -#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249 -#define GL_DEBUG_SOURCE_APPLICATION 0x824A -#define GL_DEBUG_SOURCE_OTHER 0x824B -#define GL_DEBUG_TYPE_ERROR 0x824C -#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D -#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E -#define GL_DEBUG_TYPE_PORTABILITY 0x824F -#define GL_DEBUG_TYPE_PERFORMANCE 0x8250 -#define GL_DEBUG_TYPE_OTHER 0x8251 -#define GL_DEBUG_TYPE_MARKER 0x8268 -#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269 -#define GL_DEBUG_TYPE_POP_GROUP 0x826A -#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B -#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C -#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D -#define GL_BUFFER 0x82E0 -#define GL_SHADER 0x82E1 -#define GL_PROGRAM 0x82E2 -#define GL_VERTEX_ARRAY 0x8074 -#define GL_QUERY 0x82E3 -#define GL_PROGRAM_PIPELINE 0x82E4 -#define GL_SAMPLER 0x82E6 -#define GL_MAX_LABEL_LENGTH 0x82E8 -#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143 -#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144 -#define GL_DEBUG_LOGGED_MESSAGES 0x9145 -#define GL_DEBUG_SEVERITY_HIGH 0x9146 -#define GL_DEBUG_SEVERITY_MEDIUM 0x9147 -#define GL_DEBUG_SEVERITY_LOW 0x9148 -#define GL_DEBUG_OUTPUT 0x92E0 -#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002 -#define GL_STACK_OVERFLOW 0x0503 -#define GL_STACK_UNDERFLOW 0x0504 -#define GL_GEOMETRY_SHADER 0x8DD9 -#define GL_GEOMETRY_SHADER_BIT 0x00000004 -#define GL_GEOMETRY_VERTICES_OUT 0x8916 -#define GL_GEOMETRY_INPUT_TYPE 0x8917 -#define GL_GEOMETRY_OUTPUT_TYPE 0x8918 -#define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F -#define GL_LAYER_PROVOKING_VERTEX 0x825E -#define GL_LINES_ADJACENCY 0x000A -#define GL_LINE_STRIP_ADJACENCY 0x000B -#define GL_TRIANGLES_ADJACENCY 0x000C -#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D -#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF -#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C -#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32 -#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123 -#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124 -#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0 -#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1 -#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A -#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29 -#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF -#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5 -#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD -#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7 -#define GL_FIRST_VERTEX_CONVENTION 0x8E4D -#define GL_LAST_VERTEX_CONVENTION 0x8E4E -#define GL_UNDEFINED_VERTEX 0x8260 -#define GL_PRIMITIVES_GENERATED 0x8C87 -#define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312 -#define GL_MAX_FRAMEBUFFER_LAYERS 0x9317 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8 -#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7 -#define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309 -#define GL_PRIMITIVE_BOUNDING_BOX 0x92BE -#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT 0x00000004 -#define GL_CONTEXT_FLAGS 0x821E -#define GL_LOSE_CONTEXT_ON_RESET 0x8252 -#define GL_GUILTY_CONTEXT_RESET 0x8253 -#define GL_INNOCENT_CONTEXT_RESET 0x8254 -#define GL_UNKNOWN_CONTEXT_RESET 0x8255 -#define GL_RESET_NOTIFICATION_STRATEGY 0x8256 -#define GL_NO_RESET_NOTIFICATION 0x8261 -#define GL_CONTEXT_LOST 0x0507 -#define GL_SAMPLE_SHADING 0x8C36 -#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37 -#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B -#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C -#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D -#define GL_PATCHES 0x000E -#define GL_PATCH_VERTICES 0x8E72 -#define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75 -#define GL_TESS_GEN_MODE 0x8E76 -#define GL_TESS_GEN_SPACING 0x8E77 -#define GL_TESS_GEN_VERTEX_ORDER 0x8E78 -#define GL_TESS_GEN_POINT_MODE 0x8E79 -#define GL_ISOLINES 0x8E7A -#define GL_QUADS 0x0007 -#define GL_FRACTIONAL_ODD 0x8E7B -#define GL_FRACTIONAL_EVEN 0x8E7C -#define GL_MAX_PATCH_VERTICES 0x8E7D -#define GL_MAX_TESS_GEN_LEVEL 0x8E7E -#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F -#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80 -#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81 -#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82 -#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83 -#define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84 -#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85 -#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86 -#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89 -#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A -#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C -#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D -#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E -#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F -#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD -#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE -#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3 -#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4 -#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB -#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC -#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8 -#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9 -#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221 -#define GL_IS_PER_PATCH 0x92E7 -#define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307 -#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308 -#define GL_TESS_CONTROL_SHADER 0x8E88 -#define GL_TESS_EVALUATION_SHADER 0x8E87 -#define GL_TESS_CONTROL_SHADER_BIT 0x00000008 -#define GL_TESS_EVALUATION_SHADER_BIT 0x00000010 -#define GL_TEXTURE_BORDER_COLOR 0x1004 -#define GL_CLAMP_TO_BORDER 0x812D -#define GL_TEXTURE_BUFFER 0x8C2A -#define GL_TEXTURE_BUFFER_BINDING 0x8C2A -#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B -#define GL_TEXTURE_BINDING_BUFFER 0x8C2C -#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D -#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F -#define GL_SAMPLER_BUFFER 0x8DC2 -#define GL_INT_SAMPLER_BUFFER 0x8DD0 -#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8 -#define GL_IMAGE_BUFFER 0x9051 -#define GL_INT_IMAGE_BUFFER 0x905C -#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067 -#define GL_TEXTURE_BUFFER_OFFSET 0x919D -#define GL_TEXTURE_BUFFER_SIZE 0x919E -#define GL_COMPRESSED_RGBA_ASTC_4x4 0x93B0 -#define GL_COMPRESSED_RGBA_ASTC_5x4 0x93B1 -#define GL_COMPRESSED_RGBA_ASTC_5x5 0x93B2 -#define GL_COMPRESSED_RGBA_ASTC_6x5 0x93B3 -#define GL_COMPRESSED_RGBA_ASTC_6x6 0x93B4 -#define GL_COMPRESSED_RGBA_ASTC_8x5 0x93B5 -#define GL_COMPRESSED_RGBA_ASTC_8x6 0x93B6 -#define GL_COMPRESSED_RGBA_ASTC_8x8 0x93B7 -#define GL_COMPRESSED_RGBA_ASTC_10x5 0x93B8 -#define GL_COMPRESSED_RGBA_ASTC_10x6 0x93B9 -#define GL_COMPRESSED_RGBA_ASTC_10x8 0x93BA -#define GL_COMPRESSED_RGBA_ASTC_10x10 0x93BB -#define GL_COMPRESSED_RGBA_ASTC_12x10 0x93BC -#define GL_COMPRESSED_RGBA_ASTC_12x12 0x93BD -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4 0x93D0 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4 0x93D1 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5 0x93D2 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5 0x93D3 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6 0x93D4 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5 0x93D5 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6 0x93D6 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8 0x93D7 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5 0x93D8 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6 0x93D9 -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8 0x93DA -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10 0x93DB -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10 0x93DC -#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12 0x93DD -#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009 -#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A -#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C -#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D -#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E -#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F -#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054 -#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F -#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A -#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102 -#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105 -#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B -#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C -#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D -typedef void (GL_APIENTRYP PFNGLBLENDBARRIERPROC) (void); -typedef void (GL_APIENTRYP PFNGLCOPYIMAGESUBDATAPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); -typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam); -typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message); -typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void); -typedef void (GL_APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); -typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); -typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label); -typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); -typedef void (GL_APIENTRYP PFNGLGETPOINTERVPROC) (GLenum pname, void **params); -typedef void (GL_APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index); -typedef void (GL_APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index); -typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode); -typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -typedef void (GL_APIENTRYP PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst); -typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -typedef void (GL_APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index); -typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); -typedef void (GL_APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); -typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); -typedef void (GL_APIENTRYP PFNGLPRIMITIVEBOUNDINGBOXPROC) (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); -typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSPROC) (void); -typedef void (GL_APIENTRYP PFNGLREADNPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); -typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETNUNIFORMUIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params); -typedef void (GL_APIENTRYP PFNGLMINSAMPLESHADINGPROC) (GLfloat value); -typedef void (GL_APIENTRYP PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params); -typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params); -typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param); -typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param); -typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params); -typedef void (GL_APIENTRYP PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer); -typedef void (GL_APIENTRYP PFNGLTEXBUFFERRANGEPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glBlendBarrier (void); -GL_APICALL void GL_APIENTRY glCopyImageSubData (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); -GL_APICALL void GL_APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -GL_APICALL void GL_APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -GL_APICALL void GL_APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam); -GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -GL_APICALL void GL_APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message); -GL_APICALL void GL_APIENTRY glPopDebugGroup (void); -GL_APICALL void GL_APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); -GL_APICALL void GL_APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); -GL_APICALL void GL_APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label); -GL_APICALL void GL_APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); -GL_APICALL void GL_APIENTRY glGetPointerv (GLenum pname, void **params); -GL_APICALL void GL_APIENTRY glEnablei (GLenum target, GLuint index); -GL_APICALL void GL_APIENTRY glDisablei (GLenum target, GLuint index); -GL_APICALL void GL_APIENTRY glBlendEquationi (GLuint buf, GLenum mode); -GL_APICALL void GL_APIENTRY glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -GL_APICALL void GL_APIENTRY glBlendFunci (GLuint buf, GLenum src, GLenum dst); -GL_APICALL void GL_APIENTRY glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -GL_APICALL void GL_APIENTRY glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -GL_APICALL GLboolean GL_APIENTRY glIsEnabledi (GLenum target, GLuint index); -GL_APICALL void GL_APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); -GL_APICALL void GL_APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); -GL_APICALL void GL_APIENTRY glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); -GL_APICALL void GL_APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level); -GL_APICALL void GL_APIENTRY glPrimitiveBoundingBox (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); -GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatus (void); -GL_APICALL void GL_APIENTRY glReadnPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); -GL_APICALL void GL_APIENTRY glGetnUniformfv (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -GL_APICALL void GL_APIENTRY glGetnUniformiv (GLuint program, GLint location, GLsizei bufSize, GLint *params); -GL_APICALL void GL_APIENTRY glGetnUniformuiv (GLuint program, GLint location, GLsizei bufSize, GLuint *params); -GL_APICALL void GL_APIENTRY glMinSampleShading (GLfloat value); -GL_APICALL void GL_APIENTRY glPatchParameteri (GLenum pname, GLint value); -GL_APICALL void GL_APIENTRY glTexParameterIiv (GLenum target, GLenum pname, const GLint *params); -GL_APICALL void GL_APIENTRY glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params); -GL_APICALL void GL_APIENTRY glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params); -GL_APICALL void GL_APIENTRY glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param); -GL_APICALL void GL_APIENTRY glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param); -GL_APICALL void GL_APIENTRY glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params); -GL_APICALL void GL_APIENTRY glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer); -GL_APICALL void GL_APIENTRY glTexBufferRange (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); -GL_APICALL void GL_APIENTRY glTexStorage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -#endif -#endif /* GL_ES_VERSION_3_2 */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/emscripten/include/pvrsdk/GLES3/gl3platform.h b/emscripten/include/pvrsdk/GLES3/gl3platform.h deleted file mode 100644 index 372f93e6..00000000 --- a/emscripten/include/pvrsdk/GLES3/gl3platform.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef __gl3platform_h_ -#define __gl3platform_h_ - -/* -** Copyright (c) 2017 The Khronos Group Inc. -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -/* Platform-specific types and definitions for OpenGL ES 3.X gl3.h - * - * Adopters may modify khrplatform.h and this file to suit their platform. - * Please contribute modifications back to Khronos as pull requests on the - * public github repository: - * https://github.com/KhronosGroup/OpenGL-Registry - */ - -#include "KHR/khrplatform.h" - -#ifndef GL_APICALL -#define GL_APICALL KHRONOS_APICALL -#endif - -#ifndef GL_APIENTRY -#define GL_APIENTRY KHRONOS_APIENTRY -#endif - -#endif /* __gl3platform_h_ */ diff --git a/emscripten/include/pvrsdk/KHR/khrplatform.h b/emscripten/include/pvrsdk/KHR/khrplatform.h deleted file mode 100644 index 619eedaa..00000000 --- a/emscripten/include/pvrsdk/KHR/khrplatform.h +++ /dev/null @@ -1,289 +0,0 @@ -#ifndef __khrplatform_h_ -#define __khrplatform_h_ - -/* -** Copyright (c) 2008-2009 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in 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, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER 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. -*/ - -/* Khronos platform-specific types and definitions. - * - * $Revision: 32517 $ on $Date: 2016-03-11 02:41:19 -0800 (Fri, 11 Mar 2016) $ - * - * Adopters may modify this file to suit their platform. Adopters are - * encouraged to submit platform specific modifications to the Khronos - * group so that they can be included in future versions of this file. - * Please submit changes by sending them to the public Khronos Bugzilla - * (http://khronos.org/bugzilla) by filing a bug against product - * "Khronos (general)" component "Registry". - * - * A predefined template which fills in some of the bug fields can be - * reached using http://tinyurl.com/khrplatform-h-bugreport, but you - * must create a Bugzilla login first. - * - * - * See the Implementer's Guidelines for information about where this file - * should be located on your system and for more details of its use: - * http://www.khronos.org/registry/implementers_guide.pdf - * - * This file should be included as - * #include - * by Khronos client API header files that use its types and defines. - * - * The types in khrplatform.h should only be used to define API-specific types. - * - * Types defined in khrplatform.h: - * khronos_int8_t signed 8 bit - * khronos_uint8_t unsigned 8 bit - * khronos_int16_t signed 16 bit - * khronos_uint16_t unsigned 16 bit - * khronos_int32_t signed 32 bit - * khronos_uint32_t unsigned 32 bit - * khronos_int64_t signed 64 bit - * khronos_uint64_t unsigned 64 bit - * khronos_intptr_t signed same number of bits as a pointer - * khronos_uintptr_t unsigned same number of bits as a pointer - * khronos_ssize_t signed size - * khronos_usize_t unsigned size - * khronos_float_t signed 32 bit floating point - * khronos_time_ns_t unsigned 64 bit time in nanoseconds - * khronos_utime_nanoseconds_t unsigned time interval or absolute time in - * nanoseconds - * khronos_stime_nanoseconds_t signed time interval in nanoseconds - * khronos_boolean_enum_t enumerated boolean type. This should - * only be used as a base type when a client API's boolean type is - * an enum. Client APIs which use an integer or other type for - * booleans cannot use this as the base type for their boolean. - * - * Tokens defined in khrplatform.h: - * - * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values. - * - * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0. - * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0. - * - * Calling convention macros defined in this file: - * KHRONOS_APICALL - * KHRONOS_APIENTRY - * KHRONOS_APIATTRIBUTES - * - * These may be used in function prototypes as: - * - * KHRONOS_APICALL void KHRONOS_APIENTRY funcname( - * int arg1, - * int arg2) KHRONOS_APIATTRIBUTES; - */ - -/*------------------------------------------------------------------------- - * Definition of KHRONOS_APICALL - *------------------------------------------------------------------------- - * This precedes the return type of the function in the function prototype. - */ -#if defined(_WIN32) && !defined(__SCITECH_SNAP__) -# if defined (_DLL_EXPORTS) -# define KHRONOS_APICALL __declspec(dllexport) -# else -# define KHRONOS_APICALL __declspec(dllimport) -# endif -#elif defined (__SYMBIAN32__) -# define KHRONOS_APICALL IMPORT_C -#elif defined(__ANDROID__) -# include -# define KHRONOS_APICALL __attribute__((visibility("default"))) -#else -# define KHRONOS_APICALL -#endif - -/*------------------------------------------------------------------------- - * Definition of KHRONOS_APIENTRY - *------------------------------------------------------------------------- - * This follows the return type of the function and precedes the function - * name in the function prototype. - */ -#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) - /* Win32 but not WinCE */ -# define KHRONOS_APIENTRY __stdcall -#else -# define KHRONOS_APIENTRY -#endif - -/*------------------------------------------------------------------------- - * Definition of KHRONOS_APIATTRIBUTES - *------------------------------------------------------------------------- - * This follows the closing parenthesis of the function prototype arguments. - */ -#if defined (__ARMCC_2__) -#define KHRONOS_APIATTRIBUTES __softfp -#else -#define KHRONOS_APIATTRIBUTES -#endif - -/*------------------------------------------------------------------------- - * basic type definitions - *-----------------------------------------------------------------------*/ -#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__) - - -/* - * Using - */ -#include -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(__VMS ) || defined(__sgi) - -/* - * Using - */ -#include -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(_WIN32) && !defined(__SCITECH_SNAP__) - -/* - * Win32 - */ -typedef __int32 khronos_int32_t; -typedef unsigned __int32 khronos_uint32_t; -typedef __int64 khronos_int64_t; -typedef unsigned __int64 khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(__sun__) || defined(__digital__) - -/* - * Sun or Digital - */ -typedef int khronos_int32_t; -typedef unsigned int khronos_uint32_t; -#if defined(__arch64__) || defined(_LP64) -typedef long int khronos_int64_t; -typedef unsigned long int khronos_uint64_t; -#else -typedef long long int khronos_int64_t; -typedef unsigned long long int khronos_uint64_t; -#endif /* __arch64__ */ -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif 0 - -/* - * Hypothetical platform with no float or int64 support - */ -typedef int khronos_int32_t; -typedef unsigned int khronos_uint32_t; -#define KHRONOS_SUPPORT_INT64 0 -#define KHRONOS_SUPPORT_FLOAT 0 - -#else - -/* - * Generic fallback - */ -#include -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#endif - - -/* - * Types that are (so far) the same on all platforms - */ -typedef signed char khronos_int8_t; -typedef unsigned char khronos_uint8_t; -typedef signed short int khronos_int16_t; -typedef unsigned short int khronos_uint16_t; - -/* - * Types that differ between LLP64 and LP64 architectures - in LLP64, - * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears - * to be the only LLP64 architecture in current use. - */ -#ifdef _WIN64 -typedef signed long long int khronos_intptr_t; -typedef unsigned long long int khronos_uintptr_t; -typedef signed long long int khronos_ssize_t; -typedef unsigned long long int khronos_usize_t; -#else -typedef signed long int khronos_intptr_t; -typedef unsigned long int khronos_uintptr_t; -typedef signed long int khronos_ssize_t; -typedef unsigned long int khronos_usize_t; -#endif - -#if KHRONOS_SUPPORT_FLOAT -/* - * Float type - */ -typedef float khronos_float_t; -#endif - -#if KHRONOS_SUPPORT_INT64 -/* Time types - * - * These types can be used to represent a time interval in nanoseconds or - * an absolute Unadjusted System Time. Unadjusted System Time is the number - * of nanoseconds since some arbitrary system event (e.g. since the last - * time the system booted). The Unadjusted System Time is an unsigned - * 64 bit value that wraps back to 0 every 584 years. Time intervals - * may be either signed or unsigned. - */ -typedef khronos_uint64_t khronos_utime_nanoseconds_t; -typedef khronos_int64_t khronos_stime_nanoseconds_t; -#endif - -/* - * Dummy value used to pad enum types to 32 bits. - */ -#ifndef KHRONOS_MAX_ENUM -#define KHRONOS_MAX_ENUM 0x7FFFFFFF -#endif - -/* - * Enumerated boolean type - * - * Values other than zero should be considered to be true. Therefore - * comparisons should not be made against KHRONOS_TRUE. - */ -typedef enum { - KHRONOS_FALSE = 0, - KHRONOS_TRUE = 1, - KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM -} khronos_boolean_enum_t; - -#endif /* __khrplatform_h_ */ diff --git a/emscripten/include/pvrsdk/PVRScopeComms.h b/emscripten/include/pvrsdk/PVRScopeComms.h deleted file mode 100644 index 1567efb2..00000000 --- a/emscripten/include/pvrsdk/PVRScopeComms.h +++ /dev/null @@ -1,297 +0,0 @@ -/*!*********************************************************************** - - @file PVRScopeComms.h - @copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved. - @brief PVRScopeComms header file. @copybrief ScopeComms - -**************************************************************************/ - -#ifndef _PVRSCOPECOMMS_H_ -#define _PVRSCOPECOMMS_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -/* - PVRPerfServer and PVRTune communications -*/ - -/*! - @addtogroup ScopeComms PVRScopeComms - @brief The PVRScopeComms functionality of PVRScope allows an application to send user defined information to - PVRTune via PVRPerfServer, both as counters and marks, or as editable data that can be - passed back to the application. - @details PVRScopeComms has the following limitations: - \li PVRPerfServer must be running on the host device if a @ref ScopeComms enabled - application wishes to send custom counters or marks to PVRTune. If the application in - question also wishes to communicate with PVRScopeServices without experiencing any - undesired behaviour PVRPerfServer should be run with the '--disable-hwperf' flag. - \li The following types may be sent: Boolean, Enumerator, Float, Integer, String. - @{ -*/ - -/**************************************************************************** -** Enums -****************************************************************************/ - -/*!************************************************************************** - @enum ESPSCommsLibType - @brief Each editable library item has a data type associated with it -****************************************************************************/ -/// -enum ESPSCommsLibType -{ - eSPSCommsLibTypeString, ///< data is string (NOT NULL-terminated, use length parameter) - eSPSCommsLibTypeFloat, ///< data is SSPSCommsLibraryTypeFloat - eSPSCommsLibTypeInt, ///< data is SSPSCommsLibraryTypeInt - eSPSCommsLibTypeEnum, ///< data is string (NOT NULL-terminated, use length parameter). First line is selection number, subsequent lines are available options. - eSPSCommsLibTypeBool ///< data is SSPSCommsLibraryTypeBool -}; - -/**************************************************************************** -** Structures -****************************************************************************/ - -// Internal implementation data -struct SSPSCommsData; - -/*!************************************************************************** - @struct SSPSCommsLibraryItem - @brief Definition of one editable library item -****************************************************************************/ -struct SSPSCommsLibraryItem -{ - - const char *pszName; ///< Item name. If dots are used, PVRTune could show these as a foldable tree view. - unsigned int nNameLength; ///< Item name length - - enum ESPSCommsLibType eType; ///< Item type - - const char *pData; ///< Item data - unsigned int nDataLength; ///< Item data length -}; - -/*!************************************************************************** - @struct SSPSCommsLibraryTypeFloat - @brief Current, minimum and maximum values for an editable library item of type float -****************************************************************************/ -struct SSPSCommsLibraryTypeFloat -{ - float fCurrent; ///< Current value - float fMin; ///< Minimal value - float fMax; ///< Maximum value -}; - -/*!************************************************************************** - @struct SSPSCommsLibraryTypeInt - @brief Current, minimum and maximum values for an editable library item of type int -****************************************************************************/ -struct SSPSCommsLibraryTypeInt -{ - int nCurrent; ///< Current value - int nMin; ///< Minimal value - int nMax; ///< Maximum value -}; - -/*!************************************************************************** - @struct SSPSCommsLibraryTypeBool - @brief Current value for an editable library item of type bool -****************************************************************************/ -struct SSPSCommsLibraryTypeBool -{ - int nBoolValue; ///< Boolean value (zero = false) -}; - -/*!************************************************************************** - @struct SSPSCommsCounterDef - @brief Definition of one custom counter -****************************************************************************/ -struct SSPSCommsCounterDef -{ - const char *pszName; ///< Custom counter name - unsigned int nNameLength; ///< Custom counter name length -}; - -/**************************************************************************** -** Declarations -****************************************************************************/ - - -/*!************************************************************************** - @brief Initialise @ref ScopeComms - @return @ref ScopeComms data. -****************************************************************************/ -struct SSPSCommsData *pplInitialise( - const char * const psName, ///< String to describe the application - const unsigned int nNameLen ///< String length -); - -/*!************************************************************************** - @brief Shutdown or de-initialise the remote control section of PVRScope. -****************************************************************************/ -void pplShutdown( - struct SSPSCommsData *psData ///< Context data -); - -/*!************************************************************************** - @brief Optional function. Sleeps until there is a connection to - PVRPerfServer, or time-out. Normally, each thread will wait for - its own connection, and each time-out will naturally happen in - parallel. But if a thread happens to have multiple connections, - N, then waiting for them all [in serial] with time-out M would - take N*M ms if they were all to time-out (e.g. PVRPerfServer is - not running); therefore this function, is designed to allow an - entire array of connections to be waited upon simultaneously. -****************************************************************************/ -void pplWaitForConnection( - struct SSPSCommsData * const psData, ///< Array of context data pointers - int * const pnBoolResults, ///< Array of results - false (0) if timeout - const unsigned int nCount, ///< Array length - const unsigned int nTimeOutMS ///< Time-out length in milliseconds -); - -/*!************************************************************************** - @brief Query for the time. Units are microseconds, resolution is undefined. -****************************************************************************/ -unsigned int pplGetTimeUS( - struct SSPSCommsData * const psData ///< Context data -); - -/*!************************************************************************** - @brief Send a time-stamped string marker to be displayed in PVRTune. - @details Examples might be: - \li switching to outdoor renderer - \li starting benchmark test N -****************************************************************************/ -int pplSendMark( - struct SSPSCommsData * const psData, ///< Context data - const char * const psString, ///< String to send - const unsigned int nLen ///< String length -); - -/*!************************************************************************** - @brief Send a time-stamped begin marker to PVRTune. - @details Every begin must at some point be followed by an end; begin/end - pairs can be nested. PVRTune will show these as an activity - timeline, using a "flame graph" style when there is nesting. - See also the CPPLProcessingScoped helper class. -****************************************************************************/ -int pplSendProcessingBegin( - struct SSPSCommsData * const psData, ///< Context data - const char * const psString, ///< Name of the processing block - const unsigned int nLen, ///< String length - const unsigned int nFrame ///< Iteration (or frame) number, by which processes can be grouped. -); - -/*!************************************************************************** - @brief Send a time-stamped end marker to PVRTune. - @details Every begin must at some point be followed by an end; begin/end - pairs can be nested. PVRTune will show these as an activity - timeline, using a "flame graph" style when there is nesting. - See also the CPPLProcessingScoped helper class. -****************************************************************************/ -int pplSendProcessingEnd( - struct SSPSCommsData * const psData ///< Context data -); - -/*!************************************************************************** - @brief Create a library of remotely editable items -****************************************************************************/ -int pplLibraryCreate( - struct SSPSCommsData * const psData, ///< Context data - const struct SSPSCommsLibraryItem * const pItems, ///< Editable items - const unsigned int nItemCount ///< Number of items -); - -/*!************************************************************************** - @brief Query to see whether a library item has been edited, and also - retrieve the new data. -****************************************************************************/ -int pplLibraryDirtyGetFirst( - struct SSPSCommsData * const psData, ///< Context data - unsigned int * const pnItem, ///< Item number - unsigned int * const pnNewDataLen, ///< New data length - const char **ppData ///< New data -); - -/*!************************************************************************** - @brief Specify the number of custom counters and their definitions -****************************************************************************/ -int pplCountersCreate( - struct SSPSCommsData * const psData, ///< Context data - const struct SSPSCommsCounterDef * const psCounterDefs, ///< Counter definitions - const unsigned int nCount ///< Number of counters -); - -/*!************************************************************************** - @brief Send an update for all the custom counters. The - psCounterReadings array must be nCount long. -****************************************************************************/ -int pplCountersUpdate( - struct SSPSCommsData * const psData, ///< Context data - const unsigned int * const psCounterReadings ///< Counter readings array -); - -/*!************************************************************************** - @brief Force a cache flush. - @details Some implementations store data sends in the cache. If the data - rate is low, the real send of data can be significantly - delayed. - If it is necessary to flush the cache, the best results are - likely to be achieved by calling this function with a frequency - between once per second up to once per frame. If data is sent - extremely infrequently, this function could be called once at - the end of each bout of data send. -****************************************************************************/ -int pplSendFlush( - struct SSPSCommsData * const psData ///< Context data -); - -/*! @} */ - -#ifdef __cplusplus -} - -/*!************************************************************************** -@class CPPLProcessingScoped -@brief Helper class which will send a processing begin/end pair around - its scope. You would typically instantiate these at the top of - a function or after the opening curly-brace of a new scope - within a function. -****************************************************************************/ -class CPPLProcessingScoped -{ -protected: - SSPSCommsData * const m_psData; ///< Context data - -public: - CPPLProcessingScoped( - SSPSCommsData * const psData, ///< Context data - const char * const psString, ///< Name of the processing block - const unsigned int nLen, ///< String length - const unsigned int nFrame=0 ///< Iteration (or frame) number, by which processes can be grouped. - ) - : m_psData(psData) - { - if (m_psData) - pplSendProcessingBegin(m_psData, psString, nLen, nFrame); - } - - ~CPPLProcessingScoped() - { - if (m_psData) - pplSendProcessingEnd(m_psData); - } - -private: - CPPLProcessingScoped(const CPPLProcessingScoped&); // Prevent copy-construction - CPPLProcessingScoped& operator=(const CPPLProcessingScoped&); // Prevent assignment -}; -#endif - -#endif /* _PVRSCOPECOMMS_H_ */ - -/***************************************************************************** - End of file (PVRScopeComms.h) -*****************************************************************************/ diff --git a/emscripten/include/pvrsdk/PVRScopeStats.h b/emscripten/include/pvrsdk/PVRScopeStats.h deleted file mode 100644 index a40a2c2b..00000000 --- a/emscripten/include/pvrsdk/PVRScopeStats.h +++ /dev/null @@ -1,282 +0,0 @@ -/*!*********************************************************************** - - @file PVRScopeStats.h - @copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved. - @brief PVRScopeStats header file. @copybrief ScopeStats - -**************************************************************************/ - -/*! @mainpage PVRScope - - @section overview Library Overview -***************************** -PVRScope is a utility library which has two functionalities: - \li @ref ScopeStats is used to access the hardware performance counters in - PowerVR hardware via a driver library called PVRScopeServices. - \li @ref ScopeComms allows an application to send user defined information to - PVRTune via PVRPerfServer, both as counters and marks, or as editable data that can be - passed back to the application. - -PVRScope is supplied in the PVRScope.h header file. Your application also needs to link to the PVRScope -library file, either a .lib, .so, or .dy file, depending on your platform. - -For more information on PVRScope, see the PVRScope User Manual. - - @subsection limitStats PVRScopeStats Limitations -***************************** -@copydetails ScopeStats - - @subsection limitComms PVRScopeComms Limitations -***************************** -@copydetails ScopeComms -*/ - -#ifndef _PVRSCOPESTATS_H_ -#define _PVRSCOPESTATS_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -/*! - @addtogroup ScopeStats PVRScopeStats - @brief The PVRScopeStats functionality of PVRScope is used to access the hardware performance counters in - PowerVR hardware via a driver library called PVRScopeServices. - @details PVRScopeStats has the following limitations: - \li Only one instance of @ref ScopeStats may communicate with PVRScopeServices at any - given time. If a PVRScope enabled application attempts to communicate with - PVRScopeServices at the same time as another such application, or at the same time as - PVRPerfServer, conflicts can occur that may make performance data unreliable. - \li Performance counters can only be read on devices whose drivers have been built with - hardware profiling enabled. This configuration is the default in most production drivers due to negligible overhead. - \li Performance counters contain the average value of that counter since the last time the counter was interrogated. - @{ -*/ - -/**************************************************************************** -** Includes -****************************************************************************/ - -/**************************************************************************** -** Enums -****************************************************************************/ - -/*!************************************************************************** - @enum EPVRScopeInitCode - @brief PVRScope initialisation return codes. -****************************************************************************/ -enum EPVRScopeInitCode -{ - ePVRScopeInitCodeOk, ///< Initialisation OK - ePVRScopeInitCodeOutOfMem, ///< Out of memory - ePVRScopeInitCodeDriverSupportNotFound, ///< Driver support not found - ePVRScopeInitCodeDriverSupportInsufficient, ///< Driver support insufficient - ePVRScopeInitCodeDriverSupportInitFailed, ///< Driver support initialisation failed - ePVRScopeInitCodeDriverSupportQueryInfoFailed ///< Driver support information query failed -}; - -/*!************************************************************************** - @enum EPVRScopeStandardCounter - @brief Set of "standard" counters, just a few of the total list of - counters. -****************************************************************************/ -enum EPVRScopeStandardCounter -{ - ePVRScopeStandardCounter_FPS, ///< Total device FPS - ePVRScopeStandardCounter_Load_2D, ///< 2D core load - ePVRScopeStandardCounter_Load_Renderer, ///< Renderer core load - ePVRScopeStandardCounter_Load_Tiler, ///< Tiler core load - ePVRScopeStandardCounter_Load_Compute, ///< Compute core load - ePVRScopeStandardCounter_Load_Shader_Pixel, ///< Shader core load due to pixels - ePVRScopeStandardCounter_Load_Shader_Vertex, ///< Shader core load due to vertices - ePVRScopeStandardCounter_Load_Shader_Compute, ///< Shader core load due to compute -}; - -/*!************************************************************************** - @enum EPVRScopeEvent - @brief Set of PVRScope event types. -****************************************************************************/ -enum EPVRScopeEvent -{ - ePVRScopeEventComputeBegin, ///< Compute begin - ePVRScopeEventComputeEnd, ///< Compute end - ePVRScopeEventTABegin, ///< TA begin - ePVRScopeEventTAEnd, ///< TA end - ePVRScopeEvent3DBegin, ///< 3D begin - ePVRScopeEvent3DEnd, ///< 3D end - ePVRScopeEvent2DBegin, ///< 2D begin - ePVRScopeEvent2DEnd, ///< 2D end - ePVRScopeEventRTUBegin, ///< RTU begin - ePVRScopeEventRTUEnd, ///< RTU end - ePVRScopeEventSHGBegin, ///< SHG begin - ePVRScopeEventSHGEnd, ///< SHG end -}; - -/**************************************************************************** -** Structures -****************************************************************************/ - -// Internal implementation data -struct SPVRScopeImplData; - -/*!************************************************************************** - @struct SPVRScopeCounterDef - @brief Definition of a counter that PVRScope calculates. -****************************************************************************/ -struct SPVRScopeCounterDef -{ - const char *pszName; ///< Counter name, null terminated - int nBoolPercentage; ///< true if the counter is a percentage - unsigned int nGroup; ///< The counter group that the counter is in. -}; - -/*!************************************************************************** - @struct SPVRScopeCounterReading - @brief A set of return values resulting from querying the counter values. -****************************************************************************/ -struct SPVRScopeCounterReading -{ - float *pfValueBuf; ///< Array of returned values - unsigned int nValueCnt; ///< Number of values set in the above array - unsigned int nReadingActiveGroup; ///< Group that was active when counters were sampled -}; - -/*!************************************************************************** - @struct SPVRScopeGetInfo - @brief A set of return values holding miscellaneous PVRScope information. -****************************************************************************/ -struct SPVRScopeGetInfo -{ - unsigned int nGroupMax; ///< Highest group number of any counter -}; - -/*!************************************************************************** -@struct SPVRScopeTimingPacket -@brief A start or end time. -****************************************************************************/ -struct SPVRScopeTimingPacket -{ - enum EPVRScopeEvent eEventType; ///< Event type - double dTime; ///< Event time (seconds) - unsigned int nPID; ///< Event PID -}; - -/**************************************************************************** -** Declarations -****************************************************************************/ - -const char *PVRScopeGetDescription(); ///< Query the PVRScope library description - - -/*!************************************************************************** - @brief Initialise @ref ScopeStats, to access the HW performance counters in PowerVR. - @return EPVRScopeInitCodeOk on success. -****************************************************************************/ -enum EPVRScopeInitCode PVRScopeInitialise( - struct SPVRScopeImplData **ppsData ///< Context data -); - -/*!************************************************************************** - @brief Shutdown or de-initalise @ref ScopeStats and free the allocated memory. -***************************************************************************/ -void PVRScopeDeInitialise( - struct SPVRScopeImplData **ppsData, ///< Context data - struct SPVRScopeCounterDef **ppsCounters, ///< Array of counters - struct SPVRScopeCounterReading * const psReading ///< Results memory area -); - -/*!************************************************************************** - @brief Query for @ref ScopeStats information. This function should only be called during initialisation. -****************************************************************************/ -void PVRScopeGetInfo( - struct SPVRScopeImplData * const psData, ///< Context data - struct SPVRScopeGetInfo * const psInfo ///< Returned information -); - -/*!************************************************************************** - @brief Query for the list of @ref ScopeStats HW performance counters, and - allocate memory in which the counter values will be received. This function - should only be called during initialisation. -****************************************************************************/ -int PVRScopeGetCounters( - struct SPVRScopeImplData * const psData, ///< Context data - unsigned int * const pnCount, ///< Returned number of counters - struct SPVRScopeCounterDef **ppsCounters, ///< Returned counter array - struct SPVRScopeCounterReading * const psReading ///< Pass a pointer to the structure to be initialised -); - -/*!************************************************************************** - @brief Helper function to query for the counter index of one of a set - of "standard" counters. The index will be into the results array - (from PVRScopeReadCounters) not into the counter array (from - PVRScopeGetCounters) -****************************************************************************/ -unsigned int PVRScopeFindStandardCounter( - const unsigned int nCount, ///< Returned number of counters, from PVRScopeGetCounters - const struct SPVRScopeCounterDef * const psCounters, ///< Returned counter array, from PVRScopeGetCounters - const unsigned int nGroup, ///< Group that will be active - enum EPVRScopeStandardCounter eCounter ///< Counter to be found -); - -/*!************************************************************************** - @brief Call regularly to allow PVRScope to track the latest hardware - performance data. If psReading is not NULL, PVRScope will also - calculate and return counter values to the application. - @details Returns 0 if no data is currently available; psReading will - not be filled with valid data. Try again later. - This function should be called "regularly"; two use cases are - considered: - 1) A 3D application rendering a performance HUD (e.g. the on- - screen graphs in PVRScopeExample). Such an application should - call this function at least once per frame in order to gather - new counter values. If slower HUD updates are desired, - psReading may be NULL until a new reading is required, in - order to smooth out values across longer time periods, perhaps - a number of frames. - 2) A standalone performance monitor (e.g. PVRMonitor) or - logging application. Such an application should idle and - regularly wake up to call this function; suggested rates are - 100Hz (10ms delays) or 200Hz (5ms delays). If counter updates - are required at a lower rate, set psReading to NULL on all - calls except when new counter values are desired. -****************************************************************************/ -int PVRScopeReadCounters( - struct SPVRScopeImplData * const psData, ///< Context data - struct SPVRScopeCounterReading * const psReading ///< Returned data will be filled into the pointed-to structure -); - -/*!************************************************************************** - @brief Request a new HW counter group. - @details Changing the Active HW Group: the API is designed to allow the - HW group to be changed immediately after gathering a reading. -****************************************************************************/ -void PVRScopeSetGroup( - struct SPVRScopeImplData * const psData, ///< Context data - const unsigned int nGroup ///< New group -); - -/*!************************************************************************** - @brief Retrieve the timing data packets. - @details This function can be called periodically if you wish to access - the start and end times of tasks running on the GPU. - The first time this function is called will enable the feature; - from then on data will be stored. If you wish to call this - function once only at the end of a test run, call it once also - prior to the test run. -****************************************************************************/ -const struct SPVRScopeTimingPacket *PVRScopeReadTimingData( - struct SPVRScopeImplData * const psData, ///< Context data - unsigned int * const pnCount ///< Returned number of packets -); - -/*! @} */ - -#ifdef __cplusplus -} -#endif - -#endif /* _PVRSCOPESTATS_H_ */ - -/***************************************************************************** - End of file (PVRScopeStats.h) -*****************************************************************************/ diff --git a/emscripten/include/pvrsdk/pvr_openlib.h b/emscripten/include/pvrsdk/pvr_openlib.h deleted file mode 100644 index 2cc08c9f..00000000 --- a/emscripten/include/pvrsdk/pvr_openlib.h +++ /dev/null @@ -1,413 +0,0 @@ -#pragma once -#include -#include - -#if defined(__linux__) || defined(__ANDROID__) || defined(__QNXNTO__) || defined(__APPLE__) -#include -#include -#endif - -#if defined(_WIN32) -#define WIN32_LEAN_AND_MIN_AND_MAX -#define NOMINMAX -#include -#include -#include -#endif - -#if defined(_PVR_LOG_H) -#define Log_Info(...) ((void)Log(LogLevel::Information, __VA_ARGS__)) -#define Log_Warning(...) ((void)Log(LogLevel::Warning, __VA_ARGS__)) -#define Log_Error(...) ((void)Log(LogLevel::Error, __VA_ARGS__)) -#else -#if defined(__ANDROID__) -#define _ANDROID 1 -#include -#define Log_Info(...) ((void)__android_log_print(ANDROID_LOG_INFO, "com.imgtec.vk", __VA_ARGS__)) -#define Log_Warning(...) ((void)__android_log_print(ANDROID_LOG_WARN, "com.imgtec.vk", __VA_ARGS__)) -#define Log_Error(...) ((void)__android_log_print(ANDROID_LOG_ERROR, "com.imgtec.vk", __VA_ARGS__)) -#elif defined(_WIN32) -static const char* procAddressMessageTypes[] = { - "INFORMATION: ", - "WARNING:", - "ERROR: ", -}; - -inline void logOutput(const int logLevel, const char* const formatString, va_list argumentList) -{ - static char buffer[4096]; - va_list tempList; - memset(buffer, 0, sizeof(buffer)); - -#if (defined _MSC_VER) // Pre VS2013 - tempList = argumentList; -#else - va_copy(tempList, argumentList); -#endif - - vsnprintf(buffer, 4095, formatString, argumentList); - -#if defined(_WIN32) && !defined(_CONSOLE) - if (IsDebuggerPresent()) - { - OutputDebugString(procAddressMessageTypes[logLevel]); - OutputDebugString(buffer); - OutputDebugString("\n"); - } -#else - printf("%s", procAddressMessageTypes[error]); - vprintf(formatString, tempList); - printf("\n"); -#endif -} - -inline void Log_Info(const char* const formatString, ...) -{ - va_list argumentList; - va_start(argumentList, formatString); - logOutput(0, formatString, argumentList); - va_end(argumentList); -} -inline void Log_Warning(const char* const formatString, ...) -{ - va_list argumentList; - va_start(argumentList, formatString); - logOutput(1, formatString, argumentList); - va_end(argumentList); -} -inline void Log_Error(const char* const formatString, ...) -{ - va_list argumentList; - va_start(argumentList, formatString); - logOutput(2, formatString, argumentList); - va_end(argumentList); -} -#else -#define Log_Info(...) ((void)printf(__VA_ARGS__)) -#define Log_Warning(...) ((void)fprintf(stderr, __VA_ARGS__)) -#define Log_Error(...) ((void)fprintf(stderr, __VA_ARGS__)) -#endif -#endif - -/** ABSTRACT THE PLATFORM SPEFCIFIC LIBRARY LOADING FUNCTIONS **/ -#if defined(_WIN32) - -namespace pvr { -namespace lib { -typedef HINSTANCE LIBTYPE; -} -} // namespace pvr - -namespace pvr { -namespace internal { -inline pvr::lib::LIBTYPE OpenLibrary(const char* pszPath) -{ -#if defined(_UNICODE) // UNDER_CE - if (!pszPath) - { - Log_Error("Path must be valid '%s'", pszPath); - return nullptr; - } - - // Get full path of executable - wchar_t pszPathW[_MAX_PATH]; - - // Convert char to wchar - DWORD i = 0; - - for (i = 0; i <= strlen(pszPath); ++i) - { - pszPathW[i] = static_cast(pszPath[i]); - } - - pszPathW[i] = ' '; - pvr::lib::LIBTYPE hostLib = LoadLibraryW(pszPathW); -#else - pvr::lib::LIBTYPE hostLib = LoadLibraryA(pszPath); -#endif - if (!hostLib) - { - Log_Error("Could not load host library '%s'", pszPath); - } - Log_Info("Host library '%s' loaded", pszPath); - return hostLib; -} - -inline void CloseLibrary(pvr::lib::LIBTYPE hostLib) -{ - FreeLibrary(hostLib); -} - -inline void* getLibraryFunction(pvr::lib::LIBTYPE hostLib, const char* pszName) -{ - if (hostLib) - { -#if defined(UNDER_CE) - return win32::GetProcAddressA(hostLib, pszName); -#else - return GetProcAddress(hostLib, pszName); -#endif - } - return nullptr; -} -} // namespace internal -} // namespace pvr -#elif defined(__linux__) || defined(__QNXNTO__) || defined(__APPLE__) -#if defined(__APPLE__) -#if !TARGET_OS_IPHONE -#include "CoreFoundation/CoreFoundation.h" -static const char* g_pszEnvVar = "PVRTRACE_LIB_PATH"; -inline void* OpenFramework(const char* pszPath) -{ - CFBundleRef mainBundle = CFBundleGetMainBundle(); - CFURLRef resourceURL = CFBundleCopyPrivateFrameworksURL(mainBundle); - char path[PATH_MAX]; - if (!CFURLGetFileSystemRepresentation(resourceURL, TRUE, (UInt8*)path, PATH_MAX)) - { - return 0; - } - CFRelease(resourceURL); - - { - void* lib = NULL; - - // --- Set a global environment variable to point to this path (for VFrame usage) - const char* slash = strrchr(pszPath, '/'); - if (slash) - { - char szPath[FILENAME_MAX]; - memset(szPath, 0, sizeof(szPath)); - strncpy(szPath, pszPath, slash - pszPath); - setenv(g_pszEnvVar, szPath, 1); - } - else - { - // Use the current bundle path - std::string framework = std::string(path) + "/../Frameworks/"; - setenv(g_pszEnvVar, framework.c_str(), 1); - } - - // --- Make a temp symlink - char szTempFile[FILENAME_MAX]; - memset(szTempFile, 0, sizeof(szTempFile)); - - char tmpdir[PATH_MAX]; - size_t n = confstr(_CS_DARWIN_USER_TEMP_DIR, tmpdir, sizeof(tmpdir)); - if ((n <= 0) || (n >= sizeof(tmpdir))) - { - strlcpy(tmpdir, getenv("TMPDIR"), sizeof(tmpdir)); - } - - strcat(szTempFile, tmpdir); - strcat(szTempFile, "tmp.XXXXXX"); - - if (mkstemp(szTempFile)) - { - if (symlink(pszPath, szTempFile) == 0) - { - lib = dlopen(szTempFile, RTLD_LAZY | RTLD_GLOBAL); - remove(szTempFile); - } - } - - // --- Can't find the lib? Check the application framework folder instead. - if (!lib) - { - std::string framework = std::string(path) + std::string("/") + pszPath; - lib = dlopen(framework.c_str(), RTLD_LAZY | RTLD_GLOBAL); - - if (!lib) - { - const char* err = dlerror(); - if (err) - { - // NSLog(@"dlopen failed with error: %s => %@", err, framework); - } - } - } - - return lib; - } -} -#endif -#endif - -namespace pvr { -namespace lib { -typedef void* LIBTYPE; -} -} // namespace pvr - -namespace pvr { -namespace internal { -#if defined(__APPLE__) && !TARGET_OS_IPHONE -inline pvr::lib::LIBTYPE OpenLibrary(const char* pszPath) -{ - // An objective-C function that uses dlopen - pvr::lib::LIBTYPE hostLib = OpenFramework(pszPath); - if (!hostLib) - { - Log_Error("Could not load§ host library '%s'", pszPath); - } - Log_Info("Host library '%s' loaded", pszPath); - return hostLib; -} -#else -namespace { -inline pvr::lib::LIBTYPE OpenLibrary_Helper(const char* pszPath) -{ - pvr::lib::LIBTYPE hostLib = dlopen(pszPath, RTLD_LAZY | RTLD_GLOBAL); - if (!hostLib) - { - char pathMod[256]; - strcpy(pathMod, "./"); - strcat(pathMod, pszPath); - - hostLib = dlopen(pathMod, RTLD_LAZY | RTLD_GLOBAL); - } - return hostLib; -} -} // namespace - -inline pvr::lib::LIBTYPE OpenLibrary(const char* pszPath) -{ - size_t start = 0; - std::string tmp; - std::string LibPath(pszPath); - pvr::lib::LIBTYPE hostLib = nullptr; - - while (!hostLib) - { - size_t end = LibPath.find_first_of(';', start); - - if (end == std::string::npos) - { - tmp = LibPath.substr(start, LibPath.length() - start); - } - else - { - tmp = LibPath.substr(start, end - start); - } - - if (!tmp.empty()) - { - hostLib = OpenLibrary_Helper(tmp.c_str()); - - if (!hostLib) - { - // Remove the last character in case a new line character snuck in - tmp = tmp.substr(0, tmp.size() - 1); - hostLib = OpenLibrary_Helper(tmp.c_str()); - } - } - - if (end == std::string::npos) - { - break; - } - - start = end + 1; - } - if (!hostLib) - { - const char* err = dlerror(); - if (err) - { - Log_Error("Could not load host library '%s'", pszPath); - Log_Error("dlopen failed with error '%s'", err); - } - } - Log_Info("Host library '%s' loaded", pszPath); - - return hostLib; -} - -#endif - -inline void CloseLibrary(pvr::lib::LIBTYPE hostLib) -{ - dlclose(hostLib); -} - -inline void* getLibraryFunction(pvr::lib::LIBTYPE hostLib, const char* pszName) -{ - if (hostLib) - { - void* func = dlsym(hostLib, pszName); - return func; - } - return nullptr; -} -} -} // namespace pvr -#elif defined(ANDROID) - -namespace pvr { -namespace internal { -inline pvr::lib::LIBTYPE OpenLibrary(const char* pszPath) -{ - pvr::lib::LIBTYPE hostLib = dlopen(pszPath, RTLD_LAZY | RTLD_GLOBAL); - if (!hostLib) - { - const char* err = dlerror(); - if (err) - { - Log_Error("Could not load host library '%s'", pszPath); - Log_Error("dlopen failed with error '%s'", err); - } - } - Log_Info("Host library '%s' loaded", pszPath); - return hostLib; -} - -inline void CloseLibrary(pvr::lib::LIBTYPE hostLib) -{ - dlclose(hostLib); -} - -inline void* getLibraryFunction(pvr::lib::LIBTYPE hostLib, const char* pszName) -{ - void* fnct = dlsym(hostLib, pszName); - return fnct; -} -} // namespace internal -} // namespace pvr -#else -#error Unsupported platform -#endif - -namespace pvr { -namespace lib { -static pvr::lib::LIBTYPE hostLib = nullptr; -static std::string libraryName; - -static inline pvr::lib::LIBTYPE openlib(const std::string& libName) -{ - libraryName = libName; - hostLib = pvr::internal::OpenLibrary(libName.c_str()); - return hostLib; -} - -static inline void closelib(pvr::lib::LIBTYPE lib) -{ - pvr::internal::CloseLibrary(lib); -} - -template -PtrType_ inline getLibFunction(pvr::lib::LIBTYPE hostLib, const std::string& functionName) -{ - return reinterpret_cast(pvr::internal::getLibraryFunction(hostLib, functionName.c_str())); -} - -template -PtrType_ inline getLibFunctionChecked(pvr::lib::LIBTYPE hostLib, const std::string& functionName) -{ - PtrType_ func = getLibFunction(hostLib, functionName); - if (!func) - { - Log_Error("Failed to load function [%s] from library '%s'.\n", functionName.c_str(), libraryName.c_str()); - } - return func; -} -} // namespace lib -} // namespace pvr diff --git a/emscripten/include/pvrsdk/sdkver.h b/emscripten/include/pvrsdk/sdkver.h deleted file mode 100644 index 92e0ae46..00000000 --- a/emscripten/include/pvrsdk/sdkver.h +++ /dev/null @@ -1,40 +0,0 @@ -/*!*************************************************************************** - @File sdkver.h - - @Title Version numbers and strings. - - @Date 08/11/2011 - - @Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved - - @Platform Independant - - @Description Version numbers and strings for SDK components. - -*****************************************************************************/ - -#ifndef __SDKVER_H_ -#define __SDKVER_H_ - -/*!*************************************************************************** - Defines -*****************************************************************************/ - -#define PVRSDK_VERSION "5.1" -#define PVRSDK_BUILD "18.1@5086772" -#define PVRVERSION_MAJ "18" -#define PVRVERSION_MIN "1" -#define PVRVERSION_BRANCH "181" -#define PVRVERSION_BRANCH_DEC "18.1" -#define PVRVERSION_BRANCH_NAME "REL/18.1" -#define PVRVERSION_BUILD "5086772" -#define PVRVERSION_BUILD_HI "508" -#define PVRVERSION_BUILD_LO "6772" - -#define PVRSDK_COPYRIGHT_TXT "Copyright (c) Imagination Technologies Ltd. All Rights Reserved." - -#endif /* __SDKVER_H_ */ - -/***************************************************************************** - End of file (sdkver.h) -*****************************************************************************/ diff --git a/emscripten/include/pvrsdk/vk_bindings.h b/emscripten/include/pvrsdk/vk_bindings.h deleted file mode 100644 index f9f42dad..00000000 --- a/emscripten/include/pvrsdk/vk_bindings.h +++ /dev/null @@ -1,515 +0,0 @@ -// *** THIS FILE IS GENERATED - DO NOT EDIT *** -// See vk_bindings_generator.py for modifications - -/* -\brief Vk Vulkan function pointers. -\file vk_bindings.h -\author PowerVR by Imagination, Developer Technology Team -\copyright Copyright (c) Imagination Technologies Limited. -*/ - -#pragma once -#ifndef VK_PROTOTYPES -#define VK_NO_PROTOTYPES 1 -#endif -#include "vulkan/vulkan.h" - -typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_GetPhysicalDeviceProcAddr)(VkInstance instance, const char* pName); - -// Vulkan function pointer table -typedef struct VkBindings_ { - - // ---- Before using Vulkan, an application must initialize it by loading the Vulkan commands, and creating a VkInstance object. - - // ---- This function table provides the functions necessary for achieving this. - PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr; - PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties; - PFN_vkEnumerateInstanceLayerProperties vkEnumerateInstanceLayerProperties; - PFN_vkCreateInstance vkCreateInstance; - PFN_vkEnumerateInstanceVersion vkEnumerateInstanceVersion; -} VkBindings; - -// Instance function pointers -typedef struct VkInstanceBindings_ { - // Manually add in vkGetPhysicalDeviceProcAddr entry - PFN_GetPhysicalDeviceProcAddr vkGetPhysicalDeviceProcAddr; - - // ---- Core 1_0 commands - PFN_vkCreateInstance vkCreateInstance; - PFN_vkDestroyInstance vkDestroyInstance; - PFN_vkEnumeratePhysicalDevices vkEnumeratePhysicalDevices; - PFN_vkGetPhysicalDeviceFeatures vkGetPhysicalDeviceFeatures; - PFN_vkGetPhysicalDeviceFormatProperties vkGetPhysicalDeviceFormatProperties; - PFN_vkGetPhysicalDeviceImageFormatProperties vkGetPhysicalDeviceImageFormatProperties; - PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties; - PFN_vkGetPhysicalDeviceQueueFamilyProperties vkGetPhysicalDeviceQueueFamilyProperties; - PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties; - PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr; - PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr; - PFN_vkCreateDevice vkCreateDevice; - PFN_vkEnumerateInstanceExtensionProperties vkEnumerateInstanceExtensionProperties; - PFN_vkEnumerateDeviceExtensionProperties vkEnumerateDeviceExtensionProperties; - PFN_vkEnumerateInstanceLayerProperties vkEnumerateInstanceLayerProperties; - PFN_vkEnumerateDeviceLayerProperties vkEnumerateDeviceLayerProperties; - PFN_vkGetPhysicalDeviceSparseImageFormatProperties vkGetPhysicalDeviceSparseImageFormatProperties; - - // ---- Core 1_1 commands - PFN_vkEnumerateInstanceVersion vkEnumerateInstanceVersion; - PFN_vkEnumeratePhysicalDeviceGroups vkEnumeratePhysicalDeviceGroups; - PFN_vkGetPhysicalDeviceFeatures2 vkGetPhysicalDeviceFeatures2; - PFN_vkGetPhysicalDeviceProperties2 vkGetPhysicalDeviceProperties2; - PFN_vkGetPhysicalDeviceFormatProperties2 vkGetPhysicalDeviceFormatProperties2; - PFN_vkGetPhysicalDeviceImageFormatProperties2 vkGetPhysicalDeviceImageFormatProperties2; - PFN_vkGetPhysicalDeviceQueueFamilyProperties2 vkGetPhysicalDeviceQueueFamilyProperties2; - PFN_vkGetPhysicalDeviceMemoryProperties2 vkGetPhysicalDeviceMemoryProperties2; - PFN_vkGetPhysicalDeviceSparseImageFormatProperties2 vkGetPhysicalDeviceSparseImageFormatProperties2; - PFN_vkGetPhysicalDeviceExternalBufferProperties vkGetPhysicalDeviceExternalBufferProperties; - PFN_vkGetPhysicalDeviceExternalFenceProperties vkGetPhysicalDeviceExternalFenceProperties; - PFN_vkGetPhysicalDeviceExternalSemaphoreProperties vkGetPhysicalDeviceExternalSemaphoreProperties; - - // ---- VK_KHR_surface extension commands - PFN_vkDestroySurfaceKHR vkDestroySurfaceKHR; - PFN_vkGetPhysicalDeviceSurfaceSupportKHR vkGetPhysicalDeviceSurfaceSupportKHR; - PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR vkGetPhysicalDeviceSurfaceCapabilitiesKHR; - PFN_vkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfaceFormatsKHR; - PFN_vkGetPhysicalDeviceSurfacePresentModesKHR vkGetPhysicalDeviceSurfacePresentModesKHR; - - // ---- VK_KHR_swapchain extension commands - PFN_vkGetPhysicalDevicePresentRectanglesKHR vkGetPhysicalDevicePresentRectanglesKHR; - - // ---- VK_KHR_display extension commands - PFN_vkGetPhysicalDeviceDisplayPropertiesKHR vkGetPhysicalDeviceDisplayPropertiesKHR; - PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR vkGetPhysicalDeviceDisplayPlanePropertiesKHR; - PFN_vkGetDisplayPlaneSupportedDisplaysKHR vkGetDisplayPlaneSupportedDisplaysKHR; - PFN_vkGetDisplayModePropertiesKHR vkGetDisplayModePropertiesKHR; - PFN_vkCreateDisplayModeKHR vkCreateDisplayModeKHR; - PFN_vkGetDisplayPlaneCapabilitiesKHR vkGetDisplayPlaneCapabilitiesKHR; - PFN_vkCreateDisplayPlaneSurfaceKHR vkCreateDisplayPlaneSurfaceKHR; - - // ---- VK_KHR_xlib_surface extension commands -#ifdef VK_USE_PLATFORM_XLIB_KHR - PFN_vkCreateXlibSurfaceKHR vkCreateXlibSurfaceKHR; -#endif // VK_USE_PLATFORM_XLIB_KHR -#ifdef VK_USE_PLATFORM_XLIB_KHR - PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR vkGetPhysicalDeviceXlibPresentationSupportKHR; -#endif // VK_USE_PLATFORM_XLIB_KHR - - // ---- VK_KHR_xcb_surface extension commands -#ifdef VK_USE_PLATFORM_XCB_KHR - PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR; -#endif // VK_USE_PLATFORM_XCB_KHR -#ifdef VK_USE_PLATFORM_XCB_KHR - PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR vkGetPhysicalDeviceXcbPresentationSupportKHR; -#endif // VK_USE_PLATFORM_XCB_KHR - - // ---- VK_KHR_wayland_surface extension commands -#ifdef VK_USE_PLATFORM_WAYLAND_KHR - PFN_vkCreateWaylandSurfaceKHR vkCreateWaylandSurfaceKHR; -#endif // VK_USE_PLATFORM_WAYLAND_KHR -#ifdef VK_USE_PLATFORM_WAYLAND_KHR - PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR vkGetPhysicalDeviceWaylandPresentationSupportKHR; -#endif // VK_USE_PLATFORM_WAYLAND_KHR - - // ---- VK_KHR_mir_surface extension commands -#ifdef VK_USE_PLATFORM_MIR_KHR - PFN_vkCreateMirSurfaceKHR vkCreateMirSurfaceKHR; -#endif // VK_USE_PLATFORM_MIR_KHR -#ifdef VK_USE_PLATFORM_MIR_KHR - PFN_vkGetPhysicalDeviceMirPresentationSupportKHR vkGetPhysicalDeviceMirPresentationSupportKHR; -#endif // VK_USE_PLATFORM_MIR_KHR - - // ---- VK_KHR_android_surface extension commands -#ifdef VK_USE_PLATFORM_ANDROID_KHR - PFN_vkCreateAndroidSurfaceKHR vkCreateAndroidSurfaceKHR; -#endif // VK_USE_PLATFORM_ANDROID_KHR - - // ---- VK_KHR_win32_surface extension commands -#ifdef VK_USE_PLATFORM_WIN32_KHR - PFN_vkCreateWin32SurfaceKHR vkCreateWin32SurfaceKHR; -#endif // VK_USE_PLATFORM_WIN32_KHR -#ifdef VK_USE_PLATFORM_WIN32_KHR - PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR vkGetPhysicalDeviceWin32PresentationSupportKHR; -#endif // VK_USE_PLATFORM_WIN32_KHR - - // ---- VK_KHR_get_physical_device_properties2 extension commands - PFN_vkGetPhysicalDeviceFeatures2KHR vkGetPhysicalDeviceFeatures2KHR; - PFN_vkGetPhysicalDeviceProperties2KHR vkGetPhysicalDeviceProperties2KHR; - PFN_vkGetPhysicalDeviceFormatProperties2KHR vkGetPhysicalDeviceFormatProperties2KHR; - PFN_vkGetPhysicalDeviceImageFormatProperties2KHR vkGetPhysicalDeviceImageFormatProperties2KHR; - PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR vkGetPhysicalDeviceQueueFamilyProperties2KHR; - PFN_vkGetPhysicalDeviceMemoryProperties2KHR vkGetPhysicalDeviceMemoryProperties2KHR; - PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR vkGetPhysicalDeviceSparseImageFormatProperties2KHR; - - // ---- VK_KHR_device_group_creation extension commands - PFN_vkEnumeratePhysicalDeviceGroupsKHR vkEnumeratePhysicalDeviceGroupsKHR; - - // ---- VK_KHR_external_memory_capabilities extension commands - PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR vkGetPhysicalDeviceExternalBufferPropertiesKHR; - - // ---- VK_KHR_external_semaphore_capabilities extension commands - PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR vkGetPhysicalDeviceExternalSemaphorePropertiesKHR; - - // ---- VK_KHR_external_fence_capabilities extension commands - PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR vkGetPhysicalDeviceExternalFencePropertiesKHR; - - // ---- VK_KHR_get_surface_capabilities2 extension commands - PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR vkGetPhysicalDeviceSurfaceCapabilities2KHR; - PFN_vkGetPhysicalDeviceSurfaceFormats2KHR vkGetPhysicalDeviceSurfaceFormats2KHR; - - // ---- VK_EXT_debug_report extension commands - PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallbackEXT; - PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallbackEXT; - PFN_vkDebugReportMessageEXT vkDebugReportMessageEXT; - - // ---- VK_NV_external_memory_capabilities extension commands - PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV vkGetPhysicalDeviceExternalImageFormatPropertiesNV; - - // ---- VK_NN_vi_surface extension commands -#ifdef VK_USE_PLATFORM_VI_NN - PFN_vkCreateViSurfaceNN vkCreateViSurfaceNN; -#endif // VK_USE_PLATFORM_VI_NN - - // ---- VK_NVX_device_generated_commands extension commands - PFN_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX; - - // ---- VK_EXT_direct_mode_display extension commands - PFN_vkReleaseDisplayEXT vkReleaseDisplayEXT; - - // ---- VK_EXT_acquire_xlib_display extension commands -#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT - PFN_vkAcquireXlibDisplayEXT vkAcquireXlibDisplayEXT; -#endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT -#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT - PFN_vkGetRandROutputDisplayEXT vkGetRandROutputDisplayEXT; -#endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT - - // ---- VK_EXT_display_surface_counter extension commands - PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT vkGetPhysicalDeviceSurfaceCapabilities2EXT; - - // ---- VK_MVK_ios_surface extension commands -#ifdef VK_USE_PLATFORM_IOS_MVK - PFN_vkCreateIOSSurfaceMVK vkCreateIOSSurfaceMVK; -#endif // VK_USE_PLATFORM_IOS_MVK - - // ---- VK_MVK_macos_surface extension commands -#ifdef VK_USE_PLATFORM_MACOS_MVK - PFN_vkCreateMacOSSurfaceMVK vkCreateMacOSSurfaceMVK; -#endif // VK_USE_PLATFORM_MACOS_MVK - - // ---- VK_EXT_debug_utils extension commands - PFN_vkSetDebugUtilsObjectNameEXT vkSetDebugUtilsObjectNameEXT; - PFN_vkSetDebugUtilsObjectTagEXT vkSetDebugUtilsObjectTagEXT; - PFN_vkQueueBeginDebugUtilsLabelEXT vkQueueBeginDebugUtilsLabelEXT; - PFN_vkQueueEndDebugUtilsLabelEXT vkQueueEndDebugUtilsLabelEXT; - PFN_vkQueueInsertDebugUtilsLabelEXT vkQueueInsertDebugUtilsLabelEXT; - PFN_vkCmdBeginDebugUtilsLabelEXT vkCmdBeginDebugUtilsLabelEXT; - PFN_vkCmdEndDebugUtilsLabelEXT vkCmdEndDebugUtilsLabelEXT; - PFN_vkCmdInsertDebugUtilsLabelEXT vkCmdInsertDebugUtilsLabelEXT; - PFN_vkCreateDebugUtilsMessengerEXT vkCreateDebugUtilsMessengerEXT; - PFN_vkDestroyDebugUtilsMessengerEXT vkDestroyDebugUtilsMessengerEXT; - PFN_vkSubmitDebugUtilsMessageEXT vkSubmitDebugUtilsMessageEXT; - - // ---- VK_EXT_sample_locations extension commands - PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT vkGetPhysicalDeviceMultisamplePropertiesEXT; -} VkInstanceBindings; -// Device function pointers -typedef struct VkDeviceBindings_ { - - // ---- Core 1_0 commands - PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr; - PFN_vkDestroyDevice vkDestroyDevice; - PFN_vkGetDeviceQueue vkGetDeviceQueue; - PFN_vkQueueSubmit vkQueueSubmit; - PFN_vkQueueWaitIdle vkQueueWaitIdle; - PFN_vkDeviceWaitIdle vkDeviceWaitIdle; - PFN_vkAllocateMemory vkAllocateMemory; - PFN_vkFreeMemory vkFreeMemory; - PFN_vkMapMemory vkMapMemory; - PFN_vkUnmapMemory vkUnmapMemory; - PFN_vkFlushMappedMemoryRanges vkFlushMappedMemoryRanges; - PFN_vkInvalidateMappedMemoryRanges vkInvalidateMappedMemoryRanges; - PFN_vkGetDeviceMemoryCommitment vkGetDeviceMemoryCommitment; - PFN_vkBindBufferMemory vkBindBufferMemory; - PFN_vkBindImageMemory vkBindImageMemory; - PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements; - PFN_vkGetImageMemoryRequirements vkGetImageMemoryRequirements; - PFN_vkGetImageSparseMemoryRequirements vkGetImageSparseMemoryRequirements; - PFN_vkQueueBindSparse vkQueueBindSparse; - PFN_vkCreateFence vkCreateFence; - PFN_vkDestroyFence vkDestroyFence; - PFN_vkResetFences vkResetFences; - PFN_vkGetFenceStatus vkGetFenceStatus; - PFN_vkWaitForFences vkWaitForFences; - PFN_vkCreateSemaphore vkCreateSemaphore; - PFN_vkDestroySemaphore vkDestroySemaphore; - PFN_vkCreateEvent vkCreateEvent; - PFN_vkDestroyEvent vkDestroyEvent; - PFN_vkGetEventStatus vkGetEventStatus; - PFN_vkSetEvent vkSetEvent; - PFN_vkResetEvent vkResetEvent; - PFN_vkCreateQueryPool vkCreateQueryPool; - PFN_vkDestroyQueryPool vkDestroyQueryPool; - PFN_vkGetQueryPoolResults vkGetQueryPoolResults; - PFN_vkCreateBuffer vkCreateBuffer; - PFN_vkDestroyBuffer vkDestroyBuffer; - PFN_vkCreateBufferView vkCreateBufferView; - PFN_vkDestroyBufferView vkDestroyBufferView; - PFN_vkCreateImage vkCreateImage; - PFN_vkDestroyImage vkDestroyImage; - PFN_vkGetImageSubresourceLayout vkGetImageSubresourceLayout; - PFN_vkCreateImageView vkCreateImageView; - PFN_vkDestroyImageView vkDestroyImageView; - PFN_vkCreateShaderModule vkCreateShaderModule; - PFN_vkDestroyShaderModule vkDestroyShaderModule; - PFN_vkCreatePipelineCache vkCreatePipelineCache; - PFN_vkDestroyPipelineCache vkDestroyPipelineCache; - PFN_vkGetPipelineCacheData vkGetPipelineCacheData; - PFN_vkMergePipelineCaches vkMergePipelineCaches; - PFN_vkCreateGraphicsPipelines vkCreateGraphicsPipelines; - PFN_vkCreateComputePipelines vkCreateComputePipelines; - PFN_vkDestroyPipeline vkDestroyPipeline; - PFN_vkCreatePipelineLayout vkCreatePipelineLayout; - PFN_vkDestroyPipelineLayout vkDestroyPipelineLayout; - PFN_vkCreateSampler vkCreateSampler; - PFN_vkDestroySampler vkDestroySampler; - PFN_vkCreateDescriptorSetLayout vkCreateDescriptorSetLayout; - PFN_vkDestroyDescriptorSetLayout vkDestroyDescriptorSetLayout; - PFN_vkCreateDescriptorPool vkCreateDescriptorPool; - PFN_vkDestroyDescriptorPool vkDestroyDescriptorPool; - PFN_vkResetDescriptorPool vkResetDescriptorPool; - PFN_vkAllocateDescriptorSets vkAllocateDescriptorSets; - PFN_vkFreeDescriptorSets vkFreeDescriptorSets; - PFN_vkUpdateDescriptorSets vkUpdateDescriptorSets; - PFN_vkCreateFramebuffer vkCreateFramebuffer; - PFN_vkDestroyFramebuffer vkDestroyFramebuffer; - PFN_vkCreateRenderPass vkCreateRenderPass; - PFN_vkDestroyRenderPass vkDestroyRenderPass; - PFN_vkGetRenderAreaGranularity vkGetRenderAreaGranularity; - PFN_vkCreateCommandPool vkCreateCommandPool; - PFN_vkDestroyCommandPool vkDestroyCommandPool; - PFN_vkResetCommandPool vkResetCommandPool; - PFN_vkAllocateCommandBuffers vkAllocateCommandBuffers; - PFN_vkFreeCommandBuffers vkFreeCommandBuffers; - PFN_vkBeginCommandBuffer vkBeginCommandBuffer; - PFN_vkEndCommandBuffer vkEndCommandBuffer; - PFN_vkResetCommandBuffer vkResetCommandBuffer; - PFN_vkCmdBindPipeline vkCmdBindPipeline; - PFN_vkCmdSetViewport vkCmdSetViewport; - PFN_vkCmdSetScissor vkCmdSetScissor; - PFN_vkCmdSetLineWidth vkCmdSetLineWidth; - PFN_vkCmdSetDepthBias vkCmdSetDepthBias; - PFN_vkCmdSetBlendConstants vkCmdSetBlendConstants; - PFN_vkCmdSetDepthBounds vkCmdSetDepthBounds; - PFN_vkCmdSetStencilCompareMask vkCmdSetStencilCompareMask; - PFN_vkCmdSetStencilWriteMask vkCmdSetStencilWriteMask; - PFN_vkCmdSetStencilReference vkCmdSetStencilReference; - PFN_vkCmdBindDescriptorSets vkCmdBindDescriptorSets; - PFN_vkCmdBindIndexBuffer vkCmdBindIndexBuffer; - PFN_vkCmdBindVertexBuffers vkCmdBindVertexBuffers; - PFN_vkCmdDraw vkCmdDraw; - PFN_vkCmdDrawIndexed vkCmdDrawIndexed; - PFN_vkCmdDrawIndirect vkCmdDrawIndirect; - PFN_vkCmdDrawIndexedIndirect vkCmdDrawIndexedIndirect; - PFN_vkCmdDispatch vkCmdDispatch; - PFN_vkCmdDispatchIndirect vkCmdDispatchIndirect; - PFN_vkCmdCopyBuffer vkCmdCopyBuffer; - PFN_vkCmdCopyImage vkCmdCopyImage; - PFN_vkCmdBlitImage vkCmdBlitImage; - PFN_vkCmdCopyBufferToImage vkCmdCopyBufferToImage; - PFN_vkCmdCopyImageToBuffer vkCmdCopyImageToBuffer; - PFN_vkCmdUpdateBuffer vkCmdUpdateBuffer; - PFN_vkCmdFillBuffer vkCmdFillBuffer; - PFN_vkCmdClearColorImage vkCmdClearColorImage; - PFN_vkCmdClearDepthStencilImage vkCmdClearDepthStencilImage; - PFN_vkCmdClearAttachments vkCmdClearAttachments; - PFN_vkCmdResolveImage vkCmdResolveImage; - PFN_vkCmdSetEvent vkCmdSetEvent; - PFN_vkCmdResetEvent vkCmdResetEvent; - PFN_vkCmdWaitEvents vkCmdWaitEvents; - PFN_vkCmdPipelineBarrier vkCmdPipelineBarrier; - PFN_vkCmdBeginQuery vkCmdBeginQuery; - PFN_vkCmdEndQuery vkCmdEndQuery; - PFN_vkCmdResetQueryPool vkCmdResetQueryPool; - PFN_vkCmdWriteTimestamp vkCmdWriteTimestamp; - PFN_vkCmdCopyQueryPoolResults vkCmdCopyQueryPoolResults; - PFN_vkCmdPushConstants vkCmdPushConstants; - PFN_vkCmdBeginRenderPass vkCmdBeginRenderPass; - PFN_vkCmdNextSubpass vkCmdNextSubpass; - PFN_vkCmdEndRenderPass vkCmdEndRenderPass; - PFN_vkCmdExecuteCommands vkCmdExecuteCommands; - - // ---- Core 1_1 commands - PFN_vkBindBufferMemory2 vkBindBufferMemory2; - PFN_vkBindImageMemory2 vkBindImageMemory2; - PFN_vkGetDeviceGroupPeerMemoryFeatures vkGetDeviceGroupPeerMemoryFeatures; - PFN_vkCmdSetDeviceMask vkCmdSetDeviceMask; - PFN_vkCmdDispatchBase vkCmdDispatchBase; - PFN_vkGetImageMemoryRequirements2 vkGetImageMemoryRequirements2; - PFN_vkGetBufferMemoryRequirements2 vkGetBufferMemoryRequirements2; - PFN_vkGetImageSparseMemoryRequirements2 vkGetImageSparseMemoryRequirements2; - PFN_vkTrimCommandPool vkTrimCommandPool; - PFN_vkGetDeviceQueue2 vkGetDeviceQueue2; - PFN_vkCreateSamplerYcbcrConversion vkCreateSamplerYcbcrConversion; - PFN_vkDestroySamplerYcbcrConversion vkDestroySamplerYcbcrConversion; - PFN_vkCreateDescriptorUpdateTemplate vkCreateDescriptorUpdateTemplate; - PFN_vkDestroyDescriptorUpdateTemplate vkDestroyDescriptorUpdateTemplate; - PFN_vkUpdateDescriptorSetWithTemplate vkUpdateDescriptorSetWithTemplate; - PFN_vkGetDescriptorSetLayoutSupport vkGetDescriptorSetLayoutSupport; - - // ---- VK_KHR_swapchain extension commands - PFN_vkCreateSwapchainKHR vkCreateSwapchainKHR; - PFN_vkDestroySwapchainKHR vkDestroySwapchainKHR; - PFN_vkGetSwapchainImagesKHR vkGetSwapchainImagesKHR; - PFN_vkAcquireNextImageKHR vkAcquireNextImageKHR; - PFN_vkQueuePresentKHR vkQueuePresentKHR; - PFN_vkGetDeviceGroupPresentCapabilitiesKHR vkGetDeviceGroupPresentCapabilitiesKHR; - PFN_vkGetDeviceGroupSurfacePresentModesKHR vkGetDeviceGroupSurfacePresentModesKHR; - PFN_vkAcquireNextImage2KHR vkAcquireNextImage2KHR; - - // ---- VK_KHR_display_swapchain extension commands - PFN_vkCreateSharedSwapchainsKHR vkCreateSharedSwapchainsKHR; - - // ---- VK_KHR_device_group extension commands - PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR vkGetDeviceGroupPeerMemoryFeaturesKHR; - PFN_vkCmdSetDeviceMaskKHR vkCmdSetDeviceMaskKHR; - PFN_vkCmdDispatchBaseKHR vkCmdDispatchBaseKHR; - - // ---- VK_KHR_maintenance1 extension commands - PFN_vkTrimCommandPoolKHR vkTrimCommandPoolKHR; - - // ---- VK_KHR_external_memory_win32 extension commands -#ifdef VK_USE_PLATFORM_WIN32_KHR - PFN_vkGetMemoryWin32HandleKHR vkGetMemoryWin32HandleKHR; -#endif // VK_USE_PLATFORM_WIN32_KHR -#ifdef VK_USE_PLATFORM_WIN32_KHR - PFN_vkGetMemoryWin32HandlePropertiesKHR vkGetMemoryWin32HandlePropertiesKHR; -#endif // VK_USE_PLATFORM_WIN32_KHR - - // ---- VK_KHR_external_memory_fd extension commands - PFN_vkGetMemoryFdKHR vkGetMemoryFdKHR; - PFN_vkGetMemoryFdPropertiesKHR vkGetMemoryFdPropertiesKHR; - - // ---- VK_KHR_external_semaphore_win32 extension commands -#ifdef VK_USE_PLATFORM_WIN32_KHR - PFN_vkImportSemaphoreWin32HandleKHR vkImportSemaphoreWin32HandleKHR; -#endif // VK_USE_PLATFORM_WIN32_KHR -#ifdef VK_USE_PLATFORM_WIN32_KHR - PFN_vkGetSemaphoreWin32HandleKHR vkGetSemaphoreWin32HandleKHR; -#endif // VK_USE_PLATFORM_WIN32_KHR - - // ---- VK_KHR_external_semaphore_fd extension commands - PFN_vkImportSemaphoreFdKHR vkImportSemaphoreFdKHR; - PFN_vkGetSemaphoreFdKHR vkGetSemaphoreFdKHR; - - // ---- VK_KHR_push_descriptor extension commands - PFN_vkCmdPushDescriptorSetKHR vkCmdPushDescriptorSetKHR; - PFN_vkCmdPushDescriptorSetWithTemplateKHR vkCmdPushDescriptorSetWithTemplateKHR; - - // ---- VK_KHR_descriptor_update_template extension commands - PFN_vkCreateDescriptorUpdateTemplateKHR vkCreateDescriptorUpdateTemplateKHR; - PFN_vkDestroyDescriptorUpdateTemplateKHR vkDestroyDescriptorUpdateTemplateKHR; - PFN_vkUpdateDescriptorSetWithTemplateKHR vkUpdateDescriptorSetWithTemplateKHR; - - // ---- VK_KHR_shared_presentable_image extension commands - PFN_vkGetSwapchainStatusKHR vkGetSwapchainStatusKHR; - - // ---- VK_KHR_external_fence_win32 extension commands -#ifdef VK_USE_PLATFORM_WIN32_KHR - PFN_vkImportFenceWin32HandleKHR vkImportFenceWin32HandleKHR; -#endif // VK_USE_PLATFORM_WIN32_KHR -#ifdef VK_USE_PLATFORM_WIN32_KHR - PFN_vkGetFenceWin32HandleKHR vkGetFenceWin32HandleKHR; -#endif // VK_USE_PLATFORM_WIN32_KHR - - // ---- VK_KHR_external_fence_fd extension commands - PFN_vkImportFenceFdKHR vkImportFenceFdKHR; - PFN_vkGetFenceFdKHR vkGetFenceFdKHR; - - // ---- VK_KHR_get_memory_requirements2 extension commands - PFN_vkGetImageMemoryRequirements2KHR vkGetImageMemoryRequirements2KHR; - PFN_vkGetBufferMemoryRequirements2KHR vkGetBufferMemoryRequirements2KHR; - PFN_vkGetImageSparseMemoryRequirements2KHR vkGetImageSparseMemoryRequirements2KHR; - - // ---- VK_KHR_sampler_ycbcr_conversion extension commands - PFN_vkCreateSamplerYcbcrConversionKHR vkCreateSamplerYcbcrConversionKHR; - PFN_vkDestroySamplerYcbcrConversionKHR vkDestroySamplerYcbcrConversionKHR; - - // ---- VK_KHR_bind_memory2 extension commands - PFN_vkBindBufferMemory2KHR vkBindBufferMemory2KHR; - PFN_vkBindImageMemory2KHR vkBindImageMemory2KHR; - - // ---- VK_KHR_maintenance3 extension commands - PFN_vkGetDescriptorSetLayoutSupportKHR vkGetDescriptorSetLayoutSupportKHR; - - // ---- VK_EXT_debug_marker extension commands - PFN_vkDebugMarkerSetObjectTagEXT vkDebugMarkerSetObjectTagEXT; - PFN_vkDebugMarkerSetObjectNameEXT vkDebugMarkerSetObjectNameEXT; - PFN_vkCmdDebugMarkerBeginEXT vkCmdDebugMarkerBeginEXT; - PFN_vkCmdDebugMarkerEndEXT vkCmdDebugMarkerEndEXT; - PFN_vkCmdDebugMarkerInsertEXT vkCmdDebugMarkerInsertEXT; - - // ---- VK_AMD_draw_indirect_count extension commands - PFN_vkCmdDrawIndirectCountAMD vkCmdDrawIndirectCountAMD; - PFN_vkCmdDrawIndexedIndirectCountAMD vkCmdDrawIndexedIndirectCountAMD; - - // ---- VK_AMD_shader_info extension commands - PFN_vkGetShaderInfoAMD vkGetShaderInfoAMD; - - // ---- VK_NV_external_memory_win32 extension commands -#ifdef VK_USE_PLATFORM_WIN32_KHR - PFN_vkGetMemoryWin32HandleNV vkGetMemoryWin32HandleNV; -#endif // VK_USE_PLATFORM_WIN32_KHR - - // ---- VK_NVX_device_generated_commands extension commands - PFN_vkCmdProcessCommandsNVX vkCmdProcessCommandsNVX; - PFN_vkCmdReserveSpaceForCommandsNVX vkCmdReserveSpaceForCommandsNVX; - PFN_vkCreateIndirectCommandsLayoutNVX vkCreateIndirectCommandsLayoutNVX; - PFN_vkDestroyIndirectCommandsLayoutNVX vkDestroyIndirectCommandsLayoutNVX; - PFN_vkCreateObjectTableNVX vkCreateObjectTableNVX; - PFN_vkDestroyObjectTableNVX vkDestroyObjectTableNVX; - PFN_vkRegisterObjectsNVX vkRegisterObjectsNVX; - PFN_vkUnregisterObjectsNVX vkUnregisterObjectsNVX; - - // ---- VK_NV_clip_space_w_scaling extension commands - PFN_vkCmdSetViewportWScalingNV vkCmdSetViewportWScalingNV; - - // ---- VK_EXT_display_control extension commands - PFN_vkDisplayPowerControlEXT vkDisplayPowerControlEXT; - PFN_vkRegisterDeviceEventEXT vkRegisterDeviceEventEXT; - PFN_vkRegisterDisplayEventEXT vkRegisterDisplayEventEXT; - PFN_vkGetSwapchainCounterEXT vkGetSwapchainCounterEXT; - - // ---- VK_GOOGLE_display_timing extension commands - PFN_vkGetRefreshCycleDurationGOOGLE vkGetRefreshCycleDurationGOOGLE; - PFN_vkGetPastPresentationTimingGOOGLE vkGetPastPresentationTimingGOOGLE; - - // ---- VK_EXT_discard_rectangles extension commands - PFN_vkCmdSetDiscardRectangleEXT vkCmdSetDiscardRectangleEXT; - - // ---- VK_EXT_hdr_metadata extension commands - PFN_vkSetHdrMetadataEXT vkSetHdrMetadataEXT; - - // ---- VK_ANDROID_external_memory_android_hardware_buffer extension commands -#ifdef VK_USE_PLATFORM_ANDROID_KHR - PFN_vkGetAndroidHardwareBufferPropertiesANDROID vkGetAndroidHardwareBufferPropertiesANDROID; -#endif // VK_USE_PLATFORM_ANDROID_KHR -#ifdef VK_USE_PLATFORM_ANDROID_KHR - PFN_vkGetMemoryAndroidHardwareBufferANDROID vkGetMemoryAndroidHardwareBufferANDROID; -#endif // VK_USE_PLATFORM_ANDROID_KHR - - // ---- VK_EXT_sample_locations extension commands - PFN_vkCmdSetSampleLocationsEXT vkCmdSetSampleLocationsEXT; - - // ---- VK_EXT_validation_cache extension commands - PFN_vkCreateValidationCacheEXT vkCreateValidationCacheEXT; - PFN_vkDestroyValidationCacheEXT vkDestroyValidationCacheEXT; - PFN_vkMergeValidationCachesEXT vkMergeValidationCachesEXT; - PFN_vkGetValidationCacheDataEXT vkGetValidationCacheDataEXT; - - // ---- VK_EXT_external_memory_host extension commands - PFN_vkGetMemoryHostPointerPropertiesEXT vkGetMemoryHostPointerPropertiesEXT; - - // ---- VK_AMD_buffer_marker extension commands - PFN_vkCmdWriteBufferMarkerAMD vkCmdWriteBufferMarkerAMD; -} VkDeviceBindings; - diff --git a/emscripten/include/pvrsdk/vk_bindings_helper.h b/emscripten/include/pvrsdk/vk_bindings_helper.h deleted file mode 100644 index 4df4e1fa..00000000 --- a/emscripten/include/pvrsdk/vk_bindings_helper.h +++ /dev/null @@ -1,410 +0,0 @@ -// *** THIS FILE IS GENERATED - DO NOT EDIT *** -// See vk_bindings_helper_generator.py for modifications - -/* -\brief Helper functions for filling vk bindings function pointer tables. -\file vk_bindings_helper.h -\author PowerVR by Imagination, Developer Technology Team -\copyright Copyright (c) Imagination Technologies Limited. -*/ - -#pragma once -#include -#include -#include "pvr_openlib.h" -#include "vk_bindings.h" - -namespace vk { -namespace internal { -/** DEFINE THE PLATFORM SPECIFIC LIBRARY NAME **/ -#ifdef _WIN32 -static const char* libName = "vulkan-1.dll"; -#elif defined(TARGET_OS_MAC) -static const char* libName = "libvulkan.dylib"; -#else -static const char* libName = "libvulkan.so.1;libvulkan.so"; -#endif -} -} - -static inline bool initVkBindings(VkBindings *bindings) -{ - pvr::lib::LIBTYPE lib = pvr::lib::openlib(vk::internal::libName); - - memset(bindings, 0, sizeof(*bindings)); - - // Load the function pointer dynamically for vkGetInstanceProcAddr - bindings->vkGetInstanceProcAddr = pvr::lib::getLibFunctionChecked(lib, "vkGetInstanceProcAddr"); - - // Use vkGetInstanceProcAddr with a NULL instance to retrieve the function pointers - bindings->vkEnumerateInstanceExtensionProperties = (PFN_vkEnumerateInstanceExtensionProperties)bindings->vkGetInstanceProcAddr(NULL, "vkEnumerateInstanceExtensionProperties"); - bindings->vkEnumerateInstanceLayerProperties = (PFN_vkEnumerateInstanceLayerProperties)bindings->vkGetInstanceProcAddr(NULL, "vkEnumerateInstanceLayerProperties"); - bindings->vkCreateInstance = (PFN_vkCreateInstance)bindings->vkGetInstanceProcAddr(NULL, "vkCreateInstance"); - bindings->vkEnumerateInstanceVersion = (PFN_vkEnumerateInstanceVersion)bindings->vkGetInstanceProcAddr(NULL, "vkEnumerateInstanceVersion"); - - // validate that we have all necessary function pointers to continue - if (!bindings->vkEnumerateInstanceExtensionProperties || !bindings->vkEnumerateInstanceLayerProperties || !bindings->vkCreateInstance) - { - return false; - } - return true; -} - - -static inline void initVkDeviceBindings(VkDevice device, VkDeviceBindings *bindings, PFN_vkGetDeviceProcAddr getDeviceProcAddress) { - memset(bindings, 0, sizeof(*bindings)); - // Device function pointers - bindings->vkGetDeviceProcAddr = getDeviceProcAddress; - bindings->vkDestroyDevice = (PFN_vkDestroyDevice) getDeviceProcAddress(device, "vkDestroyDevice"); - bindings->vkGetDeviceQueue = (PFN_vkGetDeviceQueue) getDeviceProcAddress(device, "vkGetDeviceQueue"); - bindings->vkQueueSubmit = (PFN_vkQueueSubmit) getDeviceProcAddress(device, "vkQueueSubmit"); - bindings->vkQueueWaitIdle = (PFN_vkQueueWaitIdle) getDeviceProcAddress(device, "vkQueueWaitIdle"); - bindings->vkDeviceWaitIdle = (PFN_vkDeviceWaitIdle) getDeviceProcAddress(device, "vkDeviceWaitIdle"); - bindings->vkAllocateMemory = (PFN_vkAllocateMemory) getDeviceProcAddress(device, "vkAllocateMemory"); - bindings->vkFreeMemory = (PFN_vkFreeMemory) getDeviceProcAddress(device, "vkFreeMemory"); - bindings->vkMapMemory = (PFN_vkMapMemory) getDeviceProcAddress(device, "vkMapMemory"); - bindings->vkUnmapMemory = (PFN_vkUnmapMemory) getDeviceProcAddress(device, "vkUnmapMemory"); - bindings->vkFlushMappedMemoryRanges = (PFN_vkFlushMappedMemoryRanges) getDeviceProcAddress(device, "vkFlushMappedMemoryRanges"); - bindings->vkInvalidateMappedMemoryRanges = (PFN_vkInvalidateMappedMemoryRanges) getDeviceProcAddress(device, "vkInvalidateMappedMemoryRanges"); - bindings->vkGetDeviceMemoryCommitment = (PFN_vkGetDeviceMemoryCommitment) getDeviceProcAddress(device, "vkGetDeviceMemoryCommitment"); - bindings->vkBindBufferMemory = (PFN_vkBindBufferMemory) getDeviceProcAddress(device, "vkBindBufferMemory"); - bindings->vkBindImageMemory = (PFN_vkBindImageMemory) getDeviceProcAddress(device, "vkBindImageMemory"); - bindings->vkGetBufferMemoryRequirements = (PFN_vkGetBufferMemoryRequirements) getDeviceProcAddress(device, "vkGetBufferMemoryRequirements"); - bindings->vkGetImageMemoryRequirements = (PFN_vkGetImageMemoryRequirements) getDeviceProcAddress(device, "vkGetImageMemoryRequirements"); - bindings->vkGetImageSparseMemoryRequirements = (PFN_vkGetImageSparseMemoryRequirements) getDeviceProcAddress(device, "vkGetImageSparseMemoryRequirements"); - bindings->vkQueueBindSparse = (PFN_vkQueueBindSparse) getDeviceProcAddress(device, "vkQueueBindSparse"); - bindings->vkCreateFence = (PFN_vkCreateFence) getDeviceProcAddress(device, "vkCreateFence"); - bindings->vkDestroyFence = (PFN_vkDestroyFence) getDeviceProcAddress(device, "vkDestroyFence"); - bindings->vkResetFences = (PFN_vkResetFences) getDeviceProcAddress(device, "vkResetFences"); - bindings->vkGetFenceStatus = (PFN_vkGetFenceStatus) getDeviceProcAddress(device, "vkGetFenceStatus"); - bindings->vkWaitForFences = (PFN_vkWaitForFences) getDeviceProcAddress(device, "vkWaitForFences"); - bindings->vkCreateSemaphore = (PFN_vkCreateSemaphore) getDeviceProcAddress(device, "vkCreateSemaphore"); - bindings->vkDestroySemaphore = (PFN_vkDestroySemaphore) getDeviceProcAddress(device, "vkDestroySemaphore"); - bindings->vkCreateEvent = (PFN_vkCreateEvent) getDeviceProcAddress(device, "vkCreateEvent"); - bindings->vkDestroyEvent = (PFN_vkDestroyEvent) getDeviceProcAddress(device, "vkDestroyEvent"); - bindings->vkGetEventStatus = (PFN_vkGetEventStatus) getDeviceProcAddress(device, "vkGetEventStatus"); - bindings->vkSetEvent = (PFN_vkSetEvent) getDeviceProcAddress(device, "vkSetEvent"); - bindings->vkResetEvent = (PFN_vkResetEvent) getDeviceProcAddress(device, "vkResetEvent"); - bindings->vkCreateQueryPool = (PFN_vkCreateQueryPool) getDeviceProcAddress(device, "vkCreateQueryPool"); - bindings->vkDestroyQueryPool = (PFN_vkDestroyQueryPool) getDeviceProcAddress(device, "vkDestroyQueryPool"); - bindings->vkGetQueryPoolResults = (PFN_vkGetQueryPoolResults) getDeviceProcAddress(device, "vkGetQueryPoolResults"); - bindings->vkCreateBuffer = (PFN_vkCreateBuffer) getDeviceProcAddress(device, "vkCreateBuffer"); - bindings->vkDestroyBuffer = (PFN_vkDestroyBuffer) getDeviceProcAddress(device, "vkDestroyBuffer"); - bindings->vkCreateBufferView = (PFN_vkCreateBufferView) getDeviceProcAddress(device, "vkCreateBufferView"); - bindings->vkDestroyBufferView = (PFN_vkDestroyBufferView) getDeviceProcAddress(device, "vkDestroyBufferView"); - bindings->vkCreateImage = (PFN_vkCreateImage) getDeviceProcAddress(device, "vkCreateImage"); - bindings->vkDestroyImage = (PFN_vkDestroyImage) getDeviceProcAddress(device, "vkDestroyImage"); - bindings->vkGetImageSubresourceLayout = (PFN_vkGetImageSubresourceLayout) getDeviceProcAddress(device, "vkGetImageSubresourceLayout"); - bindings->vkCreateImageView = (PFN_vkCreateImageView) getDeviceProcAddress(device, "vkCreateImageView"); - bindings->vkDestroyImageView = (PFN_vkDestroyImageView) getDeviceProcAddress(device, "vkDestroyImageView"); - bindings->vkCreateShaderModule = (PFN_vkCreateShaderModule) getDeviceProcAddress(device, "vkCreateShaderModule"); - bindings->vkDestroyShaderModule = (PFN_vkDestroyShaderModule) getDeviceProcAddress(device, "vkDestroyShaderModule"); - bindings->vkCreatePipelineCache = (PFN_vkCreatePipelineCache) getDeviceProcAddress(device, "vkCreatePipelineCache"); - bindings->vkDestroyPipelineCache = (PFN_vkDestroyPipelineCache) getDeviceProcAddress(device, "vkDestroyPipelineCache"); - bindings->vkGetPipelineCacheData = (PFN_vkGetPipelineCacheData) getDeviceProcAddress(device, "vkGetPipelineCacheData"); - bindings->vkMergePipelineCaches = (PFN_vkMergePipelineCaches) getDeviceProcAddress(device, "vkMergePipelineCaches"); - bindings->vkCreateGraphicsPipelines = (PFN_vkCreateGraphicsPipelines) getDeviceProcAddress(device, "vkCreateGraphicsPipelines"); - bindings->vkCreateComputePipelines = (PFN_vkCreateComputePipelines) getDeviceProcAddress(device, "vkCreateComputePipelines"); - bindings->vkDestroyPipeline = (PFN_vkDestroyPipeline) getDeviceProcAddress(device, "vkDestroyPipeline"); - bindings->vkCreatePipelineLayout = (PFN_vkCreatePipelineLayout) getDeviceProcAddress(device, "vkCreatePipelineLayout"); - bindings->vkDestroyPipelineLayout = (PFN_vkDestroyPipelineLayout) getDeviceProcAddress(device, "vkDestroyPipelineLayout"); - bindings->vkCreateSampler = (PFN_vkCreateSampler) getDeviceProcAddress(device, "vkCreateSampler"); - bindings->vkDestroySampler = (PFN_vkDestroySampler) getDeviceProcAddress(device, "vkDestroySampler"); - bindings->vkCreateDescriptorSetLayout = (PFN_vkCreateDescriptorSetLayout) getDeviceProcAddress(device, "vkCreateDescriptorSetLayout"); - bindings->vkDestroyDescriptorSetLayout = (PFN_vkDestroyDescriptorSetLayout) getDeviceProcAddress(device, "vkDestroyDescriptorSetLayout"); - bindings->vkCreateDescriptorPool = (PFN_vkCreateDescriptorPool) getDeviceProcAddress(device, "vkCreateDescriptorPool"); - bindings->vkDestroyDescriptorPool = (PFN_vkDestroyDescriptorPool) getDeviceProcAddress(device, "vkDestroyDescriptorPool"); - bindings->vkResetDescriptorPool = (PFN_vkResetDescriptorPool) getDeviceProcAddress(device, "vkResetDescriptorPool"); - bindings->vkAllocateDescriptorSets = (PFN_vkAllocateDescriptorSets) getDeviceProcAddress(device, "vkAllocateDescriptorSets"); - bindings->vkFreeDescriptorSets = (PFN_vkFreeDescriptorSets) getDeviceProcAddress(device, "vkFreeDescriptorSets"); - bindings->vkUpdateDescriptorSets = (PFN_vkUpdateDescriptorSets) getDeviceProcAddress(device, "vkUpdateDescriptorSets"); - bindings->vkCreateFramebuffer = (PFN_vkCreateFramebuffer) getDeviceProcAddress(device, "vkCreateFramebuffer"); - bindings->vkDestroyFramebuffer = (PFN_vkDestroyFramebuffer) getDeviceProcAddress(device, "vkDestroyFramebuffer"); - bindings->vkCreateRenderPass = (PFN_vkCreateRenderPass) getDeviceProcAddress(device, "vkCreateRenderPass"); - bindings->vkDestroyRenderPass = (PFN_vkDestroyRenderPass) getDeviceProcAddress(device, "vkDestroyRenderPass"); - bindings->vkGetRenderAreaGranularity = (PFN_vkGetRenderAreaGranularity) getDeviceProcAddress(device, "vkGetRenderAreaGranularity"); - bindings->vkCreateCommandPool = (PFN_vkCreateCommandPool) getDeviceProcAddress(device, "vkCreateCommandPool"); - bindings->vkDestroyCommandPool = (PFN_vkDestroyCommandPool) getDeviceProcAddress(device, "vkDestroyCommandPool"); - bindings->vkResetCommandPool = (PFN_vkResetCommandPool) getDeviceProcAddress(device, "vkResetCommandPool"); - bindings->vkAllocateCommandBuffers = (PFN_vkAllocateCommandBuffers) getDeviceProcAddress(device, "vkAllocateCommandBuffers"); - bindings->vkFreeCommandBuffers = (PFN_vkFreeCommandBuffers) getDeviceProcAddress(device, "vkFreeCommandBuffers"); - bindings->vkBeginCommandBuffer = (PFN_vkBeginCommandBuffer) getDeviceProcAddress(device, "vkBeginCommandBuffer"); - bindings->vkEndCommandBuffer = (PFN_vkEndCommandBuffer) getDeviceProcAddress(device, "vkEndCommandBuffer"); - bindings->vkResetCommandBuffer = (PFN_vkResetCommandBuffer) getDeviceProcAddress(device, "vkResetCommandBuffer"); - bindings->vkCmdBindPipeline = (PFN_vkCmdBindPipeline) getDeviceProcAddress(device, "vkCmdBindPipeline"); - bindings->vkCmdSetViewport = (PFN_vkCmdSetViewport) getDeviceProcAddress(device, "vkCmdSetViewport"); - bindings->vkCmdSetScissor = (PFN_vkCmdSetScissor) getDeviceProcAddress(device, "vkCmdSetScissor"); - bindings->vkCmdSetLineWidth = (PFN_vkCmdSetLineWidth) getDeviceProcAddress(device, "vkCmdSetLineWidth"); - bindings->vkCmdSetDepthBias = (PFN_vkCmdSetDepthBias) getDeviceProcAddress(device, "vkCmdSetDepthBias"); - bindings->vkCmdSetBlendConstants = (PFN_vkCmdSetBlendConstants) getDeviceProcAddress(device, "vkCmdSetBlendConstants"); - bindings->vkCmdSetDepthBounds = (PFN_vkCmdSetDepthBounds) getDeviceProcAddress(device, "vkCmdSetDepthBounds"); - bindings->vkCmdSetStencilCompareMask = (PFN_vkCmdSetStencilCompareMask) getDeviceProcAddress(device, "vkCmdSetStencilCompareMask"); - bindings->vkCmdSetStencilWriteMask = (PFN_vkCmdSetStencilWriteMask) getDeviceProcAddress(device, "vkCmdSetStencilWriteMask"); - bindings->vkCmdSetStencilReference = (PFN_vkCmdSetStencilReference) getDeviceProcAddress(device, "vkCmdSetStencilReference"); - bindings->vkCmdBindDescriptorSets = (PFN_vkCmdBindDescriptorSets) getDeviceProcAddress(device, "vkCmdBindDescriptorSets"); - bindings->vkCmdBindIndexBuffer = (PFN_vkCmdBindIndexBuffer) getDeviceProcAddress(device, "vkCmdBindIndexBuffer"); - bindings->vkCmdBindVertexBuffers = (PFN_vkCmdBindVertexBuffers) getDeviceProcAddress(device, "vkCmdBindVertexBuffers"); - bindings->vkCmdDraw = (PFN_vkCmdDraw) getDeviceProcAddress(device, "vkCmdDraw"); - bindings->vkCmdDrawIndexed = (PFN_vkCmdDrawIndexed) getDeviceProcAddress(device, "vkCmdDrawIndexed"); - bindings->vkCmdDrawIndirect = (PFN_vkCmdDrawIndirect) getDeviceProcAddress(device, "vkCmdDrawIndirect"); - bindings->vkCmdDrawIndexedIndirect = (PFN_vkCmdDrawIndexedIndirect) getDeviceProcAddress(device, "vkCmdDrawIndexedIndirect"); - bindings->vkCmdDispatch = (PFN_vkCmdDispatch) getDeviceProcAddress(device, "vkCmdDispatch"); - bindings->vkCmdDispatchIndirect = (PFN_vkCmdDispatchIndirect) getDeviceProcAddress(device, "vkCmdDispatchIndirect"); - bindings->vkCmdCopyBuffer = (PFN_vkCmdCopyBuffer) getDeviceProcAddress(device, "vkCmdCopyBuffer"); - bindings->vkCmdCopyImage = (PFN_vkCmdCopyImage) getDeviceProcAddress(device, "vkCmdCopyImage"); - bindings->vkCmdBlitImage = (PFN_vkCmdBlitImage) getDeviceProcAddress(device, "vkCmdBlitImage"); - bindings->vkCmdCopyBufferToImage = (PFN_vkCmdCopyBufferToImage) getDeviceProcAddress(device, "vkCmdCopyBufferToImage"); - bindings->vkCmdCopyImageToBuffer = (PFN_vkCmdCopyImageToBuffer) getDeviceProcAddress(device, "vkCmdCopyImageToBuffer"); - bindings->vkCmdUpdateBuffer = (PFN_vkCmdUpdateBuffer) getDeviceProcAddress(device, "vkCmdUpdateBuffer"); - bindings->vkCmdFillBuffer = (PFN_vkCmdFillBuffer) getDeviceProcAddress(device, "vkCmdFillBuffer"); - bindings->vkCmdClearColorImage = (PFN_vkCmdClearColorImage) getDeviceProcAddress(device, "vkCmdClearColorImage"); - bindings->vkCmdClearDepthStencilImage = (PFN_vkCmdClearDepthStencilImage) getDeviceProcAddress(device, "vkCmdClearDepthStencilImage"); - bindings->vkCmdClearAttachments = (PFN_vkCmdClearAttachments) getDeviceProcAddress(device, "vkCmdClearAttachments"); - bindings->vkCmdResolveImage = (PFN_vkCmdResolveImage) getDeviceProcAddress(device, "vkCmdResolveImage"); - bindings->vkCmdSetEvent = (PFN_vkCmdSetEvent) getDeviceProcAddress(device, "vkCmdSetEvent"); - bindings->vkCmdResetEvent = (PFN_vkCmdResetEvent) getDeviceProcAddress(device, "vkCmdResetEvent"); - bindings->vkCmdWaitEvents = (PFN_vkCmdWaitEvents) getDeviceProcAddress(device, "vkCmdWaitEvents"); - bindings->vkCmdPipelineBarrier = (PFN_vkCmdPipelineBarrier) getDeviceProcAddress(device, "vkCmdPipelineBarrier"); - bindings->vkCmdBeginQuery = (PFN_vkCmdBeginQuery) getDeviceProcAddress(device, "vkCmdBeginQuery"); - bindings->vkCmdEndQuery = (PFN_vkCmdEndQuery) getDeviceProcAddress(device, "vkCmdEndQuery"); - bindings->vkCmdResetQueryPool = (PFN_vkCmdResetQueryPool) getDeviceProcAddress(device, "vkCmdResetQueryPool"); - bindings->vkCmdWriteTimestamp = (PFN_vkCmdWriteTimestamp) getDeviceProcAddress(device, "vkCmdWriteTimestamp"); - bindings->vkCmdCopyQueryPoolResults = (PFN_vkCmdCopyQueryPoolResults) getDeviceProcAddress(device, "vkCmdCopyQueryPoolResults"); - bindings->vkCmdPushConstants = (PFN_vkCmdPushConstants) getDeviceProcAddress(device, "vkCmdPushConstants"); - bindings->vkCmdBeginRenderPass = (PFN_vkCmdBeginRenderPass) getDeviceProcAddress(device, "vkCmdBeginRenderPass"); - bindings->vkCmdNextSubpass = (PFN_vkCmdNextSubpass) getDeviceProcAddress(device, "vkCmdNextSubpass"); - bindings->vkCmdEndRenderPass = (PFN_vkCmdEndRenderPass) getDeviceProcAddress(device, "vkCmdEndRenderPass"); - bindings->vkCmdExecuteCommands = (PFN_vkCmdExecuteCommands) getDeviceProcAddress(device, "vkCmdExecuteCommands"); - bindings->vkBindBufferMemory2 = (PFN_vkBindBufferMemory2) getDeviceProcAddress(device, "vkBindBufferMemory2"); - bindings->vkBindImageMemory2 = (PFN_vkBindImageMemory2) getDeviceProcAddress(device, "vkBindImageMemory2"); - bindings->vkGetDeviceGroupPeerMemoryFeatures = (PFN_vkGetDeviceGroupPeerMemoryFeatures) getDeviceProcAddress(device, "vkGetDeviceGroupPeerMemoryFeatures"); - bindings->vkCmdSetDeviceMask = (PFN_vkCmdSetDeviceMask) getDeviceProcAddress(device, "vkCmdSetDeviceMask"); - bindings->vkCmdDispatchBase = (PFN_vkCmdDispatchBase) getDeviceProcAddress(device, "vkCmdDispatchBase"); - bindings->vkGetImageMemoryRequirements2 = (PFN_vkGetImageMemoryRequirements2) getDeviceProcAddress(device, "vkGetImageMemoryRequirements2"); - bindings->vkGetBufferMemoryRequirements2 = (PFN_vkGetBufferMemoryRequirements2) getDeviceProcAddress(device, "vkGetBufferMemoryRequirements2"); - bindings->vkGetImageSparseMemoryRequirements2 = (PFN_vkGetImageSparseMemoryRequirements2) getDeviceProcAddress(device, "vkGetImageSparseMemoryRequirements2"); - bindings->vkTrimCommandPool = (PFN_vkTrimCommandPool) getDeviceProcAddress(device, "vkTrimCommandPool"); - bindings->vkGetDeviceQueue2 = (PFN_vkGetDeviceQueue2) getDeviceProcAddress(device, "vkGetDeviceQueue2"); - bindings->vkCreateSamplerYcbcrConversion = (PFN_vkCreateSamplerYcbcrConversion) getDeviceProcAddress(device, "vkCreateSamplerYcbcrConversion"); - bindings->vkDestroySamplerYcbcrConversion = (PFN_vkDestroySamplerYcbcrConversion) getDeviceProcAddress(device, "vkDestroySamplerYcbcrConversion"); - bindings->vkCreateDescriptorUpdateTemplate = (PFN_vkCreateDescriptorUpdateTemplate) getDeviceProcAddress(device, "vkCreateDescriptorUpdateTemplate"); - bindings->vkDestroyDescriptorUpdateTemplate = (PFN_vkDestroyDescriptorUpdateTemplate) getDeviceProcAddress(device, "vkDestroyDescriptorUpdateTemplate"); - bindings->vkUpdateDescriptorSetWithTemplate = (PFN_vkUpdateDescriptorSetWithTemplate) getDeviceProcAddress(device, "vkUpdateDescriptorSetWithTemplate"); - bindings->vkGetDescriptorSetLayoutSupport = (PFN_vkGetDescriptorSetLayoutSupport) getDeviceProcAddress(device, "vkGetDescriptorSetLayoutSupport"); - bindings->vkCreateSwapchainKHR = (PFN_vkCreateSwapchainKHR) getDeviceProcAddress(device, "vkCreateSwapchainKHR"); - bindings->vkDestroySwapchainKHR = (PFN_vkDestroySwapchainKHR) getDeviceProcAddress(device, "vkDestroySwapchainKHR"); - bindings->vkGetSwapchainImagesKHR = (PFN_vkGetSwapchainImagesKHR) getDeviceProcAddress(device, "vkGetSwapchainImagesKHR"); - bindings->vkAcquireNextImageKHR = (PFN_vkAcquireNextImageKHR) getDeviceProcAddress(device, "vkAcquireNextImageKHR"); - bindings->vkQueuePresentKHR = (PFN_vkQueuePresentKHR) getDeviceProcAddress(device, "vkQueuePresentKHR"); - bindings->vkGetDeviceGroupPresentCapabilitiesKHR = (PFN_vkGetDeviceGroupPresentCapabilitiesKHR) getDeviceProcAddress(device, "vkGetDeviceGroupPresentCapabilitiesKHR"); - bindings->vkGetDeviceGroupSurfacePresentModesKHR = (PFN_vkGetDeviceGroupSurfacePresentModesKHR) getDeviceProcAddress(device, "vkGetDeviceGroupSurfacePresentModesKHR"); - bindings->vkAcquireNextImage2KHR = (PFN_vkAcquireNextImage2KHR) getDeviceProcAddress(device, "vkAcquireNextImage2KHR"); - bindings->vkCreateSharedSwapchainsKHR = (PFN_vkCreateSharedSwapchainsKHR) getDeviceProcAddress(device, "vkCreateSharedSwapchainsKHR"); - bindings->vkGetDeviceGroupPeerMemoryFeaturesKHR = (PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR) getDeviceProcAddress(device, "vkGetDeviceGroupPeerMemoryFeaturesKHR"); - bindings->vkCmdSetDeviceMaskKHR = (PFN_vkCmdSetDeviceMaskKHR) getDeviceProcAddress(device, "vkCmdSetDeviceMaskKHR"); - bindings->vkCmdDispatchBaseKHR = (PFN_vkCmdDispatchBaseKHR) getDeviceProcAddress(device, "vkCmdDispatchBaseKHR"); - bindings->vkTrimCommandPoolKHR = (PFN_vkTrimCommandPoolKHR) getDeviceProcAddress(device, "vkTrimCommandPoolKHR"); -#ifdef VK_USE_PLATFORM_WIN32_KHR - bindings->vkGetMemoryWin32HandleKHR = (PFN_vkGetMemoryWin32HandleKHR) getDeviceProcAddress(device, "vkGetMemoryWin32HandleKHR"); -#endif // VK_USE_PLATFORM_WIN32_KHR -#ifdef VK_USE_PLATFORM_WIN32_KHR - bindings->vkGetMemoryWin32HandlePropertiesKHR = (PFN_vkGetMemoryWin32HandlePropertiesKHR) getDeviceProcAddress(device, "vkGetMemoryWin32HandlePropertiesKHR"); -#endif // VK_USE_PLATFORM_WIN32_KHR - bindings->vkGetMemoryFdKHR = (PFN_vkGetMemoryFdKHR) getDeviceProcAddress(device, "vkGetMemoryFdKHR"); - bindings->vkGetMemoryFdPropertiesKHR = (PFN_vkGetMemoryFdPropertiesKHR) getDeviceProcAddress(device, "vkGetMemoryFdPropertiesKHR"); -#ifdef VK_USE_PLATFORM_WIN32_KHR - bindings->vkImportSemaphoreWin32HandleKHR = (PFN_vkImportSemaphoreWin32HandleKHR) getDeviceProcAddress(device, "vkImportSemaphoreWin32HandleKHR"); -#endif // VK_USE_PLATFORM_WIN32_KHR -#ifdef VK_USE_PLATFORM_WIN32_KHR - bindings->vkGetSemaphoreWin32HandleKHR = (PFN_vkGetSemaphoreWin32HandleKHR) getDeviceProcAddress(device, "vkGetSemaphoreWin32HandleKHR"); -#endif // VK_USE_PLATFORM_WIN32_KHR - bindings->vkImportSemaphoreFdKHR = (PFN_vkImportSemaphoreFdKHR) getDeviceProcAddress(device, "vkImportSemaphoreFdKHR"); - bindings->vkGetSemaphoreFdKHR = (PFN_vkGetSemaphoreFdKHR) getDeviceProcAddress(device, "vkGetSemaphoreFdKHR"); - bindings->vkCmdPushDescriptorSetKHR = (PFN_vkCmdPushDescriptorSetKHR) getDeviceProcAddress(device, "vkCmdPushDescriptorSetKHR"); - bindings->vkCmdPushDescriptorSetWithTemplateKHR = (PFN_vkCmdPushDescriptorSetWithTemplateKHR) getDeviceProcAddress(device, "vkCmdPushDescriptorSetWithTemplateKHR"); - bindings->vkCreateDescriptorUpdateTemplateKHR = (PFN_vkCreateDescriptorUpdateTemplateKHR) getDeviceProcAddress(device, "vkCreateDescriptorUpdateTemplateKHR"); - bindings->vkDestroyDescriptorUpdateTemplateKHR = (PFN_vkDestroyDescriptorUpdateTemplateKHR) getDeviceProcAddress(device, "vkDestroyDescriptorUpdateTemplateKHR"); - bindings->vkUpdateDescriptorSetWithTemplateKHR = (PFN_vkUpdateDescriptorSetWithTemplateKHR) getDeviceProcAddress(device, "vkUpdateDescriptorSetWithTemplateKHR"); - bindings->vkGetSwapchainStatusKHR = (PFN_vkGetSwapchainStatusKHR) getDeviceProcAddress(device, "vkGetSwapchainStatusKHR"); -#ifdef VK_USE_PLATFORM_WIN32_KHR - bindings->vkImportFenceWin32HandleKHR = (PFN_vkImportFenceWin32HandleKHR) getDeviceProcAddress(device, "vkImportFenceWin32HandleKHR"); -#endif // VK_USE_PLATFORM_WIN32_KHR -#ifdef VK_USE_PLATFORM_WIN32_KHR - bindings->vkGetFenceWin32HandleKHR = (PFN_vkGetFenceWin32HandleKHR) getDeviceProcAddress(device, "vkGetFenceWin32HandleKHR"); -#endif // VK_USE_PLATFORM_WIN32_KHR - bindings->vkImportFenceFdKHR = (PFN_vkImportFenceFdKHR) getDeviceProcAddress(device, "vkImportFenceFdKHR"); - bindings->vkGetFenceFdKHR = (PFN_vkGetFenceFdKHR) getDeviceProcAddress(device, "vkGetFenceFdKHR"); - bindings->vkGetImageMemoryRequirements2KHR = (PFN_vkGetImageMemoryRequirements2KHR) getDeviceProcAddress(device, "vkGetImageMemoryRequirements2KHR"); - bindings->vkGetBufferMemoryRequirements2KHR = (PFN_vkGetBufferMemoryRequirements2KHR) getDeviceProcAddress(device, "vkGetBufferMemoryRequirements2KHR"); - bindings->vkGetImageSparseMemoryRequirements2KHR = (PFN_vkGetImageSparseMemoryRequirements2KHR) getDeviceProcAddress(device, "vkGetImageSparseMemoryRequirements2KHR"); - bindings->vkCreateSamplerYcbcrConversionKHR = (PFN_vkCreateSamplerYcbcrConversionKHR) getDeviceProcAddress(device, "vkCreateSamplerYcbcrConversionKHR"); - bindings->vkDestroySamplerYcbcrConversionKHR = (PFN_vkDestroySamplerYcbcrConversionKHR) getDeviceProcAddress(device, "vkDestroySamplerYcbcrConversionKHR"); - bindings->vkBindBufferMemory2KHR = (PFN_vkBindBufferMemory2KHR) getDeviceProcAddress(device, "vkBindBufferMemory2KHR"); - bindings->vkBindImageMemory2KHR = (PFN_vkBindImageMemory2KHR) getDeviceProcAddress(device, "vkBindImageMemory2KHR"); - bindings->vkGetDescriptorSetLayoutSupportKHR = (PFN_vkGetDescriptorSetLayoutSupportKHR) getDeviceProcAddress(device, "vkGetDescriptorSetLayoutSupportKHR"); - bindings->vkDebugMarkerSetObjectTagEXT = (PFN_vkDebugMarkerSetObjectTagEXT) getDeviceProcAddress(device, "vkDebugMarkerSetObjectTagEXT"); - bindings->vkDebugMarkerSetObjectNameEXT = (PFN_vkDebugMarkerSetObjectNameEXT) getDeviceProcAddress(device, "vkDebugMarkerSetObjectNameEXT"); - bindings->vkCmdDebugMarkerBeginEXT = (PFN_vkCmdDebugMarkerBeginEXT) getDeviceProcAddress(device, "vkCmdDebugMarkerBeginEXT"); - bindings->vkCmdDebugMarkerEndEXT = (PFN_vkCmdDebugMarkerEndEXT) getDeviceProcAddress(device, "vkCmdDebugMarkerEndEXT"); - bindings->vkCmdDebugMarkerInsertEXT = (PFN_vkCmdDebugMarkerInsertEXT) getDeviceProcAddress(device, "vkCmdDebugMarkerInsertEXT"); - bindings->vkCmdDrawIndirectCountAMD = (PFN_vkCmdDrawIndirectCountAMD) getDeviceProcAddress(device, "vkCmdDrawIndirectCountAMD"); - bindings->vkCmdDrawIndexedIndirectCountAMD = (PFN_vkCmdDrawIndexedIndirectCountAMD) getDeviceProcAddress(device, "vkCmdDrawIndexedIndirectCountAMD"); - bindings->vkGetShaderInfoAMD = (PFN_vkGetShaderInfoAMD) getDeviceProcAddress(device, "vkGetShaderInfoAMD"); -#ifdef VK_USE_PLATFORM_WIN32_KHR - bindings->vkGetMemoryWin32HandleNV = (PFN_vkGetMemoryWin32HandleNV) getDeviceProcAddress(device, "vkGetMemoryWin32HandleNV"); -#endif // VK_USE_PLATFORM_WIN32_KHR - bindings->vkCmdProcessCommandsNVX = (PFN_vkCmdProcessCommandsNVX) getDeviceProcAddress(device, "vkCmdProcessCommandsNVX"); - bindings->vkCmdReserveSpaceForCommandsNVX = (PFN_vkCmdReserveSpaceForCommandsNVX) getDeviceProcAddress(device, "vkCmdReserveSpaceForCommandsNVX"); - bindings->vkCreateIndirectCommandsLayoutNVX = (PFN_vkCreateIndirectCommandsLayoutNVX) getDeviceProcAddress(device, "vkCreateIndirectCommandsLayoutNVX"); - bindings->vkDestroyIndirectCommandsLayoutNVX = (PFN_vkDestroyIndirectCommandsLayoutNVX) getDeviceProcAddress(device, "vkDestroyIndirectCommandsLayoutNVX"); - bindings->vkCreateObjectTableNVX = (PFN_vkCreateObjectTableNVX) getDeviceProcAddress(device, "vkCreateObjectTableNVX"); - bindings->vkDestroyObjectTableNVX = (PFN_vkDestroyObjectTableNVX) getDeviceProcAddress(device, "vkDestroyObjectTableNVX"); - bindings->vkRegisterObjectsNVX = (PFN_vkRegisterObjectsNVX) getDeviceProcAddress(device, "vkRegisterObjectsNVX"); - bindings->vkUnregisterObjectsNVX = (PFN_vkUnregisterObjectsNVX) getDeviceProcAddress(device, "vkUnregisterObjectsNVX"); - bindings->vkCmdSetViewportWScalingNV = (PFN_vkCmdSetViewportWScalingNV) getDeviceProcAddress(device, "vkCmdSetViewportWScalingNV"); - bindings->vkDisplayPowerControlEXT = (PFN_vkDisplayPowerControlEXT) getDeviceProcAddress(device, "vkDisplayPowerControlEXT"); - bindings->vkRegisterDeviceEventEXT = (PFN_vkRegisterDeviceEventEXT) getDeviceProcAddress(device, "vkRegisterDeviceEventEXT"); - bindings->vkRegisterDisplayEventEXT = (PFN_vkRegisterDisplayEventEXT) getDeviceProcAddress(device, "vkRegisterDisplayEventEXT"); - bindings->vkGetSwapchainCounterEXT = (PFN_vkGetSwapchainCounterEXT) getDeviceProcAddress(device, "vkGetSwapchainCounterEXT"); - bindings->vkGetRefreshCycleDurationGOOGLE = (PFN_vkGetRefreshCycleDurationGOOGLE) getDeviceProcAddress(device, "vkGetRefreshCycleDurationGOOGLE"); - bindings->vkGetPastPresentationTimingGOOGLE = (PFN_vkGetPastPresentationTimingGOOGLE) getDeviceProcAddress(device, "vkGetPastPresentationTimingGOOGLE"); - bindings->vkCmdSetDiscardRectangleEXT = (PFN_vkCmdSetDiscardRectangleEXT) getDeviceProcAddress(device, "vkCmdSetDiscardRectangleEXT"); - bindings->vkSetHdrMetadataEXT = (PFN_vkSetHdrMetadataEXT) getDeviceProcAddress(device, "vkSetHdrMetadataEXT"); -#ifdef VK_USE_PLATFORM_ANDROID_KHR - bindings->vkGetAndroidHardwareBufferPropertiesANDROID = (PFN_vkGetAndroidHardwareBufferPropertiesANDROID) getDeviceProcAddress(device, "vkGetAndroidHardwareBufferPropertiesANDROID"); -#endif // VK_USE_PLATFORM_ANDROID_KHR -#ifdef VK_USE_PLATFORM_ANDROID_KHR - bindings->vkGetMemoryAndroidHardwareBufferANDROID = (PFN_vkGetMemoryAndroidHardwareBufferANDROID) getDeviceProcAddress(device, "vkGetMemoryAndroidHardwareBufferANDROID"); -#endif // VK_USE_PLATFORM_ANDROID_KHR - bindings->vkCmdSetSampleLocationsEXT = (PFN_vkCmdSetSampleLocationsEXT) getDeviceProcAddress(device, "vkCmdSetSampleLocationsEXT"); - bindings->vkCreateValidationCacheEXT = (PFN_vkCreateValidationCacheEXT) getDeviceProcAddress(device, "vkCreateValidationCacheEXT"); - bindings->vkDestroyValidationCacheEXT = (PFN_vkDestroyValidationCacheEXT) getDeviceProcAddress(device, "vkDestroyValidationCacheEXT"); - bindings->vkMergeValidationCachesEXT = (PFN_vkMergeValidationCachesEXT) getDeviceProcAddress(device, "vkMergeValidationCachesEXT"); - bindings->vkGetValidationCacheDataEXT = (PFN_vkGetValidationCacheDataEXT) getDeviceProcAddress(device, "vkGetValidationCacheDataEXT"); - bindings->vkGetMemoryHostPointerPropertiesEXT = (PFN_vkGetMemoryHostPointerPropertiesEXT) getDeviceProcAddress(device, "vkGetMemoryHostPointerPropertiesEXT"); - bindings->vkCmdWriteBufferMarkerAMD = (PFN_vkCmdWriteBufferMarkerAMD) getDeviceProcAddress(device, "vkCmdWriteBufferMarkerAMD"); -} - - -static inline void initVkInstanceBindings(VkInstance instance, VkInstanceBindings *bindings, PFN_vkGetInstanceProcAddr getinstanceProcAddress) { - memset(bindings, 0, sizeof(*bindings)); - // Instance function pointers - bindings->vkDestroyInstance = (PFN_vkDestroyInstance) getinstanceProcAddress(instance, "vkDestroyInstance"); - bindings->vkEnumeratePhysicalDevices = (PFN_vkEnumeratePhysicalDevices) getinstanceProcAddress(instance, "vkEnumeratePhysicalDevices"); - bindings->vkGetPhysicalDeviceFeatures = (PFN_vkGetPhysicalDeviceFeatures) getinstanceProcAddress(instance, "vkGetPhysicalDeviceFeatures"); - bindings->vkGetPhysicalDeviceFormatProperties = (PFN_vkGetPhysicalDeviceFormatProperties) getinstanceProcAddress(instance, "vkGetPhysicalDeviceFormatProperties"); - bindings->vkGetPhysicalDeviceImageFormatProperties = (PFN_vkGetPhysicalDeviceImageFormatProperties) getinstanceProcAddress(instance, "vkGetPhysicalDeviceImageFormatProperties"); - bindings->vkGetPhysicalDeviceProperties = (PFN_vkGetPhysicalDeviceProperties) getinstanceProcAddress(instance, "vkGetPhysicalDeviceProperties"); - bindings->vkGetPhysicalDeviceQueueFamilyProperties = (PFN_vkGetPhysicalDeviceQueueFamilyProperties) getinstanceProcAddress(instance, "vkGetPhysicalDeviceQueueFamilyProperties"); - bindings->vkGetPhysicalDeviceMemoryProperties = (PFN_vkGetPhysicalDeviceMemoryProperties) getinstanceProcAddress(instance, "vkGetPhysicalDeviceMemoryProperties"); - bindings->vkGetInstanceProcAddr = getinstanceProcAddress; - bindings->vkGetDeviceProcAddr = (PFN_vkGetDeviceProcAddr) getinstanceProcAddress(instance, "vkGetDeviceProcAddr"); - bindings->vkCreateDevice = (PFN_vkCreateDevice) getinstanceProcAddress(instance, "vkCreateDevice"); - bindings->vkEnumerateDeviceExtensionProperties = (PFN_vkEnumerateDeviceExtensionProperties) getinstanceProcAddress(instance, "vkEnumerateDeviceExtensionProperties"); - bindings->vkEnumerateDeviceLayerProperties = (PFN_vkEnumerateDeviceLayerProperties) getinstanceProcAddress(instance, "vkEnumerateDeviceLayerProperties"); - bindings->vkGetPhysicalDeviceSparseImageFormatProperties = (PFN_vkGetPhysicalDeviceSparseImageFormatProperties) getinstanceProcAddress(instance, "vkGetPhysicalDeviceSparseImageFormatProperties"); - bindings->vkEnumeratePhysicalDeviceGroups = (PFN_vkEnumeratePhysicalDeviceGroups) getinstanceProcAddress(instance, "vkEnumeratePhysicalDeviceGroups"); - bindings->vkGetPhysicalDeviceFeatures2 = (PFN_vkGetPhysicalDeviceFeatures2) getinstanceProcAddress(instance, "vkGetPhysicalDeviceFeatures2"); - bindings->vkGetPhysicalDeviceProperties2 = (PFN_vkGetPhysicalDeviceProperties2) getinstanceProcAddress(instance, "vkGetPhysicalDeviceProperties2"); - bindings->vkGetPhysicalDeviceFormatProperties2 = (PFN_vkGetPhysicalDeviceFormatProperties2) getinstanceProcAddress(instance, "vkGetPhysicalDeviceFormatProperties2"); - bindings->vkGetPhysicalDeviceImageFormatProperties2 = (PFN_vkGetPhysicalDeviceImageFormatProperties2) getinstanceProcAddress(instance, "vkGetPhysicalDeviceImageFormatProperties2"); - bindings->vkGetPhysicalDeviceQueueFamilyProperties2 = (PFN_vkGetPhysicalDeviceQueueFamilyProperties2) getinstanceProcAddress(instance, "vkGetPhysicalDeviceQueueFamilyProperties2"); - bindings->vkGetPhysicalDeviceMemoryProperties2 = (PFN_vkGetPhysicalDeviceMemoryProperties2) getinstanceProcAddress(instance, "vkGetPhysicalDeviceMemoryProperties2"); - bindings->vkGetPhysicalDeviceSparseImageFormatProperties2 = (PFN_vkGetPhysicalDeviceSparseImageFormatProperties2) getinstanceProcAddress(instance, "vkGetPhysicalDeviceSparseImageFormatProperties2"); - bindings->vkGetPhysicalDeviceExternalBufferProperties = (PFN_vkGetPhysicalDeviceExternalBufferProperties) getinstanceProcAddress(instance, "vkGetPhysicalDeviceExternalBufferProperties"); - bindings->vkGetPhysicalDeviceExternalFenceProperties = (PFN_vkGetPhysicalDeviceExternalFenceProperties) getinstanceProcAddress(instance, "vkGetPhysicalDeviceExternalFenceProperties"); - bindings->vkGetPhysicalDeviceExternalSemaphoreProperties = (PFN_vkGetPhysicalDeviceExternalSemaphoreProperties) getinstanceProcAddress(instance, "vkGetPhysicalDeviceExternalSemaphoreProperties"); - bindings->vkDestroySurfaceKHR = (PFN_vkDestroySurfaceKHR) getinstanceProcAddress(instance, "vkDestroySurfaceKHR"); - bindings->vkGetPhysicalDeviceSurfaceSupportKHR = (PFN_vkGetPhysicalDeviceSurfaceSupportKHR) getinstanceProcAddress(instance, "vkGetPhysicalDeviceSurfaceSupportKHR"); - bindings->vkGetPhysicalDeviceSurfaceCapabilitiesKHR = (PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR) getinstanceProcAddress(instance, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR"); - bindings->vkGetPhysicalDeviceSurfaceFormatsKHR = (PFN_vkGetPhysicalDeviceSurfaceFormatsKHR) getinstanceProcAddress(instance, "vkGetPhysicalDeviceSurfaceFormatsKHR"); - bindings->vkGetPhysicalDeviceSurfacePresentModesKHR = (PFN_vkGetPhysicalDeviceSurfacePresentModesKHR) getinstanceProcAddress(instance, "vkGetPhysicalDeviceSurfacePresentModesKHR"); - bindings->vkGetPhysicalDevicePresentRectanglesKHR = (PFN_vkGetPhysicalDevicePresentRectanglesKHR) getinstanceProcAddress(instance, "vkGetPhysicalDevicePresentRectanglesKHR"); - bindings->vkGetPhysicalDeviceDisplayPropertiesKHR = (PFN_vkGetPhysicalDeviceDisplayPropertiesKHR) getinstanceProcAddress(instance, "vkGetPhysicalDeviceDisplayPropertiesKHR"); - bindings->vkGetPhysicalDeviceDisplayPlanePropertiesKHR = (PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR) getinstanceProcAddress(instance, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR"); - bindings->vkGetDisplayPlaneSupportedDisplaysKHR = (PFN_vkGetDisplayPlaneSupportedDisplaysKHR) getinstanceProcAddress(instance, "vkGetDisplayPlaneSupportedDisplaysKHR"); - bindings->vkGetDisplayModePropertiesKHR = (PFN_vkGetDisplayModePropertiesKHR) getinstanceProcAddress(instance, "vkGetDisplayModePropertiesKHR"); - bindings->vkCreateDisplayModeKHR = (PFN_vkCreateDisplayModeKHR) getinstanceProcAddress(instance, "vkCreateDisplayModeKHR"); - bindings->vkGetDisplayPlaneCapabilitiesKHR = (PFN_vkGetDisplayPlaneCapabilitiesKHR) getinstanceProcAddress(instance, "vkGetDisplayPlaneCapabilitiesKHR"); - bindings->vkCreateDisplayPlaneSurfaceKHR = (PFN_vkCreateDisplayPlaneSurfaceKHR) getinstanceProcAddress(instance, "vkCreateDisplayPlaneSurfaceKHR"); -#ifdef VK_USE_PLATFORM_XLIB_KHR - bindings->vkCreateXlibSurfaceKHR = (PFN_vkCreateXlibSurfaceKHR) getinstanceProcAddress(instance, "vkCreateXlibSurfaceKHR"); -#endif // VK_USE_PLATFORM_XLIB_KHR -#ifdef VK_USE_PLATFORM_XLIB_KHR - bindings->vkGetPhysicalDeviceXlibPresentationSupportKHR = (PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR) getinstanceProcAddress(instance, "vkGetPhysicalDeviceXlibPresentationSupportKHR"); -#endif // VK_USE_PLATFORM_XLIB_KHR -#ifdef VK_USE_PLATFORM_XCB_KHR - bindings->vkCreateXcbSurfaceKHR = (PFN_vkCreateXcbSurfaceKHR) getinstanceProcAddress(instance, "vkCreateXcbSurfaceKHR"); -#endif // VK_USE_PLATFORM_XCB_KHR -#ifdef VK_USE_PLATFORM_XCB_KHR - bindings->vkGetPhysicalDeviceXcbPresentationSupportKHR = (PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR) getinstanceProcAddress(instance, "vkGetPhysicalDeviceXcbPresentationSupportKHR"); -#endif // VK_USE_PLATFORM_XCB_KHR -#ifdef VK_USE_PLATFORM_WAYLAND_KHR - bindings->vkCreateWaylandSurfaceKHR = (PFN_vkCreateWaylandSurfaceKHR) getinstanceProcAddress(instance, "vkCreateWaylandSurfaceKHR"); -#endif // VK_USE_PLATFORM_WAYLAND_KHR -#ifdef VK_USE_PLATFORM_WAYLAND_KHR - bindings->vkGetPhysicalDeviceWaylandPresentationSupportKHR = (PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR) getinstanceProcAddress(instance, "vkGetPhysicalDeviceWaylandPresentationSupportKHR"); -#endif // VK_USE_PLATFORM_WAYLAND_KHR -#ifdef VK_USE_PLATFORM_MIR_KHR - bindings->vkCreateMirSurfaceKHR = (PFN_vkCreateMirSurfaceKHR) getinstanceProcAddress(instance, "vkCreateMirSurfaceKHR"); -#endif // VK_USE_PLATFORM_MIR_KHR -#ifdef VK_USE_PLATFORM_MIR_KHR - bindings->vkGetPhysicalDeviceMirPresentationSupportKHR = (PFN_vkGetPhysicalDeviceMirPresentationSupportKHR) getinstanceProcAddress(instance, "vkGetPhysicalDeviceMirPresentationSupportKHR"); -#endif // VK_USE_PLATFORM_MIR_KHR -#ifdef VK_USE_PLATFORM_ANDROID_KHR - bindings->vkCreateAndroidSurfaceKHR = (PFN_vkCreateAndroidSurfaceKHR) getinstanceProcAddress(instance, "vkCreateAndroidSurfaceKHR"); -#endif // VK_USE_PLATFORM_ANDROID_KHR -#ifdef VK_USE_PLATFORM_WIN32_KHR - bindings->vkCreateWin32SurfaceKHR = (PFN_vkCreateWin32SurfaceKHR) getinstanceProcAddress(instance, "vkCreateWin32SurfaceKHR"); -#endif // VK_USE_PLATFORM_WIN32_KHR -#ifdef VK_USE_PLATFORM_WIN32_KHR - bindings->vkGetPhysicalDeviceWin32PresentationSupportKHR = (PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR) getinstanceProcAddress(instance, "vkGetPhysicalDeviceWin32PresentationSupportKHR"); -#endif // VK_USE_PLATFORM_WIN32_KHR - bindings->vkGetPhysicalDeviceFeatures2KHR = (PFN_vkGetPhysicalDeviceFeatures2KHR) getinstanceProcAddress(instance, "vkGetPhysicalDeviceFeatures2KHR"); - bindings->vkGetPhysicalDeviceProperties2KHR = (PFN_vkGetPhysicalDeviceProperties2KHR) getinstanceProcAddress(instance, "vkGetPhysicalDeviceProperties2KHR"); - bindings->vkGetPhysicalDeviceFormatProperties2KHR = (PFN_vkGetPhysicalDeviceFormatProperties2KHR) getinstanceProcAddress(instance, "vkGetPhysicalDeviceFormatProperties2KHR"); - bindings->vkGetPhysicalDeviceImageFormatProperties2KHR = (PFN_vkGetPhysicalDeviceImageFormatProperties2KHR) getinstanceProcAddress(instance, "vkGetPhysicalDeviceImageFormatProperties2KHR"); - bindings->vkGetPhysicalDeviceQueueFamilyProperties2KHR = (PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR) getinstanceProcAddress(instance, "vkGetPhysicalDeviceQueueFamilyProperties2KHR"); - bindings->vkGetPhysicalDeviceMemoryProperties2KHR = (PFN_vkGetPhysicalDeviceMemoryProperties2KHR) getinstanceProcAddress(instance, "vkGetPhysicalDeviceMemoryProperties2KHR"); - bindings->vkGetPhysicalDeviceSparseImageFormatProperties2KHR = (PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR) getinstanceProcAddress(instance, "vkGetPhysicalDeviceSparseImageFormatProperties2KHR"); - bindings->vkEnumeratePhysicalDeviceGroupsKHR = (PFN_vkEnumeratePhysicalDeviceGroupsKHR) getinstanceProcAddress(instance, "vkEnumeratePhysicalDeviceGroupsKHR"); - bindings->vkGetPhysicalDeviceExternalBufferPropertiesKHR = (PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR) getinstanceProcAddress(instance, "vkGetPhysicalDeviceExternalBufferPropertiesKHR"); - bindings->vkGetPhysicalDeviceExternalSemaphorePropertiesKHR = (PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR) getinstanceProcAddress(instance, "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR"); - bindings->vkGetPhysicalDeviceExternalFencePropertiesKHR = (PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR) getinstanceProcAddress(instance, "vkGetPhysicalDeviceExternalFencePropertiesKHR"); - bindings->vkGetPhysicalDeviceSurfaceCapabilities2KHR = (PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR) getinstanceProcAddress(instance, "vkGetPhysicalDeviceSurfaceCapabilities2KHR"); - bindings->vkGetPhysicalDeviceSurfaceFormats2KHR = (PFN_vkGetPhysicalDeviceSurfaceFormats2KHR) getinstanceProcAddress(instance, "vkGetPhysicalDeviceSurfaceFormats2KHR"); - bindings->vkCreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT) getinstanceProcAddress(instance, "vkCreateDebugReportCallbackEXT"); - bindings->vkDestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT) getinstanceProcAddress(instance, "vkDestroyDebugReportCallbackEXT"); - bindings->vkDebugReportMessageEXT = (PFN_vkDebugReportMessageEXT) getinstanceProcAddress(instance, "vkDebugReportMessageEXT"); - bindings->vkGetPhysicalDeviceExternalImageFormatPropertiesNV = (PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV) getinstanceProcAddress(instance, "vkGetPhysicalDeviceExternalImageFormatPropertiesNV"); -#ifdef VK_USE_PLATFORM_VI_NN - bindings->vkCreateViSurfaceNN = (PFN_vkCreateViSurfaceNN) getinstanceProcAddress(instance, "vkCreateViSurfaceNN"); -#endif // VK_USE_PLATFORM_VI_NN - bindings->vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX = (PFN_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX) getinstanceProcAddress(instance, "vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX"); - bindings->vkReleaseDisplayEXT = (PFN_vkReleaseDisplayEXT) getinstanceProcAddress(instance, "vkReleaseDisplayEXT"); -#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT - bindings->vkAcquireXlibDisplayEXT = (PFN_vkAcquireXlibDisplayEXT) getinstanceProcAddress(instance, "vkAcquireXlibDisplayEXT"); -#endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT -#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT - bindings->vkGetRandROutputDisplayEXT = (PFN_vkGetRandROutputDisplayEXT) getinstanceProcAddress(instance, "vkGetRandROutputDisplayEXT"); -#endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT - bindings->vkGetPhysicalDeviceSurfaceCapabilities2EXT = (PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT) getinstanceProcAddress(instance, "vkGetPhysicalDeviceSurfaceCapabilities2EXT"); -#ifdef VK_USE_PLATFORM_IOS_MVK - bindings->vkCreateIOSSurfaceMVK = (PFN_vkCreateIOSSurfaceMVK) getinstanceProcAddress(instance, "vkCreateIOSSurfaceMVK"); -#endif // VK_USE_PLATFORM_IOS_MVK -#ifdef VK_USE_PLATFORM_MACOS_MVK - bindings->vkCreateMacOSSurfaceMVK = (PFN_vkCreateMacOSSurfaceMVK) getinstanceProcAddress(instance, "vkCreateMacOSSurfaceMVK"); -#endif // VK_USE_PLATFORM_MACOS_MVK - bindings->vkSetDebugUtilsObjectNameEXT = (PFN_vkSetDebugUtilsObjectNameEXT) getinstanceProcAddress(instance, "vkSetDebugUtilsObjectNameEXT"); - bindings->vkSetDebugUtilsObjectTagEXT = (PFN_vkSetDebugUtilsObjectTagEXT) getinstanceProcAddress(instance, "vkSetDebugUtilsObjectTagEXT"); - bindings->vkQueueBeginDebugUtilsLabelEXT = (PFN_vkQueueBeginDebugUtilsLabelEXT) getinstanceProcAddress(instance, "vkQueueBeginDebugUtilsLabelEXT"); - bindings->vkQueueEndDebugUtilsLabelEXT = (PFN_vkQueueEndDebugUtilsLabelEXT) getinstanceProcAddress(instance, "vkQueueEndDebugUtilsLabelEXT"); - bindings->vkQueueInsertDebugUtilsLabelEXT = (PFN_vkQueueInsertDebugUtilsLabelEXT) getinstanceProcAddress(instance, "vkQueueInsertDebugUtilsLabelEXT"); - bindings->vkCmdBeginDebugUtilsLabelEXT = (PFN_vkCmdBeginDebugUtilsLabelEXT) getinstanceProcAddress(instance, "vkCmdBeginDebugUtilsLabelEXT"); - bindings->vkCmdEndDebugUtilsLabelEXT = (PFN_vkCmdEndDebugUtilsLabelEXT) getinstanceProcAddress(instance, "vkCmdEndDebugUtilsLabelEXT"); - bindings->vkCmdInsertDebugUtilsLabelEXT = (PFN_vkCmdInsertDebugUtilsLabelEXT) getinstanceProcAddress(instance, "vkCmdInsertDebugUtilsLabelEXT"); - bindings->vkCreateDebugUtilsMessengerEXT = (PFN_vkCreateDebugUtilsMessengerEXT) getinstanceProcAddress(instance, "vkCreateDebugUtilsMessengerEXT"); - bindings->vkDestroyDebugUtilsMessengerEXT = (PFN_vkDestroyDebugUtilsMessengerEXT) getinstanceProcAddress(instance, "vkDestroyDebugUtilsMessengerEXT"); - bindings->vkSubmitDebugUtilsMessageEXT = (PFN_vkSubmitDebugUtilsMessageEXT) getinstanceProcAddress(instance, "vkSubmitDebugUtilsMessageEXT"); - bindings->vkGetPhysicalDeviceMultisamplePropertiesEXT = (PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT) getinstanceProcAddress(instance, "vkGetPhysicalDeviceMultisamplePropertiesEXT"); -} diff --git a/emscripten/include/pvrsdk/vulkan/vk_icd.h b/emscripten/include/pvrsdk/vulkan/vk_icd.h deleted file mode 100644 index 35956a34..00000000 --- a/emscripten/include/pvrsdk/vulkan/vk_icd.h +++ /dev/null @@ -1,170 +0,0 @@ -// -// File: vk_icd.h -// -/* - * Copyright (c) 2015-2016 The Khronos Group Inc. - * Copyright (c) 2015-2016 Valve Corporation - * Copyright (c) 2015-2016 LunarG, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef VKICD_H -#define VKICD_H - -#include "vulkan.h" -#include - -// Loader-ICD version negotiation API. Versions add the following features: -// Version 0 - Initial. Doesn't support vk_icdGetInstanceProcAddr -// or vk_icdNegotiateLoaderICDInterfaceVersion. -// Version 1 - Add support for vk_icdGetInstanceProcAddr. -// Version 2 - Add Loader/ICD Interface version negotiation -// via vk_icdNegotiateLoaderICDInterfaceVersion. -// Version 3 - Add ICD creation/destruction of KHR_surface objects. -// Version 4 - Add unknown physical device extension qyering via -// vk_icdGetPhysicalDeviceProcAddr. -// Version 5 - Tells ICDs that the loader is now paying attention to the -// application version of Vulkan passed into the ApplicationInfo -// structure during vkCreateInstance. This will tell the ICD -// that if the loader is older, it should automatically fail a -// call for any API version > 1.0. Otherwise, the loader will -// manually determine if it can support the expected version. -#define CURRENT_LOADER_ICD_INTERFACE_VERSION 5 -#define MIN_SUPPORTED_LOADER_ICD_INTERFACE_VERSION 0 -#define MIN_PHYS_DEV_EXTENSION_ICD_INTERFACE_VERSION 4 -typedef VkResult(VKAPI_PTR *PFN_vkNegotiateLoaderICDInterfaceVersion)(uint32_t *pVersion); - -// This is defined in vk_layer.h which will be found by the loader, but if an ICD is building against this -// file directly, it won't be found. -#ifndef PFN_GetPhysicalDeviceProcAddr -typedef PFN_vkVoidFunction(VKAPI_PTR *PFN_GetPhysicalDeviceProcAddr)(VkInstance instance, const char *pName); -#endif - -/* - * The ICD must reserve space for a pointer for the loader's dispatch - * table, at the start of . - * The ICD must initialize this variable using the SET_LOADER_MAGIC_VALUE macro. - */ - -#define ICD_LOADER_MAGIC 0x01CDC0DE - -typedef union { - uintptr_t loaderMagic; - void *loaderData; -} VK_LOADER_DATA; - -static inline void set_loader_magic_value(void *pNewObject) { - VK_LOADER_DATA *loader_info = (VK_LOADER_DATA *)pNewObject; - loader_info->loaderMagic = ICD_LOADER_MAGIC; -} - -static inline bool valid_loader_magic_value(void *pNewObject) { - const VK_LOADER_DATA *loader_info = (VK_LOADER_DATA *)pNewObject; - return (loader_info->loaderMagic & 0xffffffff) == ICD_LOADER_MAGIC; -} - -/* - * Windows and Linux ICDs will treat VkSurfaceKHR as a pointer to a struct that - * contains the platform-specific connection and surface information. - */ -typedef enum { - VK_ICD_WSI_PLATFORM_MIR, - VK_ICD_WSI_PLATFORM_WAYLAND, - VK_ICD_WSI_PLATFORM_WIN32, - VK_ICD_WSI_PLATFORM_XCB, - VK_ICD_WSI_PLATFORM_XLIB, - VK_ICD_WSI_PLATFORM_ANDROID, - VK_ICD_WSI_PLATFORM_MACOS, - VK_ICD_WSI_PLATFORM_IOS, - VK_ICD_WSI_PLATFORM_DISPLAY -} VkIcdWsiPlatform; - -typedef struct { - VkIcdWsiPlatform platform; -} VkIcdSurfaceBase; - -#ifdef VK_USE_PLATFORM_MIR_KHR -typedef struct { - VkIcdSurfaceBase base; - MirConnection *connection; - MirSurface *mirSurface; -} VkIcdSurfaceMir; -#endif // VK_USE_PLATFORM_MIR_KHR - -#ifdef VK_USE_PLATFORM_WAYLAND_KHR -typedef struct { - VkIcdSurfaceBase base; - struct wl_display *display; - struct wl_surface *surface; -} VkIcdSurfaceWayland; -#endif // VK_USE_PLATFORM_WAYLAND_KHR - -#ifdef VK_USE_PLATFORM_WIN32_KHR -typedef struct { - VkIcdSurfaceBase base; - HINSTANCE hinstance; - HWND hwnd; -} VkIcdSurfaceWin32; -#endif // VK_USE_PLATFORM_WIN32_KHR - -#ifdef VK_USE_PLATFORM_XCB_KHR -typedef struct { - VkIcdSurfaceBase base; - xcb_connection_t *connection; - xcb_window_t window; -} VkIcdSurfaceXcb; -#endif // VK_USE_PLATFORM_XCB_KHR - -#ifdef VK_USE_PLATFORM_XLIB_KHR -typedef struct { - VkIcdSurfaceBase base; - Display *dpy; - Window window; -} VkIcdSurfaceXlib; -#endif // VK_USE_PLATFORM_XLIB_KHR - -#ifdef VK_USE_PLATFORM_ANDROID_KHR -typedef struct { - VkIcdSurfaceBase base; - ANativeWindow *window; -} VkIcdSurfaceAndroid; -#endif // VK_USE_PLATFORM_ANDROID_KHR - -#ifdef VK_USE_PLATFORM_MACOS_MVK -typedef struct { - VkIcdSurfaceBase base; - const void *pView; -} VkIcdSurfaceMacOS; -#endif // VK_USE_PLATFORM_MACOS_MVK - -#ifdef VK_USE_PLATFORM_IOS_MVK -typedef struct { - VkIcdSurfaceBase base; - const void *pView; -} VkIcdSurfaceIOS; -#endif // VK_USE_PLATFORM_IOS_MVK - -typedef struct { - VkIcdSurfaceBase base; - VkDisplayModeKHR displayMode; - uint32_t planeIndex; - uint32_t planeStackIndex; - VkSurfaceTransformFlagBitsKHR transform; - float globalAlpha; - VkDisplayPlaneAlphaFlagBitsKHR alphaMode; - VkExtent2D imageExtent; -} VkIcdSurfaceDisplay; - -#endif // VKICD_H diff --git a/emscripten/include/pvrsdk/vulkan/vk_layer.h b/emscripten/include/pvrsdk/vulkan/vk_layer.h deleted file mode 100644 index e8300c37..00000000 --- a/emscripten/include/pvrsdk/vulkan/vk_layer.h +++ /dev/null @@ -1,195 +0,0 @@ -// -// File: vk_layer.h -// -/* - * Copyright (c) 2015-2017 The Khronos Group Inc. - * Copyright (c) 2015-2017 Valve Corporation - * Copyright (c) 2015-2017 LunarG, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/* Need to define dispatch table - * Core struct can then have ptr to dispatch table at the top - * Along with object ptrs for current and next OBJ - */ -#pragma once - -#include "vulkan.h" -#if defined(__GNUC__) && __GNUC__ >= 4 -#define VK_LAYER_EXPORT __attribute__((visibility("default"))) -#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590) -#define VK_LAYER_EXPORT __attribute__((visibility("default"))) -#else -#define VK_LAYER_EXPORT -#endif - -// Definition for VkLayerDispatchTable and VkLayerInstanceDispatchTable now appear in externally generated header -#include "vk_layer_dispatch_table.h" - -#define MAX_NUM_UNKNOWN_EXTS 250 - - // Loader-Layer version negotiation API. Versions add the following features: - // Versions 0/1 - Initial. Doesn't support vk_layerGetPhysicalDeviceProcAddr - // or vk_icdNegotiateLoaderLayerInterfaceVersion. - // Version 2 - Add support for vk_layerGetPhysicalDeviceProcAddr and - // vk_icdNegotiateLoaderLayerInterfaceVersion. -#define CURRENT_LOADER_LAYER_INTERFACE_VERSION 2 -#define MIN_SUPPORTED_LOADER_LAYER_INTERFACE_VERSION 1 - -#define VK_CURRENT_CHAIN_VERSION 1 - -// Version negotiation values -typedef enum VkNegotiateLayerStructType { - LAYER_NEGOTIATE_UNINTIALIZED = 0, - LAYER_NEGOTIATE_INTERFACE_STRUCT = 1, -} VkNegotiateLayerStructType; - -// Version negotiation structures -typedef struct VkNegotiateLayerInterface { - VkNegotiateLayerStructType sType; - void *pNext; - uint32_t loaderLayerInterfaceVersion; - PFN_vkGetInstanceProcAddr pfnGetInstanceProcAddr; - PFN_vkGetDeviceProcAddr pfnGetDeviceProcAddr; - PFN_GetPhysicalDeviceProcAddr pfnGetPhysicalDeviceProcAddr; -} VkNegotiateLayerInterface; - -// Version negotiation functions -typedef VkResult (VKAPI_PTR *PFN_vkNegotiateLoaderLayerInterfaceVersion)(VkNegotiateLayerInterface *pVersionStruct); - -// Function prototype for unknown physical device extension command -typedef VkResult(VKAPI_PTR *PFN_PhysDevExt)(VkPhysicalDevice phys_device); - -// ------------------------------------------------------------------------------------------------ -// CreateInstance and CreateDevice support structures - -/* Sub type of structure for instance and device loader ext of CreateInfo. - * When sType == VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO - * or sType == VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO - * then VkLayerFunction indicates struct type pointed to by pNext - */ -typedef enum VkLayerFunction_ { - VK_LAYER_LINK_INFO = 0, - VK_LOADER_DATA_CALLBACK = 1 -} VkLayerFunction; - -typedef struct VkLayerInstanceLink_ { - struct VkLayerInstanceLink_ *pNext; - PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr; - PFN_GetPhysicalDeviceProcAddr pfnNextGetPhysicalDeviceProcAddr; -} VkLayerInstanceLink; - -/* - * When creating the device chain the loader needs to pass - * down information about it's device structure needed at - * the end of the chain. Passing the data via the - * VkLayerDeviceInfo avoids issues with finding the - * exact instance being used. - */ -typedef struct VkLayerDeviceInfo_ { - void *device_info; - PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr; -} VkLayerDeviceInfo; - -typedef VkResult (VKAPI_PTR *PFN_vkSetInstanceLoaderData)(VkInstance instance, - void *object); -typedef VkResult (VKAPI_PTR *PFN_vkSetDeviceLoaderData)(VkDevice device, - void *object); - -typedef struct { - VkStructureType sType; // VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO - const void *pNext; - VkLayerFunction function; - union { - VkLayerInstanceLink *pLayerInfo; - PFN_vkSetInstanceLoaderData pfnSetInstanceLoaderData; - } u; -} VkLayerInstanceCreateInfo; - -typedef struct VkLayerDeviceLink_ { - struct VkLayerDeviceLink_ *pNext; - PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr; - PFN_vkGetDeviceProcAddr pfnNextGetDeviceProcAddr; -} VkLayerDeviceLink; - -typedef struct { - VkStructureType sType; // VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO - const void *pNext; - VkLayerFunction function; - union { - VkLayerDeviceLink *pLayerInfo; - PFN_vkSetDeviceLoaderData pfnSetDeviceLoaderData; - } u; -} VkLayerDeviceCreateInfo; - -#ifdef __cplusplus -extern "C" { -#endif - -VKAPI_ATTR VkResult VKAPI_CALL vkNegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface *pVersionStruct); - -typedef enum VkChainType { - VK_CHAIN_TYPE_UNKNOWN = 0, - VK_CHAIN_TYPE_ENUMERATE_INSTANCE_EXTENSION_PROPERTIES = 1, - VK_CHAIN_TYPE_ENUMERATE_INSTANCE_LAYER_PROPERTIES = 2, - VK_CHAIN_TYPE_ENUMERATE_INSTANCE_VERSION = 3, -} VkChainType; - -typedef struct VkChainHeader { - VkChainType type; - uint32_t version; - uint32_t size; -} VkChainHeader; - -typedef struct VkEnumerateInstanceExtensionPropertiesChain { - VkChainHeader header; - VkResult(VKAPI_PTR *pfnNextLayer)(const struct VkEnumerateInstanceExtensionPropertiesChain *, const char *, uint32_t *, - VkExtensionProperties *); - const struct VkEnumerateInstanceExtensionPropertiesChain *pNextLink; - -#if defined(__cplusplus) - inline VkResult CallDown(const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties) const { - return pfnNextLayer(pNextLink, pLayerName, pPropertyCount, pProperties); - } -#endif -} VkEnumerateInstanceExtensionPropertiesChain; - -typedef struct VkEnumerateInstanceLayerPropertiesChain { - VkChainHeader header; - VkResult(VKAPI_PTR *pfnNextLayer)(const struct VkEnumerateInstanceLayerPropertiesChain *, uint32_t *, VkLayerProperties *); - const struct VkEnumerateInstanceLayerPropertiesChain *pNextLink; - -#if defined(__cplusplus) - inline VkResult CallDown(uint32_t *pPropertyCount, VkLayerProperties *pProperties) const { - return pfnNextLayer(pNextLink, pPropertyCount, pProperties); - } -#endif -} VkEnumerateInstanceLayerPropertiesChain; - -typedef struct VkEnumerateInstanceVersionChain { - VkChainHeader header; - VkResult(VKAPI_PTR *pfnNextLayer)(const struct VkEnumerateInstanceVersionChain *, uint32_t *); - const struct VkEnumerateInstanceVersionChain *pNextLink; - -#if defined(__cplusplus) - inline VkResult CallDown(uint32_t *pApiVersion) const { - return pfnNextLayer(pNextLink, pApiVersion); - } -#endif -} VkEnumerateInstanceVersionChain; - -#ifdef __cplusplus -} -#endif diff --git a/emscripten/include/pvrsdk/vulkan/vk_platform.h b/emscripten/include/pvrsdk/vulkan/vk_platform.h deleted file mode 100644 index 72892992..00000000 --- a/emscripten/include/pvrsdk/vulkan/vk_platform.h +++ /dev/null @@ -1,92 +0,0 @@ -// -// File: vk_platform.h -// -/* -** Copyright (c) 2014-2017 The Khronos Group Inc. -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - - -#ifndef VK_PLATFORM_H_ -#define VK_PLATFORM_H_ - -#ifdef __cplusplus -extern "C" -{ -#endif // __cplusplus - -/* -*************************************************************************************************** -* Platform-specific directives and type declarations -*************************************************************************************************** -*/ - -/* Platform-specific calling convention macros. - * - * Platforms should define these so that Vulkan clients call Vulkan commands - * with the same calling conventions that the Vulkan implementation expects. - * - * VKAPI_ATTR - Placed before the return type in function declarations. - * Useful for C++11 and GCC/Clang-style function attribute syntax. - * VKAPI_CALL - Placed after the return type in function declarations. - * Useful for MSVC-style calling convention syntax. - * VKAPI_PTR - Placed between the '(' and '*' in function pointer types. - * - * Function declaration: VKAPI_ATTR void VKAPI_CALL vkCommand(void); - * Function pointer type: typedef void (VKAPI_PTR *PFN_vkCommand)(void); - */ -#if defined(_WIN32) - // On Windows, Vulkan commands use the stdcall convention - #define VKAPI_ATTR - #define VKAPI_CALL __stdcall - #define VKAPI_PTR VKAPI_CALL -#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7 - #error "Vulkan isn't supported for the 'armeabi' NDK ABI" -#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7 && defined(__ARM_32BIT_STATE) - // On Android 32-bit ARM targets, Vulkan functions use the "hardfloat" - // calling convention, i.e. float parameters are passed in registers. This - // is true even if the rest of the application passes floats on the stack, - // as it does by default when compiling for the armeabi-v7a NDK ABI. - #define VKAPI_ATTR __attribute__((pcs("aapcs-vfp"))) - #define VKAPI_CALL - #define VKAPI_PTR VKAPI_ATTR -#else - // On other platforms, use the default calling convention - #define VKAPI_ATTR - #define VKAPI_CALL - #define VKAPI_PTR -#endif - -#include - -#if !defined(VK_NO_STDINT_H) - #if defined(_MSC_VER) && (_MSC_VER < 1600) - typedef signed __int8 int8_t; - typedef unsigned __int8 uint8_t; - typedef signed __int16 int16_t; - typedef unsigned __int16 uint16_t; - typedef signed __int32 int32_t; - typedef unsigned __int32 uint32_t; - typedef signed __int64 int64_t; - typedef unsigned __int64 uint64_t; - #else - #include - #endif -#endif // !defined(VK_NO_STDINT_H) - -#ifdef __cplusplus -} // extern "C" -#endif // __cplusplus - -#endif diff --git a/emscripten/include/pvrsdk/vulkan/vulkan.h b/emscripten/include/pvrsdk/vulkan/vulkan.h deleted file mode 100644 index d05c8490..00000000 --- a/emscripten/include/pvrsdk/vulkan/vulkan.h +++ /dev/null @@ -1,79 +0,0 @@ -#ifndef VULKAN_H_ -#define VULKAN_H_ 1 - -/* -** Copyright (c) 2015-2018 The Khronos Group Inc. -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -#include "vk_platform.h" -#include "vulkan_core.h" - -#ifdef VK_USE_PLATFORM_ANDROID_KHR -#include "vulkan_android.h" -#endif - - -#ifdef VK_USE_PLATFORM_IOS_MVK -#include "vulkan_ios.h" -#endif - - -#ifdef VK_USE_PLATFORM_MACOS_MVK -#include "vulkan_macos.h" -#endif - - -#ifdef VK_USE_PLATFORM_MIR_KHR -#include -#include "vulkan_mir.h" -#endif - - -#ifdef VK_USE_PLATFORM_VI_NN -#include "vulkan_vi.h" -#endif - - -#ifdef VK_USE_PLATFORM_WAYLAND_KHR -#include -#include "vulkan_wayland.h" -#endif - - -#ifdef VK_USE_PLATFORM_WIN32_KHR -#include -#include "vulkan_win32.h" -#endif - - -#ifdef VK_USE_PLATFORM_XCB_KHR -#include -#include "vulkan_xcb.h" -#endif - - -#ifdef VK_USE_PLATFORM_XLIB_KHR -#include -#include "vulkan_xlib.h" -#endif - - -#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT -#include -#include -#include "vulkan_xlib_xrandr.h" -#endif - -#endif // VULKAN_H_ diff --git a/emscripten/include/pvrsdk/vulkan/vulkan_android.h b/emscripten/include/pvrsdk/vulkan/vulkan_android.h deleted file mode 100644 index 07aaeda2..00000000 --- a/emscripten/include/pvrsdk/vulkan/vulkan_android.h +++ /dev/null @@ -1,126 +0,0 @@ -#ifndef VULKAN_ANDROID_H_ -#define VULKAN_ANDROID_H_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2015-2018 The Khronos Group Inc. -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -/* -** This header is generated from the Khronos Vulkan XML API Registry. -** -*/ - - -#define VK_KHR_android_surface 1 -struct ANativeWindow; - -#define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6 -#define VK_KHR_ANDROID_SURFACE_EXTENSION_NAME "VK_KHR_android_surface" - -typedef VkFlags VkAndroidSurfaceCreateFlagsKHR; - -typedef struct VkAndroidSurfaceCreateInfoKHR { - VkStructureType sType; - const void* pNext; - VkAndroidSurfaceCreateFlagsKHR flags; - struct ANativeWindow* window; -} VkAndroidSurfaceCreateInfoKHR; - - -typedef VkResult (VKAPI_PTR *PFN_vkCreateAndroidSurfaceKHR)(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR( - VkInstance instance, - const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSurfaceKHR* pSurface); -#endif - -#define VK_ANDROID_external_memory_android_hardware_buffer 1 -struct AHardwareBuffer; - -#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 3 -#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME "VK_ANDROID_external_memory_android_hardware_buffer" - -typedef struct VkAndroidHardwareBufferUsageANDROID { - VkStructureType sType; - void* pNext; - uint64_t androidHardwareBufferUsage; -} VkAndroidHardwareBufferUsageANDROID; - -typedef struct VkAndroidHardwareBufferPropertiesANDROID { - VkStructureType sType; - void* pNext; - VkDeviceSize allocationSize; - uint32_t memoryTypeBits; -} VkAndroidHardwareBufferPropertiesANDROID; - -typedef struct VkAndroidHardwareBufferFormatPropertiesANDROID { - VkStructureType sType; - void* pNext; - VkFormat format; - uint64_t externalFormat; - VkFormatFeatureFlags formatFeatures; - VkComponentMapping samplerYcbcrConversionComponents; - VkSamplerYcbcrModelConversion suggestedYcbcrModel; - VkSamplerYcbcrRange suggestedYcbcrRange; - VkChromaLocation suggestedXChromaOffset; - VkChromaLocation suggestedYChromaOffset; -} VkAndroidHardwareBufferFormatPropertiesANDROID; - -typedef struct VkImportAndroidHardwareBufferInfoANDROID { - VkStructureType sType; - const void* pNext; - struct AHardwareBuffer* buffer; -} VkImportAndroidHardwareBufferInfoANDROID; - -typedef struct VkMemoryGetAndroidHardwareBufferInfoANDROID { - VkStructureType sType; - const void* pNext; - VkDeviceMemory memory; -} VkMemoryGetAndroidHardwareBufferInfoANDROID; - -typedef struct VkExternalFormatANDROID { - VkStructureType sType; - void* pNext; - uint64_t externalFormat; -} VkExternalFormatANDROID; - - -typedef VkResult (VKAPI_PTR *PFN_vkGetAndroidHardwareBufferPropertiesANDROID)(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties); -typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkGetAndroidHardwareBufferPropertiesANDROID( - VkDevice device, - const struct AHardwareBuffer* buffer, - VkAndroidHardwareBufferPropertiesANDROID* pProperties); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryAndroidHardwareBufferANDROID( - VkDevice device, - const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, - struct AHardwareBuffer** pBuffer); -#endif - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/emscripten/include/pvrsdk/vulkan/vulkan_core.h b/emscripten/include/pvrsdk/vulkan/vulkan_core.h deleted file mode 100644 index 2cafcddf..00000000 --- a/emscripten/include/pvrsdk/vulkan/vulkan_core.h +++ /dev/null @@ -1,7470 +0,0 @@ -#ifndef VULKAN_CORE_H_ -#define VULKAN_CORE_H_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2015-2018 The Khronos Group Inc. -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -/* -** This header is generated from the Khronos Vulkan XML API Registry. -** -*/ - - -#define VK_VERSION_1_0 1 -#include "vk_platform.h" - -#define VK_MAKE_VERSION(major, minor, patch) \ - (((major) << 22) | ((minor) << 12) | (patch)) - -// DEPRECATED: This define has been removed. Specific version defines (e.g. VK_API_VERSION_1_0), or the VK_MAKE_VERSION macro, should be used instead. -//#define VK_API_VERSION VK_MAKE_VERSION(1, 0, 0) // Patch version should always be set to 0 - -// Vulkan 1.0 version number -#define VK_API_VERSION_1_0 VK_MAKE_VERSION(1, 0, 0)// Patch version should always be set to 0 - -#define VK_VERSION_MAJOR(version) ((uint32_t)(version) >> 22) -#define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff) -#define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff) -// Version of this file -#define VK_HEADER_VERSION 73 - - -#define VK_NULL_HANDLE 0 - - - -#define VK_DEFINE_HANDLE(object) typedef struct object##_T* object; - - -#if !defined(VK_DEFINE_NON_DISPATCHABLE_HANDLE) -#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__) - #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object; -#else - #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object; -#endif -#endif - - - -typedef uint32_t VkFlags; -typedef uint32_t VkBool32; -typedef uint64_t VkDeviceSize; -typedef uint32_t VkSampleMask; - -VK_DEFINE_HANDLE(VkInstance) -VK_DEFINE_HANDLE(VkPhysicalDevice) -VK_DEFINE_HANDLE(VkDevice) -VK_DEFINE_HANDLE(VkQueue) -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSemaphore) -VK_DEFINE_HANDLE(VkCommandBuffer) -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFence) -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeviceMemory) -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBuffer) -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImage) -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkEvent) -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkQueryPool) -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferView) -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImageView) -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkShaderModule) -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineCache) -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineLayout) -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkRenderPass) -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipeline) -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSetLayout) -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSampler) -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorPool) -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSet) -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFramebuffer) -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool) - -#define VK_LOD_CLAMP_NONE 1000.0f -#define VK_REMAINING_MIP_LEVELS (~0U) -#define VK_REMAINING_ARRAY_LAYERS (~0U) -#define VK_WHOLE_SIZE (~0ULL) -#define VK_ATTACHMENT_UNUSED (~0U) -#define VK_TRUE 1 -#define VK_FALSE 0 -#define VK_QUEUE_FAMILY_IGNORED (~0U) -#define VK_SUBPASS_EXTERNAL (~0U) -#define VK_MAX_PHYSICAL_DEVICE_NAME_SIZE 256 -#define VK_UUID_SIZE 16 -#define VK_MAX_MEMORY_TYPES 32 -#define VK_MAX_MEMORY_HEAPS 16 -#define VK_MAX_EXTENSION_NAME_SIZE 256 -#define VK_MAX_DESCRIPTION_SIZE 256 - - -typedef enum VkPipelineCacheHeaderVersion { - VK_PIPELINE_CACHE_HEADER_VERSION_ONE = 1, - VK_PIPELINE_CACHE_HEADER_VERSION_BEGIN_RANGE = VK_PIPELINE_CACHE_HEADER_VERSION_ONE, - VK_PIPELINE_CACHE_HEADER_VERSION_END_RANGE = VK_PIPELINE_CACHE_HEADER_VERSION_ONE, - VK_PIPELINE_CACHE_HEADER_VERSION_RANGE_SIZE = (VK_PIPELINE_CACHE_HEADER_VERSION_ONE - VK_PIPELINE_CACHE_HEADER_VERSION_ONE + 1), - VK_PIPELINE_CACHE_HEADER_VERSION_MAX_ENUM = 0x7FFFFFFF -} VkPipelineCacheHeaderVersion; - -typedef enum VkResult { - VK_SUCCESS = 0, - VK_NOT_READY = 1, - VK_TIMEOUT = 2, - VK_EVENT_SET = 3, - VK_EVENT_RESET = 4, - VK_INCOMPLETE = 5, - VK_ERROR_OUT_OF_HOST_MEMORY = -1, - VK_ERROR_OUT_OF_DEVICE_MEMORY = -2, - VK_ERROR_INITIALIZATION_FAILED = -3, - VK_ERROR_DEVICE_LOST = -4, - VK_ERROR_MEMORY_MAP_FAILED = -5, - VK_ERROR_LAYER_NOT_PRESENT = -6, - VK_ERROR_EXTENSION_NOT_PRESENT = -7, - VK_ERROR_FEATURE_NOT_PRESENT = -8, - VK_ERROR_INCOMPATIBLE_DRIVER = -9, - VK_ERROR_TOO_MANY_OBJECTS = -10, - VK_ERROR_FORMAT_NOT_SUPPORTED = -11, - VK_ERROR_FRAGMENTED_POOL = -12, - VK_ERROR_OUT_OF_POOL_MEMORY = -1000069000, - VK_ERROR_INVALID_EXTERNAL_HANDLE = -1000072003, - VK_ERROR_SURFACE_LOST_KHR = -1000000000, - VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = -1000000001, - VK_SUBOPTIMAL_KHR = 1000001003, - VK_ERROR_OUT_OF_DATE_KHR = -1000001004, - VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = -1000003001, - VK_ERROR_VALIDATION_FAILED_EXT = -1000011001, - VK_ERROR_INVALID_SHADER_NV = -1000012000, - VK_ERROR_FRAGMENTATION_EXT = -1000161000, - VK_ERROR_NOT_PERMITTED_EXT = -1000174001, - VK_ERROR_OUT_OF_POOL_MEMORY_KHR = VK_ERROR_OUT_OF_POOL_MEMORY, - VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR = VK_ERROR_INVALID_EXTERNAL_HANDLE, - VK_RESULT_BEGIN_RANGE = VK_ERROR_FRAGMENTED_POOL, - VK_RESULT_END_RANGE = VK_INCOMPLETE, - VK_RESULT_RANGE_SIZE = (VK_INCOMPLETE - VK_ERROR_FRAGMENTED_POOL + 1), - VK_RESULT_MAX_ENUM = 0x7FFFFFFF -} VkResult; - -typedef enum VkStructureType { - VK_STRUCTURE_TYPE_APPLICATION_INFO = 0, - VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 1, - VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO = 2, - VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 3, - VK_STRUCTURE_TYPE_SUBMIT_INFO = 4, - VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO = 5, - VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE = 6, - VK_STRUCTURE_TYPE_BIND_SPARSE_INFO = 7, - VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 8, - VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 9, - VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 10, - VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 11, - VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 12, - VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 13, - VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 14, - VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 15, - VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO = 16, - VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO = 17, - VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 18, - VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO = 19, - VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO = 20, - VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO = 21, - VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO = 22, - VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO = 23, - VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO = 24, - VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO = 25, - VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO = 26, - VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO = 27, - VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 28, - VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 29, - VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 30, - VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 31, - VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 32, - VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 33, - VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO = 34, - VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET = 35, - VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET = 36, - VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37, - VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 38, - VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO = 39, - VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO = 40, - VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO = 41, - VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO = 42, - VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO = 43, - VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 44, - VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 45, - VK_STRUCTURE_TYPE_MEMORY_BARRIER = 46, - VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO = 47, - VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO = 48, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES = 1000094000, - VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO = 1000157000, - VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO = 1000157001, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES = 1000083000, - VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS = 1000127000, - VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO = 1000127001, - VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO = 1000060000, - VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO = 1000060003, - VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO = 1000060004, - VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO = 1000060005, - VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO = 1000060006, - VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO = 1000060013, - VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO = 1000060014, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES = 1000070000, - VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO = 1000070001, - VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2 = 1000146000, - VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2 = 1000146001, - VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2 = 1000146002, - VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2 = 1000146003, - VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2 = 1000146004, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2 = 1000059000, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2 = 1000059001, - VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2 = 1000059002, - VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2 = 1000059003, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2 = 1000059004, - VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2 = 1000059005, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2 = 1000059006, - VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2 = 1000059007, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2 = 1000059008, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES = 1000117000, - VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO = 1000117001, - VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO = 1000117002, - VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO = 1000117003, - VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO = 1000053000, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES = 1000053001, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES = 1000053002, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES = 1000120000, - VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO = 1000145000, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES = 1000145001, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES = 1000145002, - VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2 = 1000145003, - VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO = 1000156000, - VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO = 1000156001, - VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO = 1000156002, - VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO = 1000156003, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES = 1000156004, - VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES = 1000156005, - VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO = 1000085000, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO = 1000071000, - VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES = 1000071001, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO = 1000071002, - VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES = 1000071003, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES = 1000071004, - VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO = 1000072000, - VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO = 1000072001, - VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO = 1000072002, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO = 1000112000, - VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES = 1000112001, - VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO = 1000113000, - VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO = 1000077000, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO = 1000076000, - VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES = 1000076001, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES = 1000168000, - VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT = 1000168001, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES = 1000063000, - VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000, - VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001, - VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR = 1000060007, - VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR = 1000060008, - VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR = 1000060009, - VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR = 1000060010, - VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR = 1000060011, - VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR = 1000060012, - VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR = 1000002000, - VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR = 1000002001, - VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR = 1000003000, - VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000, - VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000, - VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000, - VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR = 1000007000, - VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000, - VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000, - VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000, - VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000, - VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000, - VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001, - VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002, - VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV = 1000026000, - VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV = 1000026001, - VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV = 1000026002, - VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD = 1000041000, - VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000, - VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001, - VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057000, - VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV = 1000057001, - VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV = 1000058000, - VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT = 1000061000, - VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN = 1000062000, - VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073000, - VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073001, - VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR = 1000073002, - VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR = 1000073003, - VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR = 1000074000, - VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR = 1000074001, - VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR = 1000074002, - VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR = 1000075000, - VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078000, - VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR = 1000078001, - VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR = 1000078002, - VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR = 1000078003, - VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR = 1000079000, - VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR = 1000079001, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = 1000080000, - VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000, - VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX = 1000086000, - VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX = 1000086001, - VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX = 1000086002, - VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX = 1000086003, - VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX = 1000086004, - VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX = 1000086005, - VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV = 1000087000, - VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT = 1000090000, - VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT = 1000091000, - VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT = 1000091001, - VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT = 1000091002, - VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT = 1000091003, - VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE = 1000092000, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX = 1000097000, - VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV = 1000098000, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT = 1000099000, - VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT = 1000101000, - VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT = 1000101001, - VK_STRUCTURE_TYPE_HDR_METADATA_EXT = 1000105000, - VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR = 1000111000, - VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114000, - VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR = 1000114001, - VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR = 1000114002, - VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR = 1000115000, - VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR = 1000115001, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR = 1000119000, - VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR = 1000119001, - VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR = 1000119002, - VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000, - VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000, - VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT = 1000128000, - VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT = 1000128001, - VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT = 1000128002, - VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT = 1000128003, - VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT = 1000128004, - VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID = 1000129000, - VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID = 1000129001, - VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID = 1000129002, - VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID = 1000129003, - VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID = 1000129004, - VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID = 1000129005, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT = 1000130000, - VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT = 1000130001, - VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT = 1000143000, - VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT = 1000143001, - VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT = 1000143002, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT = 1000143003, - VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT = 1000143004, - VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR = 1000147000, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT = 1000148000, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT = 1000148001, - VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT = 1000148002, - VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV = 1000149000, - VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV = 1000152000, - VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160000, - VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160001, - VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT = 1000161000, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT = 1000161001, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT = 1000161002, - VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT = 1000161003, - VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT = 1000161004, - VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT = 1000174000, - VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT = 1000178000, - VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT = 1000178001, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT = 1000178002, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD = 1000185000, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT = 1000190000, - VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT = 1000190001, - VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, - VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2, - VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2, - VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2, - VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR = VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2, - VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO, - VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO, - VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO, - VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO, - VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO, - VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO_KHR = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO, - VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO_KHR = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES, - VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO, - VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO, - VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES, - VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO, - VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO, - VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO, - VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES, - VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES, - VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO, - VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES, - VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES, - VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO, - VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO, - VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES, - VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS, - VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO, - VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR = VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2, - VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR = VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2, - VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR = VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2, - VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR = VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2, - VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR = VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2, - VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO, - VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO_KHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO, - VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO_KHR = VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO, - VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO_KHR = VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES, - VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES_KHR = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES, - VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHR = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO, - VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHR = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES, - VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT_KHR = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT, - VK_STRUCTURE_TYPE_BEGIN_RANGE = VK_STRUCTURE_TYPE_APPLICATION_INFO, - VK_STRUCTURE_TYPE_END_RANGE = VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO, - VK_STRUCTURE_TYPE_RANGE_SIZE = (VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO - VK_STRUCTURE_TYPE_APPLICATION_INFO + 1), - VK_STRUCTURE_TYPE_MAX_ENUM = 0x7FFFFFFF -} VkStructureType; - -typedef enum VkSystemAllocationScope { - VK_SYSTEM_ALLOCATION_SCOPE_COMMAND = 0, - VK_SYSTEM_ALLOCATION_SCOPE_OBJECT = 1, - VK_SYSTEM_ALLOCATION_SCOPE_CACHE = 2, - VK_SYSTEM_ALLOCATION_SCOPE_DEVICE = 3, - VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE = 4, - VK_SYSTEM_ALLOCATION_SCOPE_BEGIN_RANGE = VK_SYSTEM_ALLOCATION_SCOPE_COMMAND, - VK_SYSTEM_ALLOCATION_SCOPE_END_RANGE = VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE, - VK_SYSTEM_ALLOCATION_SCOPE_RANGE_SIZE = (VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE - VK_SYSTEM_ALLOCATION_SCOPE_COMMAND + 1), - VK_SYSTEM_ALLOCATION_SCOPE_MAX_ENUM = 0x7FFFFFFF -} VkSystemAllocationScope; - -typedef enum VkInternalAllocationType { - VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE = 0, - VK_INTERNAL_ALLOCATION_TYPE_BEGIN_RANGE = VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE, - VK_INTERNAL_ALLOCATION_TYPE_END_RANGE = VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE, - VK_INTERNAL_ALLOCATION_TYPE_RANGE_SIZE = (VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE - VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE + 1), - VK_INTERNAL_ALLOCATION_TYPE_MAX_ENUM = 0x7FFFFFFF -} VkInternalAllocationType; - -typedef enum VkFormat { - VK_FORMAT_UNDEFINED = 0, - VK_FORMAT_R4G4_UNORM_PACK8 = 1, - VK_FORMAT_R4G4B4A4_UNORM_PACK16 = 2, - VK_FORMAT_B4G4R4A4_UNORM_PACK16 = 3, - VK_FORMAT_R5G6B5_UNORM_PACK16 = 4, - VK_FORMAT_B5G6R5_UNORM_PACK16 = 5, - VK_FORMAT_R5G5B5A1_UNORM_PACK16 = 6, - VK_FORMAT_B5G5R5A1_UNORM_PACK16 = 7, - VK_FORMAT_A1R5G5B5_UNORM_PACK16 = 8, - VK_FORMAT_R8_UNORM = 9, - VK_FORMAT_R8_SNORM = 10, - VK_FORMAT_R8_USCALED = 11, - VK_FORMAT_R8_SSCALED = 12, - VK_FORMAT_R8_UINT = 13, - VK_FORMAT_R8_SINT = 14, - VK_FORMAT_R8_SRGB = 15, - VK_FORMAT_R8G8_UNORM = 16, - VK_FORMAT_R8G8_SNORM = 17, - VK_FORMAT_R8G8_USCALED = 18, - VK_FORMAT_R8G8_SSCALED = 19, - VK_FORMAT_R8G8_UINT = 20, - VK_FORMAT_R8G8_SINT = 21, - VK_FORMAT_R8G8_SRGB = 22, - VK_FORMAT_R8G8B8_UNORM = 23, - VK_FORMAT_R8G8B8_SNORM = 24, - VK_FORMAT_R8G8B8_USCALED = 25, - VK_FORMAT_R8G8B8_SSCALED = 26, - VK_FORMAT_R8G8B8_UINT = 27, - VK_FORMAT_R8G8B8_SINT = 28, - VK_FORMAT_R8G8B8_SRGB = 29, - VK_FORMAT_B8G8R8_UNORM = 30, - VK_FORMAT_B8G8R8_SNORM = 31, - VK_FORMAT_B8G8R8_USCALED = 32, - VK_FORMAT_B8G8R8_SSCALED = 33, - VK_FORMAT_B8G8R8_UINT = 34, - VK_FORMAT_B8G8R8_SINT = 35, - VK_FORMAT_B8G8R8_SRGB = 36, - VK_FORMAT_R8G8B8A8_UNORM = 37, - VK_FORMAT_R8G8B8A8_SNORM = 38, - VK_FORMAT_R8G8B8A8_USCALED = 39, - VK_FORMAT_R8G8B8A8_SSCALED = 40, - VK_FORMAT_R8G8B8A8_UINT = 41, - VK_FORMAT_R8G8B8A8_SINT = 42, - VK_FORMAT_R8G8B8A8_SRGB = 43, - VK_FORMAT_B8G8R8A8_UNORM = 44, - VK_FORMAT_B8G8R8A8_SNORM = 45, - VK_FORMAT_B8G8R8A8_USCALED = 46, - VK_FORMAT_B8G8R8A8_SSCALED = 47, - VK_FORMAT_B8G8R8A8_UINT = 48, - VK_FORMAT_B8G8R8A8_SINT = 49, - VK_FORMAT_B8G8R8A8_SRGB = 50, - VK_FORMAT_A8B8G8R8_UNORM_PACK32 = 51, - VK_FORMAT_A8B8G8R8_SNORM_PACK32 = 52, - VK_FORMAT_A8B8G8R8_USCALED_PACK32 = 53, - VK_FORMAT_A8B8G8R8_SSCALED_PACK32 = 54, - VK_FORMAT_A8B8G8R8_UINT_PACK32 = 55, - VK_FORMAT_A8B8G8R8_SINT_PACK32 = 56, - VK_FORMAT_A8B8G8R8_SRGB_PACK32 = 57, - VK_FORMAT_A2R10G10B10_UNORM_PACK32 = 58, - VK_FORMAT_A2R10G10B10_SNORM_PACK32 = 59, - VK_FORMAT_A2R10G10B10_USCALED_PACK32 = 60, - VK_FORMAT_A2R10G10B10_SSCALED_PACK32 = 61, - VK_FORMAT_A2R10G10B10_UINT_PACK32 = 62, - VK_FORMAT_A2R10G10B10_SINT_PACK32 = 63, - VK_FORMAT_A2B10G10R10_UNORM_PACK32 = 64, - VK_FORMAT_A2B10G10R10_SNORM_PACK32 = 65, - VK_FORMAT_A2B10G10R10_USCALED_PACK32 = 66, - VK_FORMAT_A2B10G10R10_SSCALED_PACK32 = 67, - VK_FORMAT_A2B10G10R10_UINT_PACK32 = 68, - VK_FORMAT_A2B10G10R10_SINT_PACK32 = 69, - VK_FORMAT_R16_UNORM = 70, - VK_FORMAT_R16_SNORM = 71, - VK_FORMAT_R16_USCALED = 72, - VK_FORMAT_R16_SSCALED = 73, - VK_FORMAT_R16_UINT = 74, - VK_FORMAT_R16_SINT = 75, - VK_FORMAT_R16_SFLOAT = 76, - VK_FORMAT_R16G16_UNORM = 77, - VK_FORMAT_R16G16_SNORM = 78, - VK_FORMAT_R16G16_USCALED = 79, - VK_FORMAT_R16G16_SSCALED = 80, - VK_FORMAT_R16G16_UINT = 81, - VK_FORMAT_R16G16_SINT = 82, - VK_FORMAT_R16G16_SFLOAT = 83, - VK_FORMAT_R16G16B16_UNORM = 84, - VK_FORMAT_R16G16B16_SNORM = 85, - VK_FORMAT_R16G16B16_USCALED = 86, - VK_FORMAT_R16G16B16_SSCALED = 87, - VK_FORMAT_R16G16B16_UINT = 88, - VK_FORMAT_R16G16B16_SINT = 89, - VK_FORMAT_R16G16B16_SFLOAT = 90, - VK_FORMAT_R16G16B16A16_UNORM = 91, - VK_FORMAT_R16G16B16A16_SNORM = 92, - VK_FORMAT_R16G16B16A16_USCALED = 93, - VK_FORMAT_R16G16B16A16_SSCALED = 94, - VK_FORMAT_R16G16B16A16_UINT = 95, - VK_FORMAT_R16G16B16A16_SINT = 96, - VK_FORMAT_R16G16B16A16_SFLOAT = 97, - VK_FORMAT_R32_UINT = 98, - VK_FORMAT_R32_SINT = 99, - VK_FORMAT_R32_SFLOAT = 100, - VK_FORMAT_R32G32_UINT = 101, - VK_FORMAT_R32G32_SINT = 102, - VK_FORMAT_R32G32_SFLOAT = 103, - VK_FORMAT_R32G32B32_UINT = 104, - VK_FORMAT_R32G32B32_SINT = 105, - VK_FORMAT_R32G32B32_SFLOAT = 106, - VK_FORMAT_R32G32B32A32_UINT = 107, - VK_FORMAT_R32G32B32A32_SINT = 108, - VK_FORMAT_R32G32B32A32_SFLOAT = 109, - VK_FORMAT_R64_UINT = 110, - VK_FORMAT_R64_SINT = 111, - VK_FORMAT_R64_SFLOAT = 112, - VK_FORMAT_R64G64_UINT = 113, - VK_FORMAT_R64G64_SINT = 114, - VK_FORMAT_R64G64_SFLOAT = 115, - VK_FORMAT_R64G64B64_UINT = 116, - VK_FORMAT_R64G64B64_SINT = 117, - VK_FORMAT_R64G64B64_SFLOAT = 118, - VK_FORMAT_R64G64B64A64_UINT = 119, - VK_FORMAT_R64G64B64A64_SINT = 120, - VK_FORMAT_R64G64B64A64_SFLOAT = 121, - VK_FORMAT_B10G11R11_UFLOAT_PACK32 = 122, - VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 123, - VK_FORMAT_D16_UNORM = 124, - VK_FORMAT_X8_D24_UNORM_PACK32 = 125, - VK_FORMAT_D32_SFLOAT = 126, - VK_FORMAT_S8_UINT = 127, - VK_FORMAT_D16_UNORM_S8_UINT = 128, - VK_FORMAT_D24_UNORM_S8_UINT = 129, - VK_FORMAT_D32_SFLOAT_S8_UINT = 130, - VK_FORMAT_BC1_RGB_UNORM_BLOCK = 131, - VK_FORMAT_BC1_RGB_SRGB_BLOCK = 132, - VK_FORMAT_BC1_RGBA_UNORM_BLOCK = 133, - VK_FORMAT_BC1_RGBA_SRGB_BLOCK = 134, - VK_FORMAT_BC2_UNORM_BLOCK = 135, - VK_FORMAT_BC2_SRGB_BLOCK = 136, - VK_FORMAT_BC3_UNORM_BLOCK = 137, - VK_FORMAT_BC3_SRGB_BLOCK = 138, - VK_FORMAT_BC4_UNORM_BLOCK = 139, - VK_FORMAT_BC4_SNORM_BLOCK = 140, - VK_FORMAT_BC5_UNORM_BLOCK = 141, - VK_FORMAT_BC5_SNORM_BLOCK = 142, - VK_FORMAT_BC6H_UFLOAT_BLOCK = 143, - VK_FORMAT_BC6H_SFLOAT_BLOCK = 144, - VK_FORMAT_BC7_UNORM_BLOCK = 145, - VK_FORMAT_BC7_SRGB_BLOCK = 146, - VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 147, - VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 148, - VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 149, - VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 150, - VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 151, - VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 152, - VK_FORMAT_EAC_R11_UNORM_BLOCK = 153, - VK_FORMAT_EAC_R11_SNORM_BLOCK = 154, - VK_FORMAT_EAC_R11G11_UNORM_BLOCK = 155, - VK_FORMAT_EAC_R11G11_SNORM_BLOCK = 156, - VK_FORMAT_ASTC_4x4_UNORM_BLOCK = 157, - VK_FORMAT_ASTC_4x4_SRGB_BLOCK = 158, - VK_FORMAT_ASTC_5x4_UNORM_BLOCK = 159, - VK_FORMAT_ASTC_5x4_SRGB_BLOCK = 160, - VK_FORMAT_ASTC_5x5_UNORM_BLOCK = 161, - VK_FORMAT_ASTC_5x5_SRGB_BLOCK = 162, - VK_FORMAT_ASTC_6x5_UNORM_BLOCK = 163, - VK_FORMAT_ASTC_6x5_SRGB_BLOCK = 164, - VK_FORMAT_ASTC_6x6_UNORM_BLOCK = 165, - VK_FORMAT_ASTC_6x6_SRGB_BLOCK = 166, - VK_FORMAT_ASTC_8x5_UNORM_BLOCK = 167, - VK_FORMAT_ASTC_8x5_SRGB_BLOCK = 168, - VK_FORMAT_ASTC_8x6_UNORM_BLOCK = 169, - VK_FORMAT_ASTC_8x6_SRGB_BLOCK = 170, - VK_FORMAT_ASTC_8x8_UNORM_BLOCK = 171, - VK_FORMAT_ASTC_8x8_SRGB_BLOCK = 172, - VK_FORMAT_ASTC_10x5_UNORM_BLOCK = 173, - VK_FORMAT_ASTC_10x5_SRGB_BLOCK = 174, - VK_FORMAT_ASTC_10x6_UNORM_BLOCK = 175, - VK_FORMAT_ASTC_10x6_SRGB_BLOCK = 176, - VK_FORMAT_ASTC_10x8_UNORM_BLOCK = 177, - VK_FORMAT_ASTC_10x8_SRGB_BLOCK = 178, - VK_FORMAT_ASTC_10x10_UNORM_BLOCK = 179, - VK_FORMAT_ASTC_10x10_SRGB_BLOCK = 180, - VK_FORMAT_ASTC_12x10_UNORM_BLOCK = 181, - VK_FORMAT_ASTC_12x10_SRGB_BLOCK = 182, - VK_FORMAT_ASTC_12x12_UNORM_BLOCK = 183, - VK_FORMAT_ASTC_12x12_SRGB_BLOCK = 184, - VK_FORMAT_G8B8G8R8_422_UNORM = 1000156000, - VK_FORMAT_B8G8R8G8_422_UNORM = 1000156001, - VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM = 1000156002, - VK_FORMAT_G8_B8R8_2PLANE_420_UNORM = 1000156003, - VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM = 1000156004, - VK_FORMAT_G8_B8R8_2PLANE_422_UNORM = 1000156005, - VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM = 1000156006, - VK_FORMAT_R10X6_UNORM_PACK16 = 1000156007, - VK_FORMAT_R10X6G10X6_UNORM_2PACK16 = 1000156008, - VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16 = 1000156009, - VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 = 1000156010, - VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 = 1000156011, - VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 = 1000156012, - VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 = 1000156013, - VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 = 1000156014, - VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 = 1000156015, - VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 = 1000156016, - VK_FORMAT_R12X4_UNORM_PACK16 = 1000156017, - VK_FORMAT_R12X4G12X4_UNORM_2PACK16 = 1000156018, - VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16 = 1000156019, - VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 = 1000156020, - VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 = 1000156021, - VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 = 1000156022, - VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 = 1000156023, - VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 = 1000156024, - VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 = 1000156025, - VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 = 1000156026, - VK_FORMAT_G16B16G16R16_422_UNORM = 1000156027, - VK_FORMAT_B16G16R16G16_422_UNORM = 1000156028, - VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM = 1000156029, - VK_FORMAT_G16_B16R16_2PLANE_420_UNORM = 1000156030, - VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM = 1000156031, - VK_FORMAT_G16_B16R16_2PLANE_422_UNORM = 1000156032, - VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM = 1000156033, - VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000, - VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001, - VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002, - VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG = 1000054003, - VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG = 1000054004, - VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG = 1000054005, - VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006, - VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007, - VK_FORMAT_G8B8G8R8_422_UNORM_KHR = VK_FORMAT_G8B8G8R8_422_UNORM, - VK_FORMAT_B8G8R8G8_422_UNORM_KHR = VK_FORMAT_B8G8R8G8_422_UNORM, - VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR = VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM, - VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR = VK_FORMAT_G8_B8R8_2PLANE_420_UNORM, - VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR = VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM, - VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR = VK_FORMAT_G8_B8R8_2PLANE_422_UNORM, - VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR = VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM, - VK_FORMAT_R10X6_UNORM_PACK16_KHR = VK_FORMAT_R10X6_UNORM_PACK16, - VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR = VK_FORMAT_R10X6G10X6_UNORM_2PACK16, - VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR = VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16, - VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR = VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16, - VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR = VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16, - VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16, - VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16, - VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16, - VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR = VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16, - VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR = VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16, - VK_FORMAT_R12X4_UNORM_PACK16_KHR = VK_FORMAT_R12X4_UNORM_PACK16, - VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR = VK_FORMAT_R12X4G12X4_UNORM_2PACK16, - VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR = VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16, - VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR = VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16, - VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR = VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16, - VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16, - VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16, - VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16, - VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR = VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16, - VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR = VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16, - VK_FORMAT_G16B16G16R16_422_UNORM_KHR = VK_FORMAT_G16B16G16R16_422_UNORM, - VK_FORMAT_B16G16R16G16_422_UNORM_KHR = VK_FORMAT_B16G16R16G16_422_UNORM, - VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR = VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM, - VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR = VK_FORMAT_G16_B16R16_2PLANE_420_UNORM, - VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR = VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM, - VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR = VK_FORMAT_G16_B16R16_2PLANE_422_UNORM, - VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR = VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM, - VK_FORMAT_BEGIN_RANGE = VK_FORMAT_UNDEFINED, - VK_FORMAT_END_RANGE = VK_FORMAT_ASTC_12x12_SRGB_BLOCK, - VK_FORMAT_RANGE_SIZE = (VK_FORMAT_ASTC_12x12_SRGB_BLOCK - VK_FORMAT_UNDEFINED + 1), - VK_FORMAT_MAX_ENUM = 0x7FFFFFFF -} VkFormat; - -typedef enum VkImageType { - VK_IMAGE_TYPE_1D = 0, - VK_IMAGE_TYPE_2D = 1, - VK_IMAGE_TYPE_3D = 2, - VK_IMAGE_TYPE_BEGIN_RANGE = VK_IMAGE_TYPE_1D, - VK_IMAGE_TYPE_END_RANGE = VK_IMAGE_TYPE_3D, - VK_IMAGE_TYPE_RANGE_SIZE = (VK_IMAGE_TYPE_3D - VK_IMAGE_TYPE_1D + 1), - VK_IMAGE_TYPE_MAX_ENUM = 0x7FFFFFFF -} VkImageType; - -typedef enum VkImageTiling { - VK_IMAGE_TILING_OPTIMAL = 0, - VK_IMAGE_TILING_LINEAR = 1, - VK_IMAGE_TILING_BEGIN_RANGE = VK_IMAGE_TILING_OPTIMAL, - VK_IMAGE_TILING_END_RANGE = VK_IMAGE_TILING_LINEAR, - VK_IMAGE_TILING_RANGE_SIZE = (VK_IMAGE_TILING_LINEAR - VK_IMAGE_TILING_OPTIMAL + 1), - VK_IMAGE_TILING_MAX_ENUM = 0x7FFFFFFF -} VkImageTiling; - -typedef enum VkPhysicalDeviceType { - VK_PHYSICAL_DEVICE_TYPE_OTHER = 0, - VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 1, - VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 2, - VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 3, - VK_PHYSICAL_DEVICE_TYPE_CPU = 4, - VK_PHYSICAL_DEVICE_TYPE_BEGIN_RANGE = VK_PHYSICAL_DEVICE_TYPE_OTHER, - VK_PHYSICAL_DEVICE_TYPE_END_RANGE = VK_PHYSICAL_DEVICE_TYPE_CPU, - VK_PHYSICAL_DEVICE_TYPE_RANGE_SIZE = (VK_PHYSICAL_DEVICE_TYPE_CPU - VK_PHYSICAL_DEVICE_TYPE_OTHER + 1), - VK_PHYSICAL_DEVICE_TYPE_MAX_ENUM = 0x7FFFFFFF -} VkPhysicalDeviceType; - -typedef enum VkQueryType { - VK_QUERY_TYPE_OCCLUSION = 0, - VK_QUERY_TYPE_PIPELINE_STATISTICS = 1, - VK_QUERY_TYPE_TIMESTAMP = 2, - VK_QUERY_TYPE_BEGIN_RANGE = VK_QUERY_TYPE_OCCLUSION, - VK_QUERY_TYPE_END_RANGE = VK_QUERY_TYPE_TIMESTAMP, - VK_QUERY_TYPE_RANGE_SIZE = (VK_QUERY_TYPE_TIMESTAMP - VK_QUERY_TYPE_OCCLUSION + 1), - VK_QUERY_TYPE_MAX_ENUM = 0x7FFFFFFF -} VkQueryType; - -typedef enum VkSharingMode { - VK_SHARING_MODE_EXCLUSIVE = 0, - VK_SHARING_MODE_CONCURRENT = 1, - VK_SHARING_MODE_BEGIN_RANGE = VK_SHARING_MODE_EXCLUSIVE, - VK_SHARING_MODE_END_RANGE = VK_SHARING_MODE_CONCURRENT, - VK_SHARING_MODE_RANGE_SIZE = (VK_SHARING_MODE_CONCURRENT - VK_SHARING_MODE_EXCLUSIVE + 1), - VK_SHARING_MODE_MAX_ENUM = 0x7FFFFFFF -} VkSharingMode; - -typedef enum VkImageLayout { - VK_IMAGE_LAYOUT_UNDEFINED = 0, - VK_IMAGE_LAYOUT_GENERAL = 1, - VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 2, - VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 3, - VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 4, - VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 5, - VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL = 6, - VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL = 7, - VK_IMAGE_LAYOUT_PREINITIALIZED = 8, - VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL = 1000117000, - VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL = 1000117001, - VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002, - VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR = 1000111000, - VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, - VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, - VK_IMAGE_LAYOUT_BEGIN_RANGE = VK_IMAGE_LAYOUT_UNDEFINED, - VK_IMAGE_LAYOUT_END_RANGE = VK_IMAGE_LAYOUT_PREINITIALIZED, - VK_IMAGE_LAYOUT_RANGE_SIZE = (VK_IMAGE_LAYOUT_PREINITIALIZED - VK_IMAGE_LAYOUT_UNDEFINED + 1), - VK_IMAGE_LAYOUT_MAX_ENUM = 0x7FFFFFFF -} VkImageLayout; - -typedef enum VkImageViewType { - VK_IMAGE_VIEW_TYPE_1D = 0, - VK_IMAGE_VIEW_TYPE_2D = 1, - VK_IMAGE_VIEW_TYPE_3D = 2, - VK_IMAGE_VIEW_TYPE_CUBE = 3, - VK_IMAGE_VIEW_TYPE_1D_ARRAY = 4, - VK_IMAGE_VIEW_TYPE_2D_ARRAY = 5, - VK_IMAGE_VIEW_TYPE_CUBE_ARRAY = 6, - VK_IMAGE_VIEW_TYPE_BEGIN_RANGE = VK_IMAGE_VIEW_TYPE_1D, - VK_IMAGE_VIEW_TYPE_END_RANGE = VK_IMAGE_VIEW_TYPE_CUBE_ARRAY, - VK_IMAGE_VIEW_TYPE_RANGE_SIZE = (VK_IMAGE_VIEW_TYPE_CUBE_ARRAY - VK_IMAGE_VIEW_TYPE_1D + 1), - VK_IMAGE_VIEW_TYPE_MAX_ENUM = 0x7FFFFFFF -} VkImageViewType; - -typedef enum VkComponentSwizzle { - VK_COMPONENT_SWIZZLE_IDENTITY = 0, - VK_COMPONENT_SWIZZLE_ZERO = 1, - VK_COMPONENT_SWIZZLE_ONE = 2, - VK_COMPONENT_SWIZZLE_R = 3, - VK_COMPONENT_SWIZZLE_G = 4, - VK_COMPONENT_SWIZZLE_B = 5, - VK_COMPONENT_SWIZZLE_A = 6, - VK_COMPONENT_SWIZZLE_BEGIN_RANGE = VK_COMPONENT_SWIZZLE_IDENTITY, - VK_COMPONENT_SWIZZLE_END_RANGE = VK_COMPONENT_SWIZZLE_A, - VK_COMPONENT_SWIZZLE_RANGE_SIZE = (VK_COMPONENT_SWIZZLE_A - VK_COMPONENT_SWIZZLE_IDENTITY + 1), - VK_COMPONENT_SWIZZLE_MAX_ENUM = 0x7FFFFFFF -} VkComponentSwizzle; - -typedef enum VkVertexInputRate { - VK_VERTEX_INPUT_RATE_VERTEX = 0, - VK_VERTEX_INPUT_RATE_INSTANCE = 1, - VK_VERTEX_INPUT_RATE_BEGIN_RANGE = VK_VERTEX_INPUT_RATE_VERTEX, - VK_VERTEX_INPUT_RATE_END_RANGE = VK_VERTEX_INPUT_RATE_INSTANCE, - VK_VERTEX_INPUT_RATE_RANGE_SIZE = (VK_VERTEX_INPUT_RATE_INSTANCE - VK_VERTEX_INPUT_RATE_VERTEX + 1), - VK_VERTEX_INPUT_RATE_MAX_ENUM = 0x7FFFFFFF -} VkVertexInputRate; - -typedef enum VkPrimitiveTopology { - VK_PRIMITIVE_TOPOLOGY_POINT_LIST = 0, - VK_PRIMITIVE_TOPOLOGY_LINE_LIST = 1, - VK_PRIMITIVE_TOPOLOGY_LINE_STRIP = 2, - VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST = 3, - VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP = 4, - VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN = 5, - VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY = 6, - VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY = 7, - VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY = 8, - VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY = 9, - VK_PRIMITIVE_TOPOLOGY_PATCH_LIST = 10, - VK_PRIMITIVE_TOPOLOGY_BEGIN_RANGE = VK_PRIMITIVE_TOPOLOGY_POINT_LIST, - VK_PRIMITIVE_TOPOLOGY_END_RANGE = VK_PRIMITIVE_TOPOLOGY_PATCH_LIST, - VK_PRIMITIVE_TOPOLOGY_RANGE_SIZE = (VK_PRIMITIVE_TOPOLOGY_PATCH_LIST - VK_PRIMITIVE_TOPOLOGY_POINT_LIST + 1), - VK_PRIMITIVE_TOPOLOGY_MAX_ENUM = 0x7FFFFFFF -} VkPrimitiveTopology; - -typedef enum VkPolygonMode { - VK_POLYGON_MODE_FILL = 0, - VK_POLYGON_MODE_LINE = 1, - VK_POLYGON_MODE_POINT = 2, - VK_POLYGON_MODE_FILL_RECTANGLE_NV = 1000153000, - VK_POLYGON_MODE_BEGIN_RANGE = VK_POLYGON_MODE_FILL, - VK_POLYGON_MODE_END_RANGE = VK_POLYGON_MODE_POINT, - VK_POLYGON_MODE_RANGE_SIZE = (VK_POLYGON_MODE_POINT - VK_POLYGON_MODE_FILL + 1), - VK_POLYGON_MODE_MAX_ENUM = 0x7FFFFFFF -} VkPolygonMode; - -typedef enum VkFrontFace { - VK_FRONT_FACE_COUNTER_CLOCKWISE = 0, - VK_FRONT_FACE_CLOCKWISE = 1, - VK_FRONT_FACE_BEGIN_RANGE = VK_FRONT_FACE_COUNTER_CLOCKWISE, - VK_FRONT_FACE_END_RANGE = VK_FRONT_FACE_CLOCKWISE, - VK_FRONT_FACE_RANGE_SIZE = (VK_FRONT_FACE_CLOCKWISE - VK_FRONT_FACE_COUNTER_CLOCKWISE + 1), - VK_FRONT_FACE_MAX_ENUM = 0x7FFFFFFF -} VkFrontFace; - -typedef enum VkCompareOp { - VK_COMPARE_OP_NEVER = 0, - VK_COMPARE_OP_LESS = 1, - VK_COMPARE_OP_EQUAL = 2, - VK_COMPARE_OP_LESS_OR_EQUAL = 3, - VK_COMPARE_OP_GREATER = 4, - VK_COMPARE_OP_NOT_EQUAL = 5, - VK_COMPARE_OP_GREATER_OR_EQUAL = 6, - VK_COMPARE_OP_ALWAYS = 7, - VK_COMPARE_OP_BEGIN_RANGE = VK_COMPARE_OP_NEVER, - VK_COMPARE_OP_END_RANGE = VK_COMPARE_OP_ALWAYS, - VK_COMPARE_OP_RANGE_SIZE = (VK_COMPARE_OP_ALWAYS - VK_COMPARE_OP_NEVER + 1), - VK_COMPARE_OP_MAX_ENUM = 0x7FFFFFFF -} VkCompareOp; - -typedef enum VkStencilOp { - VK_STENCIL_OP_KEEP = 0, - VK_STENCIL_OP_ZERO = 1, - VK_STENCIL_OP_REPLACE = 2, - VK_STENCIL_OP_INCREMENT_AND_CLAMP = 3, - VK_STENCIL_OP_DECREMENT_AND_CLAMP = 4, - VK_STENCIL_OP_INVERT = 5, - VK_STENCIL_OP_INCREMENT_AND_WRAP = 6, - VK_STENCIL_OP_DECREMENT_AND_WRAP = 7, - VK_STENCIL_OP_BEGIN_RANGE = VK_STENCIL_OP_KEEP, - VK_STENCIL_OP_END_RANGE = VK_STENCIL_OP_DECREMENT_AND_WRAP, - VK_STENCIL_OP_RANGE_SIZE = (VK_STENCIL_OP_DECREMENT_AND_WRAP - VK_STENCIL_OP_KEEP + 1), - VK_STENCIL_OP_MAX_ENUM = 0x7FFFFFFF -} VkStencilOp; - -typedef enum VkLogicOp { - VK_LOGIC_OP_CLEAR = 0, - VK_LOGIC_OP_AND = 1, - VK_LOGIC_OP_AND_REVERSE = 2, - VK_LOGIC_OP_COPY = 3, - VK_LOGIC_OP_AND_INVERTED = 4, - VK_LOGIC_OP_NO_OP = 5, - VK_LOGIC_OP_XOR = 6, - VK_LOGIC_OP_OR = 7, - VK_LOGIC_OP_NOR = 8, - VK_LOGIC_OP_EQUIVALENT = 9, - VK_LOGIC_OP_INVERT = 10, - VK_LOGIC_OP_OR_REVERSE = 11, - VK_LOGIC_OP_COPY_INVERTED = 12, - VK_LOGIC_OP_OR_INVERTED = 13, - VK_LOGIC_OP_NAND = 14, - VK_LOGIC_OP_SET = 15, - VK_LOGIC_OP_BEGIN_RANGE = VK_LOGIC_OP_CLEAR, - VK_LOGIC_OP_END_RANGE = VK_LOGIC_OP_SET, - VK_LOGIC_OP_RANGE_SIZE = (VK_LOGIC_OP_SET - VK_LOGIC_OP_CLEAR + 1), - VK_LOGIC_OP_MAX_ENUM = 0x7FFFFFFF -} VkLogicOp; - -typedef enum VkBlendFactor { - VK_BLEND_FACTOR_ZERO = 0, - VK_BLEND_FACTOR_ONE = 1, - VK_BLEND_FACTOR_SRC_COLOR = 2, - VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 3, - VK_BLEND_FACTOR_DST_COLOR = 4, - VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR = 5, - VK_BLEND_FACTOR_SRC_ALPHA = 6, - VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 7, - VK_BLEND_FACTOR_DST_ALPHA = 8, - VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 9, - VK_BLEND_FACTOR_CONSTANT_COLOR = 10, - VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 11, - VK_BLEND_FACTOR_CONSTANT_ALPHA = 12, - VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 13, - VK_BLEND_FACTOR_SRC_ALPHA_SATURATE = 14, - VK_BLEND_FACTOR_SRC1_COLOR = 15, - VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 16, - VK_BLEND_FACTOR_SRC1_ALPHA = 17, - VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 18, - VK_BLEND_FACTOR_BEGIN_RANGE = VK_BLEND_FACTOR_ZERO, - VK_BLEND_FACTOR_END_RANGE = VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA, - VK_BLEND_FACTOR_RANGE_SIZE = (VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA - VK_BLEND_FACTOR_ZERO + 1), - VK_BLEND_FACTOR_MAX_ENUM = 0x7FFFFFFF -} VkBlendFactor; - -typedef enum VkBlendOp { - VK_BLEND_OP_ADD = 0, - VK_BLEND_OP_SUBTRACT = 1, - VK_BLEND_OP_REVERSE_SUBTRACT = 2, - VK_BLEND_OP_MIN = 3, - VK_BLEND_OP_MAX = 4, - VK_BLEND_OP_ZERO_EXT = 1000148000, - VK_BLEND_OP_SRC_EXT = 1000148001, - VK_BLEND_OP_DST_EXT = 1000148002, - VK_BLEND_OP_SRC_OVER_EXT = 1000148003, - VK_BLEND_OP_DST_OVER_EXT = 1000148004, - VK_BLEND_OP_SRC_IN_EXT = 1000148005, - VK_BLEND_OP_DST_IN_EXT = 1000148006, - VK_BLEND_OP_SRC_OUT_EXT = 1000148007, - VK_BLEND_OP_DST_OUT_EXT = 1000148008, - VK_BLEND_OP_SRC_ATOP_EXT = 1000148009, - VK_BLEND_OP_DST_ATOP_EXT = 1000148010, - VK_BLEND_OP_XOR_EXT = 1000148011, - VK_BLEND_OP_MULTIPLY_EXT = 1000148012, - VK_BLEND_OP_SCREEN_EXT = 1000148013, - VK_BLEND_OP_OVERLAY_EXT = 1000148014, - VK_BLEND_OP_DARKEN_EXT = 1000148015, - VK_BLEND_OP_LIGHTEN_EXT = 1000148016, - VK_BLEND_OP_COLORDODGE_EXT = 1000148017, - VK_BLEND_OP_COLORBURN_EXT = 1000148018, - VK_BLEND_OP_HARDLIGHT_EXT = 1000148019, - VK_BLEND_OP_SOFTLIGHT_EXT = 1000148020, - VK_BLEND_OP_DIFFERENCE_EXT = 1000148021, - VK_BLEND_OP_EXCLUSION_EXT = 1000148022, - VK_BLEND_OP_INVERT_EXT = 1000148023, - VK_BLEND_OP_INVERT_RGB_EXT = 1000148024, - VK_BLEND_OP_LINEARDODGE_EXT = 1000148025, - VK_BLEND_OP_LINEARBURN_EXT = 1000148026, - VK_BLEND_OP_VIVIDLIGHT_EXT = 1000148027, - VK_BLEND_OP_LINEARLIGHT_EXT = 1000148028, - VK_BLEND_OP_PINLIGHT_EXT = 1000148029, - VK_BLEND_OP_HARDMIX_EXT = 1000148030, - VK_BLEND_OP_HSL_HUE_EXT = 1000148031, - VK_BLEND_OP_HSL_SATURATION_EXT = 1000148032, - VK_BLEND_OP_HSL_COLOR_EXT = 1000148033, - VK_BLEND_OP_HSL_LUMINOSITY_EXT = 1000148034, - VK_BLEND_OP_PLUS_EXT = 1000148035, - VK_BLEND_OP_PLUS_CLAMPED_EXT = 1000148036, - VK_BLEND_OP_PLUS_CLAMPED_ALPHA_EXT = 1000148037, - VK_BLEND_OP_PLUS_DARKER_EXT = 1000148038, - VK_BLEND_OP_MINUS_EXT = 1000148039, - VK_BLEND_OP_MINUS_CLAMPED_EXT = 1000148040, - VK_BLEND_OP_CONTRAST_EXT = 1000148041, - VK_BLEND_OP_INVERT_OVG_EXT = 1000148042, - VK_BLEND_OP_RED_EXT = 1000148043, - VK_BLEND_OP_GREEN_EXT = 1000148044, - VK_BLEND_OP_BLUE_EXT = 1000148045, - VK_BLEND_OP_BEGIN_RANGE = VK_BLEND_OP_ADD, - VK_BLEND_OP_END_RANGE = VK_BLEND_OP_MAX, - VK_BLEND_OP_RANGE_SIZE = (VK_BLEND_OP_MAX - VK_BLEND_OP_ADD + 1), - VK_BLEND_OP_MAX_ENUM = 0x7FFFFFFF -} VkBlendOp; - -typedef enum VkDynamicState { - VK_DYNAMIC_STATE_VIEWPORT = 0, - VK_DYNAMIC_STATE_SCISSOR = 1, - VK_DYNAMIC_STATE_LINE_WIDTH = 2, - VK_DYNAMIC_STATE_DEPTH_BIAS = 3, - VK_DYNAMIC_STATE_BLEND_CONSTANTS = 4, - VK_DYNAMIC_STATE_DEPTH_BOUNDS = 5, - VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK = 6, - VK_DYNAMIC_STATE_STENCIL_WRITE_MASK = 7, - VK_DYNAMIC_STATE_STENCIL_REFERENCE = 8, - VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV = 1000087000, - VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = 1000099000, - VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT = 1000143000, - VK_DYNAMIC_STATE_BEGIN_RANGE = VK_DYNAMIC_STATE_VIEWPORT, - VK_DYNAMIC_STATE_END_RANGE = VK_DYNAMIC_STATE_STENCIL_REFERENCE, - VK_DYNAMIC_STATE_RANGE_SIZE = (VK_DYNAMIC_STATE_STENCIL_REFERENCE - VK_DYNAMIC_STATE_VIEWPORT + 1), - VK_DYNAMIC_STATE_MAX_ENUM = 0x7FFFFFFF -} VkDynamicState; - -typedef enum VkFilter { - VK_FILTER_NEAREST = 0, - VK_FILTER_LINEAR = 1, - VK_FILTER_CUBIC_IMG = 1000015000, - VK_FILTER_BEGIN_RANGE = VK_FILTER_NEAREST, - VK_FILTER_END_RANGE = VK_FILTER_LINEAR, - VK_FILTER_RANGE_SIZE = (VK_FILTER_LINEAR - VK_FILTER_NEAREST + 1), - VK_FILTER_MAX_ENUM = 0x7FFFFFFF -} VkFilter; - -typedef enum VkSamplerMipmapMode { - VK_SAMPLER_MIPMAP_MODE_NEAREST = 0, - VK_SAMPLER_MIPMAP_MODE_LINEAR = 1, - VK_SAMPLER_MIPMAP_MODE_BEGIN_RANGE = VK_SAMPLER_MIPMAP_MODE_NEAREST, - VK_SAMPLER_MIPMAP_MODE_END_RANGE = VK_SAMPLER_MIPMAP_MODE_LINEAR, - VK_SAMPLER_MIPMAP_MODE_RANGE_SIZE = (VK_SAMPLER_MIPMAP_MODE_LINEAR - VK_SAMPLER_MIPMAP_MODE_NEAREST + 1), - VK_SAMPLER_MIPMAP_MODE_MAX_ENUM = 0x7FFFFFFF -} VkSamplerMipmapMode; - -typedef enum VkSamplerAddressMode { - VK_SAMPLER_ADDRESS_MODE_REPEAT = 0, - VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 1, - VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 2, - VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 3, - VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 4, - VK_SAMPLER_ADDRESS_MODE_BEGIN_RANGE = VK_SAMPLER_ADDRESS_MODE_REPEAT, - VK_SAMPLER_ADDRESS_MODE_END_RANGE = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER, - VK_SAMPLER_ADDRESS_MODE_RANGE_SIZE = (VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER - VK_SAMPLER_ADDRESS_MODE_REPEAT + 1), - VK_SAMPLER_ADDRESS_MODE_MAX_ENUM = 0x7FFFFFFF -} VkSamplerAddressMode; - -typedef enum VkBorderColor { - VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0, - VK_BORDER_COLOR_INT_TRANSPARENT_BLACK = 1, - VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 2, - VK_BORDER_COLOR_INT_OPAQUE_BLACK = 3, - VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 4, - VK_BORDER_COLOR_INT_OPAQUE_WHITE = 5, - VK_BORDER_COLOR_BEGIN_RANGE = VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK, - VK_BORDER_COLOR_END_RANGE = VK_BORDER_COLOR_INT_OPAQUE_WHITE, - VK_BORDER_COLOR_RANGE_SIZE = (VK_BORDER_COLOR_INT_OPAQUE_WHITE - VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK + 1), - VK_BORDER_COLOR_MAX_ENUM = 0x7FFFFFFF -} VkBorderColor; - -typedef enum VkDescriptorType { - VK_DESCRIPTOR_TYPE_SAMPLER = 0, - VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 1, - VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 2, - VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 3, - VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 4, - VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 5, - VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 6, - VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 7, - VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 8, - VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 9, - VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT = 10, - VK_DESCRIPTOR_TYPE_BEGIN_RANGE = VK_DESCRIPTOR_TYPE_SAMPLER, - VK_DESCRIPTOR_TYPE_END_RANGE = VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, - VK_DESCRIPTOR_TYPE_RANGE_SIZE = (VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT - VK_DESCRIPTOR_TYPE_SAMPLER + 1), - VK_DESCRIPTOR_TYPE_MAX_ENUM = 0x7FFFFFFF -} VkDescriptorType; - -typedef enum VkAttachmentLoadOp { - VK_ATTACHMENT_LOAD_OP_LOAD = 0, - VK_ATTACHMENT_LOAD_OP_CLEAR = 1, - VK_ATTACHMENT_LOAD_OP_DONT_CARE = 2, - VK_ATTACHMENT_LOAD_OP_BEGIN_RANGE = VK_ATTACHMENT_LOAD_OP_LOAD, - VK_ATTACHMENT_LOAD_OP_END_RANGE = VK_ATTACHMENT_LOAD_OP_DONT_CARE, - VK_ATTACHMENT_LOAD_OP_RANGE_SIZE = (VK_ATTACHMENT_LOAD_OP_DONT_CARE - VK_ATTACHMENT_LOAD_OP_LOAD + 1), - VK_ATTACHMENT_LOAD_OP_MAX_ENUM = 0x7FFFFFFF -} VkAttachmentLoadOp; - -typedef enum VkAttachmentStoreOp { - VK_ATTACHMENT_STORE_OP_STORE = 0, - VK_ATTACHMENT_STORE_OP_DONT_CARE = 1, - VK_ATTACHMENT_STORE_OP_BEGIN_RANGE = VK_ATTACHMENT_STORE_OP_STORE, - VK_ATTACHMENT_STORE_OP_END_RANGE = VK_ATTACHMENT_STORE_OP_DONT_CARE, - VK_ATTACHMENT_STORE_OP_RANGE_SIZE = (VK_ATTACHMENT_STORE_OP_DONT_CARE - VK_ATTACHMENT_STORE_OP_STORE + 1), - VK_ATTACHMENT_STORE_OP_MAX_ENUM = 0x7FFFFFFF -} VkAttachmentStoreOp; - -typedef enum VkPipelineBindPoint { - VK_PIPELINE_BIND_POINT_GRAPHICS = 0, - VK_PIPELINE_BIND_POINT_COMPUTE = 1, - VK_PIPELINE_BIND_POINT_BEGIN_RANGE = VK_PIPELINE_BIND_POINT_GRAPHICS, - VK_PIPELINE_BIND_POINT_END_RANGE = VK_PIPELINE_BIND_POINT_COMPUTE, - VK_PIPELINE_BIND_POINT_RANGE_SIZE = (VK_PIPELINE_BIND_POINT_COMPUTE - VK_PIPELINE_BIND_POINT_GRAPHICS + 1), - VK_PIPELINE_BIND_POINT_MAX_ENUM = 0x7FFFFFFF -} VkPipelineBindPoint; - -typedef enum VkCommandBufferLevel { - VK_COMMAND_BUFFER_LEVEL_PRIMARY = 0, - VK_COMMAND_BUFFER_LEVEL_SECONDARY = 1, - VK_COMMAND_BUFFER_LEVEL_BEGIN_RANGE = VK_COMMAND_BUFFER_LEVEL_PRIMARY, - VK_COMMAND_BUFFER_LEVEL_END_RANGE = VK_COMMAND_BUFFER_LEVEL_SECONDARY, - VK_COMMAND_BUFFER_LEVEL_RANGE_SIZE = (VK_COMMAND_BUFFER_LEVEL_SECONDARY - VK_COMMAND_BUFFER_LEVEL_PRIMARY + 1), - VK_COMMAND_BUFFER_LEVEL_MAX_ENUM = 0x7FFFFFFF -} VkCommandBufferLevel; - -typedef enum VkIndexType { - VK_INDEX_TYPE_UINT16 = 0, - VK_INDEX_TYPE_UINT32 = 1, - VK_INDEX_TYPE_BEGIN_RANGE = VK_INDEX_TYPE_UINT16, - VK_INDEX_TYPE_END_RANGE = VK_INDEX_TYPE_UINT32, - VK_INDEX_TYPE_RANGE_SIZE = (VK_INDEX_TYPE_UINT32 - VK_INDEX_TYPE_UINT16 + 1), - VK_INDEX_TYPE_MAX_ENUM = 0x7FFFFFFF -} VkIndexType; - -typedef enum VkSubpassContents { - VK_SUBPASS_CONTENTS_INLINE = 0, - VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS = 1, - VK_SUBPASS_CONTENTS_BEGIN_RANGE = VK_SUBPASS_CONTENTS_INLINE, - VK_SUBPASS_CONTENTS_END_RANGE = VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS, - VK_SUBPASS_CONTENTS_RANGE_SIZE = (VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS - VK_SUBPASS_CONTENTS_INLINE + 1), - VK_SUBPASS_CONTENTS_MAX_ENUM = 0x7FFFFFFF -} VkSubpassContents; - -typedef enum VkObjectType { - VK_OBJECT_TYPE_UNKNOWN = 0, - VK_OBJECT_TYPE_INSTANCE = 1, - VK_OBJECT_TYPE_PHYSICAL_DEVICE = 2, - VK_OBJECT_TYPE_DEVICE = 3, - VK_OBJECT_TYPE_QUEUE = 4, - VK_OBJECT_TYPE_SEMAPHORE = 5, - VK_OBJECT_TYPE_COMMAND_BUFFER = 6, - VK_OBJECT_TYPE_FENCE = 7, - VK_OBJECT_TYPE_DEVICE_MEMORY = 8, - VK_OBJECT_TYPE_BUFFER = 9, - VK_OBJECT_TYPE_IMAGE = 10, - VK_OBJECT_TYPE_EVENT = 11, - VK_OBJECT_TYPE_QUERY_POOL = 12, - VK_OBJECT_TYPE_BUFFER_VIEW = 13, - VK_OBJECT_TYPE_IMAGE_VIEW = 14, - VK_OBJECT_TYPE_SHADER_MODULE = 15, - VK_OBJECT_TYPE_PIPELINE_CACHE = 16, - VK_OBJECT_TYPE_PIPELINE_LAYOUT = 17, - VK_OBJECT_TYPE_RENDER_PASS = 18, - VK_OBJECT_TYPE_PIPELINE = 19, - VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT = 20, - VK_OBJECT_TYPE_SAMPLER = 21, - VK_OBJECT_TYPE_DESCRIPTOR_POOL = 22, - VK_OBJECT_TYPE_DESCRIPTOR_SET = 23, - VK_OBJECT_TYPE_FRAMEBUFFER = 24, - VK_OBJECT_TYPE_COMMAND_POOL = 25, - VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION = 1000156000, - VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE = 1000085000, - VK_OBJECT_TYPE_SURFACE_KHR = 1000000000, - VK_OBJECT_TYPE_SWAPCHAIN_KHR = 1000001000, - VK_OBJECT_TYPE_DISPLAY_KHR = 1000002000, - VK_OBJECT_TYPE_DISPLAY_MODE_KHR = 1000002001, - VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT = 1000011000, - VK_OBJECT_TYPE_OBJECT_TABLE_NVX = 1000086000, - VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX = 1000086001, - VK_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT = 1000128000, - VK_OBJECT_TYPE_VALIDATION_CACHE_EXT = 1000160000, - VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR = VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE, - VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR = VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION, - VK_OBJECT_TYPE_BEGIN_RANGE = VK_OBJECT_TYPE_UNKNOWN, - VK_OBJECT_TYPE_END_RANGE = VK_OBJECT_TYPE_COMMAND_POOL, - VK_OBJECT_TYPE_RANGE_SIZE = (VK_OBJECT_TYPE_COMMAND_POOL - VK_OBJECT_TYPE_UNKNOWN + 1), - VK_OBJECT_TYPE_MAX_ENUM = 0x7FFFFFFF -} VkObjectType; - -typedef VkFlags VkInstanceCreateFlags; - -typedef enum VkFormatFeatureFlagBits { - VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = 0x00000001, - VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = 0x00000002, - VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004, - VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008, - VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = 0x00000010, - VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020, - VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = 0x00000040, - VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = 0x00000080, - VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100, - VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200, - VK_FORMAT_FEATURE_BLIT_SRC_BIT = 0x00000400, - VK_FORMAT_FEATURE_BLIT_DST_BIT = 0x00000800, - VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000, - VK_FORMAT_FEATURE_TRANSFER_SRC_BIT = 0x00004000, - VK_FORMAT_FEATURE_TRANSFER_DST_BIT = 0x00008000, - VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT = 0x00020000, - VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT = 0x00040000, - VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT = 0x00080000, - VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT = 0x00100000, - VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT = 0x00200000, - VK_FORMAT_FEATURE_DISJOINT_BIT = 0x00400000, - VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT = 0x00800000, - VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = 0x00002000, - VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT = 0x00010000, - VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = VK_FORMAT_FEATURE_TRANSFER_SRC_BIT, - VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = VK_FORMAT_FEATURE_TRANSFER_DST_BIT, - VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT_KHR = VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT, - VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT, - VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT, - VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT, - VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR = VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT, - VK_FORMAT_FEATURE_DISJOINT_BIT_KHR = VK_FORMAT_FEATURE_DISJOINT_BIT, - VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT_KHR = VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT, - VK_FORMAT_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkFormatFeatureFlagBits; -typedef VkFlags VkFormatFeatureFlags; - -typedef enum VkImageUsageFlagBits { - VK_IMAGE_USAGE_TRANSFER_SRC_BIT = 0x00000001, - VK_IMAGE_USAGE_TRANSFER_DST_BIT = 0x00000002, - VK_IMAGE_USAGE_SAMPLED_BIT = 0x00000004, - VK_IMAGE_USAGE_STORAGE_BIT = 0x00000008, - VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT = 0x00000010, - VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020, - VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, - VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, - VK_IMAGE_USAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkImageUsageFlagBits; -typedef VkFlags VkImageUsageFlags; - -typedef enum VkImageCreateFlagBits { - VK_IMAGE_CREATE_SPARSE_BINDING_BIT = 0x00000001, - VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, - VK_IMAGE_CREATE_SPARSE_ALIASED_BIT = 0x00000004, - VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT = 0x00000008, - VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT = 0x00000010, - VK_IMAGE_CREATE_ALIAS_BIT = 0x00000400, - VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT = 0x00000040, - VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT = 0x00000020, - VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT = 0x00000080, - VK_IMAGE_CREATE_EXTENDED_USAGE_BIT = 0x00000100, - VK_IMAGE_CREATE_PROTECTED_BIT = 0x00000800, - VK_IMAGE_CREATE_DISJOINT_BIT = 0x00000200, - VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT = 0x00001000, - VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT, - VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT, - VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR = VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT, - VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR = VK_IMAGE_CREATE_EXTENDED_USAGE_BIT, - VK_IMAGE_CREATE_DISJOINT_BIT_KHR = VK_IMAGE_CREATE_DISJOINT_BIT, - VK_IMAGE_CREATE_ALIAS_BIT_KHR = VK_IMAGE_CREATE_ALIAS_BIT, - VK_IMAGE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkImageCreateFlagBits; -typedef VkFlags VkImageCreateFlags; - -typedef enum VkSampleCountFlagBits { - VK_SAMPLE_COUNT_1_BIT = 0x00000001, - VK_SAMPLE_COUNT_2_BIT = 0x00000002, - VK_SAMPLE_COUNT_4_BIT = 0x00000004, - VK_SAMPLE_COUNT_8_BIT = 0x00000008, - VK_SAMPLE_COUNT_16_BIT = 0x00000010, - VK_SAMPLE_COUNT_32_BIT = 0x00000020, - VK_SAMPLE_COUNT_64_BIT = 0x00000040, - VK_SAMPLE_COUNT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkSampleCountFlagBits; -typedef VkFlags VkSampleCountFlags; - -typedef enum VkQueueFlagBits { - VK_QUEUE_GRAPHICS_BIT = 0x00000001, - VK_QUEUE_COMPUTE_BIT = 0x00000002, - VK_QUEUE_TRANSFER_BIT = 0x00000004, - VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008, - VK_QUEUE_PROTECTED_BIT = 0x00000010, - VK_QUEUE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkQueueFlagBits; -typedef VkFlags VkQueueFlags; - -typedef enum VkMemoryPropertyFlagBits { - VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001, - VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT = 0x00000002, - VK_MEMORY_PROPERTY_HOST_COHERENT_BIT = 0x00000004, - VK_MEMORY_PROPERTY_HOST_CACHED_BIT = 0x00000008, - VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT = 0x00000010, - VK_MEMORY_PROPERTY_PROTECTED_BIT = 0x00000020, - VK_MEMORY_PROPERTY_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkMemoryPropertyFlagBits; -typedef VkFlags VkMemoryPropertyFlags; - -typedef enum VkMemoryHeapFlagBits { - VK_MEMORY_HEAP_DEVICE_LOCAL_BIT = 0x00000001, - VK_MEMORY_HEAP_MULTI_INSTANCE_BIT = 0x00000002, - VK_MEMORY_HEAP_MULTI_INSTANCE_BIT_KHR = VK_MEMORY_HEAP_MULTI_INSTANCE_BIT, - VK_MEMORY_HEAP_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkMemoryHeapFlagBits; -typedef VkFlags VkMemoryHeapFlags; -typedef VkFlags VkDeviceCreateFlags; - -typedef enum VkDeviceQueueCreateFlagBits { - VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT = 0x00000001, - VK_DEVICE_QUEUE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkDeviceQueueCreateFlagBits; -typedef VkFlags VkDeviceQueueCreateFlags; - -typedef enum VkPipelineStageFlagBits { - VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT = 0x00000001, - VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT = 0x00000002, - VK_PIPELINE_STAGE_VERTEX_INPUT_BIT = 0x00000004, - VK_PIPELINE_STAGE_VERTEX_SHADER_BIT = 0x00000008, - VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010, - VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020, - VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT = 0x00000040, - VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT = 0x00000080, - VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT = 0x00000100, - VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT = 0x00000200, - VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400, - VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT = 0x00000800, - VK_PIPELINE_STAGE_TRANSFER_BIT = 0x00001000, - VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT = 0x00002000, - VK_PIPELINE_STAGE_HOST_BIT = 0x00004000, - VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT = 0x00008000, - VK_PIPELINE_STAGE_ALL_COMMANDS_BIT = 0x00010000, - VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX = 0x00020000, - VK_PIPELINE_STAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkPipelineStageFlagBits; -typedef VkFlags VkPipelineStageFlags; -typedef VkFlags VkMemoryMapFlags; - -typedef enum VkImageAspectFlagBits { - VK_IMAGE_ASPECT_COLOR_BIT = 0x00000001, - VK_IMAGE_ASPECT_DEPTH_BIT = 0x00000002, - VK_IMAGE_ASPECT_STENCIL_BIT = 0x00000004, - VK_IMAGE_ASPECT_METADATA_BIT = 0x00000008, - VK_IMAGE_ASPECT_PLANE_0_BIT = 0x00000010, - VK_IMAGE_ASPECT_PLANE_1_BIT = 0x00000020, - VK_IMAGE_ASPECT_PLANE_2_BIT = 0x00000040, - VK_IMAGE_ASPECT_PLANE_0_BIT_KHR = VK_IMAGE_ASPECT_PLANE_0_BIT, - VK_IMAGE_ASPECT_PLANE_1_BIT_KHR = VK_IMAGE_ASPECT_PLANE_1_BIT, - VK_IMAGE_ASPECT_PLANE_2_BIT_KHR = VK_IMAGE_ASPECT_PLANE_2_BIT, - VK_IMAGE_ASPECT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkImageAspectFlagBits; -typedef VkFlags VkImageAspectFlags; - -typedef enum VkSparseImageFormatFlagBits { - VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT = 0x00000001, - VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT = 0x00000002, - VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT = 0x00000004, - VK_SPARSE_IMAGE_FORMAT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkSparseImageFormatFlagBits; -typedef VkFlags VkSparseImageFormatFlags; - -typedef enum VkSparseMemoryBindFlagBits { - VK_SPARSE_MEMORY_BIND_METADATA_BIT = 0x00000001, - VK_SPARSE_MEMORY_BIND_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkSparseMemoryBindFlagBits; -typedef VkFlags VkSparseMemoryBindFlags; - -typedef enum VkFenceCreateFlagBits { - VK_FENCE_CREATE_SIGNALED_BIT = 0x00000001, - VK_FENCE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkFenceCreateFlagBits; -typedef VkFlags VkFenceCreateFlags; -typedef VkFlags VkSemaphoreCreateFlags; -typedef VkFlags VkEventCreateFlags; -typedef VkFlags VkQueryPoolCreateFlags; - -typedef enum VkQueryPipelineStatisticFlagBits { - VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT = 0x00000001, - VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT = 0x00000002, - VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT = 0x00000004, - VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT = 0x00000008, - VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT = 0x00000010, - VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT = 0x00000020, - VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT = 0x00000040, - VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT = 0x00000080, - VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT = 0x00000100, - VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT = 0x00000200, - VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT = 0x00000400, - VK_QUERY_PIPELINE_STATISTIC_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkQueryPipelineStatisticFlagBits; -typedef VkFlags VkQueryPipelineStatisticFlags; - -typedef enum VkQueryResultFlagBits { - VK_QUERY_RESULT_64_BIT = 0x00000001, - VK_QUERY_RESULT_WAIT_BIT = 0x00000002, - VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = 0x00000004, - VK_QUERY_RESULT_PARTIAL_BIT = 0x00000008, - VK_QUERY_RESULT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkQueryResultFlagBits; -typedef VkFlags VkQueryResultFlags; - -typedef enum VkBufferCreateFlagBits { - VK_BUFFER_CREATE_SPARSE_BINDING_BIT = 0x00000001, - VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT = 0x00000002, - VK_BUFFER_CREATE_SPARSE_ALIASED_BIT = 0x00000004, - VK_BUFFER_CREATE_PROTECTED_BIT = 0x00000008, - VK_BUFFER_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkBufferCreateFlagBits; -typedef VkFlags VkBufferCreateFlags; - -typedef enum VkBufferUsageFlagBits { - VK_BUFFER_USAGE_TRANSFER_SRC_BIT = 0x00000001, - VK_BUFFER_USAGE_TRANSFER_DST_BIT = 0x00000002, - VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004, - VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT = 0x00000008, - VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT = 0x00000010, - VK_BUFFER_USAGE_STORAGE_BUFFER_BIT = 0x00000020, - VK_BUFFER_USAGE_INDEX_BUFFER_BIT = 0x00000040, - VK_BUFFER_USAGE_VERTEX_BUFFER_BIT = 0x00000080, - VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT = 0x00000100, - VK_BUFFER_USAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkBufferUsageFlagBits; -typedef VkFlags VkBufferUsageFlags; -typedef VkFlags VkBufferViewCreateFlags; -typedef VkFlags VkImageViewCreateFlags; -typedef VkFlags VkShaderModuleCreateFlags; -typedef VkFlags VkPipelineCacheCreateFlags; - -typedef enum VkPipelineCreateFlagBits { - VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = 0x00000001, - VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = 0x00000002, - VK_PIPELINE_CREATE_DERIVATIVE_BIT = 0x00000004, - VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT = 0x00000008, - VK_PIPELINE_CREATE_DISPATCH_BASE = 0x00000010, - VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR = VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT, - VK_PIPELINE_CREATE_DISPATCH_BASE_KHR = VK_PIPELINE_CREATE_DISPATCH_BASE, - VK_PIPELINE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkPipelineCreateFlagBits; -typedef VkFlags VkPipelineCreateFlags; -typedef VkFlags VkPipelineShaderStageCreateFlags; - -typedef enum VkShaderStageFlagBits { - VK_SHADER_STAGE_VERTEX_BIT = 0x00000001, - VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT = 0x00000002, - VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT = 0x00000004, - VK_SHADER_STAGE_GEOMETRY_BIT = 0x00000008, - VK_SHADER_STAGE_FRAGMENT_BIT = 0x00000010, - VK_SHADER_STAGE_COMPUTE_BIT = 0x00000020, - VK_SHADER_STAGE_ALL_GRAPHICS = 0x0000001F, - VK_SHADER_STAGE_ALL = 0x7FFFFFFF, - VK_SHADER_STAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkShaderStageFlagBits; -typedef VkFlags VkPipelineVertexInputStateCreateFlags; -typedef VkFlags VkPipelineInputAssemblyStateCreateFlags; -typedef VkFlags VkPipelineTessellationStateCreateFlags; -typedef VkFlags VkPipelineViewportStateCreateFlags; -typedef VkFlags VkPipelineRasterizationStateCreateFlags; - -typedef enum VkCullModeFlagBits { - VK_CULL_MODE_NONE = 0, - VK_CULL_MODE_FRONT_BIT = 0x00000001, - VK_CULL_MODE_BACK_BIT = 0x00000002, - VK_CULL_MODE_FRONT_AND_BACK = 0x00000003, - VK_CULL_MODE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkCullModeFlagBits; -typedef VkFlags VkCullModeFlags; -typedef VkFlags VkPipelineMultisampleStateCreateFlags; -typedef VkFlags VkPipelineDepthStencilStateCreateFlags; -typedef VkFlags VkPipelineColorBlendStateCreateFlags; - -typedef enum VkColorComponentFlagBits { - VK_COLOR_COMPONENT_R_BIT = 0x00000001, - VK_COLOR_COMPONENT_G_BIT = 0x00000002, - VK_COLOR_COMPONENT_B_BIT = 0x00000004, - VK_COLOR_COMPONENT_A_BIT = 0x00000008, - VK_COLOR_COMPONENT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkColorComponentFlagBits; -typedef VkFlags VkColorComponentFlags; -typedef VkFlags VkPipelineDynamicStateCreateFlags; -typedef VkFlags VkPipelineLayoutCreateFlags; -typedef VkFlags VkShaderStageFlags; -typedef VkFlags VkSamplerCreateFlags; - -typedef enum VkDescriptorSetLayoutCreateFlagBits { - VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = 0x00000001, - VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT = 0x00000002, - VK_DESCRIPTOR_SET_LAYOUT_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkDescriptorSetLayoutCreateFlagBits; -typedef VkFlags VkDescriptorSetLayoutCreateFlags; - -typedef enum VkDescriptorPoolCreateFlagBits { - VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 0x00000001, - VK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT_EXT = 0x00000002, - VK_DESCRIPTOR_POOL_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkDescriptorPoolCreateFlagBits; -typedef VkFlags VkDescriptorPoolCreateFlags; -typedef VkFlags VkDescriptorPoolResetFlags; -typedef VkFlags VkFramebufferCreateFlags; -typedef VkFlags VkRenderPassCreateFlags; - -typedef enum VkAttachmentDescriptionFlagBits { - VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT = 0x00000001, - VK_ATTACHMENT_DESCRIPTION_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkAttachmentDescriptionFlagBits; -typedef VkFlags VkAttachmentDescriptionFlags; - -typedef enum VkSubpassDescriptionFlagBits { - VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX = 0x00000001, - VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX = 0x00000002, - VK_SUBPASS_DESCRIPTION_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkSubpassDescriptionFlagBits; -typedef VkFlags VkSubpassDescriptionFlags; - -typedef enum VkAccessFlagBits { - VK_ACCESS_INDIRECT_COMMAND_READ_BIT = 0x00000001, - VK_ACCESS_INDEX_READ_BIT = 0x00000002, - VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004, - VK_ACCESS_UNIFORM_READ_BIT = 0x00000008, - VK_ACCESS_INPUT_ATTACHMENT_READ_BIT = 0x00000010, - VK_ACCESS_SHADER_READ_BIT = 0x00000020, - VK_ACCESS_SHADER_WRITE_BIT = 0x00000040, - VK_ACCESS_COLOR_ATTACHMENT_READ_BIT = 0x00000080, - VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100, - VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200, - VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400, - VK_ACCESS_TRANSFER_READ_BIT = 0x00000800, - VK_ACCESS_TRANSFER_WRITE_BIT = 0x00001000, - VK_ACCESS_HOST_READ_BIT = 0x00002000, - VK_ACCESS_HOST_WRITE_BIT = 0x00004000, - VK_ACCESS_MEMORY_READ_BIT = 0x00008000, - VK_ACCESS_MEMORY_WRITE_BIT = 0x00010000, - VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX = 0x00020000, - VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX = 0x00040000, - VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 0x00080000, - VK_ACCESS_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkAccessFlagBits; -typedef VkFlags VkAccessFlags; - -typedef enum VkDependencyFlagBits { - VK_DEPENDENCY_BY_REGION_BIT = 0x00000001, - VK_DEPENDENCY_DEVICE_GROUP_BIT = 0x00000004, - VK_DEPENDENCY_VIEW_LOCAL_BIT = 0x00000002, - VK_DEPENDENCY_VIEW_LOCAL_BIT_KHR = VK_DEPENDENCY_VIEW_LOCAL_BIT, - VK_DEPENDENCY_DEVICE_GROUP_BIT_KHR = VK_DEPENDENCY_DEVICE_GROUP_BIT, - VK_DEPENDENCY_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkDependencyFlagBits; -typedef VkFlags VkDependencyFlags; - -typedef enum VkCommandPoolCreateFlagBits { - VK_COMMAND_POOL_CREATE_TRANSIENT_BIT = 0x00000001, - VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT = 0x00000002, - VK_COMMAND_POOL_CREATE_PROTECTED_BIT = 0x00000004, - VK_COMMAND_POOL_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkCommandPoolCreateFlagBits; -typedef VkFlags VkCommandPoolCreateFlags; - -typedef enum VkCommandPoolResetFlagBits { - VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT = 0x00000001, - VK_COMMAND_POOL_RESET_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkCommandPoolResetFlagBits; -typedef VkFlags VkCommandPoolResetFlags; - -typedef enum VkCommandBufferUsageFlagBits { - VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT = 0x00000001, - VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT = 0x00000002, - VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT = 0x00000004, - VK_COMMAND_BUFFER_USAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkCommandBufferUsageFlagBits; -typedef VkFlags VkCommandBufferUsageFlags; - -typedef enum VkQueryControlFlagBits { - VK_QUERY_CONTROL_PRECISE_BIT = 0x00000001, - VK_QUERY_CONTROL_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkQueryControlFlagBits; -typedef VkFlags VkQueryControlFlags; - -typedef enum VkCommandBufferResetFlagBits { - VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT = 0x00000001, - VK_COMMAND_BUFFER_RESET_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkCommandBufferResetFlagBits; -typedef VkFlags VkCommandBufferResetFlags; - -typedef enum VkStencilFaceFlagBits { - VK_STENCIL_FACE_FRONT_BIT = 0x00000001, - VK_STENCIL_FACE_BACK_BIT = 0x00000002, - VK_STENCIL_FRONT_AND_BACK = 0x00000003, - VK_STENCIL_FACE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkStencilFaceFlagBits; -typedef VkFlags VkStencilFaceFlags; - -typedef struct VkApplicationInfo { - VkStructureType sType; - const void* pNext; - const char* pApplicationName; - uint32_t applicationVersion; - const char* pEngineName; - uint32_t engineVersion; - uint32_t apiVersion; -} VkApplicationInfo; - -typedef struct VkInstanceCreateInfo { - VkStructureType sType; - const void* pNext; - VkInstanceCreateFlags flags; - const VkApplicationInfo* pApplicationInfo; - uint32_t enabledLayerCount; - const char* const* ppEnabledLayerNames; - uint32_t enabledExtensionCount; - const char* const* ppEnabledExtensionNames; -} VkInstanceCreateInfo; - -typedef void* (VKAPI_PTR *PFN_vkAllocationFunction)( - void* pUserData, - size_t size, - size_t alignment, - VkSystemAllocationScope allocationScope); - -typedef void* (VKAPI_PTR *PFN_vkReallocationFunction)( - void* pUserData, - void* pOriginal, - size_t size, - size_t alignment, - VkSystemAllocationScope allocationScope); - -typedef void (VKAPI_PTR *PFN_vkFreeFunction)( - void* pUserData, - void* pMemory); - -typedef void (VKAPI_PTR *PFN_vkInternalAllocationNotification)( - void* pUserData, - size_t size, - VkInternalAllocationType allocationType, - VkSystemAllocationScope allocationScope); - -typedef void (VKAPI_PTR *PFN_vkInternalFreeNotification)( - void* pUserData, - size_t size, - VkInternalAllocationType allocationType, - VkSystemAllocationScope allocationScope); - -typedef struct VkAllocationCallbacks { - void* pUserData; - PFN_vkAllocationFunction pfnAllocation; - PFN_vkReallocationFunction pfnReallocation; - PFN_vkFreeFunction pfnFree; - PFN_vkInternalAllocationNotification pfnInternalAllocation; - PFN_vkInternalFreeNotification pfnInternalFree; -} VkAllocationCallbacks; - -typedef struct VkPhysicalDeviceFeatures { - VkBool32 robustBufferAccess; - VkBool32 fullDrawIndexUint32; - VkBool32 imageCubeArray; - VkBool32 independentBlend; - VkBool32 geometryShader; - VkBool32 tessellationShader; - VkBool32 sampleRateShading; - VkBool32 dualSrcBlend; - VkBool32 logicOp; - VkBool32 multiDrawIndirect; - VkBool32 drawIndirectFirstInstance; - VkBool32 depthClamp; - VkBool32 depthBiasClamp; - VkBool32 fillModeNonSolid; - VkBool32 depthBounds; - VkBool32 wideLines; - VkBool32 largePoints; - VkBool32 alphaToOne; - VkBool32 multiViewport; - VkBool32 samplerAnisotropy; - VkBool32 textureCompressionETC2; - VkBool32 textureCompressionASTC_LDR; - VkBool32 textureCompressionBC; - VkBool32 occlusionQueryPrecise; - VkBool32 pipelineStatisticsQuery; - VkBool32 vertexPipelineStoresAndAtomics; - VkBool32 fragmentStoresAndAtomics; - VkBool32 shaderTessellationAndGeometryPointSize; - VkBool32 shaderImageGatherExtended; - VkBool32 shaderStorageImageExtendedFormats; - VkBool32 shaderStorageImageMultisample; - VkBool32 shaderStorageImageReadWithoutFormat; - VkBool32 shaderStorageImageWriteWithoutFormat; - VkBool32 shaderUniformBufferArrayDynamicIndexing; - VkBool32 shaderSampledImageArrayDynamicIndexing; - VkBool32 shaderStorageBufferArrayDynamicIndexing; - VkBool32 shaderStorageImageArrayDynamicIndexing; - VkBool32 shaderClipDistance; - VkBool32 shaderCullDistance; - VkBool32 shaderFloat64; - VkBool32 shaderInt64; - VkBool32 shaderInt16; - VkBool32 shaderResourceResidency; - VkBool32 shaderResourceMinLod; - VkBool32 sparseBinding; - VkBool32 sparseResidencyBuffer; - VkBool32 sparseResidencyImage2D; - VkBool32 sparseResidencyImage3D; - VkBool32 sparseResidency2Samples; - VkBool32 sparseResidency4Samples; - VkBool32 sparseResidency8Samples; - VkBool32 sparseResidency16Samples; - VkBool32 sparseResidencyAliased; - VkBool32 variableMultisampleRate; - VkBool32 inheritedQueries; -} VkPhysicalDeviceFeatures; - -typedef struct VkFormatProperties { - VkFormatFeatureFlags linearTilingFeatures; - VkFormatFeatureFlags optimalTilingFeatures; - VkFormatFeatureFlags bufferFeatures; -} VkFormatProperties; - -typedef struct VkExtent3D { - uint32_t width; - uint32_t height; - uint32_t depth; -} VkExtent3D; - -typedef struct VkImageFormatProperties { - VkExtent3D maxExtent; - uint32_t maxMipLevels; - uint32_t maxArrayLayers; - VkSampleCountFlags sampleCounts; - VkDeviceSize maxResourceSize; -} VkImageFormatProperties; - -typedef struct VkPhysicalDeviceLimits { - uint32_t maxImageDimension1D; - uint32_t maxImageDimension2D; - uint32_t maxImageDimension3D; - uint32_t maxImageDimensionCube; - uint32_t maxImageArrayLayers; - uint32_t maxTexelBufferElements; - uint32_t maxUniformBufferRange; - uint32_t maxStorageBufferRange; - uint32_t maxPushConstantsSize; - uint32_t maxMemoryAllocationCount; - uint32_t maxSamplerAllocationCount; - VkDeviceSize bufferImageGranularity; - VkDeviceSize sparseAddressSpaceSize; - uint32_t maxBoundDescriptorSets; - uint32_t maxPerStageDescriptorSamplers; - uint32_t maxPerStageDescriptorUniformBuffers; - uint32_t maxPerStageDescriptorStorageBuffers; - uint32_t maxPerStageDescriptorSampledImages; - uint32_t maxPerStageDescriptorStorageImages; - uint32_t maxPerStageDescriptorInputAttachments; - uint32_t maxPerStageResources; - uint32_t maxDescriptorSetSamplers; - uint32_t maxDescriptorSetUniformBuffers; - uint32_t maxDescriptorSetUniformBuffersDynamic; - uint32_t maxDescriptorSetStorageBuffers; - uint32_t maxDescriptorSetStorageBuffersDynamic; - uint32_t maxDescriptorSetSampledImages; - uint32_t maxDescriptorSetStorageImages; - uint32_t maxDescriptorSetInputAttachments; - uint32_t maxVertexInputAttributes; - uint32_t maxVertexInputBindings; - uint32_t maxVertexInputAttributeOffset; - uint32_t maxVertexInputBindingStride; - uint32_t maxVertexOutputComponents; - uint32_t maxTessellationGenerationLevel; - uint32_t maxTessellationPatchSize; - uint32_t maxTessellationControlPerVertexInputComponents; - uint32_t maxTessellationControlPerVertexOutputComponents; - uint32_t maxTessellationControlPerPatchOutputComponents; - uint32_t maxTessellationControlTotalOutputComponents; - uint32_t maxTessellationEvaluationInputComponents; - uint32_t maxTessellationEvaluationOutputComponents; - uint32_t maxGeometryShaderInvocations; - uint32_t maxGeometryInputComponents; - uint32_t maxGeometryOutputComponents; - uint32_t maxGeometryOutputVertices; - uint32_t maxGeometryTotalOutputComponents; - uint32_t maxFragmentInputComponents; - uint32_t maxFragmentOutputAttachments; - uint32_t maxFragmentDualSrcAttachments; - uint32_t maxFragmentCombinedOutputResources; - uint32_t maxComputeSharedMemorySize; - uint32_t maxComputeWorkGroupCount[3]; - uint32_t maxComputeWorkGroupInvocations; - uint32_t maxComputeWorkGroupSize[3]; - uint32_t subPixelPrecisionBits; - uint32_t subTexelPrecisionBits; - uint32_t mipmapPrecisionBits; - uint32_t maxDrawIndexedIndexValue; - uint32_t maxDrawIndirectCount; - float maxSamplerLodBias; - float maxSamplerAnisotropy; - uint32_t maxViewports; - uint32_t maxViewportDimensions[2]; - float viewportBoundsRange[2]; - uint32_t viewportSubPixelBits; - size_t minMemoryMapAlignment; - VkDeviceSize minTexelBufferOffsetAlignment; - VkDeviceSize minUniformBufferOffsetAlignment; - VkDeviceSize minStorageBufferOffsetAlignment; - int32_t minTexelOffset; - uint32_t maxTexelOffset; - int32_t minTexelGatherOffset; - uint32_t maxTexelGatherOffset; - float minInterpolationOffset; - float maxInterpolationOffset; - uint32_t subPixelInterpolationOffsetBits; - uint32_t maxFramebufferWidth; - uint32_t maxFramebufferHeight; - uint32_t maxFramebufferLayers; - VkSampleCountFlags framebufferColorSampleCounts; - VkSampleCountFlags framebufferDepthSampleCounts; - VkSampleCountFlags framebufferStencilSampleCounts; - VkSampleCountFlags framebufferNoAttachmentsSampleCounts; - uint32_t maxColorAttachments; - VkSampleCountFlags sampledImageColorSampleCounts; - VkSampleCountFlags sampledImageIntegerSampleCounts; - VkSampleCountFlags sampledImageDepthSampleCounts; - VkSampleCountFlags sampledImageStencilSampleCounts; - VkSampleCountFlags storageImageSampleCounts; - uint32_t maxSampleMaskWords; - VkBool32 timestampComputeAndGraphics; - float timestampPeriod; - uint32_t maxClipDistances; - uint32_t maxCullDistances; - uint32_t maxCombinedClipAndCullDistances; - uint32_t discreteQueuePriorities; - float pointSizeRange[2]; - float lineWidthRange[2]; - float pointSizeGranularity; - float lineWidthGranularity; - VkBool32 strictLines; - VkBool32 standardSampleLocations; - VkDeviceSize optimalBufferCopyOffsetAlignment; - VkDeviceSize optimalBufferCopyRowPitchAlignment; - VkDeviceSize nonCoherentAtomSize; -} VkPhysicalDeviceLimits; - -typedef struct VkPhysicalDeviceSparseProperties { - VkBool32 residencyStandard2DBlockShape; - VkBool32 residencyStandard2DMultisampleBlockShape; - VkBool32 residencyStandard3DBlockShape; - VkBool32 residencyAlignedMipSize; - VkBool32 residencyNonResidentStrict; -} VkPhysicalDeviceSparseProperties; - -typedef struct VkPhysicalDeviceProperties { - uint32_t apiVersion; - uint32_t driverVersion; - uint32_t vendorID; - uint32_t deviceID; - VkPhysicalDeviceType deviceType; - char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]; - uint8_t pipelineCacheUUID[VK_UUID_SIZE]; - VkPhysicalDeviceLimits limits; - VkPhysicalDeviceSparseProperties sparseProperties; -} VkPhysicalDeviceProperties; - -typedef struct VkQueueFamilyProperties { - VkQueueFlags queueFlags; - uint32_t queueCount; - uint32_t timestampValidBits; - VkExtent3D minImageTransferGranularity; -} VkQueueFamilyProperties; - -typedef struct VkMemoryType { - VkMemoryPropertyFlags propertyFlags; - uint32_t heapIndex; -} VkMemoryType; - -typedef struct VkMemoryHeap { - VkDeviceSize size; - VkMemoryHeapFlags flags; -} VkMemoryHeap; - -typedef struct VkPhysicalDeviceMemoryProperties { - uint32_t memoryTypeCount; - VkMemoryType memoryTypes[VK_MAX_MEMORY_TYPES]; - uint32_t memoryHeapCount; - VkMemoryHeap memoryHeaps[VK_MAX_MEMORY_HEAPS]; -} VkPhysicalDeviceMemoryProperties; - -typedef void (VKAPI_PTR *PFN_vkVoidFunction)(void); -typedef struct VkDeviceQueueCreateInfo { - VkStructureType sType; - const void* pNext; - VkDeviceQueueCreateFlags flags; - uint32_t queueFamilyIndex; - uint32_t queueCount; - const float* pQueuePriorities; -} VkDeviceQueueCreateInfo; - -typedef struct VkDeviceCreateInfo { - VkStructureType sType; - const void* pNext; - VkDeviceCreateFlags flags; - uint32_t queueCreateInfoCount; - const VkDeviceQueueCreateInfo* pQueueCreateInfos; - uint32_t enabledLayerCount; - const char* const* ppEnabledLayerNames; - uint32_t enabledExtensionCount; - const char* const* ppEnabledExtensionNames; - const VkPhysicalDeviceFeatures* pEnabledFeatures; -} VkDeviceCreateInfo; - -typedef struct VkExtensionProperties { - char extensionName[VK_MAX_EXTENSION_NAME_SIZE]; - uint32_t specVersion; -} VkExtensionProperties; - -typedef struct VkLayerProperties { - char layerName[VK_MAX_EXTENSION_NAME_SIZE]; - uint32_t specVersion; - uint32_t implementationVersion; - char description[VK_MAX_DESCRIPTION_SIZE]; -} VkLayerProperties; - -typedef struct VkSubmitInfo { - VkStructureType sType; - const void* pNext; - uint32_t waitSemaphoreCount; - const VkSemaphore* pWaitSemaphores; - const VkPipelineStageFlags* pWaitDstStageMask; - uint32_t commandBufferCount; - const VkCommandBuffer* pCommandBuffers; - uint32_t signalSemaphoreCount; - const VkSemaphore* pSignalSemaphores; -} VkSubmitInfo; - -typedef struct VkMemoryAllocateInfo { - VkStructureType sType; - const void* pNext; - VkDeviceSize allocationSize; - uint32_t memoryTypeIndex; -} VkMemoryAllocateInfo; - -typedef struct VkMappedMemoryRange { - VkStructureType sType; - const void* pNext; - VkDeviceMemory memory; - VkDeviceSize offset; - VkDeviceSize size; -} VkMappedMemoryRange; - -typedef struct VkMemoryRequirements { - VkDeviceSize size; - VkDeviceSize alignment; - uint32_t memoryTypeBits; -} VkMemoryRequirements; - -typedef struct VkSparseImageFormatProperties { - VkImageAspectFlags aspectMask; - VkExtent3D imageGranularity; - VkSparseImageFormatFlags flags; -} VkSparseImageFormatProperties; - -typedef struct VkSparseImageMemoryRequirements { - VkSparseImageFormatProperties formatProperties; - uint32_t imageMipTailFirstLod; - VkDeviceSize imageMipTailSize; - VkDeviceSize imageMipTailOffset; - VkDeviceSize imageMipTailStride; -} VkSparseImageMemoryRequirements; - -typedef struct VkSparseMemoryBind { - VkDeviceSize resourceOffset; - VkDeviceSize size; - VkDeviceMemory memory; - VkDeviceSize memoryOffset; - VkSparseMemoryBindFlags flags; -} VkSparseMemoryBind; - -typedef struct VkSparseBufferMemoryBindInfo { - VkBuffer buffer; - uint32_t bindCount; - const VkSparseMemoryBind* pBinds; -} VkSparseBufferMemoryBindInfo; - -typedef struct VkSparseImageOpaqueMemoryBindInfo { - VkImage image; - uint32_t bindCount; - const VkSparseMemoryBind* pBinds; -} VkSparseImageOpaqueMemoryBindInfo; - -typedef struct VkImageSubresource { - VkImageAspectFlags aspectMask; - uint32_t mipLevel; - uint32_t arrayLayer; -} VkImageSubresource; - -typedef struct VkOffset3D { - int32_t x; - int32_t y; - int32_t z; -} VkOffset3D; - -typedef struct VkSparseImageMemoryBind { - VkImageSubresource subresource; - VkOffset3D offset; - VkExtent3D extent; - VkDeviceMemory memory; - VkDeviceSize memoryOffset; - VkSparseMemoryBindFlags flags; -} VkSparseImageMemoryBind; - -typedef struct VkSparseImageMemoryBindInfo { - VkImage image; - uint32_t bindCount; - const VkSparseImageMemoryBind* pBinds; -} VkSparseImageMemoryBindInfo; - -typedef struct VkBindSparseInfo { - VkStructureType sType; - const void* pNext; - uint32_t waitSemaphoreCount; - const VkSemaphore* pWaitSemaphores; - uint32_t bufferBindCount; - const VkSparseBufferMemoryBindInfo* pBufferBinds; - uint32_t imageOpaqueBindCount; - const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds; - uint32_t imageBindCount; - const VkSparseImageMemoryBindInfo* pImageBinds; - uint32_t signalSemaphoreCount; - const VkSemaphore* pSignalSemaphores; -} VkBindSparseInfo; - -typedef struct VkFenceCreateInfo { - VkStructureType sType; - const void* pNext; - VkFenceCreateFlags flags; -} VkFenceCreateInfo; - -typedef struct VkSemaphoreCreateInfo { - VkStructureType sType; - const void* pNext; - VkSemaphoreCreateFlags flags; -} VkSemaphoreCreateInfo; - -typedef struct VkEventCreateInfo { - VkStructureType sType; - const void* pNext; - VkEventCreateFlags flags; -} VkEventCreateInfo; - -typedef struct VkQueryPoolCreateInfo { - VkStructureType sType; - const void* pNext; - VkQueryPoolCreateFlags flags; - VkQueryType queryType; - uint32_t queryCount; - VkQueryPipelineStatisticFlags pipelineStatistics; -} VkQueryPoolCreateInfo; - -typedef struct VkBufferCreateInfo { - VkStructureType sType; - const void* pNext; - VkBufferCreateFlags flags; - VkDeviceSize size; - VkBufferUsageFlags usage; - VkSharingMode sharingMode; - uint32_t queueFamilyIndexCount; - const uint32_t* pQueueFamilyIndices; -} VkBufferCreateInfo; - -typedef struct VkBufferViewCreateInfo { - VkStructureType sType; - const void* pNext; - VkBufferViewCreateFlags flags; - VkBuffer buffer; - VkFormat format; - VkDeviceSize offset; - VkDeviceSize range; -} VkBufferViewCreateInfo; - -typedef struct VkImageCreateInfo { - VkStructureType sType; - const void* pNext; - VkImageCreateFlags flags; - VkImageType imageType; - VkFormat format; - VkExtent3D extent; - uint32_t mipLevels; - uint32_t arrayLayers; - VkSampleCountFlagBits samples; - VkImageTiling tiling; - VkImageUsageFlags usage; - VkSharingMode sharingMode; - uint32_t queueFamilyIndexCount; - const uint32_t* pQueueFamilyIndices; - VkImageLayout initialLayout; -} VkImageCreateInfo; - -typedef struct VkSubresourceLayout { - VkDeviceSize offset; - VkDeviceSize size; - VkDeviceSize rowPitch; - VkDeviceSize arrayPitch; - VkDeviceSize depthPitch; -} VkSubresourceLayout; - -typedef struct VkComponentMapping { - VkComponentSwizzle r; - VkComponentSwizzle g; - VkComponentSwizzle b; - VkComponentSwizzle a; -} VkComponentMapping; - -typedef struct VkImageSubresourceRange { - VkImageAspectFlags aspectMask; - uint32_t baseMipLevel; - uint32_t levelCount; - uint32_t baseArrayLayer; - uint32_t layerCount; -} VkImageSubresourceRange; - -typedef struct VkImageViewCreateInfo { - VkStructureType sType; - const void* pNext; - VkImageViewCreateFlags flags; - VkImage image; - VkImageViewType viewType; - VkFormat format; - VkComponentMapping components; - VkImageSubresourceRange subresourceRange; -} VkImageViewCreateInfo; - -typedef struct VkShaderModuleCreateInfo { - VkStructureType sType; - const void* pNext; - VkShaderModuleCreateFlags flags; - size_t codeSize; - const uint32_t* pCode; -} VkShaderModuleCreateInfo; - -typedef struct VkPipelineCacheCreateInfo { - VkStructureType sType; - const void* pNext; - VkPipelineCacheCreateFlags flags; - size_t initialDataSize; - const void* pInitialData; -} VkPipelineCacheCreateInfo; - -typedef struct VkSpecializationMapEntry { - uint32_t constantID; - uint32_t offset; - size_t size; -} VkSpecializationMapEntry; - -typedef struct VkSpecializationInfo { - uint32_t mapEntryCount; - const VkSpecializationMapEntry* pMapEntries; - size_t dataSize; - const void* pData; -} VkSpecializationInfo; - -typedef struct VkPipelineShaderStageCreateInfo { - VkStructureType sType; - const void* pNext; - VkPipelineShaderStageCreateFlags flags; - VkShaderStageFlagBits stage; - VkShaderModule module; - const char* pName; - const VkSpecializationInfo* pSpecializationInfo; -} VkPipelineShaderStageCreateInfo; - -typedef struct VkVertexInputBindingDescription { - uint32_t binding; - uint32_t stride; - VkVertexInputRate inputRate; -} VkVertexInputBindingDescription; - -typedef struct VkVertexInputAttributeDescription { - uint32_t location; - uint32_t binding; - VkFormat format; - uint32_t offset; -} VkVertexInputAttributeDescription; - -typedef struct VkPipelineVertexInputStateCreateInfo { - VkStructureType sType; - const void* pNext; - VkPipelineVertexInputStateCreateFlags flags; - uint32_t vertexBindingDescriptionCount; - const VkVertexInputBindingDescription* pVertexBindingDescriptions; - uint32_t vertexAttributeDescriptionCount; - const VkVertexInputAttributeDescription* pVertexAttributeDescriptions; -} VkPipelineVertexInputStateCreateInfo; - -typedef struct VkPipelineInputAssemblyStateCreateInfo { - VkStructureType sType; - const void* pNext; - VkPipelineInputAssemblyStateCreateFlags flags; - VkPrimitiveTopology topology; - VkBool32 primitiveRestartEnable; -} VkPipelineInputAssemblyStateCreateInfo; - -typedef struct VkPipelineTessellationStateCreateInfo { - VkStructureType sType; - const void* pNext; - VkPipelineTessellationStateCreateFlags flags; - uint32_t patchControlPoints; -} VkPipelineTessellationStateCreateInfo; - -typedef struct VkViewport { - float x; - float y; - float width; - float height; - float minDepth; - float maxDepth; -} VkViewport; - -typedef struct VkOffset2D { - int32_t x; - int32_t y; -} VkOffset2D; - -typedef struct VkExtent2D { - uint32_t width; - uint32_t height; -} VkExtent2D; - -typedef struct VkRect2D { - VkOffset2D offset; - VkExtent2D extent; -} VkRect2D; - -typedef struct VkPipelineViewportStateCreateInfo { - VkStructureType sType; - const void* pNext; - VkPipelineViewportStateCreateFlags flags; - uint32_t viewportCount; - const VkViewport* pViewports; - uint32_t scissorCount; - const VkRect2D* pScissors; -} VkPipelineViewportStateCreateInfo; - -typedef struct VkPipelineRasterizationStateCreateInfo { - VkStructureType sType; - const void* pNext; - VkPipelineRasterizationStateCreateFlags flags; - VkBool32 depthClampEnable; - VkBool32 rasterizerDiscardEnable; - VkPolygonMode polygonMode; - VkCullModeFlags cullMode; - VkFrontFace frontFace; - VkBool32 depthBiasEnable; - float depthBiasConstantFactor; - float depthBiasClamp; - float depthBiasSlopeFactor; - float lineWidth; -} VkPipelineRasterizationStateCreateInfo; - -typedef struct VkPipelineMultisampleStateCreateInfo { - VkStructureType sType; - const void* pNext; - VkPipelineMultisampleStateCreateFlags flags; - VkSampleCountFlagBits rasterizationSamples; - VkBool32 sampleShadingEnable; - float minSampleShading; - const VkSampleMask* pSampleMask; - VkBool32 alphaToCoverageEnable; - VkBool32 alphaToOneEnable; -} VkPipelineMultisampleStateCreateInfo; - -typedef struct VkStencilOpState { - VkStencilOp failOp; - VkStencilOp passOp; - VkStencilOp depthFailOp; - VkCompareOp compareOp; - uint32_t compareMask; - uint32_t writeMask; - uint32_t reference; -} VkStencilOpState; - -typedef struct VkPipelineDepthStencilStateCreateInfo { - VkStructureType sType; - const void* pNext; - VkPipelineDepthStencilStateCreateFlags flags; - VkBool32 depthTestEnable; - VkBool32 depthWriteEnable; - VkCompareOp depthCompareOp; - VkBool32 depthBoundsTestEnable; - VkBool32 stencilTestEnable; - VkStencilOpState front; - VkStencilOpState back; - float minDepthBounds; - float maxDepthBounds; -} VkPipelineDepthStencilStateCreateInfo; - -typedef struct VkPipelineColorBlendAttachmentState { - VkBool32 blendEnable; - VkBlendFactor srcColorBlendFactor; - VkBlendFactor dstColorBlendFactor; - VkBlendOp colorBlendOp; - VkBlendFactor srcAlphaBlendFactor; - VkBlendFactor dstAlphaBlendFactor; - VkBlendOp alphaBlendOp; - VkColorComponentFlags colorWriteMask; -} VkPipelineColorBlendAttachmentState; - -typedef struct VkPipelineColorBlendStateCreateInfo { - VkStructureType sType; - const void* pNext; - VkPipelineColorBlendStateCreateFlags flags; - VkBool32 logicOpEnable; - VkLogicOp logicOp; - uint32_t attachmentCount; - const VkPipelineColorBlendAttachmentState* pAttachments; - float blendConstants[4]; -} VkPipelineColorBlendStateCreateInfo; - -typedef struct VkPipelineDynamicStateCreateInfo { - VkStructureType sType; - const void* pNext; - VkPipelineDynamicStateCreateFlags flags; - uint32_t dynamicStateCount; - const VkDynamicState* pDynamicStates; -} VkPipelineDynamicStateCreateInfo; - -typedef struct VkGraphicsPipelineCreateInfo { - VkStructureType sType; - const void* pNext; - VkPipelineCreateFlags flags; - uint32_t stageCount; - const VkPipelineShaderStageCreateInfo* pStages; - const VkPipelineVertexInputStateCreateInfo* pVertexInputState; - const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState; - const VkPipelineTessellationStateCreateInfo* pTessellationState; - const VkPipelineViewportStateCreateInfo* pViewportState; - const VkPipelineRasterizationStateCreateInfo* pRasterizationState; - const VkPipelineMultisampleStateCreateInfo* pMultisampleState; - const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState; - const VkPipelineColorBlendStateCreateInfo* pColorBlendState; - const VkPipelineDynamicStateCreateInfo* pDynamicState; - VkPipelineLayout layout; - VkRenderPass renderPass; - uint32_t subpass; - VkPipeline basePipelineHandle; - int32_t basePipelineIndex; -} VkGraphicsPipelineCreateInfo; - -typedef struct VkComputePipelineCreateInfo { - VkStructureType sType; - const void* pNext; - VkPipelineCreateFlags flags; - VkPipelineShaderStageCreateInfo stage; - VkPipelineLayout layout; - VkPipeline basePipelineHandle; - int32_t basePipelineIndex; -} VkComputePipelineCreateInfo; - -typedef struct VkPushConstantRange { - VkShaderStageFlags stageFlags; - uint32_t offset; - uint32_t size; -} VkPushConstantRange; - -typedef struct VkPipelineLayoutCreateInfo { - VkStructureType sType; - const void* pNext; - VkPipelineLayoutCreateFlags flags; - uint32_t setLayoutCount; - const VkDescriptorSetLayout* pSetLayouts; - uint32_t pushConstantRangeCount; - const VkPushConstantRange* pPushConstantRanges; -} VkPipelineLayoutCreateInfo; - -typedef struct VkSamplerCreateInfo { - VkStructureType sType; - const void* pNext; - VkSamplerCreateFlags flags; - VkFilter magFilter; - VkFilter minFilter; - VkSamplerMipmapMode mipmapMode; - VkSamplerAddressMode addressModeU; - VkSamplerAddressMode addressModeV; - VkSamplerAddressMode addressModeW; - float mipLodBias; - VkBool32 anisotropyEnable; - float maxAnisotropy; - VkBool32 compareEnable; - VkCompareOp compareOp; - float minLod; - float maxLod; - VkBorderColor borderColor; - VkBool32 unnormalizedCoordinates; -} VkSamplerCreateInfo; - -typedef struct VkDescriptorSetLayoutBinding { - uint32_t binding; - VkDescriptorType descriptorType; - uint32_t descriptorCount; - VkShaderStageFlags stageFlags; - const VkSampler* pImmutableSamplers; -} VkDescriptorSetLayoutBinding; - -typedef struct VkDescriptorSetLayoutCreateInfo { - VkStructureType sType; - const void* pNext; - VkDescriptorSetLayoutCreateFlags flags; - uint32_t bindingCount; - const VkDescriptorSetLayoutBinding* pBindings; -} VkDescriptorSetLayoutCreateInfo; - -typedef struct VkDescriptorPoolSize { - VkDescriptorType type; - uint32_t descriptorCount; -} VkDescriptorPoolSize; - -typedef struct VkDescriptorPoolCreateInfo { - VkStructureType sType; - const void* pNext; - VkDescriptorPoolCreateFlags flags; - uint32_t maxSets; - uint32_t poolSizeCount; - const VkDescriptorPoolSize* pPoolSizes; -} VkDescriptorPoolCreateInfo; - -typedef struct VkDescriptorSetAllocateInfo { - VkStructureType sType; - const void* pNext; - VkDescriptorPool descriptorPool; - uint32_t descriptorSetCount; - const VkDescriptorSetLayout* pSetLayouts; -} VkDescriptorSetAllocateInfo; - -typedef struct VkDescriptorImageInfo { - VkSampler sampler; - VkImageView imageView; - VkImageLayout imageLayout; -} VkDescriptorImageInfo; - -typedef struct VkDescriptorBufferInfo { - VkBuffer buffer; - VkDeviceSize offset; - VkDeviceSize range; -} VkDescriptorBufferInfo; - -typedef struct VkWriteDescriptorSet { - VkStructureType sType; - const void* pNext; - VkDescriptorSet dstSet; - uint32_t dstBinding; - uint32_t dstArrayElement; - uint32_t descriptorCount; - VkDescriptorType descriptorType; - const VkDescriptorImageInfo* pImageInfo; - const VkDescriptorBufferInfo* pBufferInfo; - const VkBufferView* pTexelBufferView; -} VkWriteDescriptorSet; - -typedef struct VkCopyDescriptorSet { - VkStructureType sType; - const void* pNext; - VkDescriptorSet srcSet; - uint32_t srcBinding; - uint32_t srcArrayElement; - VkDescriptorSet dstSet; - uint32_t dstBinding; - uint32_t dstArrayElement; - uint32_t descriptorCount; -} VkCopyDescriptorSet; - -typedef struct VkFramebufferCreateInfo { - VkStructureType sType; - const void* pNext; - VkFramebufferCreateFlags flags; - VkRenderPass renderPass; - uint32_t attachmentCount; - const VkImageView* pAttachments; - uint32_t width; - uint32_t height; - uint32_t layers; -} VkFramebufferCreateInfo; - -typedef struct VkAttachmentDescription { - VkAttachmentDescriptionFlags flags; - VkFormat format; - VkSampleCountFlagBits samples; - VkAttachmentLoadOp loadOp; - VkAttachmentStoreOp storeOp; - VkAttachmentLoadOp stencilLoadOp; - VkAttachmentStoreOp stencilStoreOp; - VkImageLayout initialLayout; - VkImageLayout finalLayout; -} VkAttachmentDescription; - -typedef struct VkAttachmentReference { - uint32_t attachment; - VkImageLayout layout; -} VkAttachmentReference; - -typedef struct VkSubpassDescription { - VkSubpassDescriptionFlags flags; - VkPipelineBindPoint pipelineBindPoint; - uint32_t inputAttachmentCount; - const VkAttachmentReference* pInputAttachments; - uint32_t colorAttachmentCount; - const VkAttachmentReference* pColorAttachments; - const VkAttachmentReference* pResolveAttachments; - const VkAttachmentReference* pDepthStencilAttachment; - uint32_t preserveAttachmentCount; - const uint32_t* pPreserveAttachments; -} VkSubpassDescription; - -typedef struct VkSubpassDependency { - uint32_t srcSubpass; - uint32_t dstSubpass; - VkPipelineStageFlags srcStageMask; - VkPipelineStageFlags dstStageMask; - VkAccessFlags srcAccessMask; - VkAccessFlags dstAccessMask; - VkDependencyFlags dependencyFlags; -} VkSubpassDependency; - -typedef struct VkRenderPassCreateInfo { - VkStructureType sType; - const void* pNext; - VkRenderPassCreateFlags flags; - uint32_t attachmentCount; - const VkAttachmentDescription* pAttachments; - uint32_t subpassCount; - const VkSubpassDescription* pSubpasses; - uint32_t dependencyCount; - const VkSubpassDependency* pDependencies; -} VkRenderPassCreateInfo; - -typedef struct VkCommandPoolCreateInfo { - VkStructureType sType; - const void* pNext; - VkCommandPoolCreateFlags flags; - uint32_t queueFamilyIndex; -} VkCommandPoolCreateInfo; - -typedef struct VkCommandBufferAllocateInfo { - VkStructureType sType; - const void* pNext; - VkCommandPool commandPool; - VkCommandBufferLevel level; - uint32_t commandBufferCount; -} VkCommandBufferAllocateInfo; - -typedef struct VkCommandBufferInheritanceInfo { - VkStructureType sType; - const void* pNext; - VkRenderPass renderPass; - uint32_t subpass; - VkFramebuffer framebuffer; - VkBool32 occlusionQueryEnable; - VkQueryControlFlags queryFlags; - VkQueryPipelineStatisticFlags pipelineStatistics; -} VkCommandBufferInheritanceInfo; - -typedef struct VkCommandBufferBeginInfo { - VkStructureType sType; - const void* pNext; - VkCommandBufferUsageFlags flags; - const VkCommandBufferInheritanceInfo* pInheritanceInfo; -} VkCommandBufferBeginInfo; - -typedef struct VkBufferCopy { - VkDeviceSize srcOffset; - VkDeviceSize dstOffset; - VkDeviceSize size; -} VkBufferCopy; - -typedef struct VkImageSubresourceLayers { - VkImageAspectFlags aspectMask; - uint32_t mipLevel; - uint32_t baseArrayLayer; - uint32_t layerCount; -} VkImageSubresourceLayers; - -typedef struct VkImageCopy { - VkImageSubresourceLayers srcSubresource; - VkOffset3D srcOffset; - VkImageSubresourceLayers dstSubresource; - VkOffset3D dstOffset; - VkExtent3D extent; -} VkImageCopy; - -typedef struct VkImageBlit { - VkImageSubresourceLayers srcSubresource; - VkOffset3D srcOffsets[2]; - VkImageSubresourceLayers dstSubresource; - VkOffset3D dstOffsets[2]; -} VkImageBlit; - -typedef struct VkBufferImageCopy { - VkDeviceSize bufferOffset; - uint32_t bufferRowLength; - uint32_t bufferImageHeight; - VkImageSubresourceLayers imageSubresource; - VkOffset3D imageOffset; - VkExtent3D imageExtent; -} VkBufferImageCopy; - -typedef union VkClearColorValue { - float float32[4]; - int32_t int32[4]; - uint32_t uint32[4]; -} VkClearColorValue; - -typedef struct VkClearDepthStencilValue { - float depth; - uint32_t stencil; -} VkClearDepthStencilValue; - -typedef union VkClearValue { - VkClearColorValue color; - VkClearDepthStencilValue depthStencil; -} VkClearValue; - -typedef struct VkClearAttachment { - VkImageAspectFlags aspectMask; - uint32_t colorAttachment; - VkClearValue clearValue; -} VkClearAttachment; - -typedef struct VkClearRect { - VkRect2D rect; - uint32_t baseArrayLayer; - uint32_t layerCount; -} VkClearRect; - -typedef struct VkImageResolve { - VkImageSubresourceLayers srcSubresource; - VkOffset3D srcOffset; - VkImageSubresourceLayers dstSubresource; - VkOffset3D dstOffset; - VkExtent3D extent; -} VkImageResolve; - -typedef struct VkMemoryBarrier { - VkStructureType sType; - const void* pNext; - VkAccessFlags srcAccessMask; - VkAccessFlags dstAccessMask; -} VkMemoryBarrier; - -typedef struct VkBufferMemoryBarrier { - VkStructureType sType; - const void* pNext; - VkAccessFlags srcAccessMask; - VkAccessFlags dstAccessMask; - uint32_t srcQueueFamilyIndex; - uint32_t dstQueueFamilyIndex; - VkBuffer buffer; - VkDeviceSize offset; - VkDeviceSize size; -} VkBufferMemoryBarrier; - -typedef struct VkImageMemoryBarrier { - VkStructureType sType; - const void* pNext; - VkAccessFlags srcAccessMask; - VkAccessFlags dstAccessMask; - VkImageLayout oldLayout; - VkImageLayout newLayout; - uint32_t srcQueueFamilyIndex; - uint32_t dstQueueFamilyIndex; - VkImage image; - VkImageSubresourceRange subresourceRange; -} VkImageMemoryBarrier; - -typedef struct VkRenderPassBeginInfo { - VkStructureType sType; - const void* pNext; - VkRenderPass renderPass; - VkFramebuffer framebuffer; - VkRect2D renderArea; - uint32_t clearValueCount; - const VkClearValue* pClearValues; -} VkRenderPassBeginInfo; - -typedef struct VkDispatchIndirectCommand { - uint32_t x; - uint32_t y; - uint32_t z; -} VkDispatchIndirectCommand; - -typedef struct VkDrawIndexedIndirectCommand { - uint32_t indexCount; - uint32_t instanceCount; - uint32_t firstIndex; - int32_t vertexOffset; - uint32_t firstInstance; -} VkDrawIndexedIndirectCommand; - -typedef struct VkDrawIndirectCommand { - uint32_t vertexCount; - uint32_t instanceCount; - uint32_t firstVertex; - uint32_t firstInstance; -} VkDrawIndirectCommand; - - -typedef VkResult (VKAPI_PTR *PFN_vkCreateInstance)(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkInstance* pInstance); -typedef void (VKAPI_PTR *PFN_vkDestroyInstance)(VkInstance instance, const VkAllocationCallbacks* pAllocator); -typedef VkResult (VKAPI_PTR *PFN_vkEnumeratePhysicalDevices)(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices); -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFeatures)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures); -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties* pFormatProperties); -typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties); -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties); -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties)(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties* pQueueFamilyProperties); -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMemoryProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties); -typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_vkGetInstanceProcAddr)(VkInstance instance, const char* pName); -typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_vkGetDeviceProcAddr)(VkDevice device, const char* pName); -typedef VkResult (VKAPI_PTR *PFN_vkCreateDevice)(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDevice* pDevice); -typedef void (VKAPI_PTR *PFN_vkDestroyDevice)(VkDevice device, const VkAllocationCallbacks* pAllocator); -typedef VkResult (VKAPI_PTR *PFN_vkEnumerateInstanceExtensionProperties)(const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties); -typedef VkResult (VKAPI_PTR *PFN_vkEnumerateDeviceExtensionProperties)(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties); -typedef VkResult (VKAPI_PTR *PFN_vkEnumerateInstanceLayerProperties)(uint32_t* pPropertyCount, VkLayerProperties* pProperties); -typedef VkResult (VKAPI_PTR *PFN_vkEnumerateDeviceLayerProperties)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkLayerProperties* pProperties); -typedef void (VKAPI_PTR *PFN_vkGetDeviceQueue)(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue); -typedef VkResult (VKAPI_PTR *PFN_vkQueueSubmit)(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence); -typedef VkResult (VKAPI_PTR *PFN_vkQueueWaitIdle)(VkQueue queue); -typedef VkResult (VKAPI_PTR *PFN_vkDeviceWaitIdle)(VkDevice device); -typedef VkResult (VKAPI_PTR *PFN_vkAllocateMemory)(VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo, const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory); -typedef void (VKAPI_PTR *PFN_vkFreeMemory)(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator); -typedef VkResult (VKAPI_PTR *PFN_vkMapMemory)(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void** ppData); -typedef void (VKAPI_PTR *PFN_vkUnmapMemory)(VkDevice device, VkDeviceMemory memory); -typedef VkResult (VKAPI_PTR *PFN_vkFlushMappedMemoryRanges)(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges); -typedef VkResult (VKAPI_PTR *PFN_vkInvalidateMappedMemoryRanges)(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges); -typedef void (VKAPI_PTR *PFN_vkGetDeviceMemoryCommitment)(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes); -typedef VkResult (VKAPI_PTR *PFN_vkBindBufferMemory)(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset); -typedef VkResult (VKAPI_PTR *PFN_vkBindImageMemory)(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset); -typedef void (VKAPI_PTR *PFN_vkGetBufferMemoryRequirements)(VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements); -typedef void (VKAPI_PTR *PFN_vkGetImageMemoryRequirements)(VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements); -typedef void (VKAPI_PTR *PFN_vkGetImageSparseMemoryRequirements)(VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements); -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkSampleCountFlagBits samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t* pPropertyCount, VkSparseImageFormatProperties* pProperties); -typedef VkResult (VKAPI_PTR *PFN_vkQueueBindSparse)(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo* pBindInfo, VkFence fence); -typedef VkResult (VKAPI_PTR *PFN_vkCreateFence)(VkDevice device, const VkFenceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence); -typedef void (VKAPI_PTR *PFN_vkDestroyFence)(VkDevice device, VkFence fence, const VkAllocationCallbacks* pAllocator); -typedef VkResult (VKAPI_PTR *PFN_vkResetFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences); -typedef VkResult (VKAPI_PTR *PFN_vkGetFenceStatus)(VkDevice device, VkFence fence); -typedef VkResult (VKAPI_PTR *PFN_vkWaitForFences)(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout); -typedef VkResult (VKAPI_PTR *PFN_vkCreateSemaphore)(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSemaphore* pSemaphore); -typedef void (VKAPI_PTR *PFN_vkDestroySemaphore)(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator); -typedef VkResult (VKAPI_PTR *PFN_vkCreateEvent)(VkDevice device, const VkEventCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkEvent* pEvent); -typedef void (VKAPI_PTR *PFN_vkDestroyEvent)(VkDevice device, VkEvent event, const VkAllocationCallbacks* pAllocator); -typedef VkResult (VKAPI_PTR *PFN_vkGetEventStatus)(VkDevice device, VkEvent event); -typedef VkResult (VKAPI_PTR *PFN_vkSetEvent)(VkDevice device, VkEvent event); -typedef VkResult (VKAPI_PTR *PFN_vkResetEvent)(VkDevice device, VkEvent event); -typedef VkResult (VKAPI_PTR *PFN_vkCreateQueryPool)(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool); -typedef void (VKAPI_PTR *PFN_vkDestroyQueryPool)(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator); -typedef VkResult (VKAPI_PTR *PFN_vkGetQueryPoolResults)(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags); -typedef VkResult (VKAPI_PTR *PFN_vkCreateBuffer)(VkDevice device, const VkBufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer); -typedef void (VKAPI_PTR *PFN_vkDestroyBuffer)(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator); -typedef VkResult (VKAPI_PTR *PFN_vkCreateBufferView)(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferView* pView); -typedef void (VKAPI_PTR *PFN_vkDestroyBufferView)(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* pAllocator); -typedef VkResult (VKAPI_PTR *PFN_vkCreateImage)(VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImage* pImage); -typedef void (VKAPI_PTR *PFN_vkDestroyImage)(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator); -typedef void (VKAPI_PTR *PFN_vkGetImageSubresourceLayout)(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout); -typedef VkResult (VKAPI_PTR *PFN_vkCreateImageView)(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImageView* pView); -typedef void (VKAPI_PTR *PFN_vkDestroyImageView)(VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator); -typedef VkResult (VKAPI_PTR *PFN_vkCreateShaderModule)(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule); -typedef void (VKAPI_PTR *PFN_vkDestroyShaderModule)(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks* pAllocator); -typedef VkResult (VKAPI_PTR *PFN_vkCreatePipelineCache)(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineCache* pPipelineCache); -typedef void (VKAPI_PTR *PFN_vkDestroyPipelineCache)(VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks* pAllocator); -typedef VkResult (VKAPI_PTR *PFN_vkGetPipelineCacheData)(VkDevice device, VkPipelineCache pipelineCache, size_t* pDataSize, void* pData); -typedef VkResult (VKAPI_PTR *PFN_vkMergePipelineCaches)(VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches); -typedef VkResult (VKAPI_PTR *PFN_vkCreateGraphicsPipelines)(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); -typedef VkResult (VKAPI_PTR *PFN_vkCreateComputePipelines)(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); -typedef void (VKAPI_PTR *PFN_vkDestroyPipeline)(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator); -typedef VkResult (VKAPI_PTR *PFN_vkCreatePipelineLayout)(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout); -typedef void (VKAPI_PTR *PFN_vkDestroyPipelineLayout)(VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks* pAllocator); -typedef VkResult (VKAPI_PTR *PFN_vkCreateSampler)(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSampler* pSampler); -typedef void (VKAPI_PTR *PFN_vkDestroySampler)(VkDevice device, VkSampler sampler, const VkAllocationCallbacks* pAllocator); -typedef VkResult (VKAPI_PTR *PFN_vkCreateDescriptorSetLayout)(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorSetLayout* pSetLayout); -typedef void (VKAPI_PTR *PFN_vkDestroyDescriptorSetLayout)(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks* pAllocator); -typedef VkResult (VKAPI_PTR *PFN_vkCreateDescriptorPool)(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool); -typedef void (VKAPI_PTR *PFN_vkDestroyDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks* pAllocator); -typedef VkResult (VKAPI_PTR *PFN_vkResetDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags); -typedef VkResult (VKAPI_PTR *PFN_vkAllocateDescriptorSets)(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, VkDescriptorSet* pDescriptorSets); -typedef VkResult (VKAPI_PTR *PFN_vkFreeDescriptorSets)(VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets); -typedef void (VKAPI_PTR *PFN_vkUpdateDescriptorSets)(VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pDescriptorCopies); -typedef VkResult (VKAPI_PTR *PFN_vkCreateFramebuffer)(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer); -typedef void (VKAPI_PTR *PFN_vkDestroyFramebuffer)(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator); -typedef VkResult (VKAPI_PTR *PFN_vkCreateRenderPass)(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass); -typedef void (VKAPI_PTR *PFN_vkDestroyRenderPass)(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator); -typedef void (VKAPI_PTR *PFN_vkGetRenderAreaGranularity)(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity); -typedef VkResult (VKAPI_PTR *PFN_vkCreateCommandPool)(VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool); -typedef void (VKAPI_PTR *PFN_vkDestroyCommandPool)(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator); -typedef VkResult (VKAPI_PTR *PFN_vkResetCommandPool)(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags); -typedef VkResult (VKAPI_PTR *PFN_vkAllocateCommandBuffers)(VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, VkCommandBuffer* pCommandBuffers); -typedef void (VKAPI_PTR *PFN_vkFreeCommandBuffers)(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers); -typedef VkResult (VKAPI_PTR *PFN_vkBeginCommandBuffer)(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo); -typedef VkResult (VKAPI_PTR *PFN_vkEndCommandBuffer)(VkCommandBuffer commandBuffer); -typedef VkResult (VKAPI_PTR *PFN_vkResetCommandBuffer)(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags); -typedef void (VKAPI_PTR *PFN_vkCmdBindPipeline)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline); -typedef void (VKAPI_PTR *PFN_vkCmdSetViewport)(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport* pViewports); -typedef void (VKAPI_PTR *PFN_vkCmdSetScissor)(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D* pScissors); -typedef void (VKAPI_PTR *PFN_vkCmdSetLineWidth)(VkCommandBuffer commandBuffer, float lineWidth); -typedef void (VKAPI_PTR *PFN_vkCmdSetDepthBias)(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor); -typedef void (VKAPI_PTR *PFN_vkCmdSetBlendConstants)(VkCommandBuffer commandBuffer, const float blendConstants[4]); -typedef void (VKAPI_PTR *PFN_vkCmdSetDepthBounds)(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds); -typedef void (VKAPI_PTR *PFN_vkCmdSetStencilCompareMask)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask); -typedef void (VKAPI_PTR *PFN_vkCmdSetStencilWriteMask)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask); -typedef void (VKAPI_PTR *PFN_vkCmdSetStencilReference)(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference); -typedef void (VKAPI_PTR *PFN_vkCmdBindDescriptorSets)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets); -typedef void (VKAPI_PTR *PFN_vkCmdBindIndexBuffer)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType); -typedef void (VKAPI_PTR *PFN_vkCmdBindVertexBuffers)(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets); -typedef void (VKAPI_PTR *PFN_vkCmdDraw)(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance); -typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexed)(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance); -typedef void (VKAPI_PTR *PFN_vkCmdDrawIndirect)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride); -typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexedIndirect)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride); -typedef void (VKAPI_PTR *PFN_vkCmdDispatch)(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); -typedef void (VKAPI_PTR *PFN_vkCmdDispatchIndirect)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset); -typedef void (VKAPI_PTR *PFN_vkCmdCopyBuffer)(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy* pRegions); -typedef void (VKAPI_PTR *PFN_vkCmdCopyImage)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions); -typedef void (VKAPI_PTR *PFN_vkCmdBlitImage)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkFilter filter); -typedef void (VKAPI_PTR *PFN_vkCmdCopyBufferToImage)(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions); -typedef void (VKAPI_PTR *PFN_vkCmdCopyImageToBuffer)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions); -typedef void (VKAPI_PTR *PFN_vkCmdUpdateBuffer)(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData); -typedef void (VKAPI_PTR *PFN_vkCmdFillBuffer)(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data); -typedef void (VKAPI_PTR *PFN_vkCmdClearColorImage)(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges); -typedef void (VKAPI_PTR *PFN_vkCmdClearDepthStencilImage)(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges); -typedef void (VKAPI_PTR *PFN_vkCmdClearAttachments)(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects); -typedef void (VKAPI_PTR *PFN_vkCmdResolveImage)(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve* pRegions); -typedef void (VKAPI_PTR *PFN_vkCmdSetEvent)(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask); -typedef void (VKAPI_PTR *PFN_vkCmdResetEvent)(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask); -typedef void (VKAPI_PTR *PFN_vkCmdWaitEvents)(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers); -typedef void (VKAPI_PTR *PFN_vkCmdPipelineBarrier)(VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers); -typedef void (VKAPI_PTR *PFN_vkCmdBeginQuery)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags); -typedef void (VKAPI_PTR *PFN_vkCmdEndQuery)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query); -typedef void (VKAPI_PTR *PFN_vkCmdResetQueryPool)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount); -typedef void (VKAPI_PTR *PFN_vkCmdWriteTimestamp)(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query); -typedef void (VKAPI_PTR *PFN_vkCmdCopyQueryPoolResults)(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags); -typedef void (VKAPI_PTR *PFN_vkCmdPushConstants)(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues); -typedef void (VKAPI_PTR *PFN_vkCmdBeginRenderPass)(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents); -typedef void (VKAPI_PTR *PFN_vkCmdNextSubpass)(VkCommandBuffer commandBuffer, VkSubpassContents contents); -typedef void (VKAPI_PTR *PFN_vkCmdEndRenderPass)(VkCommandBuffer commandBuffer); -typedef void (VKAPI_PTR *PFN_vkCmdExecuteCommands)(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance( - const VkInstanceCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkInstance* pInstance); - -VKAPI_ATTR void VKAPI_CALL vkDestroyInstance( - VkInstance instance, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDevices( - VkInstance instance, - uint32_t* pPhysicalDeviceCount, - VkPhysicalDevice* pPhysicalDevices); - -VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures( - VkPhysicalDevice physicalDevice, - VkPhysicalDeviceFeatures* pFeatures); - -VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties( - VkPhysicalDevice physicalDevice, - VkFormat format, - VkFormatProperties* pFormatProperties); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties( - VkPhysicalDevice physicalDevice, - VkFormat format, - VkImageType type, - VkImageTiling tiling, - VkImageUsageFlags usage, - VkImageCreateFlags flags, - VkImageFormatProperties* pImageFormatProperties); - -VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties( - VkPhysicalDevice physicalDevice, - VkPhysicalDeviceProperties* pProperties); - -VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties( - VkPhysicalDevice physicalDevice, - uint32_t* pQueueFamilyPropertyCount, - VkQueueFamilyProperties* pQueueFamilyProperties); - -VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties( - VkPhysicalDevice physicalDevice, - VkPhysicalDeviceMemoryProperties* pMemoryProperties); - -VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr( - VkInstance instance, - const char* pName); - -VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr( - VkDevice device, - const char* pName); - -VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice( - VkPhysicalDevice physicalDevice, - const VkDeviceCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkDevice* pDevice); - -VKAPI_ATTR void VKAPI_CALL vkDestroyDevice( - VkDevice device, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceExtensionProperties( - const char* pLayerName, - uint32_t* pPropertyCount, - VkExtensionProperties* pProperties); - -VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceExtensionProperties( - VkPhysicalDevice physicalDevice, - const char* pLayerName, - uint32_t* pPropertyCount, - VkExtensionProperties* pProperties); - -VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceLayerProperties( - uint32_t* pPropertyCount, - VkLayerProperties* pProperties); - -VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceLayerProperties( - VkPhysicalDevice physicalDevice, - uint32_t* pPropertyCount, - VkLayerProperties* pProperties); - -VKAPI_ATTR void VKAPI_CALL vkGetDeviceQueue( - VkDevice device, - uint32_t queueFamilyIndex, - uint32_t queueIndex, - VkQueue* pQueue); - -VKAPI_ATTR VkResult VKAPI_CALL vkQueueSubmit( - VkQueue queue, - uint32_t submitCount, - const VkSubmitInfo* pSubmits, - VkFence fence); - -VKAPI_ATTR VkResult VKAPI_CALL vkQueueWaitIdle( - VkQueue queue); - -VKAPI_ATTR VkResult VKAPI_CALL vkDeviceWaitIdle( - VkDevice device); - -VKAPI_ATTR VkResult VKAPI_CALL vkAllocateMemory( - VkDevice device, - const VkMemoryAllocateInfo* pAllocateInfo, - const VkAllocationCallbacks* pAllocator, - VkDeviceMemory* pMemory); - -VKAPI_ATTR void VKAPI_CALL vkFreeMemory( - VkDevice device, - VkDeviceMemory memory, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL vkMapMemory( - VkDevice device, - VkDeviceMemory memory, - VkDeviceSize offset, - VkDeviceSize size, - VkMemoryMapFlags flags, - void** ppData); - -VKAPI_ATTR void VKAPI_CALL vkUnmapMemory( - VkDevice device, - VkDeviceMemory memory); - -VKAPI_ATTR VkResult VKAPI_CALL vkFlushMappedMemoryRanges( - VkDevice device, - uint32_t memoryRangeCount, - const VkMappedMemoryRange* pMemoryRanges); - -VKAPI_ATTR VkResult VKAPI_CALL vkInvalidateMappedMemoryRanges( - VkDevice device, - uint32_t memoryRangeCount, - const VkMappedMemoryRange* pMemoryRanges); - -VKAPI_ATTR void VKAPI_CALL vkGetDeviceMemoryCommitment( - VkDevice device, - VkDeviceMemory memory, - VkDeviceSize* pCommittedMemoryInBytes); - -VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory( - VkDevice device, - VkBuffer buffer, - VkDeviceMemory memory, - VkDeviceSize memoryOffset); - -VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory( - VkDevice device, - VkImage image, - VkDeviceMemory memory, - VkDeviceSize memoryOffset); - -VKAPI_ATTR void VKAPI_CALL vkGetBufferMemoryRequirements( - VkDevice device, - VkBuffer buffer, - VkMemoryRequirements* pMemoryRequirements); - -VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements( - VkDevice device, - VkImage image, - VkMemoryRequirements* pMemoryRequirements); - -VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements( - VkDevice device, - VkImage image, - uint32_t* pSparseMemoryRequirementCount, - VkSparseImageMemoryRequirements* pSparseMemoryRequirements); - -VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties( - VkPhysicalDevice physicalDevice, - VkFormat format, - VkImageType type, - VkSampleCountFlagBits samples, - VkImageUsageFlags usage, - VkImageTiling tiling, - uint32_t* pPropertyCount, - VkSparseImageFormatProperties* pProperties); - -VKAPI_ATTR VkResult VKAPI_CALL vkQueueBindSparse( - VkQueue queue, - uint32_t bindInfoCount, - const VkBindSparseInfo* pBindInfo, - VkFence fence); - -VKAPI_ATTR VkResult VKAPI_CALL vkCreateFence( - VkDevice device, - const VkFenceCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkFence* pFence); - -VKAPI_ATTR void VKAPI_CALL vkDestroyFence( - VkDevice device, - VkFence fence, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL vkResetFences( - VkDevice device, - uint32_t fenceCount, - const VkFence* pFences); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceStatus( - VkDevice device, - VkFence fence); - -VKAPI_ATTR VkResult VKAPI_CALL vkWaitForFences( - VkDevice device, - uint32_t fenceCount, - const VkFence* pFences, - VkBool32 waitAll, - uint64_t timeout); - -VKAPI_ATTR VkResult VKAPI_CALL vkCreateSemaphore( - VkDevice device, - const VkSemaphoreCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSemaphore* pSemaphore); - -VKAPI_ATTR void VKAPI_CALL vkDestroySemaphore( - VkDevice device, - VkSemaphore semaphore, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL vkCreateEvent( - VkDevice device, - const VkEventCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkEvent* pEvent); - -VKAPI_ATTR void VKAPI_CALL vkDestroyEvent( - VkDevice device, - VkEvent event, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetEventStatus( - VkDevice device, - VkEvent event); - -VKAPI_ATTR VkResult VKAPI_CALL vkSetEvent( - VkDevice device, - VkEvent event); - -VKAPI_ATTR VkResult VKAPI_CALL vkResetEvent( - VkDevice device, - VkEvent event); - -VKAPI_ATTR VkResult VKAPI_CALL vkCreateQueryPool( - VkDevice device, - const VkQueryPoolCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkQueryPool* pQueryPool); - -VKAPI_ATTR void VKAPI_CALL vkDestroyQueryPool( - VkDevice device, - VkQueryPool queryPool, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetQueryPoolResults( - VkDevice device, - VkQueryPool queryPool, - uint32_t firstQuery, - uint32_t queryCount, - size_t dataSize, - void* pData, - VkDeviceSize stride, - VkQueryResultFlags flags); - -VKAPI_ATTR VkResult VKAPI_CALL vkCreateBuffer( - VkDevice device, - const VkBufferCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkBuffer* pBuffer); - -VKAPI_ATTR void VKAPI_CALL vkDestroyBuffer( - VkDevice device, - VkBuffer buffer, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL vkCreateBufferView( - VkDevice device, - const VkBufferViewCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkBufferView* pView); - -VKAPI_ATTR void VKAPI_CALL vkDestroyBufferView( - VkDevice device, - VkBufferView bufferView, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL vkCreateImage( - VkDevice device, - const VkImageCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkImage* pImage); - -VKAPI_ATTR void VKAPI_CALL vkDestroyImage( - VkDevice device, - VkImage image, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR void VKAPI_CALL vkGetImageSubresourceLayout( - VkDevice device, - VkImage image, - const VkImageSubresource* pSubresource, - VkSubresourceLayout* pLayout); - -VKAPI_ATTR VkResult VKAPI_CALL vkCreateImageView( - VkDevice device, - const VkImageViewCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkImageView* pView); - -VKAPI_ATTR void VKAPI_CALL vkDestroyImageView( - VkDevice device, - VkImageView imageView, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL vkCreateShaderModule( - VkDevice device, - const VkShaderModuleCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkShaderModule* pShaderModule); - -VKAPI_ATTR void VKAPI_CALL vkDestroyShaderModule( - VkDevice device, - VkShaderModule shaderModule, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineCache( - VkDevice device, - const VkPipelineCacheCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkPipelineCache* pPipelineCache); - -VKAPI_ATTR void VKAPI_CALL vkDestroyPipelineCache( - VkDevice device, - VkPipelineCache pipelineCache, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelineCacheData( - VkDevice device, - VkPipelineCache pipelineCache, - size_t* pDataSize, - void* pData); - -VKAPI_ATTR VkResult VKAPI_CALL vkMergePipelineCaches( - VkDevice device, - VkPipelineCache dstCache, - uint32_t srcCacheCount, - const VkPipelineCache* pSrcCaches); - -VKAPI_ATTR VkResult VKAPI_CALL vkCreateGraphicsPipelines( - VkDevice device, - VkPipelineCache pipelineCache, - uint32_t createInfoCount, - const VkGraphicsPipelineCreateInfo* pCreateInfos, - const VkAllocationCallbacks* pAllocator, - VkPipeline* pPipelines); - -VKAPI_ATTR VkResult VKAPI_CALL vkCreateComputePipelines( - VkDevice device, - VkPipelineCache pipelineCache, - uint32_t createInfoCount, - const VkComputePipelineCreateInfo* pCreateInfos, - const VkAllocationCallbacks* pAllocator, - VkPipeline* pPipelines); - -VKAPI_ATTR void VKAPI_CALL vkDestroyPipeline( - VkDevice device, - VkPipeline pipeline, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineLayout( - VkDevice device, - const VkPipelineLayoutCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkPipelineLayout* pPipelineLayout); - -VKAPI_ATTR void VKAPI_CALL vkDestroyPipelineLayout( - VkDevice device, - VkPipelineLayout pipelineLayout, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL vkCreateSampler( - VkDevice device, - const VkSamplerCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSampler* pSampler); - -VKAPI_ATTR void VKAPI_CALL vkDestroySampler( - VkDevice device, - VkSampler sampler, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorSetLayout( - VkDevice device, - const VkDescriptorSetLayoutCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkDescriptorSetLayout* pSetLayout); - -VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorSetLayout( - VkDevice device, - VkDescriptorSetLayout descriptorSetLayout, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorPool( - VkDevice device, - const VkDescriptorPoolCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkDescriptorPool* pDescriptorPool); - -VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorPool( - VkDevice device, - VkDescriptorPool descriptorPool, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL vkResetDescriptorPool( - VkDevice device, - VkDescriptorPool descriptorPool, - VkDescriptorPoolResetFlags flags); - -VKAPI_ATTR VkResult VKAPI_CALL vkAllocateDescriptorSets( - VkDevice device, - const VkDescriptorSetAllocateInfo* pAllocateInfo, - VkDescriptorSet* pDescriptorSets); - -VKAPI_ATTR VkResult VKAPI_CALL vkFreeDescriptorSets( - VkDevice device, - VkDescriptorPool descriptorPool, - uint32_t descriptorSetCount, - const VkDescriptorSet* pDescriptorSets); - -VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSets( - VkDevice device, - uint32_t descriptorWriteCount, - const VkWriteDescriptorSet* pDescriptorWrites, - uint32_t descriptorCopyCount, - const VkCopyDescriptorSet* pDescriptorCopies); - -VKAPI_ATTR VkResult VKAPI_CALL vkCreateFramebuffer( - VkDevice device, - const VkFramebufferCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkFramebuffer* pFramebuffer); - -VKAPI_ATTR void VKAPI_CALL vkDestroyFramebuffer( - VkDevice device, - VkFramebuffer framebuffer, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL vkCreateRenderPass( - VkDevice device, - const VkRenderPassCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkRenderPass* pRenderPass); - -VKAPI_ATTR void VKAPI_CALL vkDestroyRenderPass( - VkDevice device, - VkRenderPass renderPass, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR void VKAPI_CALL vkGetRenderAreaGranularity( - VkDevice device, - VkRenderPass renderPass, - VkExtent2D* pGranularity); - -VKAPI_ATTR VkResult VKAPI_CALL vkCreateCommandPool( - VkDevice device, - const VkCommandPoolCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkCommandPool* pCommandPool); - -VKAPI_ATTR void VKAPI_CALL vkDestroyCommandPool( - VkDevice device, - VkCommandPool commandPool, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL vkResetCommandPool( - VkDevice device, - VkCommandPool commandPool, - VkCommandPoolResetFlags flags); - -VKAPI_ATTR VkResult VKAPI_CALL vkAllocateCommandBuffers( - VkDevice device, - const VkCommandBufferAllocateInfo* pAllocateInfo, - VkCommandBuffer* pCommandBuffers); - -VKAPI_ATTR void VKAPI_CALL vkFreeCommandBuffers( - VkDevice device, - VkCommandPool commandPool, - uint32_t commandBufferCount, - const VkCommandBuffer* pCommandBuffers); - -VKAPI_ATTR VkResult VKAPI_CALL vkBeginCommandBuffer( - VkCommandBuffer commandBuffer, - const VkCommandBufferBeginInfo* pBeginInfo); - -VKAPI_ATTR VkResult VKAPI_CALL vkEndCommandBuffer( - VkCommandBuffer commandBuffer); - -VKAPI_ATTR VkResult VKAPI_CALL vkResetCommandBuffer( - VkCommandBuffer commandBuffer, - VkCommandBufferResetFlags flags); - -VKAPI_ATTR void VKAPI_CALL vkCmdBindPipeline( - VkCommandBuffer commandBuffer, - VkPipelineBindPoint pipelineBindPoint, - VkPipeline pipeline); - -VKAPI_ATTR void VKAPI_CALL vkCmdSetViewport( - VkCommandBuffer commandBuffer, - uint32_t firstViewport, - uint32_t viewportCount, - const VkViewport* pViewports); - -VKAPI_ATTR void VKAPI_CALL vkCmdSetScissor( - VkCommandBuffer commandBuffer, - uint32_t firstScissor, - uint32_t scissorCount, - const VkRect2D* pScissors); - -VKAPI_ATTR void VKAPI_CALL vkCmdSetLineWidth( - VkCommandBuffer commandBuffer, - float lineWidth); - -VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBias( - VkCommandBuffer commandBuffer, - float depthBiasConstantFactor, - float depthBiasClamp, - float depthBiasSlopeFactor); - -VKAPI_ATTR void VKAPI_CALL vkCmdSetBlendConstants( - VkCommandBuffer commandBuffer, - const float blendConstants[4]); - -VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBounds( - VkCommandBuffer commandBuffer, - float minDepthBounds, - float maxDepthBounds); - -VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilCompareMask( - VkCommandBuffer commandBuffer, - VkStencilFaceFlags faceMask, - uint32_t compareMask); - -VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilWriteMask( - VkCommandBuffer commandBuffer, - VkStencilFaceFlags faceMask, - uint32_t writeMask); - -VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilReference( - VkCommandBuffer commandBuffer, - VkStencilFaceFlags faceMask, - uint32_t reference); - -VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorSets( - VkCommandBuffer commandBuffer, - VkPipelineBindPoint pipelineBindPoint, - VkPipelineLayout layout, - uint32_t firstSet, - uint32_t descriptorSetCount, - const VkDescriptorSet* pDescriptorSets, - uint32_t dynamicOffsetCount, - const uint32_t* pDynamicOffsets); - -VKAPI_ATTR void VKAPI_CALL vkCmdBindIndexBuffer( - VkCommandBuffer commandBuffer, - VkBuffer buffer, - VkDeviceSize offset, - VkIndexType indexType); - -VKAPI_ATTR void VKAPI_CALL vkCmdBindVertexBuffers( - VkCommandBuffer commandBuffer, - uint32_t firstBinding, - uint32_t bindingCount, - const VkBuffer* pBuffers, - const VkDeviceSize* pOffsets); - -VKAPI_ATTR void VKAPI_CALL vkCmdDraw( - VkCommandBuffer commandBuffer, - uint32_t vertexCount, - uint32_t instanceCount, - uint32_t firstVertex, - uint32_t firstInstance); - -VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexed( - VkCommandBuffer commandBuffer, - uint32_t indexCount, - uint32_t instanceCount, - uint32_t firstIndex, - int32_t vertexOffset, - uint32_t firstInstance); - -VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirect( - VkCommandBuffer commandBuffer, - VkBuffer buffer, - VkDeviceSize offset, - uint32_t drawCount, - uint32_t stride); - -VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirect( - VkCommandBuffer commandBuffer, - VkBuffer buffer, - VkDeviceSize offset, - uint32_t drawCount, - uint32_t stride); - -VKAPI_ATTR void VKAPI_CALL vkCmdDispatch( - VkCommandBuffer commandBuffer, - uint32_t groupCountX, - uint32_t groupCountY, - uint32_t groupCountZ); - -VKAPI_ATTR void VKAPI_CALL vkCmdDispatchIndirect( - VkCommandBuffer commandBuffer, - VkBuffer buffer, - VkDeviceSize offset); - -VKAPI_ATTR void VKAPI_CALL vkCmdCopyBuffer( - VkCommandBuffer commandBuffer, - VkBuffer srcBuffer, - VkBuffer dstBuffer, - uint32_t regionCount, - const VkBufferCopy* pRegions); - -VKAPI_ATTR void VKAPI_CALL vkCmdCopyImage( - VkCommandBuffer commandBuffer, - VkImage srcImage, - VkImageLayout srcImageLayout, - VkImage dstImage, - VkImageLayout dstImageLayout, - uint32_t regionCount, - const VkImageCopy* pRegions); - -VKAPI_ATTR void VKAPI_CALL vkCmdBlitImage( - VkCommandBuffer commandBuffer, - VkImage srcImage, - VkImageLayout srcImageLayout, - VkImage dstImage, - VkImageLayout dstImageLayout, - uint32_t regionCount, - const VkImageBlit* pRegions, - VkFilter filter); - -VKAPI_ATTR void VKAPI_CALL vkCmdCopyBufferToImage( - VkCommandBuffer commandBuffer, - VkBuffer srcBuffer, - VkImage dstImage, - VkImageLayout dstImageLayout, - uint32_t regionCount, - const VkBufferImageCopy* pRegions); - -VKAPI_ATTR void VKAPI_CALL vkCmdCopyImageToBuffer( - VkCommandBuffer commandBuffer, - VkImage srcImage, - VkImageLayout srcImageLayout, - VkBuffer dstBuffer, - uint32_t regionCount, - const VkBufferImageCopy* pRegions); - -VKAPI_ATTR void VKAPI_CALL vkCmdUpdateBuffer( - VkCommandBuffer commandBuffer, - VkBuffer dstBuffer, - VkDeviceSize dstOffset, - VkDeviceSize dataSize, - const void* pData); - -VKAPI_ATTR void VKAPI_CALL vkCmdFillBuffer( - VkCommandBuffer commandBuffer, - VkBuffer dstBuffer, - VkDeviceSize dstOffset, - VkDeviceSize size, - uint32_t data); - -VKAPI_ATTR void VKAPI_CALL vkCmdClearColorImage( - VkCommandBuffer commandBuffer, - VkImage image, - VkImageLayout imageLayout, - const VkClearColorValue* pColor, - uint32_t rangeCount, - const VkImageSubresourceRange* pRanges); - -VKAPI_ATTR void VKAPI_CALL vkCmdClearDepthStencilImage( - VkCommandBuffer commandBuffer, - VkImage image, - VkImageLayout imageLayout, - const VkClearDepthStencilValue* pDepthStencil, - uint32_t rangeCount, - const VkImageSubresourceRange* pRanges); - -VKAPI_ATTR void VKAPI_CALL vkCmdClearAttachments( - VkCommandBuffer commandBuffer, - uint32_t attachmentCount, - const VkClearAttachment* pAttachments, - uint32_t rectCount, - const VkClearRect* pRects); - -VKAPI_ATTR void VKAPI_CALL vkCmdResolveImage( - VkCommandBuffer commandBuffer, - VkImage srcImage, - VkImageLayout srcImageLayout, - VkImage dstImage, - VkImageLayout dstImageLayout, - uint32_t regionCount, - const VkImageResolve* pRegions); - -VKAPI_ATTR void VKAPI_CALL vkCmdSetEvent( - VkCommandBuffer commandBuffer, - VkEvent event, - VkPipelineStageFlags stageMask); - -VKAPI_ATTR void VKAPI_CALL vkCmdResetEvent( - VkCommandBuffer commandBuffer, - VkEvent event, - VkPipelineStageFlags stageMask); - -VKAPI_ATTR void VKAPI_CALL vkCmdWaitEvents( - VkCommandBuffer commandBuffer, - uint32_t eventCount, - const VkEvent* pEvents, - VkPipelineStageFlags srcStageMask, - VkPipelineStageFlags dstStageMask, - uint32_t memoryBarrierCount, - const VkMemoryBarrier* pMemoryBarriers, - uint32_t bufferMemoryBarrierCount, - const VkBufferMemoryBarrier* pBufferMemoryBarriers, - uint32_t imageMemoryBarrierCount, - const VkImageMemoryBarrier* pImageMemoryBarriers); - -VKAPI_ATTR void VKAPI_CALL vkCmdPipelineBarrier( - VkCommandBuffer commandBuffer, - VkPipelineStageFlags srcStageMask, - VkPipelineStageFlags dstStageMask, - VkDependencyFlags dependencyFlags, - uint32_t memoryBarrierCount, - const VkMemoryBarrier* pMemoryBarriers, - uint32_t bufferMemoryBarrierCount, - const VkBufferMemoryBarrier* pBufferMemoryBarriers, - uint32_t imageMemoryBarrierCount, - const VkImageMemoryBarrier* pImageMemoryBarriers); - -VKAPI_ATTR void VKAPI_CALL vkCmdBeginQuery( - VkCommandBuffer commandBuffer, - VkQueryPool queryPool, - uint32_t query, - VkQueryControlFlags flags); - -VKAPI_ATTR void VKAPI_CALL vkCmdEndQuery( - VkCommandBuffer commandBuffer, - VkQueryPool queryPool, - uint32_t query); - -VKAPI_ATTR void VKAPI_CALL vkCmdResetQueryPool( - VkCommandBuffer commandBuffer, - VkQueryPool queryPool, - uint32_t firstQuery, - uint32_t queryCount); - -VKAPI_ATTR void VKAPI_CALL vkCmdWriteTimestamp( - VkCommandBuffer commandBuffer, - VkPipelineStageFlagBits pipelineStage, - VkQueryPool queryPool, - uint32_t query); - -VKAPI_ATTR void VKAPI_CALL vkCmdCopyQueryPoolResults( - VkCommandBuffer commandBuffer, - VkQueryPool queryPool, - uint32_t firstQuery, - uint32_t queryCount, - VkBuffer dstBuffer, - VkDeviceSize dstOffset, - VkDeviceSize stride, - VkQueryResultFlags flags); - -VKAPI_ATTR void VKAPI_CALL vkCmdPushConstants( - VkCommandBuffer commandBuffer, - VkPipelineLayout layout, - VkShaderStageFlags stageFlags, - uint32_t offset, - uint32_t size, - const void* pValues); - -VKAPI_ATTR void VKAPI_CALL vkCmdBeginRenderPass( - VkCommandBuffer commandBuffer, - const VkRenderPassBeginInfo* pRenderPassBegin, - VkSubpassContents contents); - -VKAPI_ATTR void VKAPI_CALL vkCmdNextSubpass( - VkCommandBuffer commandBuffer, - VkSubpassContents contents); - -VKAPI_ATTR void VKAPI_CALL vkCmdEndRenderPass( - VkCommandBuffer commandBuffer); - -VKAPI_ATTR void VKAPI_CALL vkCmdExecuteCommands( - VkCommandBuffer commandBuffer, - uint32_t commandBufferCount, - const VkCommandBuffer* pCommandBuffers); -#endif - -#define VK_VERSION_1_1 1 -// Vulkan 1.1 version number -#define VK_API_VERSION_1_1 VK_MAKE_VERSION(1, 1, 0)// Patch version should always be set to 0 - - -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSamplerYcbcrConversion) -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorUpdateTemplate) - -#define VK_MAX_DEVICE_GROUP_SIZE 32 -#define VK_LUID_SIZE 8 -#define VK_QUEUE_FAMILY_EXTERNAL (~0U-1) - - -typedef enum VkPointClippingBehavior { - VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES = 0, - VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY = 1, - VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES_KHR = VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES, - VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY_KHR = VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY, - VK_POINT_CLIPPING_BEHAVIOR_BEGIN_RANGE = VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES, - VK_POINT_CLIPPING_BEHAVIOR_END_RANGE = VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY, - VK_POINT_CLIPPING_BEHAVIOR_RANGE_SIZE = (VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY - VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES + 1), - VK_POINT_CLIPPING_BEHAVIOR_MAX_ENUM = 0x7FFFFFFF -} VkPointClippingBehavior; - -typedef enum VkTessellationDomainOrigin { - VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT = 0, - VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT = 1, - VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT_KHR = VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT, - VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT_KHR = VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT, - VK_TESSELLATION_DOMAIN_ORIGIN_BEGIN_RANGE = VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT, - VK_TESSELLATION_DOMAIN_ORIGIN_END_RANGE = VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT, - VK_TESSELLATION_DOMAIN_ORIGIN_RANGE_SIZE = (VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT - VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT + 1), - VK_TESSELLATION_DOMAIN_ORIGIN_MAX_ENUM = 0x7FFFFFFF -} VkTessellationDomainOrigin; - -typedef enum VkSamplerYcbcrModelConversion { - VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY = 0, - VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY = 1, - VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709 = 2, - VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601 = 3, - VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020 = 4, - VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY, - VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY, - VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709, - VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601, - VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020_KHR = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020, - VK_SAMPLER_YCBCR_MODEL_CONVERSION_BEGIN_RANGE = VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY, - VK_SAMPLER_YCBCR_MODEL_CONVERSION_END_RANGE = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020, - VK_SAMPLER_YCBCR_MODEL_CONVERSION_RANGE_SIZE = (VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_2020 - VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY + 1), - VK_SAMPLER_YCBCR_MODEL_CONVERSION_MAX_ENUM = 0x7FFFFFFF -} VkSamplerYcbcrModelConversion; - -typedef enum VkSamplerYcbcrRange { - VK_SAMPLER_YCBCR_RANGE_ITU_FULL = 0, - VK_SAMPLER_YCBCR_RANGE_ITU_NARROW = 1, - VK_SAMPLER_YCBCR_RANGE_ITU_FULL_KHR = VK_SAMPLER_YCBCR_RANGE_ITU_FULL, - VK_SAMPLER_YCBCR_RANGE_ITU_NARROW_KHR = VK_SAMPLER_YCBCR_RANGE_ITU_NARROW, - VK_SAMPLER_YCBCR_RANGE_BEGIN_RANGE = VK_SAMPLER_YCBCR_RANGE_ITU_FULL, - VK_SAMPLER_YCBCR_RANGE_END_RANGE = VK_SAMPLER_YCBCR_RANGE_ITU_NARROW, - VK_SAMPLER_YCBCR_RANGE_RANGE_SIZE = (VK_SAMPLER_YCBCR_RANGE_ITU_NARROW - VK_SAMPLER_YCBCR_RANGE_ITU_FULL + 1), - VK_SAMPLER_YCBCR_RANGE_MAX_ENUM = 0x7FFFFFFF -} VkSamplerYcbcrRange; - -typedef enum VkChromaLocation { - VK_CHROMA_LOCATION_COSITED_EVEN = 0, - VK_CHROMA_LOCATION_MIDPOINT = 1, - VK_CHROMA_LOCATION_COSITED_EVEN_KHR = VK_CHROMA_LOCATION_COSITED_EVEN, - VK_CHROMA_LOCATION_MIDPOINT_KHR = VK_CHROMA_LOCATION_MIDPOINT, - VK_CHROMA_LOCATION_BEGIN_RANGE = VK_CHROMA_LOCATION_COSITED_EVEN, - VK_CHROMA_LOCATION_END_RANGE = VK_CHROMA_LOCATION_MIDPOINT, - VK_CHROMA_LOCATION_RANGE_SIZE = (VK_CHROMA_LOCATION_MIDPOINT - VK_CHROMA_LOCATION_COSITED_EVEN + 1), - VK_CHROMA_LOCATION_MAX_ENUM = 0x7FFFFFFF -} VkChromaLocation; - -typedef enum VkDescriptorUpdateTemplateType { - VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET = 0, - VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = 1, - VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET, - VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_BEGIN_RANGE = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET, - VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_END_RANGE = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET, - VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_RANGE_SIZE = (VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET - VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET + 1), - VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_MAX_ENUM = 0x7FFFFFFF -} VkDescriptorUpdateTemplateType; - - -typedef enum VkSubgroupFeatureFlagBits { - VK_SUBGROUP_FEATURE_BASIC_BIT = 0x00000001, - VK_SUBGROUP_FEATURE_VOTE_BIT = 0x00000002, - VK_SUBGROUP_FEATURE_ARITHMETIC_BIT = 0x00000004, - VK_SUBGROUP_FEATURE_BALLOT_BIT = 0x00000008, - VK_SUBGROUP_FEATURE_SHUFFLE_BIT = 0x00000010, - VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT = 0x00000020, - VK_SUBGROUP_FEATURE_CLUSTERED_BIT = 0x00000040, - VK_SUBGROUP_FEATURE_QUAD_BIT = 0x00000080, - VK_SUBGROUP_FEATURE_PARTITIONED_BIT_NV = 0x00000100, - VK_SUBGROUP_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkSubgroupFeatureFlagBits; -typedef VkFlags VkSubgroupFeatureFlags; - -typedef enum VkPeerMemoryFeatureFlagBits { - VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT = 0x00000001, - VK_PEER_MEMORY_FEATURE_COPY_DST_BIT = 0x00000002, - VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT = 0x00000004, - VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT = 0x00000008, - VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT_KHR = VK_PEER_MEMORY_FEATURE_COPY_SRC_BIT, - VK_PEER_MEMORY_FEATURE_COPY_DST_BIT_KHR = VK_PEER_MEMORY_FEATURE_COPY_DST_BIT, - VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT_KHR = VK_PEER_MEMORY_FEATURE_GENERIC_SRC_BIT, - VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT_KHR = VK_PEER_MEMORY_FEATURE_GENERIC_DST_BIT, - VK_PEER_MEMORY_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkPeerMemoryFeatureFlagBits; -typedef VkFlags VkPeerMemoryFeatureFlags; - -typedef enum VkMemoryAllocateFlagBits { - VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT = 0x00000001, - VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT_KHR = VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT, - VK_MEMORY_ALLOCATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkMemoryAllocateFlagBits; -typedef VkFlags VkMemoryAllocateFlags; -typedef VkFlags VkCommandPoolTrimFlags; -typedef VkFlags VkDescriptorUpdateTemplateCreateFlags; - -typedef enum VkExternalMemoryHandleTypeFlagBits { - VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT = 0x00000001, - VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT = 0x00000002, - VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 0x00000004, - VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT = 0x00000008, - VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT = 0x00000010, - VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT = 0x00000020, - VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT = 0x00000040, - VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT = 0x00000200, - VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID = 0x00000400, - VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT = 0x00000080, - VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT = 0x00000100, - VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT, - VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT, - VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT, - VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT, - VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT, - VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT, - VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT, - VK_EXTERNAL_MEMORY_HANDLE_TYPE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkExternalMemoryHandleTypeFlagBits; -typedef VkFlags VkExternalMemoryHandleTypeFlags; - -typedef enum VkExternalMemoryFeatureFlagBits { - VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT = 0x00000001, - VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT = 0x00000002, - VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT = 0x00000004, - VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHR = VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT, - VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHR = VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT, - VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHR = VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT, - VK_EXTERNAL_MEMORY_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkExternalMemoryFeatureFlagBits; -typedef VkFlags VkExternalMemoryFeatureFlags; - -typedef enum VkExternalFenceHandleTypeFlagBits { - VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT = 0x00000001, - VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT = 0x00000002, - VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 0x00000004, - VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT = 0x00000008, - VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT, - VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT, - VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT, - VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT_KHR = VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT, - VK_EXTERNAL_FENCE_HANDLE_TYPE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkExternalFenceHandleTypeFlagBits; -typedef VkFlags VkExternalFenceHandleTypeFlags; - -typedef enum VkExternalFenceFeatureFlagBits { - VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT = 0x00000001, - VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT = 0x00000002, - VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT_KHR = VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT, - VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT_KHR = VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT, - VK_EXTERNAL_FENCE_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkExternalFenceFeatureFlagBits; -typedef VkFlags VkExternalFenceFeatureFlags; - -typedef enum VkFenceImportFlagBits { - VK_FENCE_IMPORT_TEMPORARY_BIT = 0x00000001, - VK_FENCE_IMPORT_TEMPORARY_BIT_KHR = VK_FENCE_IMPORT_TEMPORARY_BIT, - VK_FENCE_IMPORT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkFenceImportFlagBits; -typedef VkFlags VkFenceImportFlags; - -typedef enum VkSemaphoreImportFlagBits { - VK_SEMAPHORE_IMPORT_TEMPORARY_BIT = 0x00000001, - VK_SEMAPHORE_IMPORT_TEMPORARY_BIT_KHR = VK_SEMAPHORE_IMPORT_TEMPORARY_BIT, - VK_SEMAPHORE_IMPORT_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkSemaphoreImportFlagBits; -typedef VkFlags VkSemaphoreImportFlags; - -typedef enum VkExternalSemaphoreHandleTypeFlagBits { - VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT = 0x00000001, - VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT = 0x00000002, - VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT = 0x00000004, - VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT = 0x00000008, - VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT = 0x00000010, - VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT, - VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT, - VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT, - VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT, - VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT, - VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkExternalSemaphoreHandleTypeFlagBits; -typedef VkFlags VkExternalSemaphoreHandleTypeFlags; - -typedef enum VkExternalSemaphoreFeatureFlagBits { - VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT = 0x00000001, - VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT = 0x00000002, - VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHR = VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT, - VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHR = VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT, - VK_EXTERNAL_SEMAPHORE_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF -} VkExternalSemaphoreFeatureFlagBits; -typedef VkFlags VkExternalSemaphoreFeatureFlags; - -typedef struct VkPhysicalDeviceSubgroupProperties { - VkStructureType sType; - void* pNext; - uint32_t subgroupSize; - VkShaderStageFlags supportedStages; - VkSubgroupFeatureFlags supportedOperations; - VkBool32 quadOperationsInAllStages; -} VkPhysicalDeviceSubgroupProperties; - -typedef struct VkBindBufferMemoryInfo { - VkStructureType sType; - const void* pNext; - VkBuffer buffer; - VkDeviceMemory memory; - VkDeviceSize memoryOffset; -} VkBindBufferMemoryInfo; - -typedef struct VkBindImageMemoryInfo { - VkStructureType sType; - const void* pNext; - VkImage image; - VkDeviceMemory memory; - VkDeviceSize memoryOffset; -} VkBindImageMemoryInfo; - -typedef struct VkPhysicalDevice16BitStorageFeatures { - VkStructureType sType; - void* pNext; - VkBool32 storageBuffer16BitAccess; - VkBool32 uniformAndStorageBuffer16BitAccess; - VkBool32 storagePushConstant16; - VkBool32 storageInputOutput16; -} VkPhysicalDevice16BitStorageFeatures; - -typedef struct VkMemoryDedicatedRequirements { - VkStructureType sType; - void* pNext; - VkBool32 prefersDedicatedAllocation; - VkBool32 requiresDedicatedAllocation; -} VkMemoryDedicatedRequirements; - -typedef struct VkMemoryDedicatedAllocateInfo { - VkStructureType sType; - const void* pNext; - VkImage image; - VkBuffer buffer; -} VkMemoryDedicatedAllocateInfo; - -typedef struct VkMemoryAllocateFlagsInfo { - VkStructureType sType; - const void* pNext; - VkMemoryAllocateFlags flags; - uint32_t deviceMask; -} VkMemoryAllocateFlagsInfo; - -typedef struct VkDeviceGroupRenderPassBeginInfo { - VkStructureType sType; - const void* pNext; - uint32_t deviceMask; - uint32_t deviceRenderAreaCount; - const VkRect2D* pDeviceRenderAreas; -} VkDeviceGroupRenderPassBeginInfo; - -typedef struct VkDeviceGroupCommandBufferBeginInfo { - VkStructureType sType; - const void* pNext; - uint32_t deviceMask; -} VkDeviceGroupCommandBufferBeginInfo; - -typedef struct VkDeviceGroupSubmitInfo { - VkStructureType sType; - const void* pNext; - uint32_t waitSemaphoreCount; - const uint32_t* pWaitSemaphoreDeviceIndices; - uint32_t commandBufferCount; - const uint32_t* pCommandBufferDeviceMasks; - uint32_t signalSemaphoreCount; - const uint32_t* pSignalSemaphoreDeviceIndices; -} VkDeviceGroupSubmitInfo; - -typedef struct VkDeviceGroupBindSparseInfo { - VkStructureType sType; - const void* pNext; - uint32_t resourceDeviceIndex; - uint32_t memoryDeviceIndex; -} VkDeviceGroupBindSparseInfo; - -typedef struct VkBindBufferMemoryDeviceGroupInfo { - VkStructureType sType; - const void* pNext; - uint32_t deviceIndexCount; - const uint32_t* pDeviceIndices; -} VkBindBufferMemoryDeviceGroupInfo; - -typedef struct VkBindImageMemoryDeviceGroupInfo { - VkStructureType sType; - const void* pNext; - uint32_t deviceIndexCount; - const uint32_t* pDeviceIndices; - uint32_t splitInstanceBindRegionCount; - const VkRect2D* pSplitInstanceBindRegions; -} VkBindImageMemoryDeviceGroupInfo; - -typedef struct VkPhysicalDeviceGroupProperties { - VkStructureType sType; - void* pNext; - uint32_t physicalDeviceCount; - VkPhysicalDevice physicalDevices[VK_MAX_DEVICE_GROUP_SIZE]; - VkBool32 subsetAllocation; -} VkPhysicalDeviceGroupProperties; - -typedef struct VkDeviceGroupDeviceCreateInfo { - VkStructureType sType; - const void* pNext; - uint32_t physicalDeviceCount; - const VkPhysicalDevice* pPhysicalDevices; -} VkDeviceGroupDeviceCreateInfo; - -typedef struct VkBufferMemoryRequirementsInfo2 { - VkStructureType sType; - const void* pNext; - VkBuffer buffer; -} VkBufferMemoryRequirementsInfo2; - -typedef struct VkImageMemoryRequirementsInfo2 { - VkStructureType sType; - const void* pNext; - VkImage image; -} VkImageMemoryRequirementsInfo2; - -typedef struct VkImageSparseMemoryRequirementsInfo2 { - VkStructureType sType; - const void* pNext; - VkImage image; -} VkImageSparseMemoryRequirementsInfo2; - -typedef struct VkMemoryRequirements2 { - VkStructureType sType; - void* pNext; - VkMemoryRequirements memoryRequirements; -} VkMemoryRequirements2; - -typedef struct VkSparseImageMemoryRequirements2 { - VkStructureType sType; - void* pNext; - VkSparseImageMemoryRequirements memoryRequirements; -} VkSparseImageMemoryRequirements2; - -typedef struct VkPhysicalDeviceFeatures2 { - VkStructureType sType; - void* pNext; - VkPhysicalDeviceFeatures features; -} VkPhysicalDeviceFeatures2; - -typedef struct VkPhysicalDeviceProperties2 { - VkStructureType sType; - void* pNext; - VkPhysicalDeviceProperties properties; -} VkPhysicalDeviceProperties2; - -typedef struct VkFormatProperties2 { - VkStructureType sType; - void* pNext; - VkFormatProperties formatProperties; -} VkFormatProperties2; - -typedef struct VkImageFormatProperties2 { - VkStructureType sType; - void* pNext; - VkImageFormatProperties imageFormatProperties; -} VkImageFormatProperties2; - -typedef struct VkPhysicalDeviceImageFormatInfo2 { - VkStructureType sType; - const void* pNext; - VkFormat format; - VkImageType type; - VkImageTiling tiling; - VkImageUsageFlags usage; - VkImageCreateFlags flags; -} VkPhysicalDeviceImageFormatInfo2; - -typedef struct VkQueueFamilyProperties2 { - VkStructureType sType; - void* pNext; - VkQueueFamilyProperties queueFamilyProperties; -} VkQueueFamilyProperties2; - -typedef struct VkPhysicalDeviceMemoryProperties2 { - VkStructureType sType; - void* pNext; - VkPhysicalDeviceMemoryProperties memoryProperties; -} VkPhysicalDeviceMemoryProperties2; - -typedef struct VkSparseImageFormatProperties2 { - VkStructureType sType; - void* pNext; - VkSparseImageFormatProperties properties; -} VkSparseImageFormatProperties2; - -typedef struct VkPhysicalDeviceSparseImageFormatInfo2 { - VkStructureType sType; - const void* pNext; - VkFormat format; - VkImageType type; - VkSampleCountFlagBits samples; - VkImageUsageFlags usage; - VkImageTiling tiling; -} VkPhysicalDeviceSparseImageFormatInfo2; - -typedef struct VkPhysicalDevicePointClippingProperties { - VkStructureType sType; - void* pNext; - VkPointClippingBehavior pointClippingBehavior; -} VkPhysicalDevicePointClippingProperties; - -typedef struct VkInputAttachmentAspectReference { - uint32_t subpass; - uint32_t inputAttachmentIndex; - VkImageAspectFlags aspectMask; -} VkInputAttachmentAspectReference; - -typedef struct VkRenderPassInputAttachmentAspectCreateInfo { - VkStructureType sType; - const void* pNext; - uint32_t aspectReferenceCount; - const VkInputAttachmentAspectReference* pAspectReferences; -} VkRenderPassInputAttachmentAspectCreateInfo; - -typedef struct VkImageViewUsageCreateInfo { - VkStructureType sType; - const void* pNext; - VkImageUsageFlags usage; -} VkImageViewUsageCreateInfo; - -typedef struct VkPipelineTessellationDomainOriginStateCreateInfo { - VkStructureType sType; - const void* pNext; - VkTessellationDomainOrigin domainOrigin; -} VkPipelineTessellationDomainOriginStateCreateInfo; - -typedef struct VkRenderPassMultiviewCreateInfo { - VkStructureType sType; - const void* pNext; - uint32_t subpassCount; - const uint32_t* pViewMasks; - uint32_t dependencyCount; - const int32_t* pViewOffsets; - uint32_t correlationMaskCount; - const uint32_t* pCorrelationMasks; -} VkRenderPassMultiviewCreateInfo; - -typedef struct VkPhysicalDeviceMultiviewFeatures { - VkStructureType sType; - void* pNext; - VkBool32 multiview; - VkBool32 multiviewGeometryShader; - VkBool32 multiviewTessellationShader; -} VkPhysicalDeviceMultiviewFeatures; - -typedef struct VkPhysicalDeviceMultiviewProperties { - VkStructureType sType; - void* pNext; - uint32_t maxMultiviewViewCount; - uint32_t maxMultiviewInstanceIndex; -} VkPhysicalDeviceMultiviewProperties; - -typedef struct VkPhysicalDeviceVariablePointerFeatures { - VkStructureType sType; - void* pNext; - VkBool32 variablePointersStorageBuffer; - VkBool32 variablePointers; -} VkPhysicalDeviceVariablePointerFeatures; - -typedef struct VkPhysicalDeviceProtectedMemoryFeatures { - VkStructureType sType; - void* pNext; - VkBool32 protectedMemory; -} VkPhysicalDeviceProtectedMemoryFeatures; - -typedef struct VkPhysicalDeviceProtectedMemoryProperties { - VkStructureType sType; - void* pNext; - VkBool32 protectedNoFault; -} VkPhysicalDeviceProtectedMemoryProperties; - -typedef struct VkDeviceQueueInfo2 { - VkStructureType sType; - const void* pNext; - VkDeviceQueueCreateFlags flags; - uint32_t queueFamilyIndex; - uint32_t queueIndex; -} VkDeviceQueueInfo2; - -typedef struct VkProtectedSubmitInfo { - VkStructureType sType; - const void* pNext; - VkBool32 protectedSubmit; -} VkProtectedSubmitInfo; - -typedef struct VkSamplerYcbcrConversionCreateInfo { - VkStructureType sType; - const void* pNext; - VkFormat format; - VkSamplerYcbcrModelConversion ycbcrModel; - VkSamplerYcbcrRange ycbcrRange; - VkComponentMapping components; - VkChromaLocation xChromaOffset; - VkChromaLocation yChromaOffset; - VkFilter chromaFilter; - VkBool32 forceExplicitReconstruction; -} VkSamplerYcbcrConversionCreateInfo; - -typedef struct VkSamplerYcbcrConversionInfo { - VkStructureType sType; - const void* pNext; - VkSamplerYcbcrConversion conversion; -} VkSamplerYcbcrConversionInfo; - -typedef struct VkBindImagePlaneMemoryInfo { - VkStructureType sType; - const void* pNext; - VkImageAspectFlagBits planeAspect; -} VkBindImagePlaneMemoryInfo; - -typedef struct VkImagePlaneMemoryRequirementsInfo { - VkStructureType sType; - const void* pNext; - VkImageAspectFlagBits planeAspect; -} VkImagePlaneMemoryRequirementsInfo; - -typedef struct VkPhysicalDeviceSamplerYcbcrConversionFeatures { - VkStructureType sType; - void* pNext; - VkBool32 samplerYcbcrConversion; -} VkPhysicalDeviceSamplerYcbcrConversionFeatures; - -typedef struct VkSamplerYcbcrConversionImageFormatProperties { - VkStructureType sType; - void* pNext; - uint32_t combinedImageSamplerDescriptorCount; -} VkSamplerYcbcrConversionImageFormatProperties; - -typedef struct VkDescriptorUpdateTemplateEntry { - uint32_t dstBinding; - uint32_t dstArrayElement; - uint32_t descriptorCount; - VkDescriptorType descriptorType; - size_t offset; - size_t stride; -} VkDescriptorUpdateTemplateEntry; - -typedef struct VkDescriptorUpdateTemplateCreateInfo { - VkStructureType sType; - void* pNext; - VkDescriptorUpdateTemplateCreateFlags flags; - uint32_t descriptorUpdateEntryCount; - const VkDescriptorUpdateTemplateEntry* pDescriptorUpdateEntries; - VkDescriptorUpdateTemplateType templateType; - VkDescriptorSetLayout descriptorSetLayout; - VkPipelineBindPoint pipelineBindPoint; - VkPipelineLayout pipelineLayout; - uint32_t set; -} VkDescriptorUpdateTemplateCreateInfo; - -typedef struct VkExternalMemoryProperties { - VkExternalMemoryFeatureFlags externalMemoryFeatures; - VkExternalMemoryHandleTypeFlags exportFromImportedHandleTypes; - VkExternalMemoryHandleTypeFlags compatibleHandleTypes; -} VkExternalMemoryProperties; - -typedef struct VkPhysicalDeviceExternalImageFormatInfo { - VkStructureType sType; - const void* pNext; - VkExternalMemoryHandleTypeFlagBits handleType; -} VkPhysicalDeviceExternalImageFormatInfo; - -typedef struct VkExternalImageFormatProperties { - VkStructureType sType; - void* pNext; - VkExternalMemoryProperties externalMemoryProperties; -} VkExternalImageFormatProperties; - -typedef struct VkPhysicalDeviceExternalBufferInfo { - VkStructureType sType; - const void* pNext; - VkBufferCreateFlags flags; - VkBufferUsageFlags usage; - VkExternalMemoryHandleTypeFlagBits handleType; -} VkPhysicalDeviceExternalBufferInfo; - -typedef struct VkExternalBufferProperties { - VkStructureType sType; - void* pNext; - VkExternalMemoryProperties externalMemoryProperties; -} VkExternalBufferProperties; - -typedef struct VkPhysicalDeviceIDProperties { - VkStructureType sType; - void* pNext; - uint8_t deviceUUID[VK_UUID_SIZE]; - uint8_t driverUUID[VK_UUID_SIZE]; - uint8_t deviceLUID[VK_LUID_SIZE]; - uint32_t deviceNodeMask; - VkBool32 deviceLUIDValid; -} VkPhysicalDeviceIDProperties; - -typedef struct VkExternalMemoryImageCreateInfo { - VkStructureType sType; - const void* pNext; - VkExternalMemoryHandleTypeFlags handleTypes; -} VkExternalMemoryImageCreateInfo; - -typedef struct VkExternalMemoryBufferCreateInfo { - VkStructureType sType; - const void* pNext; - VkExternalMemoryHandleTypeFlags handleTypes; -} VkExternalMemoryBufferCreateInfo; - -typedef struct VkExportMemoryAllocateInfo { - VkStructureType sType; - const void* pNext; - VkExternalMemoryHandleTypeFlags handleTypes; -} VkExportMemoryAllocateInfo; - -typedef struct VkPhysicalDeviceExternalFenceInfo { - VkStructureType sType; - const void* pNext; - VkExternalFenceHandleTypeFlagBits handleType; -} VkPhysicalDeviceExternalFenceInfo; - -typedef struct VkExternalFenceProperties { - VkStructureType sType; - void* pNext; - VkExternalFenceHandleTypeFlags exportFromImportedHandleTypes; - VkExternalFenceHandleTypeFlags compatibleHandleTypes; - VkExternalFenceFeatureFlags externalFenceFeatures; -} VkExternalFenceProperties; - -typedef struct VkExportFenceCreateInfo { - VkStructureType sType; - const void* pNext; - VkExternalFenceHandleTypeFlags handleTypes; -} VkExportFenceCreateInfo; - -typedef struct VkExportSemaphoreCreateInfo { - VkStructureType sType; - const void* pNext; - VkExternalSemaphoreHandleTypeFlags handleTypes; -} VkExportSemaphoreCreateInfo; - -typedef struct VkPhysicalDeviceExternalSemaphoreInfo { - VkStructureType sType; - const void* pNext; - VkExternalSemaphoreHandleTypeFlagBits handleType; -} VkPhysicalDeviceExternalSemaphoreInfo; - -typedef struct VkExternalSemaphoreProperties { - VkStructureType sType; - void* pNext; - VkExternalSemaphoreHandleTypeFlags exportFromImportedHandleTypes; - VkExternalSemaphoreHandleTypeFlags compatibleHandleTypes; - VkExternalSemaphoreFeatureFlags externalSemaphoreFeatures; -} VkExternalSemaphoreProperties; - -typedef struct VkPhysicalDeviceMaintenance3Properties { - VkStructureType sType; - void* pNext; - uint32_t maxPerSetDescriptors; - VkDeviceSize maxMemoryAllocationSize; -} VkPhysicalDeviceMaintenance3Properties; - -typedef struct VkDescriptorSetLayoutSupport { - VkStructureType sType; - void* pNext; - VkBool32 supported; -} VkDescriptorSetLayoutSupport; - -typedef struct VkPhysicalDeviceShaderDrawParameterFeatures { - VkStructureType sType; - void* pNext; - VkBool32 shaderDrawParameters; -} VkPhysicalDeviceShaderDrawParameterFeatures; - - -typedef VkResult (VKAPI_PTR *PFN_vkEnumerateInstanceVersion)(uint32_t* pApiVersion); -typedef VkResult (VKAPI_PTR *PFN_vkBindBufferMemory2)(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos); -typedef VkResult (VKAPI_PTR *PFN_vkBindImageMemory2)(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos); -typedef void (VKAPI_PTR *PFN_vkGetDeviceGroupPeerMemoryFeatures)(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures); -typedef void (VKAPI_PTR *PFN_vkCmdSetDeviceMask)(VkCommandBuffer commandBuffer, uint32_t deviceMask); -typedef void (VKAPI_PTR *PFN_vkCmdDispatchBase)(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); -typedef VkResult (VKAPI_PTR *PFN_vkEnumeratePhysicalDeviceGroups)(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties); -typedef void (VKAPI_PTR *PFN_vkGetImageMemoryRequirements2)(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements); -typedef void (VKAPI_PTR *PFN_vkGetBufferMemoryRequirements2)(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements); -typedef void (VKAPI_PTR *PFN_vkGetImageSparseMemoryRequirements2)(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFeatures2)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures); -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceProperties2)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties); -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFormatProperties2)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2* pFormatProperties); -typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties2)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, VkImageFormatProperties2* pImageFormatProperties); -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties2)(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2* pQueueFamilyProperties); -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMemoryProperties2)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties); -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties2)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties); -typedef void (VKAPI_PTR *PFN_vkTrimCommandPool)(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags); -typedef void (VKAPI_PTR *PFN_vkGetDeviceQueue2)(VkDevice device, const VkDeviceQueueInfo2* pQueueInfo, VkQueue* pQueue); -typedef VkResult (VKAPI_PTR *PFN_vkCreateSamplerYcbcrConversion)(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion); -typedef void (VKAPI_PTR *PFN_vkDestroySamplerYcbcrConversion)(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks* pAllocator); -typedef VkResult (VKAPI_PTR *PFN_vkCreateDescriptorUpdateTemplate)(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate); -typedef void (VKAPI_PTR *PFN_vkDestroyDescriptorUpdateTemplate)(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator); -typedef void (VKAPI_PTR *PFN_vkUpdateDescriptorSetWithTemplate)(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData); -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalBufferProperties)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VkExternalBufferProperties* pExternalBufferProperties); -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalFenceProperties)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VkExternalFenceProperties* pExternalFenceProperties); -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalSemaphoreProperties)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VkExternalSemaphoreProperties* pExternalSemaphoreProperties); -typedef void (VKAPI_PTR *PFN_vkGetDescriptorSetLayoutSupport)(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceVersion( - uint32_t* pApiVersion); - -VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory2( - VkDevice device, - uint32_t bindInfoCount, - const VkBindBufferMemoryInfo* pBindInfos); - -VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory2( - VkDevice device, - uint32_t bindInfoCount, - const VkBindImageMemoryInfo* pBindInfos); - -VKAPI_ATTR void VKAPI_CALL vkGetDeviceGroupPeerMemoryFeatures( - VkDevice device, - uint32_t heapIndex, - uint32_t localDeviceIndex, - uint32_t remoteDeviceIndex, - VkPeerMemoryFeatureFlags* pPeerMemoryFeatures); - -VKAPI_ATTR void VKAPI_CALL vkCmdSetDeviceMask( - VkCommandBuffer commandBuffer, - uint32_t deviceMask); - -VKAPI_ATTR void VKAPI_CALL vkCmdDispatchBase( - VkCommandBuffer commandBuffer, - uint32_t baseGroupX, - uint32_t baseGroupY, - uint32_t baseGroupZ, - uint32_t groupCountX, - uint32_t groupCountY, - uint32_t groupCountZ); - -VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDeviceGroups( - VkInstance instance, - uint32_t* pPhysicalDeviceGroupCount, - VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties); - -VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements2( - VkDevice device, - const VkImageMemoryRequirementsInfo2* pInfo, - VkMemoryRequirements2* pMemoryRequirements); - -VKAPI_ATTR void VKAPI_CALL vkGetBufferMemoryRequirements2( - VkDevice device, - const VkBufferMemoryRequirementsInfo2* pInfo, - VkMemoryRequirements2* pMemoryRequirements); - -VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements2( - VkDevice device, - const VkImageSparseMemoryRequirementsInfo2* pInfo, - uint32_t* pSparseMemoryRequirementCount, - VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); - -VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures2( - VkPhysicalDevice physicalDevice, - VkPhysicalDeviceFeatures2* pFeatures); - -VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties2( - VkPhysicalDevice physicalDevice, - VkPhysicalDeviceProperties2* pProperties); - -VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties2( - VkPhysicalDevice physicalDevice, - VkFormat format, - VkFormatProperties2* pFormatProperties); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties2( - VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, - VkImageFormatProperties2* pImageFormatProperties); - -VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties2( - VkPhysicalDevice physicalDevice, - uint32_t* pQueueFamilyPropertyCount, - VkQueueFamilyProperties2* pQueueFamilyProperties); - -VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties2( - VkPhysicalDevice physicalDevice, - VkPhysicalDeviceMemoryProperties2* pMemoryProperties); - -VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties2( - VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, - uint32_t* pPropertyCount, - VkSparseImageFormatProperties2* pProperties); - -VKAPI_ATTR void VKAPI_CALL vkTrimCommandPool( - VkDevice device, - VkCommandPool commandPool, - VkCommandPoolTrimFlags flags); - -VKAPI_ATTR void VKAPI_CALL vkGetDeviceQueue2( - VkDevice device, - const VkDeviceQueueInfo2* pQueueInfo, - VkQueue* pQueue); - -VKAPI_ATTR VkResult VKAPI_CALL vkCreateSamplerYcbcrConversion( - VkDevice device, - const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSamplerYcbcrConversion* pYcbcrConversion); - -VKAPI_ATTR void VKAPI_CALL vkDestroySamplerYcbcrConversion( - VkDevice device, - VkSamplerYcbcrConversion ycbcrConversion, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorUpdateTemplate( - VkDevice device, - const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate); - -VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorUpdateTemplate( - VkDevice device, - VkDescriptorUpdateTemplate descriptorUpdateTemplate, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSetWithTemplate( - VkDevice device, - VkDescriptorSet descriptorSet, - VkDescriptorUpdateTemplate descriptorUpdateTemplate, - const void* pData); - -VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalBufferProperties( - VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, - VkExternalBufferProperties* pExternalBufferProperties); - -VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalFenceProperties( - VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, - VkExternalFenceProperties* pExternalFenceProperties); - -VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalSemaphoreProperties( - VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, - VkExternalSemaphoreProperties* pExternalSemaphoreProperties); - -VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetLayoutSupport( - VkDevice device, - const VkDescriptorSetLayoutCreateInfo* pCreateInfo, - VkDescriptorSetLayoutSupport* pSupport); -#endif - -#define VK_KHR_surface 1 -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR) - -#define VK_KHR_SURFACE_SPEC_VERSION 25 -#define VK_KHR_SURFACE_EXTENSION_NAME "VK_KHR_surface" -#define VK_COLORSPACE_SRGB_NONLINEAR_KHR VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - - -typedef enum VkColorSpaceKHR { - VK_COLOR_SPACE_SRGB_NONLINEAR_KHR = 0, - VK_COLOR_SPACE_DISPLAY_P3_NONLINEAR_EXT = 1000104001, - VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT = 1000104002, - VK_COLOR_SPACE_DCI_P3_LINEAR_EXT = 1000104003, - VK_COLOR_SPACE_DCI_P3_NONLINEAR_EXT = 1000104004, - VK_COLOR_SPACE_BT709_LINEAR_EXT = 1000104005, - VK_COLOR_SPACE_BT709_NONLINEAR_EXT = 1000104006, - VK_COLOR_SPACE_BT2020_LINEAR_EXT = 1000104007, - VK_COLOR_SPACE_HDR10_ST2084_EXT = 1000104008, - VK_COLOR_SPACE_DOLBYVISION_EXT = 1000104009, - VK_COLOR_SPACE_HDR10_HLG_EXT = 1000104010, - VK_COLOR_SPACE_ADOBERGB_LINEAR_EXT = 1000104011, - VK_COLOR_SPACE_ADOBERGB_NONLINEAR_EXT = 1000104012, - VK_COLOR_SPACE_PASS_THROUGH_EXT = 1000104013, - VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT = 1000104014, - VK_COLOR_SPACE_BEGIN_RANGE_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, - VK_COLOR_SPACE_END_RANGE_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, - VK_COLOR_SPACE_RANGE_SIZE_KHR = (VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - VK_COLOR_SPACE_SRGB_NONLINEAR_KHR + 1), - VK_COLOR_SPACE_MAX_ENUM_KHR = 0x7FFFFFFF -} VkColorSpaceKHR; - -typedef enum VkPresentModeKHR { - VK_PRESENT_MODE_IMMEDIATE_KHR = 0, - VK_PRESENT_MODE_MAILBOX_KHR = 1, - VK_PRESENT_MODE_FIFO_KHR = 2, - VK_PRESENT_MODE_FIFO_RELAXED_KHR = 3, - VK_PRESENT_MODE_SHARED_DEMAND_REFRESH_KHR = 1000111000, - VK_PRESENT_MODE_SHARED_CONTINUOUS_REFRESH_KHR = 1000111001, - VK_PRESENT_MODE_BEGIN_RANGE_KHR = VK_PRESENT_MODE_IMMEDIATE_KHR, - VK_PRESENT_MODE_END_RANGE_KHR = VK_PRESENT_MODE_FIFO_RELAXED_KHR, - VK_PRESENT_MODE_RANGE_SIZE_KHR = (VK_PRESENT_MODE_FIFO_RELAXED_KHR - VK_PRESENT_MODE_IMMEDIATE_KHR + 1), - VK_PRESENT_MODE_MAX_ENUM_KHR = 0x7FFFFFFF -} VkPresentModeKHR; - - -typedef enum VkSurfaceTransformFlagBitsKHR { - VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR = 0x00000001, - VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR = 0x00000002, - VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR = 0x00000004, - VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR = 0x00000008, - VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR = 0x00000010, - VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR = 0x00000020, - VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR = 0x00000040, - VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR = 0x00000080, - VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR = 0x00000100, - VK_SURFACE_TRANSFORM_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF -} VkSurfaceTransformFlagBitsKHR; -typedef VkFlags VkSurfaceTransformFlagsKHR; - -typedef enum VkCompositeAlphaFlagBitsKHR { - VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR = 0x00000001, - VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR = 0x00000002, - VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR = 0x00000004, - VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR = 0x00000008, - VK_COMPOSITE_ALPHA_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF -} VkCompositeAlphaFlagBitsKHR; -typedef VkFlags VkCompositeAlphaFlagsKHR; - -typedef struct VkSurfaceCapabilitiesKHR { - uint32_t minImageCount; - uint32_t maxImageCount; - VkExtent2D currentExtent; - VkExtent2D minImageExtent; - VkExtent2D maxImageExtent; - uint32_t maxImageArrayLayers; - VkSurfaceTransformFlagsKHR supportedTransforms; - VkSurfaceTransformFlagBitsKHR currentTransform; - VkCompositeAlphaFlagsKHR supportedCompositeAlpha; - VkImageUsageFlags supportedUsageFlags; -} VkSurfaceCapabilitiesKHR; - -typedef struct VkSurfaceFormatKHR { - VkFormat format; - VkColorSpaceKHR colorSpace; -} VkSurfaceFormatKHR; - - -typedef void (VKAPI_PTR *PFN_vkDestroySurfaceKHR)(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator); -typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, VkBool32* pSupported); -typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR* pSurfaceCapabilities); -typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats); -typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfacePresentModesKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR void VKAPI_CALL vkDestroySurfaceKHR( - VkInstance instance, - VkSurfaceKHR surface, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceSupportKHR( - VkPhysicalDevice physicalDevice, - uint32_t queueFamilyIndex, - VkSurfaceKHR surface, - VkBool32* pSupported); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilitiesKHR( - VkPhysicalDevice physicalDevice, - VkSurfaceKHR surface, - VkSurfaceCapabilitiesKHR* pSurfaceCapabilities); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormatsKHR( - VkPhysicalDevice physicalDevice, - VkSurfaceKHR surface, - uint32_t* pSurfaceFormatCount, - VkSurfaceFormatKHR* pSurfaceFormats); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModesKHR( - VkPhysicalDevice physicalDevice, - VkSurfaceKHR surface, - uint32_t* pPresentModeCount, - VkPresentModeKHR* pPresentModes); -#endif - -#define VK_KHR_swapchain 1 -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSwapchainKHR) - -#define VK_KHR_SWAPCHAIN_SPEC_VERSION 70 -#define VK_KHR_SWAPCHAIN_EXTENSION_NAME "VK_KHR_swapchain" - - -typedef enum VkSwapchainCreateFlagBitsKHR { - VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = 0x00000001, - VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR = 0x00000002, - VK_SWAPCHAIN_CREATE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF -} VkSwapchainCreateFlagBitsKHR; -typedef VkFlags VkSwapchainCreateFlagsKHR; - -typedef enum VkDeviceGroupPresentModeFlagBitsKHR { - VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR = 0x00000001, - VK_DEVICE_GROUP_PRESENT_MODE_REMOTE_BIT_KHR = 0x00000002, - VK_DEVICE_GROUP_PRESENT_MODE_SUM_BIT_KHR = 0x00000004, - VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_MULTI_DEVICE_BIT_KHR = 0x00000008, - VK_DEVICE_GROUP_PRESENT_MODE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF -} VkDeviceGroupPresentModeFlagBitsKHR; -typedef VkFlags VkDeviceGroupPresentModeFlagsKHR; - -typedef struct VkSwapchainCreateInfoKHR { - VkStructureType sType; - const void* pNext; - VkSwapchainCreateFlagsKHR flags; - VkSurfaceKHR surface; - uint32_t minImageCount; - VkFormat imageFormat; - VkColorSpaceKHR imageColorSpace; - VkExtent2D imageExtent; - uint32_t imageArrayLayers; - VkImageUsageFlags imageUsage; - VkSharingMode imageSharingMode; - uint32_t queueFamilyIndexCount; - const uint32_t* pQueueFamilyIndices; - VkSurfaceTransformFlagBitsKHR preTransform; - VkCompositeAlphaFlagBitsKHR compositeAlpha; - VkPresentModeKHR presentMode; - VkBool32 clipped; - VkSwapchainKHR oldSwapchain; -} VkSwapchainCreateInfoKHR; - -typedef struct VkPresentInfoKHR { - VkStructureType sType; - const void* pNext; - uint32_t waitSemaphoreCount; - const VkSemaphore* pWaitSemaphores; - uint32_t swapchainCount; - const VkSwapchainKHR* pSwapchains; - const uint32_t* pImageIndices; - VkResult* pResults; -} VkPresentInfoKHR; - -typedef struct VkImageSwapchainCreateInfoKHR { - VkStructureType sType; - const void* pNext; - VkSwapchainKHR swapchain; -} VkImageSwapchainCreateInfoKHR; - -typedef struct VkBindImageMemorySwapchainInfoKHR { - VkStructureType sType; - const void* pNext; - VkSwapchainKHR swapchain; - uint32_t imageIndex; -} VkBindImageMemorySwapchainInfoKHR; - -typedef struct VkAcquireNextImageInfoKHR { - VkStructureType sType; - const void* pNext; - VkSwapchainKHR swapchain; - uint64_t timeout; - VkSemaphore semaphore; - VkFence fence; - uint32_t deviceMask; -} VkAcquireNextImageInfoKHR; - -typedef struct VkDeviceGroupPresentCapabilitiesKHR { - VkStructureType sType; - const void* pNext; - uint32_t presentMask[VK_MAX_DEVICE_GROUP_SIZE]; - VkDeviceGroupPresentModeFlagsKHR modes; -} VkDeviceGroupPresentCapabilitiesKHR; - -typedef struct VkDeviceGroupPresentInfoKHR { - VkStructureType sType; - const void* pNext; - uint32_t swapchainCount; - const uint32_t* pDeviceMasks; - VkDeviceGroupPresentModeFlagBitsKHR mode; -} VkDeviceGroupPresentInfoKHR; - -typedef struct VkDeviceGroupSwapchainCreateInfoKHR { - VkStructureType sType; - const void* pNext; - VkDeviceGroupPresentModeFlagsKHR modes; -} VkDeviceGroupSwapchainCreateInfoKHR; - - -typedef VkResult (VKAPI_PTR *PFN_vkCreateSwapchainKHR)(VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain); -typedef void (VKAPI_PTR *PFN_vkDestroySwapchainKHR)(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator); -typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainImagesKHR)(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pSwapchainImageCount, VkImage* pSwapchainImages); -typedef VkResult (VKAPI_PTR *PFN_vkAcquireNextImageKHR)(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t* pImageIndex); -typedef VkResult (VKAPI_PTR *PFN_vkQueuePresentKHR)(VkQueue queue, const VkPresentInfoKHR* pPresentInfo); -typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupPresentCapabilitiesKHR)(VkDevice device, VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities); -typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupSurfacePresentModesKHR)(VkDevice device, VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR* pModes); -typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDevicePresentRectanglesKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pRectCount, VkRect2D* pRects); -typedef VkResult (VKAPI_PTR *PFN_vkAcquireNextImage2KHR)(VkDevice device, const VkAcquireNextImageInfoKHR* pAcquireInfo, uint32_t* pImageIndex); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkCreateSwapchainKHR( - VkDevice device, - const VkSwapchainCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSwapchainKHR* pSwapchain); - -VKAPI_ATTR void VKAPI_CALL vkDestroySwapchainKHR( - VkDevice device, - VkSwapchainKHR swapchain, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainImagesKHR( - VkDevice device, - VkSwapchainKHR swapchain, - uint32_t* pSwapchainImageCount, - VkImage* pSwapchainImages); - -VKAPI_ATTR VkResult VKAPI_CALL vkAcquireNextImageKHR( - VkDevice device, - VkSwapchainKHR swapchain, - uint64_t timeout, - VkSemaphore semaphore, - VkFence fence, - uint32_t* pImageIndex); - -VKAPI_ATTR VkResult VKAPI_CALL vkQueuePresentKHR( - VkQueue queue, - const VkPresentInfoKHR* pPresentInfo); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupPresentCapabilitiesKHR( - VkDevice device, - VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModesKHR( - VkDevice device, - VkSurfaceKHR surface, - VkDeviceGroupPresentModeFlagsKHR* pModes); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDevicePresentRectanglesKHR( - VkPhysicalDevice physicalDevice, - VkSurfaceKHR surface, - uint32_t* pRectCount, - VkRect2D* pRects); - -VKAPI_ATTR VkResult VKAPI_CALL vkAcquireNextImage2KHR( - VkDevice device, - const VkAcquireNextImageInfoKHR* pAcquireInfo, - uint32_t* pImageIndex); -#endif - -#define VK_KHR_display 1 -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayKHR) -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayModeKHR) - -#define VK_KHR_DISPLAY_SPEC_VERSION 21 -#define VK_KHR_DISPLAY_EXTENSION_NAME "VK_KHR_display" - - -typedef enum VkDisplayPlaneAlphaFlagBitsKHR { - VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR = 0x00000001, - VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR = 0x00000002, - VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004, - VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008, - VK_DISPLAY_PLANE_ALPHA_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF -} VkDisplayPlaneAlphaFlagBitsKHR; -typedef VkFlags VkDisplayPlaneAlphaFlagsKHR; -typedef VkFlags VkDisplayModeCreateFlagsKHR; -typedef VkFlags VkDisplaySurfaceCreateFlagsKHR; - -typedef struct VkDisplayPropertiesKHR { - VkDisplayKHR display; - const char* displayName; - VkExtent2D physicalDimensions; - VkExtent2D physicalResolution; - VkSurfaceTransformFlagsKHR supportedTransforms; - VkBool32 planeReorderPossible; - VkBool32 persistentContent; -} VkDisplayPropertiesKHR; - -typedef struct VkDisplayModeParametersKHR { - VkExtent2D visibleRegion; - uint32_t refreshRate; -} VkDisplayModeParametersKHR; - -typedef struct VkDisplayModePropertiesKHR { - VkDisplayModeKHR displayMode; - VkDisplayModeParametersKHR parameters; -} VkDisplayModePropertiesKHR; - -typedef struct VkDisplayModeCreateInfoKHR { - VkStructureType sType; - const void* pNext; - VkDisplayModeCreateFlagsKHR flags; - VkDisplayModeParametersKHR parameters; -} VkDisplayModeCreateInfoKHR; - -typedef struct VkDisplayPlaneCapabilitiesKHR { - VkDisplayPlaneAlphaFlagsKHR supportedAlpha; - VkOffset2D minSrcPosition; - VkOffset2D maxSrcPosition; - VkExtent2D minSrcExtent; - VkExtent2D maxSrcExtent; - VkOffset2D minDstPosition; - VkOffset2D maxDstPosition; - VkExtent2D minDstExtent; - VkExtent2D maxDstExtent; -} VkDisplayPlaneCapabilitiesKHR; - -typedef struct VkDisplayPlanePropertiesKHR { - VkDisplayKHR currentDisplay; - uint32_t currentStackIndex; -} VkDisplayPlanePropertiesKHR; - -typedef struct VkDisplaySurfaceCreateInfoKHR { - VkStructureType sType; - const void* pNext; - VkDisplaySurfaceCreateFlagsKHR flags; - VkDisplayModeKHR displayMode; - uint32_t planeIndex; - uint32_t planeStackIndex; - VkSurfaceTransformFlagBitsKHR transform; - float globalAlpha; - VkDisplayPlaneAlphaFlagBitsKHR alphaMode; - VkExtent2D imageExtent; -} VkDisplaySurfaceCreateInfoKHR; - - -typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceDisplayPropertiesKHR)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPropertiesKHR* pProperties); -typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPlanePropertiesKHR* pProperties); -typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayPlaneSupportedDisplaysKHR)(VkPhysicalDevice physicalDevice, uint32_t planeIndex, uint32_t* pDisplayCount, VkDisplayKHR* pDisplays); -typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayModePropertiesKHR)(VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, VkDisplayModePropertiesKHR* pProperties); -typedef VkResult (VKAPI_PTR *PFN_vkCreateDisplayModeKHR)(VkPhysicalDevice physicalDevice, VkDisplayKHR display, const VkDisplayModeCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode); -typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayPlaneCapabilitiesKHR)(VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR* pCapabilities); -typedef VkResult (VKAPI_PTR *PFN_vkCreateDisplayPlaneSurfaceKHR)(VkInstance instance, const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceDisplayPropertiesKHR( - VkPhysicalDevice physicalDevice, - uint32_t* pPropertyCount, - VkDisplayPropertiesKHR* pProperties); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceDisplayPlanePropertiesKHR( - VkPhysicalDevice physicalDevice, - uint32_t* pPropertyCount, - VkDisplayPlanePropertiesKHR* pProperties); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayPlaneSupportedDisplaysKHR( - VkPhysicalDevice physicalDevice, - uint32_t planeIndex, - uint32_t* pDisplayCount, - VkDisplayKHR* pDisplays); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayModePropertiesKHR( - VkPhysicalDevice physicalDevice, - VkDisplayKHR display, - uint32_t* pPropertyCount, - VkDisplayModePropertiesKHR* pProperties); - -VKAPI_ATTR VkResult VKAPI_CALL vkCreateDisplayModeKHR( - VkPhysicalDevice physicalDevice, - VkDisplayKHR display, - const VkDisplayModeCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkDisplayModeKHR* pMode); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayPlaneCapabilitiesKHR( - VkPhysicalDevice physicalDevice, - VkDisplayModeKHR mode, - uint32_t planeIndex, - VkDisplayPlaneCapabilitiesKHR* pCapabilities); - -VKAPI_ATTR VkResult VKAPI_CALL vkCreateDisplayPlaneSurfaceKHR( - VkInstance instance, - const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSurfaceKHR* pSurface); -#endif - -#define VK_KHR_display_swapchain 1 -#define VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION 9 -#define VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME "VK_KHR_display_swapchain" - -typedef struct VkDisplayPresentInfoKHR { - VkStructureType sType; - const void* pNext; - VkRect2D srcRect; - VkRect2D dstRect; - VkBool32 persistent; -} VkDisplayPresentInfoKHR; - - -typedef VkResult (VKAPI_PTR *PFN_vkCreateSharedSwapchainsKHR)(VkDevice device, uint32_t swapchainCount, const VkSwapchainCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkCreateSharedSwapchainsKHR( - VkDevice device, - uint32_t swapchainCount, - const VkSwapchainCreateInfoKHR* pCreateInfos, - const VkAllocationCallbacks* pAllocator, - VkSwapchainKHR* pSwapchains); -#endif - -#define VK_KHR_sampler_mirror_clamp_to_edge 1 -#define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION 1 -#define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME "VK_KHR_sampler_mirror_clamp_to_edge" - - -#define VK_KHR_multiview 1 -#define VK_KHR_MULTIVIEW_SPEC_VERSION 1 -#define VK_KHR_MULTIVIEW_EXTENSION_NAME "VK_KHR_multiview" - -typedef VkRenderPassMultiviewCreateInfo VkRenderPassMultiviewCreateInfoKHR; - -typedef VkPhysicalDeviceMultiviewFeatures VkPhysicalDeviceMultiviewFeaturesKHR; - -typedef VkPhysicalDeviceMultiviewProperties VkPhysicalDeviceMultiviewPropertiesKHR; - - - -#define VK_KHR_get_physical_device_properties2 1 -#define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION 1 -#define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME "VK_KHR_get_physical_device_properties2" - -typedef VkPhysicalDeviceFeatures2 VkPhysicalDeviceFeatures2KHR; - -typedef VkPhysicalDeviceProperties2 VkPhysicalDeviceProperties2KHR; - -typedef VkFormatProperties2 VkFormatProperties2KHR; - -typedef VkImageFormatProperties2 VkImageFormatProperties2KHR; - -typedef VkPhysicalDeviceImageFormatInfo2 VkPhysicalDeviceImageFormatInfo2KHR; - -typedef VkQueueFamilyProperties2 VkQueueFamilyProperties2KHR; - -typedef VkPhysicalDeviceMemoryProperties2 VkPhysicalDeviceMemoryProperties2KHR; - -typedef VkSparseImageFormatProperties2 VkSparseImageFormatProperties2KHR; - -typedef VkPhysicalDeviceSparseImageFormatInfo2 VkPhysicalDeviceSparseImageFormatInfo2KHR; - - -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFeatures2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures); -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceProperties2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties); -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceFormatProperties2KHR)(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2* pFormatProperties); -typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, VkImageFormatProperties2* pImageFormatProperties); -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties2KHR)(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2* pQueueFamilyProperties); -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMemoryProperties2KHR)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties); -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures2KHR( - VkPhysicalDevice physicalDevice, - VkPhysicalDeviceFeatures2* pFeatures); - -VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties2KHR( - VkPhysicalDevice physicalDevice, - VkPhysicalDeviceProperties2* pProperties); - -VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties2KHR( - VkPhysicalDevice physicalDevice, - VkFormat format, - VkFormatProperties2* pFormatProperties); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties2KHR( - VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, - VkImageFormatProperties2* pImageFormatProperties); - -VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties2KHR( - VkPhysicalDevice physicalDevice, - uint32_t* pQueueFamilyPropertyCount, - VkQueueFamilyProperties2* pQueueFamilyProperties); - -VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties2KHR( - VkPhysicalDevice physicalDevice, - VkPhysicalDeviceMemoryProperties2* pMemoryProperties); - -VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties2KHR( - VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, - uint32_t* pPropertyCount, - VkSparseImageFormatProperties2* pProperties); -#endif - -#define VK_KHR_device_group 1 -#define VK_KHR_DEVICE_GROUP_SPEC_VERSION 3 -#define VK_KHR_DEVICE_GROUP_EXTENSION_NAME "VK_KHR_device_group" - -typedef VkPeerMemoryFeatureFlags VkPeerMemoryFeatureFlagsKHR; - -typedef VkPeerMemoryFeatureFlagBits VkPeerMemoryFeatureFlagBitsKHR; - -typedef VkMemoryAllocateFlags VkMemoryAllocateFlagsKHR; - -typedef VkMemoryAllocateFlagBits VkMemoryAllocateFlagBitsKHR; - - -typedef VkMemoryAllocateFlagsInfo VkMemoryAllocateFlagsInfoKHR; - -typedef VkDeviceGroupRenderPassBeginInfo VkDeviceGroupRenderPassBeginInfoKHR; - -typedef VkDeviceGroupCommandBufferBeginInfo VkDeviceGroupCommandBufferBeginInfoKHR; - -typedef VkDeviceGroupSubmitInfo VkDeviceGroupSubmitInfoKHR; - -typedef VkDeviceGroupBindSparseInfo VkDeviceGroupBindSparseInfoKHR; - -typedef VkBindBufferMemoryDeviceGroupInfo VkBindBufferMemoryDeviceGroupInfoKHR; - -typedef VkBindImageMemoryDeviceGroupInfo VkBindImageMemoryDeviceGroupInfoKHR; - - -typedef void (VKAPI_PTR *PFN_vkGetDeviceGroupPeerMemoryFeaturesKHR)(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures); -typedef void (VKAPI_PTR *PFN_vkCmdSetDeviceMaskKHR)(VkCommandBuffer commandBuffer, uint32_t deviceMask); -typedef void (VKAPI_PTR *PFN_vkCmdDispatchBaseKHR)(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR void VKAPI_CALL vkGetDeviceGroupPeerMemoryFeaturesKHR( - VkDevice device, - uint32_t heapIndex, - uint32_t localDeviceIndex, - uint32_t remoteDeviceIndex, - VkPeerMemoryFeatureFlags* pPeerMemoryFeatures); - -VKAPI_ATTR void VKAPI_CALL vkCmdSetDeviceMaskKHR( - VkCommandBuffer commandBuffer, - uint32_t deviceMask); - -VKAPI_ATTR void VKAPI_CALL vkCmdDispatchBaseKHR( - VkCommandBuffer commandBuffer, - uint32_t baseGroupX, - uint32_t baseGroupY, - uint32_t baseGroupZ, - uint32_t groupCountX, - uint32_t groupCountY, - uint32_t groupCountZ); -#endif - -#define VK_KHR_shader_draw_parameters 1 -#define VK_KHR_SHADER_DRAW_PARAMETERS_SPEC_VERSION 1 -#define VK_KHR_SHADER_DRAW_PARAMETERS_EXTENSION_NAME "VK_KHR_shader_draw_parameters" - - -#define VK_KHR_maintenance1 1 -#define VK_KHR_MAINTENANCE1_SPEC_VERSION 2 -#define VK_KHR_MAINTENANCE1_EXTENSION_NAME "VK_KHR_maintenance1" - -typedef VkCommandPoolTrimFlags VkCommandPoolTrimFlagsKHR; - - -typedef void (VKAPI_PTR *PFN_vkTrimCommandPoolKHR)(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR void VKAPI_CALL vkTrimCommandPoolKHR( - VkDevice device, - VkCommandPool commandPool, - VkCommandPoolTrimFlags flags); -#endif - -#define VK_KHR_device_group_creation 1 -#define VK_KHR_DEVICE_GROUP_CREATION_SPEC_VERSION 1 -#define VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME "VK_KHR_device_group_creation" -#define VK_MAX_DEVICE_GROUP_SIZE_KHR VK_MAX_DEVICE_GROUP_SIZE - -typedef VkPhysicalDeviceGroupProperties VkPhysicalDeviceGroupPropertiesKHR; - -typedef VkDeviceGroupDeviceCreateInfo VkDeviceGroupDeviceCreateInfoKHR; - - -typedef VkResult (VKAPI_PTR *PFN_vkEnumeratePhysicalDeviceGroupsKHR)(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDeviceGroupsKHR( - VkInstance instance, - uint32_t* pPhysicalDeviceGroupCount, - VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties); -#endif - -#define VK_KHR_external_memory_capabilities 1 -#define VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1 -#define VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_memory_capabilities" -#define VK_LUID_SIZE_KHR VK_LUID_SIZE - -typedef VkExternalMemoryHandleTypeFlags VkExternalMemoryHandleTypeFlagsKHR; - -typedef VkExternalMemoryHandleTypeFlagBits VkExternalMemoryHandleTypeFlagBitsKHR; - -typedef VkExternalMemoryFeatureFlags VkExternalMemoryFeatureFlagsKHR; - -typedef VkExternalMemoryFeatureFlagBits VkExternalMemoryFeatureFlagBitsKHR; - - -typedef VkExternalMemoryProperties VkExternalMemoryPropertiesKHR; - -typedef VkPhysicalDeviceExternalImageFormatInfo VkPhysicalDeviceExternalImageFormatInfoKHR; - -typedef VkExternalImageFormatProperties VkExternalImageFormatPropertiesKHR; - -typedef VkPhysicalDeviceExternalBufferInfo VkPhysicalDeviceExternalBufferInfoKHR; - -typedef VkExternalBufferProperties VkExternalBufferPropertiesKHR; - -typedef VkPhysicalDeviceIDProperties VkPhysicalDeviceIDPropertiesKHR; - - -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VkExternalBufferProperties* pExternalBufferProperties); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalBufferPropertiesKHR( - VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, - VkExternalBufferProperties* pExternalBufferProperties); -#endif - -#define VK_KHR_external_memory 1 -#define VK_KHR_EXTERNAL_MEMORY_SPEC_VERSION 1 -#define VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME "VK_KHR_external_memory" -#define VK_QUEUE_FAMILY_EXTERNAL_KHR VK_QUEUE_FAMILY_EXTERNAL - -typedef VkExternalMemoryImageCreateInfo VkExternalMemoryImageCreateInfoKHR; - -typedef VkExternalMemoryBufferCreateInfo VkExternalMemoryBufferCreateInfoKHR; - -typedef VkExportMemoryAllocateInfo VkExportMemoryAllocateInfoKHR; - - - -#define VK_KHR_external_memory_fd 1 -#define VK_KHR_EXTERNAL_MEMORY_FD_SPEC_VERSION 1 -#define VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME "VK_KHR_external_memory_fd" - -typedef struct VkImportMemoryFdInfoKHR { - VkStructureType sType; - const void* pNext; - VkExternalMemoryHandleTypeFlagBits handleType; - int fd; -} VkImportMemoryFdInfoKHR; - -typedef struct VkMemoryFdPropertiesKHR { - VkStructureType sType; - void* pNext; - uint32_t memoryTypeBits; -} VkMemoryFdPropertiesKHR; - -typedef struct VkMemoryGetFdInfoKHR { - VkStructureType sType; - const void* pNext; - VkDeviceMemory memory; - VkExternalMemoryHandleTypeFlagBits handleType; -} VkMemoryGetFdInfoKHR; - - -typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryFdKHR)(VkDevice device, const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd); -typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryFdPropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, int fd, VkMemoryFdPropertiesKHR* pMemoryFdProperties); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryFdKHR( - VkDevice device, - const VkMemoryGetFdInfoKHR* pGetFdInfo, - int* pFd); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryFdPropertiesKHR( - VkDevice device, - VkExternalMemoryHandleTypeFlagBits handleType, - int fd, - VkMemoryFdPropertiesKHR* pMemoryFdProperties); -#endif - -#define VK_KHR_external_semaphore_capabilities 1 -#define VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION 1 -#define VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_semaphore_capabilities" - -typedef VkExternalSemaphoreHandleTypeFlags VkExternalSemaphoreHandleTypeFlagsKHR; - -typedef VkExternalSemaphoreHandleTypeFlagBits VkExternalSemaphoreHandleTypeFlagBitsKHR; - -typedef VkExternalSemaphoreFeatureFlags VkExternalSemaphoreFeatureFlagsKHR; - -typedef VkExternalSemaphoreFeatureFlagBits VkExternalSemaphoreFeatureFlagBitsKHR; - - -typedef VkPhysicalDeviceExternalSemaphoreInfo VkPhysicalDeviceExternalSemaphoreInfoKHR; - -typedef VkExternalSemaphoreProperties VkExternalSemaphorePropertiesKHR; - - -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VkExternalSemaphoreProperties* pExternalSemaphoreProperties); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( - VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, - VkExternalSemaphoreProperties* pExternalSemaphoreProperties); -#endif - -#define VK_KHR_external_semaphore 1 -#define VK_KHR_EXTERNAL_SEMAPHORE_SPEC_VERSION 1 -#define VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME "VK_KHR_external_semaphore" - -typedef VkSemaphoreImportFlags VkSemaphoreImportFlagsKHR; - -typedef VkSemaphoreImportFlagBits VkSemaphoreImportFlagBitsKHR; - - -typedef VkExportSemaphoreCreateInfo VkExportSemaphoreCreateInfoKHR; - - - -#define VK_KHR_external_semaphore_fd 1 -#define VK_KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION 1 -#define VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME "VK_KHR_external_semaphore_fd" - -typedef struct VkImportSemaphoreFdInfoKHR { - VkStructureType sType; - const void* pNext; - VkSemaphore semaphore; - VkSemaphoreImportFlags flags; - VkExternalSemaphoreHandleTypeFlagBits handleType; - int fd; -} VkImportSemaphoreFdInfoKHR; - -typedef struct VkSemaphoreGetFdInfoKHR { - VkStructureType sType; - const void* pNext; - VkSemaphore semaphore; - VkExternalSemaphoreHandleTypeFlagBits handleType; -} VkSemaphoreGetFdInfoKHR; - - -typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreFdKHR)(VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo); -typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreFdKHR)(VkDevice device, const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreFdKHR( - VkDevice device, - const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreFdKHR( - VkDevice device, - const VkSemaphoreGetFdInfoKHR* pGetFdInfo, - int* pFd); -#endif - -#define VK_KHR_push_descriptor 1 -#define VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION 2 -#define VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME "VK_KHR_push_descriptor" - -typedef struct VkPhysicalDevicePushDescriptorPropertiesKHR { - VkStructureType sType; - void* pNext; - uint32_t maxPushDescriptors; -} VkPhysicalDevicePushDescriptorPropertiesKHR; - - -typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSetKHR)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites); -typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSetWithTemplateKHR)(VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplate descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void* pData); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetKHR( - VkCommandBuffer commandBuffer, - VkPipelineBindPoint pipelineBindPoint, - VkPipelineLayout layout, - uint32_t set, - uint32_t descriptorWriteCount, - const VkWriteDescriptorSet* pDescriptorWrites); - -VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetWithTemplateKHR( - VkCommandBuffer commandBuffer, - VkDescriptorUpdateTemplate descriptorUpdateTemplate, - VkPipelineLayout layout, - uint32_t set, - const void* pData); -#endif - -#define VK_KHR_16bit_storage 1 -#define VK_KHR_16BIT_STORAGE_SPEC_VERSION 1 -#define VK_KHR_16BIT_STORAGE_EXTENSION_NAME "VK_KHR_16bit_storage" - -typedef VkPhysicalDevice16BitStorageFeatures VkPhysicalDevice16BitStorageFeaturesKHR; - - - -#define VK_KHR_incremental_present 1 -#define VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION 1 -#define VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME "VK_KHR_incremental_present" - -typedef struct VkRectLayerKHR { - VkOffset2D offset; - VkExtent2D extent; - uint32_t layer; -} VkRectLayerKHR; - -typedef struct VkPresentRegionKHR { - uint32_t rectangleCount; - const VkRectLayerKHR* pRectangles; -} VkPresentRegionKHR; - -typedef struct VkPresentRegionsKHR { - VkStructureType sType; - const void* pNext; - uint32_t swapchainCount; - const VkPresentRegionKHR* pRegions; -} VkPresentRegionsKHR; - - - -#define VK_KHR_descriptor_update_template 1 -typedef VkDescriptorUpdateTemplate VkDescriptorUpdateTemplateKHR; - - -#define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION 1 -#define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME "VK_KHR_descriptor_update_template" - -typedef VkDescriptorUpdateTemplateType VkDescriptorUpdateTemplateTypeKHR; - - -typedef VkDescriptorUpdateTemplateCreateFlags VkDescriptorUpdateTemplateCreateFlagsKHR; - - -typedef VkDescriptorUpdateTemplateEntry VkDescriptorUpdateTemplateEntryKHR; - -typedef VkDescriptorUpdateTemplateCreateInfo VkDescriptorUpdateTemplateCreateInfoKHR; - - -typedef VkResult (VKAPI_PTR *PFN_vkCreateDescriptorUpdateTemplateKHR)(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate); -typedef void (VKAPI_PTR *PFN_vkDestroyDescriptorUpdateTemplateKHR)(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator); -typedef void (VKAPI_PTR *PFN_vkUpdateDescriptorSetWithTemplateKHR)(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorUpdateTemplateKHR( - VkDevice device, - const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate); - -VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorUpdateTemplateKHR( - VkDevice device, - VkDescriptorUpdateTemplate descriptorUpdateTemplate, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSetWithTemplateKHR( - VkDevice device, - VkDescriptorSet descriptorSet, - VkDescriptorUpdateTemplate descriptorUpdateTemplate, - const void* pData); -#endif - -#define VK_KHR_shared_presentable_image 1 -#define VK_KHR_SHARED_PRESENTABLE_IMAGE_SPEC_VERSION 1 -#define VK_KHR_SHARED_PRESENTABLE_IMAGE_EXTENSION_NAME "VK_KHR_shared_presentable_image" - -typedef struct VkSharedPresentSurfaceCapabilitiesKHR { - VkStructureType sType; - void* pNext; - VkImageUsageFlags sharedPresentSupportedUsageFlags; -} VkSharedPresentSurfaceCapabilitiesKHR; - - -typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainStatusKHR)(VkDevice device, VkSwapchainKHR swapchain); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainStatusKHR( - VkDevice device, - VkSwapchainKHR swapchain); -#endif - -#define VK_KHR_external_fence_capabilities 1 -#define VK_KHR_EXTERNAL_FENCE_CAPABILITIES_SPEC_VERSION 1 -#define VK_KHR_EXTERNAL_FENCE_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_fence_capabilities" - -typedef VkExternalFenceHandleTypeFlags VkExternalFenceHandleTypeFlagsKHR; - -typedef VkExternalFenceHandleTypeFlagBits VkExternalFenceHandleTypeFlagBitsKHR; - -typedef VkExternalFenceFeatureFlags VkExternalFenceFeatureFlagsKHR; - -typedef VkExternalFenceFeatureFlagBits VkExternalFenceFeatureFlagBitsKHR; - - -typedef VkPhysicalDeviceExternalFenceInfo VkPhysicalDeviceExternalFenceInfoKHR; - -typedef VkExternalFenceProperties VkExternalFencePropertiesKHR; - - -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VkExternalFenceProperties* pExternalFenceProperties); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalFencePropertiesKHR( - VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, - VkExternalFenceProperties* pExternalFenceProperties); -#endif - -#define VK_KHR_external_fence 1 -#define VK_KHR_EXTERNAL_FENCE_SPEC_VERSION 1 -#define VK_KHR_EXTERNAL_FENCE_EXTENSION_NAME "VK_KHR_external_fence" - -typedef VkFenceImportFlags VkFenceImportFlagsKHR; - -typedef VkFenceImportFlagBits VkFenceImportFlagBitsKHR; - - -typedef VkExportFenceCreateInfo VkExportFenceCreateInfoKHR; - - - -#define VK_KHR_external_fence_fd 1 -#define VK_KHR_EXTERNAL_FENCE_FD_SPEC_VERSION 1 -#define VK_KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME "VK_KHR_external_fence_fd" - -typedef struct VkImportFenceFdInfoKHR { - VkStructureType sType; - const void* pNext; - VkFence fence; - VkFenceImportFlags flags; - VkExternalFenceHandleTypeFlagBits handleType; - int fd; -} VkImportFenceFdInfoKHR; - -typedef struct VkFenceGetFdInfoKHR { - VkStructureType sType; - const void* pNext; - VkFence fence; - VkExternalFenceHandleTypeFlagBits handleType; -} VkFenceGetFdInfoKHR; - - -typedef VkResult (VKAPI_PTR *PFN_vkImportFenceFdKHR)(VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo); -typedef VkResult (VKAPI_PTR *PFN_vkGetFenceFdKHR)(VkDevice device, const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkImportFenceFdKHR( - VkDevice device, - const VkImportFenceFdInfoKHR* pImportFenceFdInfo); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceFdKHR( - VkDevice device, - const VkFenceGetFdInfoKHR* pGetFdInfo, - int* pFd); -#endif - -#define VK_KHR_maintenance2 1 -#define VK_KHR_MAINTENANCE2_SPEC_VERSION 1 -#define VK_KHR_MAINTENANCE2_EXTENSION_NAME "VK_KHR_maintenance2" - -typedef VkPointClippingBehavior VkPointClippingBehaviorKHR; - -typedef VkTessellationDomainOrigin VkTessellationDomainOriginKHR; - - -typedef VkPhysicalDevicePointClippingProperties VkPhysicalDevicePointClippingPropertiesKHR; - -typedef VkRenderPassInputAttachmentAspectCreateInfo VkRenderPassInputAttachmentAspectCreateInfoKHR; - -typedef VkInputAttachmentAspectReference VkInputAttachmentAspectReferenceKHR; - -typedef VkImageViewUsageCreateInfo VkImageViewUsageCreateInfoKHR; - -typedef VkPipelineTessellationDomainOriginStateCreateInfo VkPipelineTessellationDomainOriginStateCreateInfoKHR; - - - -#define VK_KHR_get_surface_capabilities2 1 -#define VK_KHR_GET_SURFACE_CAPABILITIES_2_SPEC_VERSION 1 -#define VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME "VK_KHR_get_surface_capabilities2" - -typedef struct VkPhysicalDeviceSurfaceInfo2KHR { - VkStructureType sType; - const void* pNext; - VkSurfaceKHR surface; -} VkPhysicalDeviceSurfaceInfo2KHR; - -typedef struct VkSurfaceCapabilities2KHR { - VkStructureType sType; - void* pNext; - VkSurfaceCapabilitiesKHR surfaceCapabilities; -} VkSurfaceCapabilities2KHR; - -typedef struct VkSurfaceFormat2KHR { - VkStructureType sType; - void* pNext; - VkSurfaceFormatKHR surfaceFormat; -} VkSurfaceFormat2KHR; - - -typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkSurfaceCapabilities2KHR* pSurfaceCapabilities); -typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceFormats2KHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pSurfaceFormatCount, VkSurfaceFormat2KHR* pSurfaceFormats); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilities2KHR( - VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, - VkSurfaceCapabilities2KHR* pSurfaceCapabilities); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormats2KHR( - VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, - uint32_t* pSurfaceFormatCount, - VkSurfaceFormat2KHR* pSurfaceFormats); -#endif - -#define VK_KHR_variable_pointers 1 -#define VK_KHR_VARIABLE_POINTERS_SPEC_VERSION 1 -#define VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME "VK_KHR_variable_pointers" - -typedef VkPhysicalDeviceVariablePointerFeatures VkPhysicalDeviceVariablePointerFeaturesKHR; - - - -#define VK_KHR_dedicated_allocation 1 -#define VK_KHR_DEDICATED_ALLOCATION_SPEC_VERSION 3 -#define VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_KHR_dedicated_allocation" - -typedef VkMemoryDedicatedRequirements VkMemoryDedicatedRequirementsKHR; - -typedef VkMemoryDedicatedAllocateInfo VkMemoryDedicatedAllocateInfoKHR; - - - -#define VK_KHR_storage_buffer_storage_class 1 -#define VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_SPEC_VERSION 1 -#define VK_KHR_STORAGE_BUFFER_STORAGE_CLASS_EXTENSION_NAME "VK_KHR_storage_buffer_storage_class" - - -#define VK_KHR_relaxed_block_layout 1 -#define VK_KHR_RELAXED_BLOCK_LAYOUT_SPEC_VERSION 1 -#define VK_KHR_RELAXED_BLOCK_LAYOUT_EXTENSION_NAME "VK_KHR_relaxed_block_layout" - - -#define VK_KHR_get_memory_requirements2 1 -#define VK_KHR_GET_MEMORY_REQUIREMENTS_2_SPEC_VERSION 1 -#define VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME "VK_KHR_get_memory_requirements2" - -typedef VkBufferMemoryRequirementsInfo2 VkBufferMemoryRequirementsInfo2KHR; - -typedef VkImageMemoryRequirementsInfo2 VkImageMemoryRequirementsInfo2KHR; - -typedef VkImageSparseMemoryRequirementsInfo2 VkImageSparseMemoryRequirementsInfo2KHR; - -typedef VkMemoryRequirements2 VkMemoryRequirements2KHR; - -typedef VkSparseImageMemoryRequirements2 VkSparseImageMemoryRequirements2KHR; - - -typedef void (VKAPI_PTR *PFN_vkGetImageMemoryRequirements2KHR)(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements); -typedef void (VKAPI_PTR *PFN_vkGetBufferMemoryRequirements2KHR)(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements); -typedef void (VKAPI_PTR *PFN_vkGetImageSparseMemoryRequirements2KHR)(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements2KHR( - VkDevice device, - const VkImageMemoryRequirementsInfo2* pInfo, - VkMemoryRequirements2* pMemoryRequirements); - -VKAPI_ATTR void VKAPI_CALL vkGetBufferMemoryRequirements2KHR( - VkDevice device, - const VkBufferMemoryRequirementsInfo2* pInfo, - VkMemoryRequirements2* pMemoryRequirements); - -VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements2KHR( - VkDevice device, - const VkImageSparseMemoryRequirementsInfo2* pInfo, - uint32_t* pSparseMemoryRequirementCount, - VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); -#endif - -#define VK_KHR_image_format_list 1 -#define VK_KHR_IMAGE_FORMAT_LIST_SPEC_VERSION 1 -#define VK_KHR_IMAGE_FORMAT_LIST_EXTENSION_NAME "VK_KHR_image_format_list" - -typedef struct VkImageFormatListCreateInfoKHR { - VkStructureType sType; - const void* pNext; - uint32_t viewFormatCount; - const VkFormat* pViewFormats; -} VkImageFormatListCreateInfoKHR; - - - -#define VK_KHR_sampler_ycbcr_conversion 1 -typedef VkSamplerYcbcrConversion VkSamplerYcbcrConversionKHR; - - -#define VK_KHR_SAMPLER_YCBCR_CONVERSION_SPEC_VERSION 1 -#define VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME "VK_KHR_sampler_ycbcr_conversion" - -typedef VkSamplerYcbcrModelConversion VkSamplerYcbcrModelConversionKHR; - -typedef VkSamplerYcbcrRange VkSamplerYcbcrRangeKHR; - -typedef VkChromaLocation VkChromaLocationKHR; - - -typedef VkSamplerYcbcrConversionCreateInfo VkSamplerYcbcrConversionCreateInfoKHR; - -typedef VkSamplerYcbcrConversionInfo VkSamplerYcbcrConversionInfoKHR; - -typedef VkBindImagePlaneMemoryInfo VkBindImagePlaneMemoryInfoKHR; - -typedef VkImagePlaneMemoryRequirementsInfo VkImagePlaneMemoryRequirementsInfoKHR; - -typedef VkPhysicalDeviceSamplerYcbcrConversionFeatures VkPhysicalDeviceSamplerYcbcrConversionFeaturesKHR; - -typedef VkSamplerYcbcrConversionImageFormatProperties VkSamplerYcbcrConversionImageFormatPropertiesKHR; - - -typedef VkResult (VKAPI_PTR *PFN_vkCreateSamplerYcbcrConversionKHR)(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion); -typedef void (VKAPI_PTR *PFN_vkDestroySamplerYcbcrConversionKHR)(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks* pAllocator); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkCreateSamplerYcbcrConversionKHR( - VkDevice device, - const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSamplerYcbcrConversion* pYcbcrConversion); - -VKAPI_ATTR void VKAPI_CALL vkDestroySamplerYcbcrConversionKHR( - VkDevice device, - VkSamplerYcbcrConversion ycbcrConversion, - const VkAllocationCallbacks* pAllocator); -#endif - -#define VK_KHR_bind_memory2 1 -#define VK_KHR_BIND_MEMORY_2_SPEC_VERSION 1 -#define VK_KHR_BIND_MEMORY_2_EXTENSION_NAME "VK_KHR_bind_memory2" - -typedef VkBindBufferMemoryInfo VkBindBufferMemoryInfoKHR; - -typedef VkBindImageMemoryInfo VkBindImageMemoryInfoKHR; - - -typedef VkResult (VKAPI_PTR *PFN_vkBindBufferMemory2KHR)(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos); -typedef VkResult (VKAPI_PTR *PFN_vkBindImageMemory2KHR)(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory2KHR( - VkDevice device, - uint32_t bindInfoCount, - const VkBindBufferMemoryInfo* pBindInfos); - -VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory2KHR( - VkDevice device, - uint32_t bindInfoCount, - const VkBindImageMemoryInfo* pBindInfos); -#endif - -#define VK_KHR_maintenance3 1 -#define VK_KHR_MAINTENANCE3_SPEC_VERSION 1 -#define VK_KHR_MAINTENANCE3_EXTENSION_NAME "VK_KHR_maintenance3" - -typedef VkPhysicalDeviceMaintenance3Properties VkPhysicalDeviceMaintenance3PropertiesKHR; - -typedef VkDescriptorSetLayoutSupport VkDescriptorSetLayoutSupportKHR; - - -typedef void (VKAPI_PTR *PFN_vkGetDescriptorSetLayoutSupportKHR)(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetLayoutSupportKHR( - VkDevice device, - const VkDescriptorSetLayoutCreateInfo* pCreateInfo, - VkDescriptorSetLayoutSupport* pSupport); -#endif - -#define VK_EXT_debug_report 1 -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT) - -#define VK_EXT_DEBUG_REPORT_SPEC_VERSION 9 -#define VK_EXT_DEBUG_REPORT_EXTENSION_NAME "VK_EXT_debug_report" -#define VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT -#define VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT - - -typedef enum VkDebugReportObjectTypeEXT { - VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT = 0, - VK_DEBUG_REPORT_OBJECT_TYPE_INSTANCE_EXT = 1, - VK_DEBUG_REPORT_OBJECT_TYPE_PHYSICAL_DEVICE_EXT = 2, - VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT = 3, - VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT = 4, - VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT = 5, - VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT = 6, - VK_DEBUG_REPORT_OBJECT_TYPE_FENCE_EXT = 7, - VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT = 8, - VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_EXT = 9, - VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT = 10, - VK_DEBUG_REPORT_OBJECT_TYPE_EVENT_EXT = 11, - VK_DEBUG_REPORT_OBJECT_TYPE_QUERY_POOL_EXT = 12, - VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_VIEW_EXT = 13, - VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_VIEW_EXT = 14, - VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT = 15, - VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT = 16, - VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_LAYOUT_EXT = 17, - VK_DEBUG_REPORT_OBJECT_TYPE_RENDER_PASS_EXT = 18, - VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT = 19, - VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT_EXT = 20, - VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_EXT = 21, - VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT = 22, - VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT = 23, - VK_DEBUG_REPORT_OBJECT_TYPE_FRAMEBUFFER_EXT = 24, - VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_POOL_EXT = 25, - VK_DEBUG_REPORT_OBJECT_TYPE_SURFACE_KHR_EXT = 26, - VK_DEBUG_REPORT_OBJECT_TYPE_SWAPCHAIN_KHR_EXT = 27, - VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT = 28, - VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_KHR_EXT = 29, - VK_DEBUG_REPORT_OBJECT_TYPE_DISPLAY_MODE_KHR_EXT = 30, - VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT = 31, - VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT = 32, - VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT = 33, - VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT = 1000156000, - VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT = 1000085000, - VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_BEGIN_RANGE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_END_RANGE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_RANGE_SIZE_EXT = (VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT - VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT + 1), - VK_DEBUG_REPORT_OBJECT_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF -} VkDebugReportObjectTypeEXT; - - -typedef enum VkDebugReportFlagBitsEXT { - VK_DEBUG_REPORT_INFORMATION_BIT_EXT = 0x00000001, - VK_DEBUG_REPORT_WARNING_BIT_EXT = 0x00000002, - VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT = 0x00000004, - VK_DEBUG_REPORT_ERROR_BIT_EXT = 0x00000008, - VK_DEBUG_REPORT_DEBUG_BIT_EXT = 0x00000010, - VK_DEBUG_REPORT_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF -} VkDebugReportFlagBitsEXT; -typedef VkFlags VkDebugReportFlagsEXT; - -typedef VkBool32 (VKAPI_PTR *PFN_vkDebugReportCallbackEXT)( - VkDebugReportFlagsEXT flags, - VkDebugReportObjectTypeEXT objectType, - uint64_t object, - size_t location, - int32_t messageCode, - const char* pLayerPrefix, - const char* pMessage, - void* pUserData); - -typedef struct VkDebugReportCallbackCreateInfoEXT { - VkStructureType sType; - const void* pNext; - VkDebugReportFlagsEXT flags; - PFN_vkDebugReportCallbackEXT pfnCallback; - void* pUserData; -} VkDebugReportCallbackCreateInfoEXT; - - -typedef VkResult (VKAPI_PTR *PFN_vkCreateDebugReportCallbackEXT)(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugReportCallbackEXT* pCallback); -typedef void (VKAPI_PTR *PFN_vkDestroyDebugReportCallbackEXT)(VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks* pAllocator); -typedef void (VKAPI_PTR *PFN_vkDebugReportMessageEXT)(VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkCreateDebugReportCallbackEXT( - VkInstance instance, - const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkDebugReportCallbackEXT* pCallback); - -VKAPI_ATTR void VKAPI_CALL vkDestroyDebugReportCallbackEXT( - VkInstance instance, - VkDebugReportCallbackEXT callback, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR void VKAPI_CALL vkDebugReportMessageEXT( - VkInstance instance, - VkDebugReportFlagsEXT flags, - VkDebugReportObjectTypeEXT objectType, - uint64_t object, - size_t location, - int32_t messageCode, - const char* pLayerPrefix, - const char* pMessage); -#endif - -#define VK_NV_glsl_shader 1 -#define VK_NV_GLSL_SHADER_SPEC_VERSION 1 -#define VK_NV_GLSL_SHADER_EXTENSION_NAME "VK_NV_glsl_shader" - - -#define VK_EXT_depth_range_unrestricted 1 -#define VK_EXT_DEPTH_RANGE_UNRESTRICTED_SPEC_VERSION 1 -#define VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME "VK_EXT_depth_range_unrestricted" - - -#define VK_IMG_filter_cubic 1 -#define VK_IMG_FILTER_CUBIC_SPEC_VERSION 1 -#define VK_IMG_FILTER_CUBIC_EXTENSION_NAME "VK_IMG_filter_cubic" - - -#define VK_AMD_rasterization_order 1 -#define VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION 1 -#define VK_AMD_RASTERIZATION_ORDER_EXTENSION_NAME "VK_AMD_rasterization_order" - - -typedef enum VkRasterizationOrderAMD { - VK_RASTERIZATION_ORDER_STRICT_AMD = 0, - VK_RASTERIZATION_ORDER_RELAXED_AMD = 1, - VK_RASTERIZATION_ORDER_BEGIN_RANGE_AMD = VK_RASTERIZATION_ORDER_STRICT_AMD, - VK_RASTERIZATION_ORDER_END_RANGE_AMD = VK_RASTERIZATION_ORDER_RELAXED_AMD, - VK_RASTERIZATION_ORDER_RANGE_SIZE_AMD = (VK_RASTERIZATION_ORDER_RELAXED_AMD - VK_RASTERIZATION_ORDER_STRICT_AMD + 1), - VK_RASTERIZATION_ORDER_MAX_ENUM_AMD = 0x7FFFFFFF -} VkRasterizationOrderAMD; - -typedef struct VkPipelineRasterizationStateRasterizationOrderAMD { - VkStructureType sType; - const void* pNext; - VkRasterizationOrderAMD rasterizationOrder; -} VkPipelineRasterizationStateRasterizationOrderAMD; - - - -#define VK_AMD_shader_trinary_minmax 1 -#define VK_AMD_SHADER_TRINARY_MINMAX_SPEC_VERSION 1 -#define VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME "VK_AMD_shader_trinary_minmax" - - -#define VK_AMD_shader_explicit_vertex_parameter 1 -#define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_SPEC_VERSION 1 -#define VK_AMD_SHADER_EXPLICIT_VERTEX_PARAMETER_EXTENSION_NAME "VK_AMD_shader_explicit_vertex_parameter" - - -#define VK_EXT_debug_marker 1 -#define VK_EXT_DEBUG_MARKER_SPEC_VERSION 4 -#define VK_EXT_DEBUG_MARKER_EXTENSION_NAME "VK_EXT_debug_marker" - -typedef struct VkDebugMarkerObjectNameInfoEXT { - VkStructureType sType; - const void* pNext; - VkDebugReportObjectTypeEXT objectType; - uint64_t object; - const char* pObjectName; -} VkDebugMarkerObjectNameInfoEXT; - -typedef struct VkDebugMarkerObjectTagInfoEXT { - VkStructureType sType; - const void* pNext; - VkDebugReportObjectTypeEXT objectType; - uint64_t object; - uint64_t tagName; - size_t tagSize; - const void* pTag; -} VkDebugMarkerObjectTagInfoEXT; - -typedef struct VkDebugMarkerMarkerInfoEXT { - VkStructureType sType; - const void* pNext; - const char* pMarkerName; - float color[4]; -} VkDebugMarkerMarkerInfoEXT; - - -typedef VkResult (VKAPI_PTR *PFN_vkDebugMarkerSetObjectTagEXT)(VkDevice device, const VkDebugMarkerObjectTagInfoEXT* pTagInfo); -typedef VkResult (VKAPI_PTR *PFN_vkDebugMarkerSetObjectNameEXT)(VkDevice device, const VkDebugMarkerObjectNameInfoEXT* pNameInfo); -typedef void (VKAPI_PTR *PFN_vkCmdDebugMarkerBeginEXT)(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); -typedef void (VKAPI_PTR *PFN_vkCmdDebugMarkerEndEXT)(VkCommandBuffer commandBuffer); -typedef void (VKAPI_PTR *PFN_vkCmdDebugMarkerInsertEXT)(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkDebugMarkerSetObjectTagEXT( - VkDevice device, - const VkDebugMarkerObjectTagInfoEXT* pTagInfo); - -VKAPI_ATTR VkResult VKAPI_CALL vkDebugMarkerSetObjectNameEXT( - VkDevice device, - const VkDebugMarkerObjectNameInfoEXT* pNameInfo); - -VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerBeginEXT( - VkCommandBuffer commandBuffer, - const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); - -VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerEndEXT( - VkCommandBuffer commandBuffer); - -VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerInsertEXT( - VkCommandBuffer commandBuffer, - const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); -#endif - -#define VK_AMD_gcn_shader 1 -#define VK_AMD_GCN_SHADER_SPEC_VERSION 1 -#define VK_AMD_GCN_SHADER_EXTENSION_NAME "VK_AMD_gcn_shader" - - -#define VK_NV_dedicated_allocation 1 -#define VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION 1 -#define VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_NV_dedicated_allocation" - -typedef struct VkDedicatedAllocationImageCreateInfoNV { - VkStructureType sType; - const void* pNext; - VkBool32 dedicatedAllocation; -} VkDedicatedAllocationImageCreateInfoNV; - -typedef struct VkDedicatedAllocationBufferCreateInfoNV { - VkStructureType sType; - const void* pNext; - VkBool32 dedicatedAllocation; -} VkDedicatedAllocationBufferCreateInfoNV; - -typedef struct VkDedicatedAllocationMemoryAllocateInfoNV { - VkStructureType sType; - const void* pNext; - VkImage image; - VkBuffer buffer; -} VkDedicatedAllocationMemoryAllocateInfoNV; - - - -#define VK_AMD_draw_indirect_count 1 -#define VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION 1 -#define VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME "VK_AMD_draw_indirect_count" - -typedef void (VKAPI_PTR *PFN_vkCmdDrawIndirectCountAMD)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); -typedef void (VKAPI_PTR *PFN_vkCmdDrawIndexedIndirectCountAMD)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirectCountAMD( - VkCommandBuffer commandBuffer, - VkBuffer buffer, - VkDeviceSize offset, - VkBuffer countBuffer, - VkDeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride); - -VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirectCountAMD( - VkCommandBuffer commandBuffer, - VkBuffer buffer, - VkDeviceSize offset, - VkBuffer countBuffer, - VkDeviceSize countBufferOffset, - uint32_t maxDrawCount, - uint32_t stride); -#endif - -#define VK_AMD_negative_viewport_height 1 -#define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_SPEC_VERSION 1 -#define VK_AMD_NEGATIVE_VIEWPORT_HEIGHT_EXTENSION_NAME "VK_AMD_negative_viewport_height" - - -#define VK_AMD_gpu_shader_half_float 1 -#define VK_AMD_GPU_SHADER_HALF_FLOAT_SPEC_VERSION 1 -#define VK_AMD_GPU_SHADER_HALF_FLOAT_EXTENSION_NAME "VK_AMD_gpu_shader_half_float" - - -#define VK_AMD_shader_ballot 1 -#define VK_AMD_SHADER_BALLOT_SPEC_VERSION 1 -#define VK_AMD_SHADER_BALLOT_EXTENSION_NAME "VK_AMD_shader_ballot" - - -#define VK_AMD_texture_gather_bias_lod 1 -#define VK_AMD_TEXTURE_GATHER_BIAS_LOD_SPEC_VERSION 1 -#define VK_AMD_TEXTURE_GATHER_BIAS_LOD_EXTENSION_NAME "VK_AMD_texture_gather_bias_lod" - -typedef struct VkTextureLODGatherFormatPropertiesAMD { - VkStructureType sType; - void* pNext; - VkBool32 supportsTextureGatherLODBiasAMD; -} VkTextureLODGatherFormatPropertiesAMD; - - - -#define VK_AMD_shader_info 1 -#define VK_AMD_SHADER_INFO_SPEC_VERSION 1 -#define VK_AMD_SHADER_INFO_EXTENSION_NAME "VK_AMD_shader_info" - - -typedef enum VkShaderInfoTypeAMD { - VK_SHADER_INFO_TYPE_STATISTICS_AMD = 0, - VK_SHADER_INFO_TYPE_BINARY_AMD = 1, - VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD = 2, - VK_SHADER_INFO_TYPE_BEGIN_RANGE_AMD = VK_SHADER_INFO_TYPE_STATISTICS_AMD, - VK_SHADER_INFO_TYPE_END_RANGE_AMD = VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD, - VK_SHADER_INFO_TYPE_RANGE_SIZE_AMD = (VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD - VK_SHADER_INFO_TYPE_STATISTICS_AMD + 1), - VK_SHADER_INFO_TYPE_MAX_ENUM_AMD = 0x7FFFFFFF -} VkShaderInfoTypeAMD; - -typedef struct VkShaderResourceUsageAMD { - uint32_t numUsedVgprs; - uint32_t numUsedSgprs; - uint32_t ldsSizePerLocalWorkGroup; - size_t ldsUsageSizeInBytes; - size_t scratchMemUsageInBytes; -} VkShaderResourceUsageAMD; - -typedef struct VkShaderStatisticsInfoAMD { - VkShaderStageFlags shaderStageMask; - VkShaderResourceUsageAMD resourceUsage; - uint32_t numPhysicalVgprs; - uint32_t numPhysicalSgprs; - uint32_t numAvailableVgprs; - uint32_t numAvailableSgprs; - uint32_t computeWorkGroupSize[3]; -} VkShaderStatisticsInfoAMD; - - -typedef VkResult (VKAPI_PTR *PFN_vkGetShaderInfoAMD)(VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, VkShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkGetShaderInfoAMD( - VkDevice device, - VkPipeline pipeline, - VkShaderStageFlagBits shaderStage, - VkShaderInfoTypeAMD infoType, - size_t* pInfoSize, - void* pInfo); -#endif - -#define VK_AMD_shader_image_load_store_lod 1 -#define VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_SPEC_VERSION 1 -#define VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_EXTENSION_NAME "VK_AMD_shader_image_load_store_lod" - - -#define VK_IMG_format_pvrtc 1 -#define VK_IMG_FORMAT_PVRTC_SPEC_VERSION 1 -#define VK_IMG_FORMAT_PVRTC_EXTENSION_NAME "VK_IMG_format_pvrtc" - - -#define VK_NV_external_memory_capabilities 1 -#define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION 1 -#define VK_NV_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_NV_external_memory_capabilities" - - -typedef enum VkExternalMemoryHandleTypeFlagBitsNV { - VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_NV = 0x00000001, - VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_NV = 0x00000002, - VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_BIT_NV = 0x00000004, - VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_IMAGE_KMT_BIT_NV = 0x00000008, - VK_EXTERNAL_MEMORY_HANDLE_TYPE_FLAG_BITS_MAX_ENUM_NV = 0x7FFFFFFF -} VkExternalMemoryHandleTypeFlagBitsNV; -typedef VkFlags VkExternalMemoryHandleTypeFlagsNV; - -typedef enum VkExternalMemoryFeatureFlagBitsNV { - VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_NV = 0x00000001, - VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_NV = 0x00000002, - VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_NV = 0x00000004, - VK_EXTERNAL_MEMORY_FEATURE_FLAG_BITS_MAX_ENUM_NV = 0x7FFFFFFF -} VkExternalMemoryFeatureFlagBitsNV; -typedef VkFlags VkExternalMemoryFeatureFlagsNV; - -typedef struct VkExternalImageFormatPropertiesNV { - VkImageFormatProperties imageFormatProperties; - VkExternalMemoryFeatureFlagsNV externalMemoryFeatures; - VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes; - VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes; -} VkExternalImageFormatPropertiesNV; - - -typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalImageFormatPropertiesNV)(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkExternalMemoryHandleTypeFlagsNV externalHandleType, VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceExternalImageFormatPropertiesNV( - VkPhysicalDevice physicalDevice, - VkFormat format, - VkImageType type, - VkImageTiling tiling, - VkImageUsageFlags usage, - VkImageCreateFlags flags, - VkExternalMemoryHandleTypeFlagsNV externalHandleType, - VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties); -#endif - -#define VK_NV_external_memory 1 -#define VK_NV_EXTERNAL_MEMORY_SPEC_VERSION 1 -#define VK_NV_EXTERNAL_MEMORY_EXTENSION_NAME "VK_NV_external_memory" - -typedef struct VkExternalMemoryImageCreateInfoNV { - VkStructureType sType; - const void* pNext; - VkExternalMemoryHandleTypeFlagsNV handleTypes; -} VkExternalMemoryImageCreateInfoNV; - -typedef struct VkExportMemoryAllocateInfoNV { - VkStructureType sType; - const void* pNext; - VkExternalMemoryHandleTypeFlagsNV handleTypes; -} VkExportMemoryAllocateInfoNV; - - - -#define VK_EXT_validation_flags 1 -#define VK_EXT_VALIDATION_FLAGS_SPEC_VERSION 1 -#define VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME "VK_EXT_validation_flags" - - -typedef enum VkValidationCheckEXT { - VK_VALIDATION_CHECK_ALL_EXT = 0, - VK_VALIDATION_CHECK_SHADERS_EXT = 1, - VK_VALIDATION_CHECK_BEGIN_RANGE_EXT = VK_VALIDATION_CHECK_ALL_EXT, - VK_VALIDATION_CHECK_END_RANGE_EXT = VK_VALIDATION_CHECK_SHADERS_EXT, - VK_VALIDATION_CHECK_RANGE_SIZE_EXT = (VK_VALIDATION_CHECK_SHADERS_EXT - VK_VALIDATION_CHECK_ALL_EXT + 1), - VK_VALIDATION_CHECK_MAX_ENUM_EXT = 0x7FFFFFFF -} VkValidationCheckEXT; - -typedef struct VkValidationFlagsEXT { - VkStructureType sType; - const void* pNext; - uint32_t disabledValidationCheckCount; - VkValidationCheckEXT* pDisabledValidationChecks; -} VkValidationFlagsEXT; - - - -#define VK_EXT_shader_subgroup_ballot 1 -#define VK_EXT_SHADER_SUBGROUP_BALLOT_SPEC_VERSION 1 -#define VK_EXT_SHADER_SUBGROUP_BALLOT_EXTENSION_NAME "VK_EXT_shader_subgroup_ballot" - - -#define VK_EXT_shader_subgroup_vote 1 -#define VK_EXT_SHADER_SUBGROUP_VOTE_SPEC_VERSION 1 -#define VK_EXT_SHADER_SUBGROUP_VOTE_EXTENSION_NAME "VK_EXT_shader_subgroup_vote" - - -#define VK_NVX_device_generated_commands 1 -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkObjectTableNVX) -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectCommandsLayoutNVX) - -#define VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION 3 -#define VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME "VK_NVX_device_generated_commands" - - -typedef enum VkIndirectCommandsTokenTypeNVX { - VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX = 0, - VK_INDIRECT_COMMANDS_TOKEN_TYPE_DESCRIPTOR_SET_NVX = 1, - VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NVX = 2, - VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NVX = 3, - VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NVX = 4, - VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NVX = 5, - VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NVX = 6, - VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX = 7, - VK_INDIRECT_COMMANDS_TOKEN_TYPE_BEGIN_RANGE_NVX = VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX, - VK_INDIRECT_COMMANDS_TOKEN_TYPE_END_RANGE_NVX = VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX, - VK_INDIRECT_COMMANDS_TOKEN_TYPE_RANGE_SIZE_NVX = (VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX - VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX + 1), - VK_INDIRECT_COMMANDS_TOKEN_TYPE_MAX_ENUM_NVX = 0x7FFFFFFF -} VkIndirectCommandsTokenTypeNVX; - -typedef enum VkObjectEntryTypeNVX { - VK_OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX = 0, - VK_OBJECT_ENTRY_TYPE_PIPELINE_NVX = 1, - VK_OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVX = 2, - VK_OBJECT_ENTRY_TYPE_VERTEX_BUFFER_NVX = 3, - VK_OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX = 4, - VK_OBJECT_ENTRY_TYPE_BEGIN_RANGE_NVX = VK_OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX, - VK_OBJECT_ENTRY_TYPE_END_RANGE_NVX = VK_OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX, - VK_OBJECT_ENTRY_TYPE_RANGE_SIZE_NVX = (VK_OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX - VK_OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX + 1), - VK_OBJECT_ENTRY_TYPE_MAX_ENUM_NVX = 0x7FFFFFFF -} VkObjectEntryTypeNVX; - - -typedef enum VkIndirectCommandsLayoutUsageFlagBitsNVX { - VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX = 0x00000001, - VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX = 0x00000002, - VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX = 0x00000004, - VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX = 0x00000008, - VK_INDIRECT_COMMANDS_LAYOUT_USAGE_FLAG_BITS_MAX_ENUM_NVX = 0x7FFFFFFF -} VkIndirectCommandsLayoutUsageFlagBitsNVX; -typedef VkFlags VkIndirectCommandsLayoutUsageFlagsNVX; - -typedef enum VkObjectEntryUsageFlagBitsNVX { - VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX = 0x00000001, - VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX = 0x00000002, - VK_OBJECT_ENTRY_USAGE_FLAG_BITS_MAX_ENUM_NVX = 0x7FFFFFFF -} VkObjectEntryUsageFlagBitsNVX; -typedef VkFlags VkObjectEntryUsageFlagsNVX; - -typedef struct VkDeviceGeneratedCommandsFeaturesNVX { - VkStructureType sType; - const void* pNext; - VkBool32 computeBindingPointSupport; -} VkDeviceGeneratedCommandsFeaturesNVX; - -typedef struct VkDeviceGeneratedCommandsLimitsNVX { - VkStructureType sType; - const void* pNext; - uint32_t maxIndirectCommandsLayoutTokenCount; - uint32_t maxObjectEntryCounts; - uint32_t minSequenceCountBufferOffsetAlignment; - uint32_t minSequenceIndexBufferOffsetAlignment; - uint32_t minCommandsTokenBufferOffsetAlignment; -} VkDeviceGeneratedCommandsLimitsNVX; - -typedef struct VkIndirectCommandsTokenNVX { - VkIndirectCommandsTokenTypeNVX tokenType; - VkBuffer buffer; - VkDeviceSize offset; -} VkIndirectCommandsTokenNVX; - -typedef struct VkIndirectCommandsLayoutTokenNVX { - VkIndirectCommandsTokenTypeNVX tokenType; - uint32_t bindingUnit; - uint32_t dynamicCount; - uint32_t divisor; -} VkIndirectCommandsLayoutTokenNVX; - -typedef struct VkIndirectCommandsLayoutCreateInfoNVX { - VkStructureType sType; - const void* pNext; - VkPipelineBindPoint pipelineBindPoint; - VkIndirectCommandsLayoutUsageFlagsNVX flags; - uint32_t tokenCount; - const VkIndirectCommandsLayoutTokenNVX* pTokens; -} VkIndirectCommandsLayoutCreateInfoNVX; - -typedef struct VkCmdProcessCommandsInfoNVX { - VkStructureType sType; - const void* pNext; - VkObjectTableNVX objectTable; - VkIndirectCommandsLayoutNVX indirectCommandsLayout; - uint32_t indirectCommandsTokenCount; - const VkIndirectCommandsTokenNVX* pIndirectCommandsTokens; - uint32_t maxSequencesCount; - VkCommandBuffer targetCommandBuffer; - VkBuffer sequencesCountBuffer; - VkDeviceSize sequencesCountOffset; - VkBuffer sequencesIndexBuffer; - VkDeviceSize sequencesIndexOffset; -} VkCmdProcessCommandsInfoNVX; - -typedef struct VkCmdReserveSpaceForCommandsInfoNVX { - VkStructureType sType; - const void* pNext; - VkObjectTableNVX objectTable; - VkIndirectCommandsLayoutNVX indirectCommandsLayout; - uint32_t maxSequencesCount; -} VkCmdReserveSpaceForCommandsInfoNVX; - -typedef struct VkObjectTableCreateInfoNVX { - VkStructureType sType; - const void* pNext; - uint32_t objectCount; - const VkObjectEntryTypeNVX* pObjectEntryTypes; - const uint32_t* pObjectEntryCounts; - const VkObjectEntryUsageFlagsNVX* pObjectEntryUsageFlags; - uint32_t maxUniformBuffersPerDescriptor; - uint32_t maxStorageBuffersPerDescriptor; - uint32_t maxStorageImagesPerDescriptor; - uint32_t maxSampledImagesPerDescriptor; - uint32_t maxPipelineLayouts; -} VkObjectTableCreateInfoNVX; - -typedef struct VkObjectTableEntryNVX { - VkObjectEntryTypeNVX type; - VkObjectEntryUsageFlagsNVX flags; -} VkObjectTableEntryNVX; - -typedef struct VkObjectTablePipelineEntryNVX { - VkObjectEntryTypeNVX type; - VkObjectEntryUsageFlagsNVX flags; - VkPipeline pipeline; -} VkObjectTablePipelineEntryNVX; - -typedef struct VkObjectTableDescriptorSetEntryNVX { - VkObjectEntryTypeNVX type; - VkObjectEntryUsageFlagsNVX flags; - VkPipelineLayout pipelineLayout; - VkDescriptorSet descriptorSet; -} VkObjectTableDescriptorSetEntryNVX; - -typedef struct VkObjectTableVertexBufferEntryNVX { - VkObjectEntryTypeNVX type; - VkObjectEntryUsageFlagsNVX flags; - VkBuffer buffer; -} VkObjectTableVertexBufferEntryNVX; - -typedef struct VkObjectTableIndexBufferEntryNVX { - VkObjectEntryTypeNVX type; - VkObjectEntryUsageFlagsNVX flags; - VkBuffer buffer; - VkIndexType indexType; -} VkObjectTableIndexBufferEntryNVX; - -typedef struct VkObjectTablePushConstantEntryNVX { - VkObjectEntryTypeNVX type; - VkObjectEntryUsageFlagsNVX flags; - VkPipelineLayout pipelineLayout; - VkShaderStageFlags stageFlags; -} VkObjectTablePushConstantEntryNVX; - - -typedef void (VKAPI_PTR *PFN_vkCmdProcessCommandsNVX)(VkCommandBuffer commandBuffer, const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo); -typedef void (VKAPI_PTR *PFN_vkCmdReserveSpaceForCommandsNVX)(VkCommandBuffer commandBuffer, const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo); -typedef VkResult (VKAPI_PTR *PFN_vkCreateIndirectCommandsLayoutNVX)(VkDevice device, const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout); -typedef void (VKAPI_PTR *PFN_vkDestroyIndirectCommandsLayoutNVX)(VkDevice device, VkIndirectCommandsLayoutNVX indirectCommandsLayout, const VkAllocationCallbacks* pAllocator); -typedef VkResult (VKAPI_PTR *PFN_vkCreateObjectTableNVX)(VkDevice device, const VkObjectTableCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkObjectTableNVX* pObjectTable); -typedef void (VKAPI_PTR *PFN_vkDestroyObjectTableNVX)(VkDevice device, VkObjectTableNVX objectTable, const VkAllocationCallbacks* pAllocator); -typedef VkResult (VKAPI_PTR *PFN_vkRegisterObjectsNVX)(VkDevice device, VkObjectTableNVX objectTable, uint32_t objectCount, const VkObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices); -typedef VkResult (VKAPI_PTR *PFN_vkUnregisterObjectsNVX)(VkDevice device, VkObjectTableNVX objectTable, uint32_t objectCount, const VkObjectEntryTypeNVX* pObjectEntryTypes, const uint32_t* pObjectIndices); -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX)(VkPhysicalDevice physicalDevice, VkDeviceGeneratedCommandsFeaturesNVX* pFeatures, VkDeviceGeneratedCommandsLimitsNVX* pLimits); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR void VKAPI_CALL vkCmdProcessCommandsNVX( - VkCommandBuffer commandBuffer, - const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo); - -VKAPI_ATTR void VKAPI_CALL vkCmdReserveSpaceForCommandsNVX( - VkCommandBuffer commandBuffer, - const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo); - -VKAPI_ATTR VkResult VKAPI_CALL vkCreateIndirectCommandsLayoutNVX( - VkDevice device, - const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout); - -VKAPI_ATTR void VKAPI_CALL vkDestroyIndirectCommandsLayoutNVX( - VkDevice device, - VkIndirectCommandsLayoutNVX indirectCommandsLayout, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL vkCreateObjectTableNVX( - VkDevice device, - const VkObjectTableCreateInfoNVX* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkObjectTableNVX* pObjectTable); - -VKAPI_ATTR void VKAPI_CALL vkDestroyObjectTableNVX( - VkDevice device, - VkObjectTableNVX objectTable, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL vkRegisterObjectsNVX( - VkDevice device, - VkObjectTableNVX objectTable, - uint32_t objectCount, - const VkObjectTableEntryNVX* const* ppObjectTableEntries, - const uint32_t* pObjectIndices); - -VKAPI_ATTR VkResult VKAPI_CALL vkUnregisterObjectsNVX( - VkDevice device, - VkObjectTableNVX objectTable, - uint32_t objectCount, - const VkObjectEntryTypeNVX* pObjectEntryTypes, - const uint32_t* pObjectIndices); - -VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( - VkPhysicalDevice physicalDevice, - VkDeviceGeneratedCommandsFeaturesNVX* pFeatures, - VkDeviceGeneratedCommandsLimitsNVX* pLimits); -#endif - -#define VK_NV_clip_space_w_scaling 1 -#define VK_NV_CLIP_SPACE_W_SCALING_SPEC_VERSION 1 -#define VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME "VK_NV_clip_space_w_scaling" - -typedef struct VkViewportWScalingNV { - float xcoeff; - float ycoeff; -} VkViewportWScalingNV; - -typedef struct VkPipelineViewportWScalingStateCreateInfoNV { - VkStructureType sType; - const void* pNext; - VkBool32 viewportWScalingEnable; - uint32_t viewportCount; - const VkViewportWScalingNV* pViewportWScalings; -} VkPipelineViewportWScalingStateCreateInfoNV; - - -typedef void (VKAPI_PTR *PFN_vkCmdSetViewportWScalingNV)(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportWScalingNV* pViewportWScalings); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR void VKAPI_CALL vkCmdSetViewportWScalingNV( - VkCommandBuffer commandBuffer, - uint32_t firstViewport, - uint32_t viewportCount, - const VkViewportWScalingNV* pViewportWScalings); -#endif - -#define VK_EXT_direct_mode_display 1 -#define VK_EXT_DIRECT_MODE_DISPLAY_SPEC_VERSION 1 -#define VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME "VK_EXT_direct_mode_display" - -typedef VkResult (VKAPI_PTR *PFN_vkReleaseDisplayEXT)(VkPhysicalDevice physicalDevice, VkDisplayKHR display); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkReleaseDisplayEXT( - VkPhysicalDevice physicalDevice, - VkDisplayKHR display); -#endif - -#define VK_EXT_display_surface_counter 1 -#define VK_EXT_DISPLAY_SURFACE_COUNTER_SPEC_VERSION 1 -#define VK_EXT_DISPLAY_SURFACE_COUNTER_EXTENSION_NAME "VK_EXT_display_surface_counter" -#define VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT - - -typedef enum VkSurfaceCounterFlagBitsEXT { - VK_SURFACE_COUNTER_VBLANK_EXT = 0x00000001, - VK_SURFACE_COUNTER_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF -} VkSurfaceCounterFlagBitsEXT; -typedef VkFlags VkSurfaceCounterFlagsEXT; - -typedef struct VkSurfaceCapabilities2EXT { - VkStructureType sType; - void* pNext; - uint32_t minImageCount; - uint32_t maxImageCount; - VkExtent2D currentExtent; - VkExtent2D minImageExtent; - VkExtent2D maxImageExtent; - uint32_t maxImageArrayLayers; - VkSurfaceTransformFlagsKHR supportedTransforms; - VkSurfaceTransformFlagBitsKHR currentTransform; - VkCompositeAlphaFlagsKHR supportedCompositeAlpha; - VkImageUsageFlags supportedUsageFlags; - VkSurfaceCounterFlagsEXT supportedSurfaceCounters; -} VkSurfaceCapabilities2EXT; - - -typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilities2EXT)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilities2EXT* pSurfaceCapabilities); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilities2EXT( - VkPhysicalDevice physicalDevice, - VkSurfaceKHR surface, - VkSurfaceCapabilities2EXT* pSurfaceCapabilities); -#endif - -#define VK_EXT_display_control 1 -#define VK_EXT_DISPLAY_CONTROL_SPEC_VERSION 1 -#define VK_EXT_DISPLAY_CONTROL_EXTENSION_NAME "VK_EXT_display_control" - - -typedef enum VkDisplayPowerStateEXT { - VK_DISPLAY_POWER_STATE_OFF_EXT = 0, - VK_DISPLAY_POWER_STATE_SUSPEND_EXT = 1, - VK_DISPLAY_POWER_STATE_ON_EXT = 2, - VK_DISPLAY_POWER_STATE_BEGIN_RANGE_EXT = VK_DISPLAY_POWER_STATE_OFF_EXT, - VK_DISPLAY_POWER_STATE_END_RANGE_EXT = VK_DISPLAY_POWER_STATE_ON_EXT, - VK_DISPLAY_POWER_STATE_RANGE_SIZE_EXT = (VK_DISPLAY_POWER_STATE_ON_EXT - VK_DISPLAY_POWER_STATE_OFF_EXT + 1), - VK_DISPLAY_POWER_STATE_MAX_ENUM_EXT = 0x7FFFFFFF -} VkDisplayPowerStateEXT; - -typedef enum VkDeviceEventTypeEXT { - VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT = 0, - VK_DEVICE_EVENT_TYPE_BEGIN_RANGE_EXT = VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT, - VK_DEVICE_EVENT_TYPE_END_RANGE_EXT = VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT, - VK_DEVICE_EVENT_TYPE_RANGE_SIZE_EXT = (VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT - VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT + 1), - VK_DEVICE_EVENT_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF -} VkDeviceEventTypeEXT; - -typedef enum VkDisplayEventTypeEXT { - VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT = 0, - VK_DISPLAY_EVENT_TYPE_BEGIN_RANGE_EXT = VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT, - VK_DISPLAY_EVENT_TYPE_END_RANGE_EXT = VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT, - VK_DISPLAY_EVENT_TYPE_RANGE_SIZE_EXT = (VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT - VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT + 1), - VK_DISPLAY_EVENT_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF -} VkDisplayEventTypeEXT; - -typedef struct VkDisplayPowerInfoEXT { - VkStructureType sType; - const void* pNext; - VkDisplayPowerStateEXT powerState; -} VkDisplayPowerInfoEXT; - -typedef struct VkDeviceEventInfoEXT { - VkStructureType sType; - const void* pNext; - VkDeviceEventTypeEXT deviceEvent; -} VkDeviceEventInfoEXT; - -typedef struct VkDisplayEventInfoEXT { - VkStructureType sType; - const void* pNext; - VkDisplayEventTypeEXT displayEvent; -} VkDisplayEventInfoEXT; - -typedef struct VkSwapchainCounterCreateInfoEXT { - VkStructureType sType; - const void* pNext; - VkSurfaceCounterFlagsEXT surfaceCounters; -} VkSwapchainCounterCreateInfoEXT; - - -typedef VkResult (VKAPI_PTR *PFN_vkDisplayPowerControlEXT)(VkDevice device, VkDisplayKHR display, const VkDisplayPowerInfoEXT* pDisplayPowerInfo); -typedef VkResult (VKAPI_PTR *PFN_vkRegisterDeviceEventEXT)(VkDevice device, const VkDeviceEventInfoEXT* pDeviceEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence); -typedef VkResult (VKAPI_PTR *PFN_vkRegisterDisplayEventEXT)(VkDevice device, VkDisplayKHR display, const VkDisplayEventInfoEXT* pDisplayEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence); -typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainCounterEXT)(VkDevice device, VkSwapchainKHR swapchain, VkSurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkDisplayPowerControlEXT( - VkDevice device, - VkDisplayKHR display, - const VkDisplayPowerInfoEXT* pDisplayPowerInfo); - -VKAPI_ATTR VkResult VKAPI_CALL vkRegisterDeviceEventEXT( - VkDevice device, - const VkDeviceEventInfoEXT* pDeviceEventInfo, - const VkAllocationCallbacks* pAllocator, - VkFence* pFence); - -VKAPI_ATTR VkResult VKAPI_CALL vkRegisterDisplayEventEXT( - VkDevice device, - VkDisplayKHR display, - const VkDisplayEventInfoEXT* pDisplayEventInfo, - const VkAllocationCallbacks* pAllocator, - VkFence* pFence); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainCounterEXT( - VkDevice device, - VkSwapchainKHR swapchain, - VkSurfaceCounterFlagBitsEXT counter, - uint64_t* pCounterValue); -#endif - -#define VK_GOOGLE_display_timing 1 -#define VK_GOOGLE_DISPLAY_TIMING_SPEC_VERSION 1 -#define VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME "VK_GOOGLE_display_timing" - -typedef struct VkRefreshCycleDurationGOOGLE { - uint64_t refreshDuration; -} VkRefreshCycleDurationGOOGLE; - -typedef struct VkPastPresentationTimingGOOGLE { - uint32_t presentID; - uint64_t desiredPresentTime; - uint64_t actualPresentTime; - uint64_t earliestPresentTime; - uint64_t presentMargin; -} VkPastPresentationTimingGOOGLE; - -typedef struct VkPresentTimeGOOGLE { - uint32_t presentID; - uint64_t desiredPresentTime; -} VkPresentTimeGOOGLE; - -typedef struct VkPresentTimesInfoGOOGLE { - VkStructureType sType; - const void* pNext; - uint32_t swapchainCount; - const VkPresentTimeGOOGLE* pTimes; -} VkPresentTimesInfoGOOGLE; - - -typedef VkResult (VKAPI_PTR *PFN_vkGetRefreshCycleDurationGOOGLE)(VkDevice device, VkSwapchainKHR swapchain, VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties); -typedef VkResult (VKAPI_PTR *PFN_vkGetPastPresentationTimingGOOGLE)(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pPresentationTimingCount, VkPastPresentationTimingGOOGLE* pPresentationTimings); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkGetRefreshCycleDurationGOOGLE( - VkDevice device, - VkSwapchainKHR swapchain, - VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetPastPresentationTimingGOOGLE( - VkDevice device, - VkSwapchainKHR swapchain, - uint32_t* pPresentationTimingCount, - VkPastPresentationTimingGOOGLE* pPresentationTimings); -#endif - -#define VK_NV_sample_mask_override_coverage 1 -#define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION 1 -#define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_EXTENSION_NAME "VK_NV_sample_mask_override_coverage" - - -#define VK_NV_geometry_shader_passthrough 1 -#define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_SPEC_VERSION 1 -#define VK_NV_GEOMETRY_SHADER_PASSTHROUGH_EXTENSION_NAME "VK_NV_geometry_shader_passthrough" - - -#define VK_NV_viewport_array2 1 -#define VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION 1 -#define VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME "VK_NV_viewport_array2" - - -#define VK_NVX_multiview_per_view_attributes 1 -#define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_SPEC_VERSION 1 -#define VK_NVX_MULTIVIEW_PER_VIEW_ATTRIBUTES_EXTENSION_NAME "VK_NVX_multiview_per_view_attributes" - -typedef struct VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX { - VkStructureType sType; - void* pNext; - VkBool32 perViewPositionAllComponents; -} VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX; - - - -#define VK_NV_viewport_swizzle 1 -#define VK_NV_VIEWPORT_SWIZZLE_SPEC_VERSION 1 -#define VK_NV_VIEWPORT_SWIZZLE_EXTENSION_NAME "VK_NV_viewport_swizzle" - - -typedef enum VkViewportCoordinateSwizzleNV { - VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV = 0, - VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_X_NV = 1, - VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Y_NV = 2, - VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Y_NV = 3, - VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_Z_NV = 4, - VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_Z_NV = 5, - VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_W_NV = 6, - VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV = 7, - VK_VIEWPORT_COORDINATE_SWIZZLE_BEGIN_RANGE_NV = VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV, - VK_VIEWPORT_COORDINATE_SWIZZLE_END_RANGE_NV = VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV, - VK_VIEWPORT_COORDINATE_SWIZZLE_RANGE_SIZE_NV = (VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV - VK_VIEWPORT_COORDINATE_SWIZZLE_POSITIVE_X_NV + 1), - VK_VIEWPORT_COORDINATE_SWIZZLE_MAX_ENUM_NV = 0x7FFFFFFF -} VkViewportCoordinateSwizzleNV; - -typedef VkFlags VkPipelineViewportSwizzleStateCreateFlagsNV; - -typedef struct VkViewportSwizzleNV { - VkViewportCoordinateSwizzleNV x; - VkViewportCoordinateSwizzleNV y; - VkViewportCoordinateSwizzleNV z; - VkViewportCoordinateSwizzleNV w; -} VkViewportSwizzleNV; - -typedef struct VkPipelineViewportSwizzleStateCreateInfoNV { - VkStructureType sType; - const void* pNext; - VkPipelineViewportSwizzleStateCreateFlagsNV flags; - uint32_t viewportCount; - const VkViewportSwizzleNV* pViewportSwizzles; -} VkPipelineViewportSwizzleStateCreateInfoNV; - - - -#define VK_EXT_discard_rectangles 1 -#define VK_EXT_DISCARD_RECTANGLES_SPEC_VERSION 1 -#define VK_EXT_DISCARD_RECTANGLES_EXTENSION_NAME "VK_EXT_discard_rectangles" - - -typedef enum VkDiscardRectangleModeEXT { - VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT = 0, - VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT = 1, - VK_DISCARD_RECTANGLE_MODE_BEGIN_RANGE_EXT = VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT, - VK_DISCARD_RECTANGLE_MODE_END_RANGE_EXT = VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT, - VK_DISCARD_RECTANGLE_MODE_RANGE_SIZE_EXT = (VK_DISCARD_RECTANGLE_MODE_EXCLUSIVE_EXT - VK_DISCARD_RECTANGLE_MODE_INCLUSIVE_EXT + 1), - VK_DISCARD_RECTANGLE_MODE_MAX_ENUM_EXT = 0x7FFFFFFF -} VkDiscardRectangleModeEXT; - -typedef VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT; - -typedef struct VkPhysicalDeviceDiscardRectanglePropertiesEXT { - VkStructureType sType; - void* pNext; - uint32_t maxDiscardRectangles; -} VkPhysicalDeviceDiscardRectanglePropertiesEXT; - -typedef struct VkPipelineDiscardRectangleStateCreateInfoEXT { - VkStructureType sType; - const void* pNext; - VkPipelineDiscardRectangleStateCreateFlagsEXT flags; - VkDiscardRectangleModeEXT discardRectangleMode; - uint32_t discardRectangleCount; - const VkRect2D* pDiscardRectangles; -} VkPipelineDiscardRectangleStateCreateInfoEXT; - - -typedef void (VKAPI_PTR *PFN_vkCmdSetDiscardRectangleEXT)(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR void VKAPI_CALL vkCmdSetDiscardRectangleEXT( - VkCommandBuffer commandBuffer, - uint32_t firstDiscardRectangle, - uint32_t discardRectangleCount, - const VkRect2D* pDiscardRectangles); -#endif - -#define VK_EXT_conservative_rasterization 1 -#define VK_EXT_CONSERVATIVE_RASTERIZATION_SPEC_VERSION 1 -#define VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME "VK_EXT_conservative_rasterization" - - -typedef enum VkConservativeRasterizationModeEXT { - VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT = 0, - VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT = 1, - VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT = 2, - VK_CONSERVATIVE_RASTERIZATION_MODE_BEGIN_RANGE_EXT = VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT, - VK_CONSERVATIVE_RASTERIZATION_MODE_END_RANGE_EXT = VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT, - VK_CONSERVATIVE_RASTERIZATION_MODE_RANGE_SIZE_EXT = (VK_CONSERVATIVE_RASTERIZATION_MODE_UNDERESTIMATE_EXT - VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT + 1), - VK_CONSERVATIVE_RASTERIZATION_MODE_MAX_ENUM_EXT = 0x7FFFFFFF -} VkConservativeRasterizationModeEXT; - -typedef VkFlags VkPipelineRasterizationConservativeStateCreateFlagsEXT; - -typedef struct VkPhysicalDeviceConservativeRasterizationPropertiesEXT { - VkStructureType sType; - void* pNext; - float primitiveOverestimationSize; - float maxExtraPrimitiveOverestimationSize; - float extraPrimitiveOverestimationSizeGranularity; - VkBool32 primitiveUnderestimation; - VkBool32 conservativePointAndLineRasterization; - VkBool32 degenerateTrianglesRasterized; - VkBool32 degenerateLinesRasterized; - VkBool32 fullyCoveredFragmentShaderInputVariable; - VkBool32 conservativeRasterizationPostDepthCoverage; -} VkPhysicalDeviceConservativeRasterizationPropertiesEXT; - -typedef struct VkPipelineRasterizationConservativeStateCreateInfoEXT { - VkStructureType sType; - const void* pNext; - VkPipelineRasterizationConservativeStateCreateFlagsEXT flags; - VkConservativeRasterizationModeEXT conservativeRasterizationMode; - float extraPrimitiveOverestimationSize; -} VkPipelineRasterizationConservativeStateCreateInfoEXT; - - - -#define VK_EXT_swapchain_colorspace 1 -#define VK_EXT_SWAPCHAIN_COLOR_SPACE_SPEC_VERSION 3 -#define VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME "VK_EXT_swapchain_colorspace" - - -#define VK_EXT_hdr_metadata 1 -#define VK_EXT_HDR_METADATA_SPEC_VERSION 1 -#define VK_EXT_HDR_METADATA_EXTENSION_NAME "VK_EXT_hdr_metadata" - -typedef struct VkXYColorEXT { - float x; - float y; -} VkXYColorEXT; - -typedef struct VkHdrMetadataEXT { - VkStructureType sType; - const void* pNext; - VkXYColorEXT displayPrimaryRed; - VkXYColorEXT displayPrimaryGreen; - VkXYColorEXT displayPrimaryBlue; - VkXYColorEXT whitePoint; - float maxLuminance; - float minLuminance; - float maxContentLightLevel; - float maxFrameAverageLightLevel; -} VkHdrMetadataEXT; - - -typedef void (VKAPI_PTR *PFN_vkSetHdrMetadataEXT)(VkDevice device, uint32_t swapchainCount, const VkSwapchainKHR* pSwapchains, const VkHdrMetadataEXT* pMetadata); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR void VKAPI_CALL vkSetHdrMetadataEXT( - VkDevice device, - uint32_t swapchainCount, - const VkSwapchainKHR* pSwapchains, - const VkHdrMetadataEXT* pMetadata); -#endif - -#define VK_EXT_external_memory_dma_buf 1 -#define VK_EXT_EXTERNAL_MEMORY_DMA_BUF_SPEC_VERSION 1 -#define VK_EXT_EXTERNAL_MEMORY_DMA_BUF_EXTENSION_NAME "VK_EXT_external_memory_dma_buf" - - -#define VK_EXT_queue_family_foreign 1 -#define VK_EXT_QUEUE_FAMILY_FOREIGN_SPEC_VERSION 1 -#define VK_EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME "VK_EXT_queue_family_foreign" -#define VK_QUEUE_FAMILY_FOREIGN_EXT (~0U-2) - - -#define VK_EXT_debug_utils 1 -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugUtilsMessengerEXT) - -#define VK_EXT_DEBUG_UTILS_SPEC_VERSION 1 -#define VK_EXT_DEBUG_UTILS_EXTENSION_NAME "VK_EXT_debug_utils" - -typedef VkFlags VkDebugUtilsMessengerCallbackDataFlagsEXT; -typedef VkFlags VkDebugUtilsMessengerCreateFlagsEXT; - -typedef enum VkDebugUtilsMessageSeverityFlagBitsEXT { - VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT = 0x00000001, - VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT = 0x00000010, - VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT = 0x00000100, - VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT = 0x00001000, - VK_DEBUG_UTILS_MESSAGE_SEVERITY_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF -} VkDebugUtilsMessageSeverityFlagBitsEXT; -typedef VkFlags VkDebugUtilsMessageSeverityFlagsEXT; - -typedef enum VkDebugUtilsMessageTypeFlagBitsEXT { - VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT = 0x00000001, - VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT = 0x00000002, - VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT = 0x00000004, - VK_DEBUG_UTILS_MESSAGE_TYPE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF -} VkDebugUtilsMessageTypeFlagBitsEXT; -typedef VkFlags VkDebugUtilsMessageTypeFlagsEXT; - -typedef struct VkDebugUtilsObjectNameInfoEXT { - VkStructureType sType; - const void* pNext; - VkObjectType objectType; - uint64_t objectHandle; - const char* pObjectName; -} VkDebugUtilsObjectNameInfoEXT; - -typedef struct VkDebugUtilsObjectTagInfoEXT { - VkStructureType sType; - const void* pNext; - VkObjectType objectType; - uint64_t objectHandle; - uint64_t tagName; - size_t tagSize; - const void* pTag; -} VkDebugUtilsObjectTagInfoEXT; - -typedef struct VkDebugUtilsLabelEXT { - VkStructureType sType; - const void* pNext; - const char* pLabelName; - float color[4]; -} VkDebugUtilsLabelEXT; - -typedef struct VkDebugUtilsMessengerCallbackDataEXT { - VkStructureType sType; - const void* pNext; - VkDebugUtilsMessengerCallbackDataFlagsEXT flags; - const char* pMessageIdName; - int32_t messageIdNumber; - const char* pMessage; - uint32_t queueLabelCount; - VkDebugUtilsLabelEXT* pQueueLabels; - uint32_t cmdBufLabelCount; - VkDebugUtilsLabelEXT* pCmdBufLabels; - uint32_t objectCount; - VkDebugUtilsObjectNameInfoEXT* pObjects; -} VkDebugUtilsMessengerCallbackDataEXT; - -typedef VkBool32 (VKAPI_PTR *PFN_vkDebugUtilsMessengerCallbackEXT)( - VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, - VkDebugUtilsMessageTypeFlagsEXT messageType, - const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData, - void* pUserData); - -typedef struct VkDebugUtilsMessengerCreateInfoEXT { - VkStructureType sType; - const void* pNext; - VkDebugUtilsMessengerCreateFlagsEXT flags; - VkDebugUtilsMessageSeverityFlagsEXT messageSeverity; - VkDebugUtilsMessageTypeFlagsEXT messageType; - PFN_vkDebugUtilsMessengerCallbackEXT pfnUserCallback; - void* pUserData; -} VkDebugUtilsMessengerCreateInfoEXT; - - -typedef VkResult (VKAPI_PTR *PFN_vkSetDebugUtilsObjectNameEXT)(VkDevice device, const VkDebugUtilsObjectNameInfoEXT* pNameInfo); -typedef VkResult (VKAPI_PTR *PFN_vkSetDebugUtilsObjectTagEXT)(VkDevice device, const VkDebugUtilsObjectTagInfoEXT* pTagInfo); -typedef void (VKAPI_PTR *PFN_vkQueueBeginDebugUtilsLabelEXT)(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo); -typedef void (VKAPI_PTR *PFN_vkQueueEndDebugUtilsLabelEXT)(VkQueue queue); -typedef void (VKAPI_PTR *PFN_vkQueueInsertDebugUtilsLabelEXT)(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo); -typedef void (VKAPI_PTR *PFN_vkCmdBeginDebugUtilsLabelEXT)(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo); -typedef void (VKAPI_PTR *PFN_vkCmdEndDebugUtilsLabelEXT)(VkCommandBuffer commandBuffer); -typedef void (VKAPI_PTR *PFN_vkCmdInsertDebugUtilsLabelEXT)(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo); -typedef VkResult (VKAPI_PTR *PFN_vkCreateDebugUtilsMessengerEXT)(VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugUtilsMessengerEXT* pMessenger); -typedef void (VKAPI_PTR *PFN_vkDestroyDebugUtilsMessengerEXT)(VkInstance instance, VkDebugUtilsMessengerEXT messenger, const VkAllocationCallbacks* pAllocator); -typedef void (VKAPI_PTR *PFN_vkSubmitDebugUtilsMessageEXT)(VkInstance instance, VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageTypes, const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkSetDebugUtilsObjectNameEXT( - VkDevice device, - const VkDebugUtilsObjectNameInfoEXT* pNameInfo); - -VKAPI_ATTR VkResult VKAPI_CALL vkSetDebugUtilsObjectTagEXT( - VkDevice device, - const VkDebugUtilsObjectTagInfoEXT* pTagInfo); - -VKAPI_ATTR void VKAPI_CALL vkQueueBeginDebugUtilsLabelEXT( - VkQueue queue, - const VkDebugUtilsLabelEXT* pLabelInfo); - -VKAPI_ATTR void VKAPI_CALL vkQueueEndDebugUtilsLabelEXT( - VkQueue queue); - -VKAPI_ATTR void VKAPI_CALL vkQueueInsertDebugUtilsLabelEXT( - VkQueue queue, - const VkDebugUtilsLabelEXT* pLabelInfo); - -VKAPI_ATTR void VKAPI_CALL vkCmdBeginDebugUtilsLabelEXT( - VkCommandBuffer commandBuffer, - const VkDebugUtilsLabelEXT* pLabelInfo); - -VKAPI_ATTR void VKAPI_CALL vkCmdEndDebugUtilsLabelEXT( - VkCommandBuffer commandBuffer); - -VKAPI_ATTR void VKAPI_CALL vkCmdInsertDebugUtilsLabelEXT( - VkCommandBuffer commandBuffer, - const VkDebugUtilsLabelEXT* pLabelInfo); - -VKAPI_ATTR VkResult VKAPI_CALL vkCreateDebugUtilsMessengerEXT( - VkInstance instance, - const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkDebugUtilsMessengerEXT* pMessenger); - -VKAPI_ATTR void VKAPI_CALL vkDestroyDebugUtilsMessengerEXT( - VkInstance instance, - VkDebugUtilsMessengerEXT messenger, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR void VKAPI_CALL vkSubmitDebugUtilsMessageEXT( - VkInstance instance, - VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, - VkDebugUtilsMessageTypeFlagsEXT messageTypes, - const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData); -#endif - -#define VK_EXT_sampler_filter_minmax 1 -#define VK_EXT_SAMPLER_FILTER_MINMAX_SPEC_VERSION 1 -#define VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME "VK_EXT_sampler_filter_minmax" - - -typedef enum VkSamplerReductionModeEXT { - VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT = 0, - VK_SAMPLER_REDUCTION_MODE_MIN_EXT = 1, - VK_SAMPLER_REDUCTION_MODE_MAX_EXT = 2, - VK_SAMPLER_REDUCTION_MODE_BEGIN_RANGE_EXT = VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT, - VK_SAMPLER_REDUCTION_MODE_END_RANGE_EXT = VK_SAMPLER_REDUCTION_MODE_MAX_EXT, - VK_SAMPLER_REDUCTION_MODE_RANGE_SIZE_EXT = (VK_SAMPLER_REDUCTION_MODE_MAX_EXT - VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT + 1), - VK_SAMPLER_REDUCTION_MODE_MAX_ENUM_EXT = 0x7FFFFFFF -} VkSamplerReductionModeEXT; - -typedef struct VkSamplerReductionModeCreateInfoEXT { - VkStructureType sType; - const void* pNext; - VkSamplerReductionModeEXT reductionMode; -} VkSamplerReductionModeCreateInfoEXT; - -typedef struct VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT { - VkStructureType sType; - void* pNext; - VkBool32 filterMinmaxSingleComponentFormats; - VkBool32 filterMinmaxImageComponentMapping; -} VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT; - - - -#define VK_AMD_gpu_shader_int16 1 -#define VK_AMD_GPU_SHADER_INT16_SPEC_VERSION 1 -#define VK_AMD_GPU_SHADER_INT16_EXTENSION_NAME "VK_AMD_gpu_shader_int16" - - -#define VK_AMD_mixed_attachment_samples 1 -#define VK_AMD_MIXED_ATTACHMENT_SAMPLES_SPEC_VERSION 1 -#define VK_AMD_MIXED_ATTACHMENT_SAMPLES_EXTENSION_NAME "VK_AMD_mixed_attachment_samples" - - -#define VK_AMD_shader_fragment_mask 1 -#define VK_AMD_SHADER_FRAGMENT_MASK_SPEC_VERSION 1 -#define VK_AMD_SHADER_FRAGMENT_MASK_EXTENSION_NAME "VK_AMD_shader_fragment_mask" - - -#define VK_EXT_shader_stencil_export 1 -#define VK_EXT_SHADER_STENCIL_EXPORT_SPEC_VERSION 1 -#define VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME "VK_EXT_shader_stencil_export" - - -#define VK_EXT_sample_locations 1 -#define VK_EXT_SAMPLE_LOCATIONS_SPEC_VERSION 1 -#define VK_EXT_SAMPLE_LOCATIONS_EXTENSION_NAME "VK_EXT_sample_locations" - -typedef struct VkSampleLocationEXT { - float x; - float y; -} VkSampleLocationEXT; - -typedef struct VkSampleLocationsInfoEXT { - VkStructureType sType; - const void* pNext; - VkSampleCountFlagBits sampleLocationsPerPixel; - VkExtent2D sampleLocationGridSize; - uint32_t sampleLocationsCount; - const VkSampleLocationEXT* pSampleLocations; -} VkSampleLocationsInfoEXT; - -typedef struct VkAttachmentSampleLocationsEXT { - uint32_t attachmentIndex; - VkSampleLocationsInfoEXT sampleLocationsInfo; -} VkAttachmentSampleLocationsEXT; - -typedef struct VkSubpassSampleLocationsEXT { - uint32_t subpassIndex; - VkSampleLocationsInfoEXT sampleLocationsInfo; -} VkSubpassSampleLocationsEXT; - -typedef struct VkRenderPassSampleLocationsBeginInfoEXT { - VkStructureType sType; - const void* pNext; - uint32_t attachmentInitialSampleLocationsCount; - const VkAttachmentSampleLocationsEXT* pAttachmentInitialSampleLocations; - uint32_t postSubpassSampleLocationsCount; - const VkSubpassSampleLocationsEXT* pPostSubpassSampleLocations; -} VkRenderPassSampleLocationsBeginInfoEXT; - -typedef struct VkPipelineSampleLocationsStateCreateInfoEXT { - VkStructureType sType; - const void* pNext; - VkBool32 sampleLocationsEnable; - VkSampleLocationsInfoEXT sampleLocationsInfo; -} VkPipelineSampleLocationsStateCreateInfoEXT; - -typedef struct VkPhysicalDeviceSampleLocationsPropertiesEXT { - VkStructureType sType; - void* pNext; - VkSampleCountFlags sampleLocationSampleCounts; - VkExtent2D maxSampleLocationGridSize; - float sampleLocationCoordinateRange[2]; - uint32_t sampleLocationSubPixelBits; - VkBool32 variableSampleLocations; -} VkPhysicalDeviceSampleLocationsPropertiesEXT; - -typedef struct VkMultisamplePropertiesEXT { - VkStructureType sType; - void* pNext; - VkExtent2D maxSampleLocationGridSize; -} VkMultisamplePropertiesEXT; - - -typedef void (VKAPI_PTR *PFN_vkCmdSetSampleLocationsEXT)(VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT* pSampleLocationsInfo); -typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceMultisamplePropertiesEXT)(VkPhysicalDevice physicalDevice, VkSampleCountFlagBits samples, VkMultisamplePropertiesEXT* pMultisampleProperties); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR void VKAPI_CALL vkCmdSetSampleLocationsEXT( - VkCommandBuffer commandBuffer, - const VkSampleLocationsInfoEXT* pSampleLocationsInfo); - -VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMultisamplePropertiesEXT( - VkPhysicalDevice physicalDevice, - VkSampleCountFlagBits samples, - VkMultisamplePropertiesEXT* pMultisampleProperties); -#endif - -#define VK_EXT_blend_operation_advanced 1 -#define VK_EXT_BLEND_OPERATION_ADVANCED_SPEC_VERSION 2 -#define VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME "VK_EXT_blend_operation_advanced" - - -typedef enum VkBlendOverlapEXT { - VK_BLEND_OVERLAP_UNCORRELATED_EXT = 0, - VK_BLEND_OVERLAP_DISJOINT_EXT = 1, - VK_BLEND_OVERLAP_CONJOINT_EXT = 2, - VK_BLEND_OVERLAP_BEGIN_RANGE_EXT = VK_BLEND_OVERLAP_UNCORRELATED_EXT, - VK_BLEND_OVERLAP_END_RANGE_EXT = VK_BLEND_OVERLAP_CONJOINT_EXT, - VK_BLEND_OVERLAP_RANGE_SIZE_EXT = (VK_BLEND_OVERLAP_CONJOINT_EXT - VK_BLEND_OVERLAP_UNCORRELATED_EXT + 1), - VK_BLEND_OVERLAP_MAX_ENUM_EXT = 0x7FFFFFFF -} VkBlendOverlapEXT; - -typedef struct VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT { - VkStructureType sType; - void* pNext; - VkBool32 advancedBlendCoherentOperations; -} VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT; - -typedef struct VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT { - VkStructureType sType; - void* pNext; - uint32_t advancedBlendMaxColorAttachments; - VkBool32 advancedBlendIndependentBlend; - VkBool32 advancedBlendNonPremultipliedSrcColor; - VkBool32 advancedBlendNonPremultipliedDstColor; - VkBool32 advancedBlendCorrelatedOverlap; - VkBool32 advancedBlendAllOperations; -} VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT; - -typedef struct VkPipelineColorBlendAdvancedStateCreateInfoEXT { - VkStructureType sType; - const void* pNext; - VkBool32 srcPremultiplied; - VkBool32 dstPremultiplied; - VkBlendOverlapEXT blendOverlap; -} VkPipelineColorBlendAdvancedStateCreateInfoEXT; - - - -#define VK_NV_fragment_coverage_to_color 1 -#define VK_NV_FRAGMENT_COVERAGE_TO_COLOR_SPEC_VERSION 1 -#define VK_NV_FRAGMENT_COVERAGE_TO_COLOR_EXTENSION_NAME "VK_NV_fragment_coverage_to_color" - -typedef VkFlags VkPipelineCoverageToColorStateCreateFlagsNV; - -typedef struct VkPipelineCoverageToColorStateCreateInfoNV { - VkStructureType sType; - const void* pNext; - VkPipelineCoverageToColorStateCreateFlagsNV flags; - VkBool32 coverageToColorEnable; - uint32_t coverageToColorLocation; -} VkPipelineCoverageToColorStateCreateInfoNV; - - - -#define VK_NV_framebuffer_mixed_samples 1 -#define VK_NV_FRAMEBUFFER_MIXED_SAMPLES_SPEC_VERSION 1 -#define VK_NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME "VK_NV_framebuffer_mixed_samples" - - -typedef enum VkCoverageModulationModeNV { - VK_COVERAGE_MODULATION_MODE_NONE_NV = 0, - VK_COVERAGE_MODULATION_MODE_RGB_NV = 1, - VK_COVERAGE_MODULATION_MODE_ALPHA_NV = 2, - VK_COVERAGE_MODULATION_MODE_RGBA_NV = 3, - VK_COVERAGE_MODULATION_MODE_BEGIN_RANGE_NV = VK_COVERAGE_MODULATION_MODE_NONE_NV, - VK_COVERAGE_MODULATION_MODE_END_RANGE_NV = VK_COVERAGE_MODULATION_MODE_RGBA_NV, - VK_COVERAGE_MODULATION_MODE_RANGE_SIZE_NV = (VK_COVERAGE_MODULATION_MODE_RGBA_NV - VK_COVERAGE_MODULATION_MODE_NONE_NV + 1), - VK_COVERAGE_MODULATION_MODE_MAX_ENUM_NV = 0x7FFFFFFF -} VkCoverageModulationModeNV; - -typedef VkFlags VkPipelineCoverageModulationStateCreateFlagsNV; - -typedef struct VkPipelineCoverageModulationStateCreateInfoNV { - VkStructureType sType; - const void* pNext; - VkPipelineCoverageModulationStateCreateFlagsNV flags; - VkCoverageModulationModeNV coverageModulationMode; - VkBool32 coverageModulationTableEnable; - uint32_t coverageModulationTableCount; - const float* pCoverageModulationTable; -} VkPipelineCoverageModulationStateCreateInfoNV; - - - -#define VK_NV_fill_rectangle 1 -#define VK_NV_FILL_RECTANGLE_SPEC_VERSION 1 -#define VK_NV_FILL_RECTANGLE_EXTENSION_NAME "VK_NV_fill_rectangle" - - -#define VK_EXT_post_depth_coverage 1 -#define VK_EXT_POST_DEPTH_COVERAGE_SPEC_VERSION 1 -#define VK_EXT_POST_DEPTH_COVERAGE_EXTENSION_NAME "VK_EXT_post_depth_coverage" - - -#define VK_EXT_validation_cache 1 -VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkValidationCacheEXT) - -#define VK_EXT_VALIDATION_CACHE_SPEC_VERSION 1 -#define VK_EXT_VALIDATION_CACHE_EXTENSION_NAME "VK_EXT_validation_cache" -#define VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT - - -typedef enum VkValidationCacheHeaderVersionEXT { - VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT = 1, - VK_VALIDATION_CACHE_HEADER_VERSION_BEGIN_RANGE_EXT = VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT, - VK_VALIDATION_CACHE_HEADER_VERSION_END_RANGE_EXT = VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT, - VK_VALIDATION_CACHE_HEADER_VERSION_RANGE_SIZE_EXT = (VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT - VK_VALIDATION_CACHE_HEADER_VERSION_ONE_EXT + 1), - VK_VALIDATION_CACHE_HEADER_VERSION_MAX_ENUM_EXT = 0x7FFFFFFF -} VkValidationCacheHeaderVersionEXT; - -typedef VkFlags VkValidationCacheCreateFlagsEXT; - -typedef struct VkValidationCacheCreateInfoEXT { - VkStructureType sType; - const void* pNext; - VkValidationCacheCreateFlagsEXT flags; - size_t initialDataSize; - const void* pInitialData; -} VkValidationCacheCreateInfoEXT; - -typedef struct VkShaderModuleValidationCacheCreateInfoEXT { - VkStructureType sType; - const void* pNext; - VkValidationCacheEXT validationCache; -} VkShaderModuleValidationCacheCreateInfoEXT; - - -typedef VkResult (VKAPI_PTR *PFN_vkCreateValidationCacheEXT)(VkDevice device, const VkValidationCacheCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkValidationCacheEXT* pValidationCache); -typedef void (VKAPI_PTR *PFN_vkDestroyValidationCacheEXT)(VkDevice device, VkValidationCacheEXT validationCache, const VkAllocationCallbacks* pAllocator); -typedef VkResult (VKAPI_PTR *PFN_vkMergeValidationCachesEXT)(VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, const VkValidationCacheEXT* pSrcCaches); -typedef VkResult (VKAPI_PTR *PFN_vkGetValidationCacheDataEXT)(VkDevice device, VkValidationCacheEXT validationCache, size_t* pDataSize, void* pData); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkCreateValidationCacheEXT( - VkDevice device, - const VkValidationCacheCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkValidationCacheEXT* pValidationCache); - -VKAPI_ATTR void VKAPI_CALL vkDestroyValidationCacheEXT( - VkDevice device, - VkValidationCacheEXT validationCache, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL vkMergeValidationCachesEXT( - VkDevice device, - VkValidationCacheEXT dstCache, - uint32_t srcCacheCount, - const VkValidationCacheEXT* pSrcCaches); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetValidationCacheDataEXT( - VkDevice device, - VkValidationCacheEXT validationCache, - size_t* pDataSize, - void* pData); -#endif - -#define VK_EXT_descriptor_indexing 1 -#define VK_EXT_DESCRIPTOR_INDEXING_SPEC_VERSION 2 -#define VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME "VK_EXT_descriptor_indexing" - - -typedef enum VkDescriptorBindingFlagBitsEXT { - VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT_EXT = 0x00000001, - VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT_EXT = 0x00000002, - VK_DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT_EXT = 0x00000004, - VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT_EXT = 0x00000008, - VK_DESCRIPTOR_BINDING_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF -} VkDescriptorBindingFlagBitsEXT; -typedef VkFlags VkDescriptorBindingFlagsEXT; - -typedef struct VkDescriptorSetLayoutBindingFlagsCreateInfoEXT { - VkStructureType sType; - const void* pNext; - uint32_t bindingCount; - const VkDescriptorBindingFlagsEXT* pBindingFlags; -} VkDescriptorSetLayoutBindingFlagsCreateInfoEXT; - -typedef struct VkPhysicalDeviceDescriptorIndexingFeaturesEXT { - VkStructureType sType; - void* pNext; - VkBool32 shaderInputAttachmentArrayDynamicIndexing; - VkBool32 shaderUniformTexelBufferArrayDynamicIndexing; - VkBool32 shaderStorageTexelBufferArrayDynamicIndexing; - VkBool32 shaderUniformBufferArrayNonUniformIndexing; - VkBool32 shaderSampledImageArrayNonUniformIndexing; - VkBool32 shaderStorageBufferArrayNonUniformIndexing; - VkBool32 shaderStorageImageArrayNonUniformIndexing; - VkBool32 shaderInputAttachmentArrayNonUniformIndexing; - VkBool32 shaderUniformTexelBufferArrayNonUniformIndexing; - VkBool32 shaderStorageTexelBufferArrayNonUniformIndexing; - VkBool32 descriptorBindingUniformBufferUpdateAfterBind; - VkBool32 descriptorBindingSampledImageUpdateAfterBind; - VkBool32 descriptorBindingStorageImageUpdateAfterBind; - VkBool32 descriptorBindingStorageBufferUpdateAfterBind; - VkBool32 descriptorBindingUniformTexelBufferUpdateAfterBind; - VkBool32 descriptorBindingStorageTexelBufferUpdateAfterBind; - VkBool32 descriptorBindingUpdateUnusedWhilePending; - VkBool32 descriptorBindingPartiallyBound; - VkBool32 descriptorBindingVariableDescriptorCount; - VkBool32 runtimeDescriptorArray; -} VkPhysicalDeviceDescriptorIndexingFeaturesEXT; - -typedef struct VkPhysicalDeviceDescriptorIndexingPropertiesEXT { - VkStructureType sType; - void* pNext; - uint32_t maxUpdateAfterBindDescriptorsInAllPools; - VkBool32 shaderUniformBufferArrayNonUniformIndexingNative; - VkBool32 shaderSampledImageArrayNonUniformIndexingNative; - VkBool32 shaderStorageBufferArrayNonUniformIndexingNative; - VkBool32 shaderStorageImageArrayNonUniformIndexingNative; - VkBool32 shaderInputAttachmentArrayNonUniformIndexingNative; - VkBool32 robustBufferAccessUpdateAfterBind; - VkBool32 quadDivergentImplicitLod; - uint32_t maxPerStageDescriptorUpdateAfterBindSamplers; - uint32_t maxPerStageDescriptorUpdateAfterBindUniformBuffers; - uint32_t maxPerStageDescriptorUpdateAfterBindStorageBuffers; - uint32_t maxPerStageDescriptorUpdateAfterBindSampledImages; - uint32_t maxPerStageDescriptorUpdateAfterBindStorageImages; - uint32_t maxPerStageDescriptorUpdateAfterBindInputAttachments; - uint32_t maxPerStageUpdateAfterBindResources; - uint32_t maxDescriptorSetUpdateAfterBindSamplers; - uint32_t maxDescriptorSetUpdateAfterBindUniformBuffers; - uint32_t maxDescriptorSetUpdateAfterBindUniformBuffersDynamic; - uint32_t maxDescriptorSetUpdateAfterBindStorageBuffers; - uint32_t maxDescriptorSetUpdateAfterBindStorageBuffersDynamic; - uint32_t maxDescriptorSetUpdateAfterBindSampledImages; - uint32_t maxDescriptorSetUpdateAfterBindStorageImages; - uint32_t maxDescriptorSetUpdateAfterBindInputAttachments; -} VkPhysicalDeviceDescriptorIndexingPropertiesEXT; - -typedef struct VkDescriptorSetVariableDescriptorCountAllocateInfoEXT { - VkStructureType sType; - const void* pNext; - uint32_t descriptorSetCount; - const uint32_t* pDescriptorCounts; -} VkDescriptorSetVariableDescriptorCountAllocateInfoEXT; - -typedef struct VkDescriptorSetVariableDescriptorCountLayoutSupportEXT { - VkStructureType sType; - void* pNext; - uint32_t maxVariableDescriptorCount; -} VkDescriptorSetVariableDescriptorCountLayoutSupportEXT; - - - -#define VK_EXT_shader_viewport_index_layer 1 -#define VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_SPEC_VERSION 1 -#define VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME "VK_EXT_shader_viewport_index_layer" - - -#define VK_EXT_global_priority 1 -#define VK_EXT_GLOBAL_PRIORITY_SPEC_VERSION 2 -#define VK_EXT_GLOBAL_PRIORITY_EXTENSION_NAME "VK_EXT_global_priority" - - -typedef enum VkQueueGlobalPriorityEXT { - VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT = 128, - VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT = 256, - VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT = 512, - VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT = 1024, - VK_QUEUE_GLOBAL_PRIORITY_BEGIN_RANGE_EXT = VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT, - VK_QUEUE_GLOBAL_PRIORITY_END_RANGE_EXT = VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT, - VK_QUEUE_GLOBAL_PRIORITY_RANGE_SIZE_EXT = (VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT - VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT + 1), - VK_QUEUE_GLOBAL_PRIORITY_MAX_ENUM_EXT = 0x7FFFFFFF -} VkQueueGlobalPriorityEXT; - -typedef struct VkDeviceQueueGlobalPriorityCreateInfoEXT { - VkStructureType sType; - const void* pNext; - VkQueueGlobalPriorityEXT globalPriority; -} VkDeviceQueueGlobalPriorityCreateInfoEXT; - - - -#define VK_EXT_external_memory_host 1 -#define VK_EXT_EXTERNAL_MEMORY_HOST_SPEC_VERSION 1 -#define VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME "VK_EXT_external_memory_host" - -typedef struct VkImportMemoryHostPointerInfoEXT { - VkStructureType sType; - const void* pNext; - VkExternalMemoryHandleTypeFlagBits handleType; - void* pHostPointer; -} VkImportMemoryHostPointerInfoEXT; - -typedef struct VkMemoryHostPointerPropertiesEXT { - VkStructureType sType; - void* pNext; - uint32_t memoryTypeBits; -} VkMemoryHostPointerPropertiesEXT; - -typedef struct VkPhysicalDeviceExternalMemoryHostPropertiesEXT { - VkStructureType sType; - void* pNext; - VkDeviceSize minImportedHostPointerAlignment; -} VkPhysicalDeviceExternalMemoryHostPropertiesEXT; - - -typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryHostPointerPropertiesEXT)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, const void* pHostPointer, VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryHostPointerPropertiesEXT( - VkDevice device, - VkExternalMemoryHandleTypeFlagBits handleType, - const void* pHostPointer, - VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties); -#endif - -#define VK_AMD_buffer_marker 1 -#define VK_AMD_BUFFER_MARKER_SPEC_VERSION 1 -#define VK_AMD_BUFFER_MARKER_EXTENSION_NAME "VK_AMD_buffer_marker" - -typedef void (VKAPI_PTR *PFN_vkCmdWriteBufferMarkerAMD)(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR void VKAPI_CALL vkCmdWriteBufferMarkerAMD( - VkCommandBuffer commandBuffer, - VkPipelineStageFlagBits pipelineStage, - VkBuffer dstBuffer, - VkDeviceSize dstOffset, - uint32_t marker); -#endif - -#define VK_AMD_shader_core_properties 1 -#define VK_AMD_SHADER_CORE_PROPERTIES_SPEC_VERSION 1 -#define VK_AMD_SHADER_CORE_PROPERTIES_EXTENSION_NAME "VK_AMD_shader_core_properties" - -typedef struct VkPhysicalDeviceShaderCorePropertiesAMD { - VkStructureType sType; - void* pNext; - uint32_t shaderEngineCount; - uint32_t shaderArraysPerEngineCount; - uint32_t computeUnitsPerShaderArray; - uint32_t simdPerComputeUnit; - uint32_t wavefrontsPerSimd; - uint32_t wavefrontSize; - uint32_t sgprsPerSimd; - uint32_t minSgprAllocation; - uint32_t maxSgprAllocation; - uint32_t sgprAllocationGranularity; - uint32_t vgprsPerSimd; - uint32_t minVgprAllocation; - uint32_t maxVgprAllocation; - uint32_t vgprAllocationGranularity; -} VkPhysicalDeviceShaderCorePropertiesAMD; - - - -#define VK_EXT_vertex_attribute_divisor 1 -#define VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_SPEC_VERSION 1 -#define VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME "VK_EXT_vertex_attribute_divisor" - -typedef struct VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT { - VkStructureType sType; - void* pNext; - uint32_t maxVertexAttribDivisor; -} VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT; - -typedef struct VkVertexInputBindingDivisorDescriptionEXT { - uint32_t binding; - uint32_t divisor; -} VkVertexInputBindingDivisorDescriptionEXT; - -typedef struct VkPipelineVertexInputDivisorStateCreateInfoEXT { - VkStructureType sType; - const void* pNext; - uint32_t vertexBindingDivisorCount; - const VkVertexInputBindingDivisorDescriptionEXT* pVertexBindingDivisors; -} VkPipelineVertexInputDivisorStateCreateInfoEXT; - - - -#define VK_NV_shader_subgroup_partitioned 1 -#define VK_NV_SHADER_SUBGROUP_PARTITIONED_SPEC_VERSION 1 -#define VK_NV_SHADER_SUBGROUP_PARTITIONED_EXTENSION_NAME "VK_NV_shader_subgroup_partitioned" - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/emscripten/include/pvrsdk/vulkan/vulkan_ios.h b/emscripten/include/pvrsdk/vulkan/vulkan_ios.h deleted file mode 100644 index a0924816..00000000 --- a/emscripten/include/pvrsdk/vulkan/vulkan_ios.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef VULKAN_IOS_H_ -#define VULKAN_IOS_H_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2015-2018 The Khronos Group Inc. -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -/* -** This header is generated from the Khronos Vulkan XML API Registry. -** -*/ - - -#define VK_MVK_ios_surface 1 -#define VK_MVK_IOS_SURFACE_SPEC_VERSION 2 -#define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface" - -typedef VkFlags VkIOSSurfaceCreateFlagsMVK; - -typedef struct VkIOSSurfaceCreateInfoMVK { - VkStructureType sType; - const void* pNext; - VkIOSSurfaceCreateFlagsMVK flags; - const void* pView; -} VkIOSSurfaceCreateInfoMVK; - - -typedef VkResult (VKAPI_PTR *PFN_vkCreateIOSSurfaceMVK)(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkCreateIOSSurfaceMVK( - VkInstance instance, - const VkIOSSurfaceCreateInfoMVK* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSurfaceKHR* pSurface); -#endif - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/emscripten/include/pvrsdk/vulkan/vulkan_macos.h b/emscripten/include/pvrsdk/vulkan/vulkan_macos.h deleted file mode 100644 index ff0b7018..00000000 --- a/emscripten/include/pvrsdk/vulkan/vulkan_macos.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef VULKAN_MACOS_H_ -#define VULKAN_MACOS_H_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2015-2018 The Khronos Group Inc. -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -/* -** This header is generated from the Khronos Vulkan XML API Registry. -** -*/ - - -#define VK_MVK_macos_surface 1 -#define VK_MVK_MACOS_SURFACE_SPEC_VERSION 2 -#define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface" - -typedef VkFlags VkMacOSSurfaceCreateFlagsMVK; - -typedef struct VkMacOSSurfaceCreateInfoMVK { - VkStructureType sType; - const void* pNext; - VkMacOSSurfaceCreateFlagsMVK flags; - const void* pView; -} VkMacOSSurfaceCreateInfoMVK; - - -typedef VkResult (VKAPI_PTR *PFN_vkCreateMacOSSurfaceMVK)(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkCreateMacOSSurfaceMVK( - VkInstance instance, - const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSurfaceKHR* pSurface); -#endif - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/emscripten/include/pvrsdk/vulkan/vulkan_mir.h b/emscripten/include/pvrsdk/vulkan/vulkan_mir.h deleted file mode 100644 index 7d24ed27..00000000 --- a/emscripten/include/pvrsdk/vulkan/vulkan_mir.h +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef VULKAN_MIR_H_ -#define VULKAN_MIR_H_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2015-2018 The Khronos Group Inc. -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -/* -** This header is generated from the Khronos Vulkan XML API Registry. -** -*/ - - -#define VK_KHR_mir_surface 1 -#define VK_KHR_MIR_SURFACE_SPEC_VERSION 4 -#define VK_KHR_MIR_SURFACE_EXTENSION_NAME "VK_KHR_mir_surface" - -typedef VkFlags VkMirSurfaceCreateFlagsKHR; - -typedef struct VkMirSurfaceCreateInfoKHR { - VkStructureType sType; - const void* pNext; - VkMirSurfaceCreateFlagsKHR flags; - MirConnection* connection; - MirSurface* mirSurface; -} VkMirSurfaceCreateInfoKHR; - - -typedef VkResult (VKAPI_PTR *PFN_vkCreateMirSurfaceKHR)(VkInstance instance, const VkMirSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); -typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceMirPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, MirConnection* connection); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkCreateMirSurfaceKHR( - VkInstance instance, - const VkMirSurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSurfaceKHR* pSurface); - -VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceMirPresentationSupportKHR( - VkPhysicalDevice physicalDevice, - uint32_t queueFamilyIndex, - MirConnection* connection); -#endif - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/emscripten/include/pvrsdk/vulkan/vulkan_vi.h b/emscripten/include/pvrsdk/vulkan/vulkan_vi.h deleted file mode 100644 index 015166bf..00000000 --- a/emscripten/include/pvrsdk/vulkan/vulkan_vi.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef VULKAN_VI_H_ -#define VULKAN_VI_H_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2015-2018 The Khronos Group Inc. -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -/* -** This header is generated from the Khronos Vulkan XML API Registry. -** -*/ - - -#define VK_NN_vi_surface 1 -#define VK_NN_VI_SURFACE_SPEC_VERSION 1 -#define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface" - -typedef VkFlags VkViSurfaceCreateFlagsNN; - -typedef struct VkViSurfaceCreateInfoNN { - VkStructureType sType; - const void* pNext; - VkViSurfaceCreateFlagsNN flags; - void* window; -} VkViSurfaceCreateInfoNN; - - -typedef VkResult (VKAPI_PTR *PFN_vkCreateViSurfaceNN)(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkCreateViSurfaceNN( - VkInstance instance, - const VkViSurfaceCreateInfoNN* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSurfaceKHR* pSurface); -#endif - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/emscripten/include/pvrsdk/vulkan/vulkan_wayland.h b/emscripten/include/pvrsdk/vulkan/vulkan_wayland.h deleted file mode 100644 index 5ba0827a..00000000 --- a/emscripten/include/pvrsdk/vulkan/vulkan_wayland.h +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef VULKAN_WAYLAND_H_ -#define VULKAN_WAYLAND_H_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2015-2018 The Khronos Group Inc. -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -/* -** This header is generated from the Khronos Vulkan XML API Registry. -** -*/ - - -#define VK_KHR_wayland_surface 1 -#define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6 -#define VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME "VK_KHR_wayland_surface" - -typedef VkFlags VkWaylandSurfaceCreateFlagsKHR; - -typedef struct VkWaylandSurfaceCreateInfoKHR { - VkStructureType sType; - const void* pNext; - VkWaylandSurfaceCreateFlagsKHR flags; - struct wl_display* display; - struct wl_surface* surface; -} VkWaylandSurfaceCreateInfoKHR; - - -typedef VkResult (VKAPI_PTR *PFN_vkCreateWaylandSurfaceKHR)(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); -typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkCreateWaylandSurfaceKHR( - VkInstance instance, - const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSurfaceKHR* pSurface); - -VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWaylandPresentationSupportKHR( - VkPhysicalDevice physicalDevice, - uint32_t queueFamilyIndex, - struct wl_display* display); -#endif - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/emscripten/include/pvrsdk/vulkan/vulkan_win32.h b/emscripten/include/pvrsdk/vulkan/vulkan_win32.h deleted file mode 100644 index 6a85409e..00000000 --- a/emscripten/include/pvrsdk/vulkan/vulkan_win32.h +++ /dev/null @@ -1,276 +0,0 @@ -#ifndef VULKAN_WIN32_H_ -#define VULKAN_WIN32_H_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2015-2018 The Khronos Group Inc. -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -/* -** This header is generated from the Khronos Vulkan XML API Registry. -** -*/ - - -#define VK_KHR_win32_surface 1 -#define VK_KHR_WIN32_SURFACE_SPEC_VERSION 6 -#define VK_KHR_WIN32_SURFACE_EXTENSION_NAME "VK_KHR_win32_surface" - -typedef VkFlags VkWin32SurfaceCreateFlagsKHR; - -typedef struct VkWin32SurfaceCreateInfoKHR { - VkStructureType sType; - const void* pNext; - VkWin32SurfaceCreateFlagsKHR flags; - HINSTANCE hinstance; - HWND hwnd; -} VkWin32SurfaceCreateInfoKHR; - - -typedef VkResult (VKAPI_PTR *PFN_vkCreateWin32SurfaceKHR)(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); -typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR( - VkInstance instance, - const VkWin32SurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSurfaceKHR* pSurface); - -VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR( - VkPhysicalDevice physicalDevice, - uint32_t queueFamilyIndex); -#endif - -#define VK_KHR_external_memory_win32 1 -#define VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1 -#define VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHR_external_memory_win32" - -typedef struct VkImportMemoryWin32HandleInfoKHR { - VkStructureType sType; - const void* pNext; - VkExternalMemoryHandleTypeFlagBits handleType; - HANDLE handle; - LPCWSTR name; -} VkImportMemoryWin32HandleInfoKHR; - -typedef struct VkExportMemoryWin32HandleInfoKHR { - VkStructureType sType; - const void* pNext; - const SECURITY_ATTRIBUTES* pAttributes; - DWORD dwAccess; - LPCWSTR name; -} VkExportMemoryWin32HandleInfoKHR; - -typedef struct VkMemoryWin32HandlePropertiesKHR { - VkStructureType sType; - void* pNext; - uint32_t memoryTypeBits; -} VkMemoryWin32HandlePropertiesKHR; - -typedef struct VkMemoryGetWin32HandleInfoKHR { - VkStructureType sType; - const void* pNext; - VkDeviceMemory memory; - VkExternalMemoryHandleTypeFlagBits handleType; -} VkMemoryGetWin32HandleInfoKHR; - - -typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleKHR)(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle); -typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandlePropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleKHR( - VkDevice device, - const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, - HANDLE* pHandle); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandlePropertiesKHR( - VkDevice device, - VkExternalMemoryHandleTypeFlagBits handleType, - HANDLE handle, - VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties); -#endif - -#define VK_KHR_win32_keyed_mutex 1 -#define VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION 1 -#define VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHR_win32_keyed_mutex" - -typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR { - VkStructureType sType; - const void* pNext; - uint32_t acquireCount; - const VkDeviceMemory* pAcquireSyncs; - const uint64_t* pAcquireKeys; - const uint32_t* pAcquireTimeouts; - uint32_t releaseCount; - const VkDeviceMemory* pReleaseSyncs; - const uint64_t* pReleaseKeys; -} VkWin32KeyedMutexAcquireReleaseInfoKHR; - - - -#define VK_KHR_external_semaphore_win32 1 -#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1 -#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHR_external_semaphore_win32" - -typedef struct VkImportSemaphoreWin32HandleInfoKHR { - VkStructureType sType; - const void* pNext; - VkSemaphore semaphore; - VkSemaphoreImportFlags flags; - VkExternalSemaphoreHandleTypeFlagBits handleType; - HANDLE handle; - LPCWSTR name; -} VkImportSemaphoreWin32HandleInfoKHR; - -typedef struct VkExportSemaphoreWin32HandleInfoKHR { - VkStructureType sType; - const void* pNext; - const SECURITY_ATTRIBUTES* pAttributes; - DWORD dwAccess; - LPCWSTR name; -} VkExportSemaphoreWin32HandleInfoKHR; - -typedef struct VkD3D12FenceSubmitInfoKHR { - VkStructureType sType; - const void* pNext; - uint32_t waitSemaphoreValuesCount; - const uint64_t* pWaitSemaphoreValues; - uint32_t signalSemaphoreValuesCount; - const uint64_t* pSignalSemaphoreValues; -} VkD3D12FenceSubmitInfoKHR; - -typedef struct VkSemaphoreGetWin32HandleInfoKHR { - VkStructureType sType; - const void* pNext; - VkSemaphore semaphore; - VkExternalSemaphoreHandleTypeFlagBits handleType; -} VkSemaphoreGetWin32HandleInfoKHR; - - -typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreWin32HandleKHR)(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo); -typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreWin32HandleKHR)(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreWin32HandleKHR( - VkDevice device, - const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreWin32HandleKHR( - VkDevice device, - const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, - HANDLE* pHandle); -#endif - -#define VK_KHR_external_fence_win32 1 -#define VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION 1 -#define VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME "VK_KHR_external_fence_win32" - -typedef struct VkImportFenceWin32HandleInfoKHR { - VkStructureType sType; - const void* pNext; - VkFence fence; - VkFenceImportFlags flags; - VkExternalFenceHandleTypeFlagBits handleType; - HANDLE handle; - LPCWSTR name; -} VkImportFenceWin32HandleInfoKHR; - -typedef struct VkExportFenceWin32HandleInfoKHR { - VkStructureType sType; - const void* pNext; - const SECURITY_ATTRIBUTES* pAttributes; - DWORD dwAccess; - LPCWSTR name; -} VkExportFenceWin32HandleInfoKHR; - -typedef struct VkFenceGetWin32HandleInfoKHR { - VkStructureType sType; - const void* pNext; - VkFence fence; - VkExternalFenceHandleTypeFlagBits handleType; -} VkFenceGetWin32HandleInfoKHR; - - -typedef VkResult (VKAPI_PTR *PFN_vkImportFenceWin32HandleKHR)(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo); -typedef VkResult (VKAPI_PTR *PFN_vkGetFenceWin32HandleKHR)(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkImportFenceWin32HandleKHR( - VkDevice device, - const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceWin32HandleKHR( - VkDevice device, - const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, - HANDLE* pHandle); -#endif - -#define VK_NV_external_memory_win32 1 -#define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1 -#define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32" - -typedef struct VkImportMemoryWin32HandleInfoNV { - VkStructureType sType; - const void* pNext; - VkExternalMemoryHandleTypeFlagsNV handleType; - HANDLE handle; -} VkImportMemoryWin32HandleInfoNV; - -typedef struct VkExportMemoryWin32HandleInfoNV { - VkStructureType sType; - const void* pNext; - const SECURITY_ATTRIBUTES* pAttributes; - DWORD dwAccess; -} VkExportMemoryWin32HandleInfoNV; - - -typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleNV)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleNV( - VkDevice device, - VkDeviceMemory memory, - VkExternalMemoryHandleTypeFlagsNV handleType, - HANDLE* pHandle); -#endif - -#define VK_NV_win32_keyed_mutex 1 -#define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1 -#define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex" - -typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV { - VkStructureType sType; - const void* pNext; - uint32_t acquireCount; - const VkDeviceMemory* pAcquireSyncs; - const uint64_t* pAcquireKeys; - const uint32_t* pAcquireTimeoutMilliseconds; - uint32_t releaseCount; - const VkDeviceMemory* pReleaseSyncs; - const uint64_t* pReleaseKeys; -} VkWin32KeyedMutexAcquireReleaseInfoNV; - - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/emscripten/include/pvrsdk/vulkan/vulkan_xcb.h b/emscripten/include/pvrsdk/vulkan/vulkan_xcb.h deleted file mode 100644 index ba036006..00000000 --- a/emscripten/include/pvrsdk/vulkan/vulkan_xcb.h +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef VULKAN_XCB_H_ -#define VULKAN_XCB_H_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2015-2018 The Khronos Group Inc. -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -/* -** This header is generated from the Khronos Vulkan XML API Registry. -** -*/ - - -#define VK_KHR_xcb_surface 1 -#define VK_KHR_XCB_SURFACE_SPEC_VERSION 6 -#define VK_KHR_XCB_SURFACE_EXTENSION_NAME "VK_KHR_xcb_surface" - -typedef VkFlags VkXcbSurfaceCreateFlagsKHR; - -typedef struct VkXcbSurfaceCreateInfoKHR { - VkStructureType sType; - const void* pNext; - VkXcbSurfaceCreateFlagsKHR flags; - xcb_connection_t* connection; - xcb_window_t window; -} VkXcbSurfaceCreateInfoKHR; - - -typedef VkResult (VKAPI_PTR *PFN_vkCreateXcbSurfaceKHR)(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); -typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkCreateXcbSurfaceKHR( - VkInstance instance, - const VkXcbSurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSurfaceKHR* pSurface); - -VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXcbPresentationSupportKHR( - VkPhysicalDevice physicalDevice, - uint32_t queueFamilyIndex, - xcb_connection_t* connection, - xcb_visualid_t visual_id); -#endif - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/emscripten/include/pvrsdk/vulkan/vulkan_xlib.h b/emscripten/include/pvrsdk/vulkan/vulkan_xlib.h deleted file mode 100644 index e1d967e0..00000000 --- a/emscripten/include/pvrsdk/vulkan/vulkan_xlib.h +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef VULKAN_XLIB_H_ -#define VULKAN_XLIB_H_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2015-2018 The Khronos Group Inc. -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -/* -** This header is generated from the Khronos Vulkan XML API Registry. -** -*/ - - -#define VK_KHR_xlib_surface 1 -#define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6 -#define VK_KHR_XLIB_SURFACE_EXTENSION_NAME "VK_KHR_xlib_surface" - -typedef VkFlags VkXlibSurfaceCreateFlagsKHR; - -typedef struct VkXlibSurfaceCreateInfoKHR { - VkStructureType sType; - const void* pNext; - VkXlibSurfaceCreateFlagsKHR flags; - Display* dpy; - Window window; -} VkXlibSurfaceCreateInfoKHR; - - -typedef VkResult (VKAPI_PTR *PFN_vkCreateXlibSurfaceKHR)(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); -typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkCreateXlibSurfaceKHR( - VkInstance instance, - const VkXlibSurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSurfaceKHR* pSurface); - -VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXlibPresentationSupportKHR( - VkPhysicalDevice physicalDevice, - uint32_t queueFamilyIndex, - Display* dpy, - VisualID visualID); -#endif - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/emscripten/include/pvrsdk/vulkan/vulkan_xlib_xrandr.h b/emscripten/include/pvrsdk/vulkan/vulkan_xlib_xrandr.h deleted file mode 100644 index 117d0179..00000000 --- a/emscripten/include/pvrsdk/vulkan/vulkan_xlib_xrandr.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef VULKAN_XLIB_XRANDR_H_ -#define VULKAN_XLIB_XRANDR_H_ 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2015-2018 The Khronos Group Inc. -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -/* -** This header is generated from the Khronos Vulkan XML API Registry. -** -*/ - - -#define VK_EXT_acquire_xlib_display 1 -#define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1 -#define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display" - -typedef VkResult (VKAPI_PTR *PFN_vkAcquireXlibDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display); -typedef VkResult (VKAPI_PTR *PFN_vkGetRandROutputDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkAcquireXlibDisplayEXT( - VkPhysicalDevice physicalDevice, - Display* dpy, - VkDisplayKHR display); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetRandROutputDisplayEXT( - VkPhysicalDevice physicalDevice, - Display* dpy, - RROutput rrOutput, - VkDisplayKHR* pDisplay); -#endif - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/emscripten/include/spirv_cross/GLSL.std.450.h b/emscripten/include/spirv_cross/GLSL.std.450.h deleted file mode 100644 index 54cc00e9..00000000 --- a/emscripten/include/spirv_cross/GLSL.std.450.h +++ /dev/null @@ -1,131 +0,0 @@ -/* -** Copyright (c) 2014-2016 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a copy -** of this software and/or associated documentation files (the "Materials"), -** to deal in the Materials without restriction, including without limitation -** the rights to use, copy, modify, merge, publish, distribute, sublicense, -** and/or sell copies of the Materials, and to permit persons to whom the -** Materials are furnished to do so, subject to the following conditions: -** -** The above copyright notice and this permission notice shall be included in -** all copies or substantial portions of the Materials. -** -** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS -** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND -** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ -** -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -** 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. -*/ - -#ifndef GLSLstd450_H -#define GLSLstd450_H - -static const int GLSLstd450Version = 100; -static const int GLSLstd450Revision = 3; - -enum GLSLstd450 { - GLSLstd450Bad = 0, // Don't use - - GLSLstd450Round = 1, - GLSLstd450RoundEven = 2, - GLSLstd450Trunc = 3, - GLSLstd450FAbs = 4, - GLSLstd450SAbs = 5, - GLSLstd450FSign = 6, - GLSLstd450SSign = 7, - GLSLstd450Floor = 8, - GLSLstd450Ceil = 9, - GLSLstd450Fract = 10, - - GLSLstd450Radians = 11, - GLSLstd450Degrees = 12, - GLSLstd450Sin = 13, - GLSLstd450Cos = 14, - GLSLstd450Tan = 15, - GLSLstd450Asin = 16, - GLSLstd450Acos = 17, - GLSLstd450Atan = 18, - GLSLstd450Sinh = 19, - GLSLstd450Cosh = 20, - GLSLstd450Tanh = 21, - GLSLstd450Asinh = 22, - GLSLstd450Acosh = 23, - GLSLstd450Atanh = 24, - GLSLstd450Atan2 = 25, - - GLSLstd450Pow = 26, - GLSLstd450Exp = 27, - GLSLstd450Log = 28, - GLSLstd450Exp2 = 29, - GLSLstd450Log2 = 30, - GLSLstd450Sqrt = 31, - GLSLstd450InverseSqrt = 32, - - GLSLstd450Determinant = 33, - GLSLstd450MatrixInverse = 34, - - GLSLstd450Modf = 35, // second operand needs an OpVariable to write to - GLSLstd450ModfStruct = 36, // no OpVariable operand - GLSLstd450FMin = 37, - GLSLstd450UMin = 38, - GLSLstd450SMin = 39, - GLSLstd450FMax = 40, - GLSLstd450UMax = 41, - GLSLstd450SMax = 42, - GLSLstd450FClamp = 43, - GLSLstd450UClamp = 44, - GLSLstd450SClamp = 45, - GLSLstd450FMix = 46, - GLSLstd450IMix = 47, // Reserved - GLSLstd450Step = 48, - GLSLstd450SmoothStep = 49, - - GLSLstd450Fma = 50, - GLSLstd450Frexp = 51, // second operand needs an OpVariable to write to - GLSLstd450FrexpStruct = 52, // no OpVariable operand - GLSLstd450Ldexp = 53, - - GLSLstd450PackSnorm4x8 = 54, - GLSLstd450PackUnorm4x8 = 55, - GLSLstd450PackSnorm2x16 = 56, - GLSLstd450PackUnorm2x16 = 57, - GLSLstd450PackHalf2x16 = 58, - GLSLstd450PackDouble2x32 = 59, - GLSLstd450UnpackSnorm2x16 = 60, - GLSLstd450UnpackUnorm2x16 = 61, - GLSLstd450UnpackHalf2x16 = 62, - GLSLstd450UnpackSnorm4x8 = 63, - GLSLstd450UnpackUnorm4x8 = 64, - GLSLstd450UnpackDouble2x32 = 65, - - GLSLstd450Length = 66, - GLSLstd450Distance = 67, - GLSLstd450Cross = 68, - GLSLstd450Normalize = 69, - GLSLstd450FaceForward = 70, - GLSLstd450Reflect = 71, - GLSLstd450Refract = 72, - - GLSLstd450FindILsb = 73, - GLSLstd450FindSMsb = 74, - GLSLstd450FindUMsb = 75, - - GLSLstd450InterpolateAtCentroid = 76, - GLSLstd450InterpolateAtSample = 77, - GLSLstd450InterpolateAtOffset = 78, - - GLSLstd450NMin = 79, - GLSLstd450NMax = 80, - GLSLstd450NClamp = 81, - - GLSLstd450Count -}; - -#endif // #ifndef GLSLstd450_H diff --git a/emscripten/include/spirv_cross/spirv.hpp b/emscripten/include/spirv_cross/spirv.hpp deleted file mode 100644 index 43dd2aae..00000000 --- a/emscripten/include/spirv_cross/spirv.hpp +++ /dev/null @@ -1,2203 +0,0 @@ -// Copyright (c) 2014-2020 The Khronos Group Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and/or associated documentation files (the "Materials"), -// to deal in the Materials without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Materials, and to permit persons to whom the -// Materials are furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Materials. -// -// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS -// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND -// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ -// -// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// 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. - -// This header is automatically generated by the same tool that creates -// the Binary Section of the SPIR-V specification. - -// Enumeration tokens for SPIR-V, in various styles: -// C, C++, C++11, JSON, Lua, Python, C#, D -// -// - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL -// - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL -// - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL -// - Lua will use tables, e.g.: spv.SourceLanguage.GLSL -// - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL'] -// - C# will use enum classes in the Specification class located in the "Spv" namespace, -// e.g.: Spv.Specification.SourceLanguage.GLSL -// - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL -// -// Some tokens act like mask values, which can be OR'd together, -// while others are mutually exclusive. The mask-like ones have -// "Mask" in their name, and a parallel enum that has the shift -// amount (1 << x) for each corresponding enumerant. - -#ifndef spirv_HPP -#define spirv_HPP - -namespace spv { - -typedef unsigned int Id; - -#define SPV_VERSION 0x10500 -#define SPV_REVISION 4 - -static const unsigned int MagicNumber = 0x07230203; -static const unsigned int Version = 0x00010500; -static const unsigned int Revision = 4; -static const unsigned int OpCodeMask = 0xffff; -static const unsigned int WordCountShift = 16; - -enum SourceLanguage { - SourceLanguageUnknown = 0, - SourceLanguageESSL = 1, - SourceLanguageGLSL = 2, - SourceLanguageOpenCL_C = 3, - SourceLanguageOpenCL_CPP = 4, - SourceLanguageHLSL = 5, - SourceLanguageMax = 0x7fffffff, -}; - -enum ExecutionModel { - ExecutionModelVertex = 0, - ExecutionModelTessellationControl = 1, - ExecutionModelTessellationEvaluation = 2, - ExecutionModelGeometry = 3, - ExecutionModelFragment = 4, - ExecutionModelGLCompute = 5, - ExecutionModelKernel = 6, - ExecutionModelTaskNV = 5267, - ExecutionModelMeshNV = 5268, - ExecutionModelRayGenerationKHR = 5313, - ExecutionModelRayGenerationNV = 5313, - ExecutionModelIntersectionKHR = 5314, - ExecutionModelIntersectionNV = 5314, - ExecutionModelAnyHitKHR = 5315, - ExecutionModelAnyHitNV = 5315, - ExecutionModelClosestHitKHR = 5316, - ExecutionModelClosestHitNV = 5316, - ExecutionModelMissKHR = 5317, - ExecutionModelMissNV = 5317, - ExecutionModelCallableKHR = 5318, - ExecutionModelCallableNV = 5318, - ExecutionModelMax = 0x7fffffff, -}; - -enum AddressingModel { - AddressingModelLogical = 0, - AddressingModelPhysical32 = 1, - AddressingModelPhysical64 = 2, - AddressingModelPhysicalStorageBuffer64 = 5348, - AddressingModelPhysicalStorageBuffer64EXT = 5348, - AddressingModelMax = 0x7fffffff, -}; - -enum MemoryModel { - MemoryModelSimple = 0, - MemoryModelGLSL450 = 1, - MemoryModelOpenCL = 2, - MemoryModelVulkan = 3, - MemoryModelVulkanKHR = 3, - MemoryModelMax = 0x7fffffff, -}; - -enum ExecutionMode { - ExecutionModeInvocations = 0, - ExecutionModeSpacingEqual = 1, - ExecutionModeSpacingFractionalEven = 2, - ExecutionModeSpacingFractionalOdd = 3, - ExecutionModeVertexOrderCw = 4, - ExecutionModeVertexOrderCcw = 5, - ExecutionModePixelCenterInteger = 6, - ExecutionModeOriginUpperLeft = 7, - ExecutionModeOriginLowerLeft = 8, - ExecutionModeEarlyFragmentTests = 9, - ExecutionModePointMode = 10, - ExecutionModeXfb = 11, - ExecutionModeDepthReplacing = 12, - ExecutionModeDepthGreater = 14, - ExecutionModeDepthLess = 15, - ExecutionModeDepthUnchanged = 16, - ExecutionModeLocalSize = 17, - ExecutionModeLocalSizeHint = 18, - ExecutionModeInputPoints = 19, - ExecutionModeInputLines = 20, - ExecutionModeInputLinesAdjacency = 21, - ExecutionModeTriangles = 22, - ExecutionModeInputTrianglesAdjacency = 23, - ExecutionModeQuads = 24, - ExecutionModeIsolines = 25, - ExecutionModeOutputVertices = 26, - ExecutionModeOutputPoints = 27, - ExecutionModeOutputLineStrip = 28, - ExecutionModeOutputTriangleStrip = 29, - ExecutionModeVecTypeHint = 30, - ExecutionModeContractionOff = 31, - ExecutionModeInitializer = 33, - ExecutionModeFinalizer = 34, - ExecutionModeSubgroupSize = 35, - ExecutionModeSubgroupsPerWorkgroup = 36, - ExecutionModeSubgroupsPerWorkgroupId = 37, - ExecutionModeLocalSizeId = 38, - ExecutionModeLocalSizeHintId = 39, - ExecutionModePostDepthCoverage = 4446, - ExecutionModeDenormPreserve = 4459, - ExecutionModeDenormFlushToZero = 4460, - ExecutionModeSignedZeroInfNanPreserve = 4461, - ExecutionModeRoundingModeRTE = 4462, - ExecutionModeRoundingModeRTZ = 4463, - ExecutionModeStencilRefReplacingEXT = 5027, - ExecutionModeOutputLinesNV = 5269, - ExecutionModeOutputPrimitivesNV = 5270, - ExecutionModeDerivativeGroupQuadsNV = 5289, - ExecutionModeDerivativeGroupLinearNV = 5290, - ExecutionModeOutputTrianglesNV = 5298, - ExecutionModePixelInterlockOrderedEXT = 5366, - ExecutionModePixelInterlockUnorderedEXT = 5367, - ExecutionModeSampleInterlockOrderedEXT = 5368, - ExecutionModeSampleInterlockUnorderedEXT = 5369, - ExecutionModeShadingRateInterlockOrderedEXT = 5370, - ExecutionModeShadingRateInterlockUnorderedEXT = 5371, - ExecutionModeMaxWorkgroupSizeINTEL = 5893, - ExecutionModeMaxWorkDimINTEL = 5894, - ExecutionModeNoGlobalOffsetINTEL = 5895, - ExecutionModeNumSIMDWorkitemsINTEL = 5896, - ExecutionModeMax = 0x7fffffff, -}; - -enum StorageClass { - StorageClassUniformConstant = 0, - StorageClassInput = 1, - StorageClassUniform = 2, - StorageClassOutput = 3, - StorageClassWorkgroup = 4, - StorageClassCrossWorkgroup = 5, - StorageClassPrivate = 6, - StorageClassFunction = 7, - StorageClassGeneric = 8, - StorageClassPushConstant = 9, - StorageClassAtomicCounter = 10, - StorageClassImage = 11, - StorageClassStorageBuffer = 12, - StorageClassCallableDataKHR = 5328, - StorageClassCallableDataNV = 5328, - StorageClassIncomingCallableDataKHR = 5329, - StorageClassIncomingCallableDataNV = 5329, - StorageClassRayPayloadKHR = 5338, - StorageClassRayPayloadNV = 5338, - StorageClassHitAttributeKHR = 5339, - StorageClassHitAttributeNV = 5339, - StorageClassIncomingRayPayloadKHR = 5342, - StorageClassIncomingRayPayloadNV = 5342, - StorageClassShaderRecordBufferKHR = 5343, - StorageClassShaderRecordBufferNV = 5343, - StorageClassPhysicalStorageBuffer = 5349, - StorageClassPhysicalStorageBufferEXT = 5349, - StorageClassCodeSectionINTEL = 5605, - StorageClassMax = 0x7fffffff, -}; - -enum Dim { - Dim1D = 0, - Dim2D = 1, - Dim3D = 2, - DimCube = 3, - DimRect = 4, - DimBuffer = 5, - DimSubpassData = 6, - DimMax = 0x7fffffff, -}; - -enum SamplerAddressingMode { - SamplerAddressingModeNone = 0, - SamplerAddressingModeClampToEdge = 1, - SamplerAddressingModeClamp = 2, - SamplerAddressingModeRepeat = 3, - SamplerAddressingModeRepeatMirrored = 4, - SamplerAddressingModeMax = 0x7fffffff, -}; - -enum SamplerFilterMode { - SamplerFilterModeNearest = 0, - SamplerFilterModeLinear = 1, - SamplerFilterModeMax = 0x7fffffff, -}; - -enum ImageFormat { - ImageFormatUnknown = 0, - ImageFormatRgba32f = 1, - ImageFormatRgba16f = 2, - ImageFormatR32f = 3, - ImageFormatRgba8 = 4, - ImageFormatRgba8Snorm = 5, - ImageFormatRg32f = 6, - ImageFormatRg16f = 7, - ImageFormatR11fG11fB10f = 8, - ImageFormatR16f = 9, - ImageFormatRgba16 = 10, - ImageFormatRgb10A2 = 11, - ImageFormatRg16 = 12, - ImageFormatRg8 = 13, - ImageFormatR16 = 14, - ImageFormatR8 = 15, - ImageFormatRgba16Snorm = 16, - ImageFormatRg16Snorm = 17, - ImageFormatRg8Snorm = 18, - ImageFormatR16Snorm = 19, - ImageFormatR8Snorm = 20, - ImageFormatRgba32i = 21, - ImageFormatRgba16i = 22, - ImageFormatRgba8i = 23, - ImageFormatR32i = 24, - ImageFormatRg32i = 25, - ImageFormatRg16i = 26, - ImageFormatRg8i = 27, - ImageFormatR16i = 28, - ImageFormatR8i = 29, - ImageFormatRgba32ui = 30, - ImageFormatRgba16ui = 31, - ImageFormatRgba8ui = 32, - ImageFormatR32ui = 33, - ImageFormatRgb10a2ui = 34, - ImageFormatRg32ui = 35, - ImageFormatRg16ui = 36, - ImageFormatRg8ui = 37, - ImageFormatR16ui = 38, - ImageFormatR8ui = 39, - ImageFormatR64ui = 40, - ImageFormatR64i = 41, - ImageFormatMax = 0x7fffffff, -}; - -enum ImageChannelOrder { - ImageChannelOrderR = 0, - ImageChannelOrderA = 1, - ImageChannelOrderRG = 2, - ImageChannelOrderRA = 3, - ImageChannelOrderRGB = 4, - ImageChannelOrderRGBA = 5, - ImageChannelOrderBGRA = 6, - ImageChannelOrderARGB = 7, - ImageChannelOrderIntensity = 8, - ImageChannelOrderLuminance = 9, - ImageChannelOrderRx = 10, - ImageChannelOrderRGx = 11, - ImageChannelOrderRGBx = 12, - ImageChannelOrderDepth = 13, - ImageChannelOrderDepthStencil = 14, - ImageChannelOrdersRGB = 15, - ImageChannelOrdersRGBx = 16, - ImageChannelOrdersRGBA = 17, - ImageChannelOrdersBGRA = 18, - ImageChannelOrderABGR = 19, - ImageChannelOrderMax = 0x7fffffff, -}; - -enum ImageChannelDataType { - ImageChannelDataTypeSnormInt8 = 0, - ImageChannelDataTypeSnormInt16 = 1, - ImageChannelDataTypeUnormInt8 = 2, - ImageChannelDataTypeUnormInt16 = 3, - ImageChannelDataTypeUnormShort565 = 4, - ImageChannelDataTypeUnormShort555 = 5, - ImageChannelDataTypeUnormInt101010 = 6, - ImageChannelDataTypeSignedInt8 = 7, - ImageChannelDataTypeSignedInt16 = 8, - ImageChannelDataTypeSignedInt32 = 9, - ImageChannelDataTypeUnsignedInt8 = 10, - ImageChannelDataTypeUnsignedInt16 = 11, - ImageChannelDataTypeUnsignedInt32 = 12, - ImageChannelDataTypeHalfFloat = 13, - ImageChannelDataTypeFloat = 14, - ImageChannelDataTypeUnormInt24 = 15, - ImageChannelDataTypeUnormInt101010_2 = 16, - ImageChannelDataTypeMax = 0x7fffffff, -}; - -enum ImageOperandsShift { - ImageOperandsBiasShift = 0, - ImageOperandsLodShift = 1, - ImageOperandsGradShift = 2, - ImageOperandsConstOffsetShift = 3, - ImageOperandsOffsetShift = 4, - ImageOperandsConstOffsetsShift = 5, - ImageOperandsSampleShift = 6, - ImageOperandsMinLodShift = 7, - ImageOperandsMakeTexelAvailableShift = 8, - ImageOperandsMakeTexelAvailableKHRShift = 8, - ImageOperandsMakeTexelVisibleShift = 9, - ImageOperandsMakeTexelVisibleKHRShift = 9, - ImageOperandsNonPrivateTexelShift = 10, - ImageOperandsNonPrivateTexelKHRShift = 10, - ImageOperandsVolatileTexelShift = 11, - ImageOperandsVolatileTexelKHRShift = 11, - ImageOperandsSignExtendShift = 12, - ImageOperandsZeroExtendShift = 13, - ImageOperandsMax = 0x7fffffff, -}; - -enum ImageOperandsMask { - ImageOperandsMaskNone = 0, - ImageOperandsBiasMask = 0x00000001, - ImageOperandsLodMask = 0x00000002, - ImageOperandsGradMask = 0x00000004, - ImageOperandsConstOffsetMask = 0x00000008, - ImageOperandsOffsetMask = 0x00000010, - ImageOperandsConstOffsetsMask = 0x00000020, - ImageOperandsSampleMask = 0x00000040, - ImageOperandsMinLodMask = 0x00000080, - ImageOperandsMakeTexelAvailableMask = 0x00000100, - ImageOperandsMakeTexelAvailableKHRMask = 0x00000100, - ImageOperandsMakeTexelVisibleMask = 0x00000200, - ImageOperandsMakeTexelVisibleKHRMask = 0x00000200, - ImageOperandsNonPrivateTexelMask = 0x00000400, - ImageOperandsNonPrivateTexelKHRMask = 0x00000400, - ImageOperandsVolatileTexelMask = 0x00000800, - ImageOperandsVolatileTexelKHRMask = 0x00000800, - ImageOperandsSignExtendMask = 0x00001000, - ImageOperandsZeroExtendMask = 0x00002000, -}; - -enum FPFastMathModeShift { - FPFastMathModeNotNaNShift = 0, - FPFastMathModeNotInfShift = 1, - FPFastMathModeNSZShift = 2, - FPFastMathModeAllowRecipShift = 3, - FPFastMathModeFastShift = 4, - FPFastMathModeMax = 0x7fffffff, -}; - -enum FPFastMathModeMask { - FPFastMathModeMaskNone = 0, - FPFastMathModeNotNaNMask = 0x00000001, - FPFastMathModeNotInfMask = 0x00000002, - FPFastMathModeNSZMask = 0x00000004, - FPFastMathModeAllowRecipMask = 0x00000008, - FPFastMathModeFastMask = 0x00000010, -}; - -enum FPRoundingMode { - FPRoundingModeRTE = 0, - FPRoundingModeRTZ = 1, - FPRoundingModeRTP = 2, - FPRoundingModeRTN = 3, - FPRoundingModeMax = 0x7fffffff, -}; - -enum LinkageType { - LinkageTypeExport = 0, - LinkageTypeImport = 1, - LinkageTypeMax = 0x7fffffff, -}; - -enum AccessQualifier { - AccessQualifierReadOnly = 0, - AccessQualifierWriteOnly = 1, - AccessQualifierReadWrite = 2, - AccessQualifierMax = 0x7fffffff, -}; - -enum FunctionParameterAttribute { - FunctionParameterAttributeZext = 0, - FunctionParameterAttributeSext = 1, - FunctionParameterAttributeByVal = 2, - FunctionParameterAttributeSret = 3, - FunctionParameterAttributeNoAlias = 4, - FunctionParameterAttributeNoCapture = 5, - FunctionParameterAttributeNoWrite = 6, - FunctionParameterAttributeNoReadWrite = 7, - FunctionParameterAttributeMax = 0x7fffffff, -}; - -enum Decoration { - DecorationRelaxedPrecision = 0, - DecorationSpecId = 1, - DecorationBlock = 2, - DecorationBufferBlock = 3, - DecorationRowMajor = 4, - DecorationColMajor = 5, - DecorationArrayStride = 6, - DecorationMatrixStride = 7, - DecorationGLSLShared = 8, - DecorationGLSLPacked = 9, - DecorationCPacked = 10, - DecorationBuiltIn = 11, - DecorationNoPerspective = 13, - DecorationFlat = 14, - DecorationPatch = 15, - DecorationCentroid = 16, - DecorationSample = 17, - DecorationInvariant = 18, - DecorationRestrict = 19, - DecorationAliased = 20, - DecorationVolatile = 21, - DecorationConstant = 22, - DecorationCoherent = 23, - DecorationNonWritable = 24, - DecorationNonReadable = 25, - DecorationUniform = 26, - DecorationUniformId = 27, - DecorationSaturatedConversion = 28, - DecorationStream = 29, - DecorationLocation = 30, - DecorationComponent = 31, - DecorationIndex = 32, - DecorationBinding = 33, - DecorationDescriptorSet = 34, - DecorationOffset = 35, - DecorationXfbBuffer = 36, - DecorationXfbStride = 37, - DecorationFuncParamAttr = 38, - DecorationFPRoundingMode = 39, - DecorationFPFastMathMode = 40, - DecorationLinkageAttributes = 41, - DecorationNoContraction = 42, - DecorationInputAttachmentIndex = 43, - DecorationAlignment = 44, - DecorationMaxByteOffset = 45, - DecorationAlignmentId = 46, - DecorationMaxByteOffsetId = 47, - DecorationNoSignedWrap = 4469, - DecorationNoUnsignedWrap = 4470, - DecorationExplicitInterpAMD = 4999, - DecorationOverrideCoverageNV = 5248, - DecorationPassthroughNV = 5250, - DecorationViewportRelativeNV = 5252, - DecorationSecondaryViewportRelativeNV = 5256, - DecorationPerPrimitiveNV = 5271, - DecorationPerViewNV = 5272, - DecorationPerTaskNV = 5273, - DecorationPerVertexNV = 5285, - DecorationNonUniform = 5300, - DecorationNonUniformEXT = 5300, - DecorationRestrictPointer = 5355, - DecorationRestrictPointerEXT = 5355, - DecorationAliasedPointer = 5356, - DecorationAliasedPointerEXT = 5356, - DecorationReferencedIndirectlyINTEL = 5602, - DecorationCounterBuffer = 5634, - DecorationHlslCounterBufferGOOGLE = 5634, - DecorationHlslSemanticGOOGLE = 5635, - DecorationUserSemantic = 5635, - DecorationUserTypeGOOGLE = 5636, - DecorationRegisterINTEL = 5825, - DecorationMemoryINTEL = 5826, - DecorationNumbanksINTEL = 5827, - DecorationBankwidthINTEL = 5828, - DecorationMaxPrivateCopiesINTEL = 5829, - DecorationSinglepumpINTEL = 5830, - DecorationDoublepumpINTEL = 5831, - DecorationMaxReplicatesINTEL = 5832, - DecorationSimpleDualPortINTEL = 5833, - DecorationMergeINTEL = 5834, - DecorationBankBitsINTEL = 5835, - DecorationForcePow2DepthINTEL = 5836, - DecorationMax = 0x7fffffff, -}; - -enum BuiltIn { - BuiltInPosition = 0, - BuiltInPointSize = 1, - BuiltInClipDistance = 3, - BuiltInCullDistance = 4, - BuiltInVertexId = 5, - BuiltInInstanceId = 6, - BuiltInPrimitiveId = 7, - BuiltInInvocationId = 8, - BuiltInLayer = 9, - BuiltInViewportIndex = 10, - BuiltInTessLevelOuter = 11, - BuiltInTessLevelInner = 12, - BuiltInTessCoord = 13, - BuiltInPatchVertices = 14, - BuiltInFragCoord = 15, - BuiltInPointCoord = 16, - BuiltInFrontFacing = 17, - BuiltInSampleId = 18, - BuiltInSamplePosition = 19, - BuiltInSampleMask = 20, - BuiltInFragDepth = 22, - BuiltInHelperInvocation = 23, - BuiltInNumWorkgroups = 24, - BuiltInWorkgroupSize = 25, - BuiltInWorkgroupId = 26, - BuiltInLocalInvocationId = 27, - BuiltInGlobalInvocationId = 28, - BuiltInLocalInvocationIndex = 29, - BuiltInWorkDim = 30, - BuiltInGlobalSize = 31, - BuiltInEnqueuedWorkgroupSize = 32, - BuiltInGlobalOffset = 33, - BuiltInGlobalLinearId = 34, - BuiltInSubgroupSize = 36, - BuiltInSubgroupMaxSize = 37, - BuiltInNumSubgroups = 38, - BuiltInNumEnqueuedSubgroups = 39, - BuiltInSubgroupId = 40, - BuiltInSubgroupLocalInvocationId = 41, - BuiltInVertexIndex = 42, - BuiltInInstanceIndex = 43, - BuiltInSubgroupEqMask = 4416, - BuiltInSubgroupEqMaskKHR = 4416, - BuiltInSubgroupGeMask = 4417, - BuiltInSubgroupGeMaskKHR = 4417, - BuiltInSubgroupGtMask = 4418, - BuiltInSubgroupGtMaskKHR = 4418, - BuiltInSubgroupLeMask = 4419, - BuiltInSubgroupLeMaskKHR = 4419, - BuiltInSubgroupLtMask = 4420, - BuiltInSubgroupLtMaskKHR = 4420, - BuiltInBaseVertex = 4424, - BuiltInBaseInstance = 4425, - BuiltInDrawIndex = 4426, - BuiltInPrimitiveShadingRateKHR = 4432, - BuiltInDeviceIndex = 4438, - BuiltInViewIndex = 4440, - BuiltInShadingRateKHR = 4444, - BuiltInBaryCoordNoPerspAMD = 4992, - BuiltInBaryCoordNoPerspCentroidAMD = 4993, - BuiltInBaryCoordNoPerspSampleAMD = 4994, - BuiltInBaryCoordSmoothAMD = 4995, - BuiltInBaryCoordSmoothCentroidAMD = 4996, - BuiltInBaryCoordSmoothSampleAMD = 4997, - BuiltInBaryCoordPullModelAMD = 4998, - BuiltInFragStencilRefEXT = 5014, - BuiltInViewportMaskNV = 5253, - BuiltInSecondaryPositionNV = 5257, - BuiltInSecondaryViewportMaskNV = 5258, - BuiltInPositionPerViewNV = 5261, - BuiltInViewportMaskPerViewNV = 5262, - BuiltInFullyCoveredEXT = 5264, - BuiltInTaskCountNV = 5274, - BuiltInPrimitiveCountNV = 5275, - BuiltInPrimitiveIndicesNV = 5276, - BuiltInClipDistancePerViewNV = 5277, - BuiltInCullDistancePerViewNV = 5278, - BuiltInLayerPerViewNV = 5279, - BuiltInMeshViewCountNV = 5280, - BuiltInMeshViewIndicesNV = 5281, - BuiltInBaryCoordNV = 5286, - BuiltInBaryCoordNoPerspNV = 5287, - BuiltInFragSizeEXT = 5292, - BuiltInFragmentSizeNV = 5292, - BuiltInFragInvocationCountEXT = 5293, - BuiltInInvocationsPerPixelNV = 5293, - BuiltInLaunchIdKHR = 5319, - BuiltInLaunchIdNV = 5319, - BuiltInLaunchSizeKHR = 5320, - BuiltInLaunchSizeNV = 5320, - BuiltInWorldRayOriginKHR = 5321, - BuiltInWorldRayOriginNV = 5321, - BuiltInWorldRayDirectionKHR = 5322, - BuiltInWorldRayDirectionNV = 5322, - BuiltInObjectRayOriginKHR = 5323, - BuiltInObjectRayOriginNV = 5323, - BuiltInObjectRayDirectionKHR = 5324, - BuiltInObjectRayDirectionNV = 5324, - BuiltInRayTminKHR = 5325, - BuiltInRayTminNV = 5325, - BuiltInRayTmaxKHR = 5326, - BuiltInRayTmaxNV = 5326, - BuiltInInstanceCustomIndexKHR = 5327, - BuiltInInstanceCustomIndexNV = 5327, - BuiltInObjectToWorldKHR = 5330, - BuiltInObjectToWorldNV = 5330, - BuiltInWorldToObjectKHR = 5331, - BuiltInWorldToObjectNV = 5331, - BuiltInHitTNV = 5332, - BuiltInHitKindKHR = 5333, - BuiltInHitKindNV = 5333, - BuiltInIncomingRayFlagsKHR = 5351, - BuiltInIncomingRayFlagsNV = 5351, - BuiltInRayGeometryIndexKHR = 5352, - BuiltInWarpsPerSMNV = 5374, - BuiltInSMCountNV = 5375, - BuiltInWarpIDNV = 5376, - BuiltInSMIDNV = 5377, - BuiltInMax = 0x7fffffff, -}; - -enum SelectionControlShift { - SelectionControlFlattenShift = 0, - SelectionControlDontFlattenShift = 1, - SelectionControlMax = 0x7fffffff, -}; - -enum SelectionControlMask { - SelectionControlMaskNone = 0, - SelectionControlFlattenMask = 0x00000001, - SelectionControlDontFlattenMask = 0x00000002, -}; - -enum LoopControlShift { - LoopControlUnrollShift = 0, - LoopControlDontUnrollShift = 1, - LoopControlDependencyInfiniteShift = 2, - LoopControlDependencyLengthShift = 3, - LoopControlMinIterationsShift = 4, - LoopControlMaxIterationsShift = 5, - LoopControlIterationMultipleShift = 6, - LoopControlPeelCountShift = 7, - LoopControlPartialCountShift = 8, - LoopControlInitiationIntervalINTELShift = 16, - LoopControlMaxConcurrencyINTELShift = 17, - LoopControlDependencyArrayINTELShift = 18, - LoopControlPipelineEnableINTELShift = 19, - LoopControlLoopCoalesceINTELShift = 20, - LoopControlMaxInterleavingINTELShift = 21, - LoopControlSpeculatedIterationsINTELShift = 22, - LoopControlMax = 0x7fffffff, -}; - -enum LoopControlMask { - LoopControlMaskNone = 0, - LoopControlUnrollMask = 0x00000001, - LoopControlDontUnrollMask = 0x00000002, - LoopControlDependencyInfiniteMask = 0x00000004, - LoopControlDependencyLengthMask = 0x00000008, - LoopControlMinIterationsMask = 0x00000010, - LoopControlMaxIterationsMask = 0x00000020, - LoopControlIterationMultipleMask = 0x00000040, - LoopControlPeelCountMask = 0x00000080, - LoopControlPartialCountMask = 0x00000100, - LoopControlInitiationIntervalINTELMask = 0x00010000, - LoopControlMaxConcurrencyINTELMask = 0x00020000, - LoopControlDependencyArrayINTELMask = 0x00040000, - LoopControlPipelineEnableINTELMask = 0x00080000, - LoopControlLoopCoalesceINTELMask = 0x00100000, - LoopControlMaxInterleavingINTELMask = 0x00200000, - LoopControlSpeculatedIterationsINTELMask = 0x00400000, -}; - -enum FunctionControlShift { - FunctionControlInlineShift = 0, - FunctionControlDontInlineShift = 1, - FunctionControlPureShift = 2, - FunctionControlConstShift = 3, - FunctionControlMax = 0x7fffffff, -}; - -enum FunctionControlMask { - FunctionControlMaskNone = 0, - FunctionControlInlineMask = 0x00000001, - FunctionControlDontInlineMask = 0x00000002, - FunctionControlPureMask = 0x00000004, - FunctionControlConstMask = 0x00000008, -}; - -enum MemorySemanticsShift { - MemorySemanticsAcquireShift = 1, - MemorySemanticsReleaseShift = 2, - MemorySemanticsAcquireReleaseShift = 3, - MemorySemanticsSequentiallyConsistentShift = 4, - MemorySemanticsUniformMemoryShift = 6, - MemorySemanticsSubgroupMemoryShift = 7, - MemorySemanticsWorkgroupMemoryShift = 8, - MemorySemanticsCrossWorkgroupMemoryShift = 9, - MemorySemanticsAtomicCounterMemoryShift = 10, - MemorySemanticsImageMemoryShift = 11, - MemorySemanticsOutputMemoryShift = 12, - MemorySemanticsOutputMemoryKHRShift = 12, - MemorySemanticsMakeAvailableShift = 13, - MemorySemanticsMakeAvailableKHRShift = 13, - MemorySemanticsMakeVisibleShift = 14, - MemorySemanticsMakeVisibleKHRShift = 14, - MemorySemanticsVolatileShift = 15, - MemorySemanticsMax = 0x7fffffff, -}; - -enum MemorySemanticsMask { - MemorySemanticsMaskNone = 0, - MemorySemanticsAcquireMask = 0x00000002, - MemorySemanticsReleaseMask = 0x00000004, - MemorySemanticsAcquireReleaseMask = 0x00000008, - MemorySemanticsSequentiallyConsistentMask = 0x00000010, - MemorySemanticsUniformMemoryMask = 0x00000040, - MemorySemanticsSubgroupMemoryMask = 0x00000080, - MemorySemanticsWorkgroupMemoryMask = 0x00000100, - MemorySemanticsCrossWorkgroupMemoryMask = 0x00000200, - MemorySemanticsAtomicCounterMemoryMask = 0x00000400, - MemorySemanticsImageMemoryMask = 0x00000800, - MemorySemanticsOutputMemoryMask = 0x00001000, - MemorySemanticsOutputMemoryKHRMask = 0x00001000, - MemorySemanticsMakeAvailableMask = 0x00002000, - MemorySemanticsMakeAvailableKHRMask = 0x00002000, - MemorySemanticsMakeVisibleMask = 0x00004000, - MemorySemanticsMakeVisibleKHRMask = 0x00004000, - MemorySemanticsVolatileMask = 0x00008000, -}; - -enum MemoryAccessShift { - MemoryAccessVolatileShift = 0, - MemoryAccessAlignedShift = 1, - MemoryAccessNontemporalShift = 2, - MemoryAccessMakePointerAvailableShift = 3, - MemoryAccessMakePointerAvailableKHRShift = 3, - MemoryAccessMakePointerVisibleShift = 4, - MemoryAccessMakePointerVisibleKHRShift = 4, - MemoryAccessNonPrivatePointerShift = 5, - MemoryAccessNonPrivatePointerKHRShift = 5, - MemoryAccessMax = 0x7fffffff, -}; - -enum MemoryAccessMask { - MemoryAccessMaskNone = 0, - MemoryAccessVolatileMask = 0x00000001, - MemoryAccessAlignedMask = 0x00000002, - MemoryAccessNontemporalMask = 0x00000004, - MemoryAccessMakePointerAvailableMask = 0x00000008, - MemoryAccessMakePointerAvailableKHRMask = 0x00000008, - MemoryAccessMakePointerVisibleMask = 0x00000010, - MemoryAccessMakePointerVisibleKHRMask = 0x00000010, - MemoryAccessNonPrivatePointerMask = 0x00000020, - MemoryAccessNonPrivatePointerKHRMask = 0x00000020, -}; - -enum Scope { - ScopeCrossDevice = 0, - ScopeDevice = 1, - ScopeWorkgroup = 2, - ScopeSubgroup = 3, - ScopeInvocation = 4, - ScopeQueueFamily = 5, - ScopeQueueFamilyKHR = 5, - ScopeShaderCallKHR = 6, - ScopeMax = 0x7fffffff, -}; - -enum GroupOperation { - GroupOperationReduce = 0, - GroupOperationInclusiveScan = 1, - GroupOperationExclusiveScan = 2, - GroupOperationClusteredReduce = 3, - GroupOperationPartitionedReduceNV = 6, - GroupOperationPartitionedInclusiveScanNV = 7, - GroupOperationPartitionedExclusiveScanNV = 8, - GroupOperationMax = 0x7fffffff, -}; - -enum KernelEnqueueFlags { - KernelEnqueueFlagsNoWait = 0, - KernelEnqueueFlagsWaitKernel = 1, - KernelEnqueueFlagsWaitWorkGroup = 2, - KernelEnqueueFlagsMax = 0x7fffffff, -}; - -enum KernelProfilingInfoShift { - KernelProfilingInfoCmdExecTimeShift = 0, - KernelProfilingInfoMax = 0x7fffffff, -}; - -enum KernelProfilingInfoMask { - KernelProfilingInfoMaskNone = 0, - KernelProfilingInfoCmdExecTimeMask = 0x00000001, -}; - -enum Capability { - CapabilityMatrix = 0, - CapabilityShader = 1, - CapabilityGeometry = 2, - CapabilityTessellation = 3, - CapabilityAddresses = 4, - CapabilityLinkage = 5, - CapabilityKernel = 6, - CapabilityVector16 = 7, - CapabilityFloat16Buffer = 8, - CapabilityFloat16 = 9, - CapabilityFloat64 = 10, - CapabilityInt64 = 11, - CapabilityInt64Atomics = 12, - CapabilityImageBasic = 13, - CapabilityImageReadWrite = 14, - CapabilityImageMipmap = 15, - CapabilityPipes = 17, - CapabilityGroups = 18, - CapabilityDeviceEnqueue = 19, - CapabilityLiteralSampler = 20, - CapabilityAtomicStorage = 21, - CapabilityInt16 = 22, - CapabilityTessellationPointSize = 23, - CapabilityGeometryPointSize = 24, - CapabilityImageGatherExtended = 25, - CapabilityStorageImageMultisample = 27, - CapabilityUniformBufferArrayDynamicIndexing = 28, - CapabilitySampledImageArrayDynamicIndexing = 29, - CapabilityStorageBufferArrayDynamicIndexing = 30, - CapabilityStorageImageArrayDynamicIndexing = 31, - CapabilityClipDistance = 32, - CapabilityCullDistance = 33, - CapabilityImageCubeArray = 34, - CapabilitySampleRateShading = 35, - CapabilityImageRect = 36, - CapabilitySampledRect = 37, - CapabilityGenericPointer = 38, - CapabilityInt8 = 39, - CapabilityInputAttachment = 40, - CapabilitySparseResidency = 41, - CapabilityMinLod = 42, - CapabilitySampled1D = 43, - CapabilityImage1D = 44, - CapabilitySampledCubeArray = 45, - CapabilitySampledBuffer = 46, - CapabilityImageBuffer = 47, - CapabilityImageMSArray = 48, - CapabilityStorageImageExtendedFormats = 49, - CapabilityImageQuery = 50, - CapabilityDerivativeControl = 51, - CapabilityInterpolationFunction = 52, - CapabilityTransformFeedback = 53, - CapabilityGeometryStreams = 54, - CapabilityStorageImageReadWithoutFormat = 55, - CapabilityStorageImageWriteWithoutFormat = 56, - CapabilityMultiViewport = 57, - CapabilitySubgroupDispatch = 58, - CapabilityNamedBarrier = 59, - CapabilityPipeStorage = 60, - CapabilityGroupNonUniform = 61, - CapabilityGroupNonUniformVote = 62, - CapabilityGroupNonUniformArithmetic = 63, - CapabilityGroupNonUniformBallot = 64, - CapabilityGroupNonUniformShuffle = 65, - CapabilityGroupNonUniformShuffleRelative = 66, - CapabilityGroupNonUniformClustered = 67, - CapabilityGroupNonUniformQuad = 68, - CapabilityShaderLayer = 69, - CapabilityShaderViewportIndex = 70, - CapabilityFragmentShadingRateKHR = 4422, - CapabilitySubgroupBallotKHR = 4423, - CapabilityDrawParameters = 4427, - CapabilitySubgroupVoteKHR = 4431, - CapabilityStorageBuffer16BitAccess = 4433, - CapabilityStorageUniformBufferBlock16 = 4433, - CapabilityStorageUniform16 = 4434, - CapabilityUniformAndStorageBuffer16BitAccess = 4434, - CapabilityStoragePushConstant16 = 4435, - CapabilityStorageInputOutput16 = 4436, - CapabilityDeviceGroup = 4437, - CapabilityMultiView = 4439, - CapabilityVariablePointersStorageBuffer = 4441, - CapabilityVariablePointers = 4442, - CapabilityAtomicStorageOps = 4445, - CapabilitySampleMaskPostDepthCoverage = 4447, - CapabilityStorageBuffer8BitAccess = 4448, - CapabilityUniformAndStorageBuffer8BitAccess = 4449, - CapabilityStoragePushConstant8 = 4450, - CapabilityDenormPreserve = 4464, - CapabilityDenormFlushToZero = 4465, - CapabilitySignedZeroInfNanPreserve = 4466, - CapabilityRoundingModeRTE = 4467, - CapabilityRoundingModeRTZ = 4468, - CapabilityRayQueryProvisionalKHR = 4471, - CapabilityRayQueryKHR = 4472, - CapabilityRayTraversalPrimitiveCullingKHR = 4478, - CapabilityRayTracingKHR = 4479, - CapabilityFloat16ImageAMD = 5008, - CapabilityImageGatherBiasLodAMD = 5009, - CapabilityFragmentMaskAMD = 5010, - CapabilityStencilExportEXT = 5013, - CapabilityImageReadWriteLodAMD = 5015, - CapabilityInt64ImageEXT = 5016, - CapabilityShaderClockKHR = 5055, - CapabilitySampleMaskOverrideCoverageNV = 5249, - CapabilityGeometryShaderPassthroughNV = 5251, - CapabilityShaderViewportIndexLayerEXT = 5254, - CapabilityShaderViewportIndexLayerNV = 5254, - CapabilityShaderViewportMaskNV = 5255, - CapabilityShaderStereoViewNV = 5259, - CapabilityPerViewAttributesNV = 5260, - CapabilityFragmentFullyCoveredEXT = 5265, - CapabilityMeshShadingNV = 5266, - CapabilityImageFootprintNV = 5282, - CapabilityFragmentBarycentricNV = 5284, - CapabilityComputeDerivativeGroupQuadsNV = 5288, - CapabilityFragmentDensityEXT = 5291, - CapabilityShadingRateNV = 5291, - CapabilityGroupNonUniformPartitionedNV = 5297, - CapabilityShaderNonUniform = 5301, - CapabilityShaderNonUniformEXT = 5301, - CapabilityRuntimeDescriptorArray = 5302, - CapabilityRuntimeDescriptorArrayEXT = 5302, - CapabilityInputAttachmentArrayDynamicIndexing = 5303, - CapabilityInputAttachmentArrayDynamicIndexingEXT = 5303, - CapabilityUniformTexelBufferArrayDynamicIndexing = 5304, - CapabilityUniformTexelBufferArrayDynamicIndexingEXT = 5304, - CapabilityStorageTexelBufferArrayDynamicIndexing = 5305, - CapabilityStorageTexelBufferArrayDynamicIndexingEXT = 5305, - CapabilityUniformBufferArrayNonUniformIndexing = 5306, - CapabilityUniformBufferArrayNonUniformIndexingEXT = 5306, - CapabilitySampledImageArrayNonUniformIndexing = 5307, - CapabilitySampledImageArrayNonUniformIndexingEXT = 5307, - CapabilityStorageBufferArrayNonUniformIndexing = 5308, - CapabilityStorageBufferArrayNonUniformIndexingEXT = 5308, - CapabilityStorageImageArrayNonUniformIndexing = 5309, - CapabilityStorageImageArrayNonUniformIndexingEXT = 5309, - CapabilityInputAttachmentArrayNonUniformIndexing = 5310, - CapabilityInputAttachmentArrayNonUniformIndexingEXT = 5310, - CapabilityUniformTexelBufferArrayNonUniformIndexing = 5311, - CapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311, - CapabilityStorageTexelBufferArrayNonUniformIndexing = 5312, - CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312, - CapabilityRayTracingNV = 5340, - CapabilityVulkanMemoryModel = 5345, - CapabilityVulkanMemoryModelKHR = 5345, - CapabilityVulkanMemoryModelDeviceScope = 5346, - CapabilityVulkanMemoryModelDeviceScopeKHR = 5346, - CapabilityPhysicalStorageBufferAddresses = 5347, - CapabilityPhysicalStorageBufferAddressesEXT = 5347, - CapabilityComputeDerivativeGroupLinearNV = 5350, - CapabilityRayTracingProvisionalKHR = 5353, - CapabilityCooperativeMatrixNV = 5357, - CapabilityFragmentShaderSampleInterlockEXT = 5363, - CapabilityFragmentShaderShadingRateInterlockEXT = 5372, - CapabilityShaderSMBuiltinsNV = 5373, - CapabilityFragmentShaderPixelInterlockEXT = 5378, - CapabilityDemoteToHelperInvocationEXT = 5379, - CapabilitySubgroupShuffleINTEL = 5568, - CapabilitySubgroupBufferBlockIOINTEL = 5569, - CapabilitySubgroupImageBlockIOINTEL = 5570, - CapabilitySubgroupImageMediaBlockIOINTEL = 5579, - CapabilityIntegerFunctions2INTEL = 5584, - CapabilityFunctionPointersINTEL = 5603, - CapabilityIndirectReferencesINTEL = 5604, - CapabilitySubgroupAvcMotionEstimationINTEL = 5696, - CapabilitySubgroupAvcMotionEstimationIntraINTEL = 5697, - CapabilitySubgroupAvcMotionEstimationChromaINTEL = 5698, - CapabilityFPGAMemoryAttributesINTEL = 5824, - CapabilityUnstructuredLoopControlsINTEL = 5886, - CapabilityFPGALoopControlsINTEL = 5888, - CapabilityKernelAttributesINTEL = 5892, - CapabilityFPGAKernelAttributesINTEL = 5897, - CapabilityBlockingPipesINTEL = 5945, - CapabilityFPGARegINTEL = 5948, - CapabilityAtomicFloat32AddEXT = 6033, - CapabilityAtomicFloat64AddEXT = 6034, - CapabilityMax = 0x7fffffff, -}; - -enum RayFlagsShift { - RayFlagsOpaqueKHRShift = 0, - RayFlagsNoOpaqueKHRShift = 1, - RayFlagsTerminateOnFirstHitKHRShift = 2, - RayFlagsSkipClosestHitShaderKHRShift = 3, - RayFlagsCullBackFacingTrianglesKHRShift = 4, - RayFlagsCullFrontFacingTrianglesKHRShift = 5, - RayFlagsCullOpaqueKHRShift = 6, - RayFlagsCullNoOpaqueKHRShift = 7, - RayFlagsSkipTrianglesKHRShift = 8, - RayFlagsSkipAABBsKHRShift = 9, - RayFlagsMax = 0x7fffffff, -}; - -enum RayFlagsMask { - RayFlagsMaskNone = 0, - RayFlagsOpaqueKHRMask = 0x00000001, - RayFlagsNoOpaqueKHRMask = 0x00000002, - RayFlagsTerminateOnFirstHitKHRMask = 0x00000004, - RayFlagsSkipClosestHitShaderKHRMask = 0x00000008, - RayFlagsCullBackFacingTrianglesKHRMask = 0x00000010, - RayFlagsCullFrontFacingTrianglesKHRMask = 0x00000020, - RayFlagsCullOpaqueKHRMask = 0x00000040, - RayFlagsCullNoOpaqueKHRMask = 0x00000080, - RayFlagsSkipTrianglesKHRMask = 0x00000100, - RayFlagsSkipAABBsKHRMask = 0x00000200, -}; - -enum RayQueryIntersection { - RayQueryIntersectionRayQueryCandidateIntersectionKHR = 0, - RayQueryIntersectionRayQueryCommittedIntersectionKHR = 1, - RayQueryIntersectionMax = 0x7fffffff, -}; - -enum RayQueryCommittedIntersectionType { - RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionNoneKHR = 0, - RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionTriangleKHR = 1, - RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionGeneratedKHR = 2, - RayQueryCommittedIntersectionTypeMax = 0x7fffffff, -}; - -enum RayQueryCandidateIntersectionType { - RayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionTriangleKHR = 0, - RayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionAABBKHR = 1, - RayQueryCandidateIntersectionTypeMax = 0x7fffffff, -}; - -enum FragmentShadingRateShift { - FragmentShadingRateVertical2PixelsShift = 0, - FragmentShadingRateVertical4PixelsShift = 1, - FragmentShadingRateHorizontal2PixelsShift = 2, - FragmentShadingRateHorizontal4PixelsShift = 3, - FragmentShadingRateMax = 0x7fffffff, -}; - -enum FragmentShadingRateMask { - FragmentShadingRateMaskNone = 0, - FragmentShadingRateVertical2PixelsMask = 0x00000001, - FragmentShadingRateVertical4PixelsMask = 0x00000002, - FragmentShadingRateHorizontal2PixelsMask = 0x00000004, - FragmentShadingRateHorizontal4PixelsMask = 0x00000008, -}; - -enum Op { - OpNop = 0, - OpUndef = 1, - OpSourceContinued = 2, - OpSource = 3, - OpSourceExtension = 4, - OpName = 5, - OpMemberName = 6, - OpString = 7, - OpLine = 8, - OpExtension = 10, - OpExtInstImport = 11, - OpExtInst = 12, - OpMemoryModel = 14, - OpEntryPoint = 15, - OpExecutionMode = 16, - OpCapability = 17, - OpTypeVoid = 19, - OpTypeBool = 20, - OpTypeInt = 21, - OpTypeFloat = 22, - OpTypeVector = 23, - OpTypeMatrix = 24, - OpTypeImage = 25, - OpTypeSampler = 26, - OpTypeSampledImage = 27, - OpTypeArray = 28, - OpTypeRuntimeArray = 29, - OpTypeStruct = 30, - OpTypeOpaque = 31, - OpTypePointer = 32, - OpTypeFunction = 33, - OpTypeEvent = 34, - OpTypeDeviceEvent = 35, - OpTypeReserveId = 36, - OpTypeQueue = 37, - OpTypePipe = 38, - OpTypeForwardPointer = 39, - OpConstantTrue = 41, - OpConstantFalse = 42, - OpConstant = 43, - OpConstantComposite = 44, - OpConstantSampler = 45, - OpConstantNull = 46, - OpSpecConstantTrue = 48, - OpSpecConstantFalse = 49, - OpSpecConstant = 50, - OpSpecConstantComposite = 51, - OpSpecConstantOp = 52, - OpFunction = 54, - OpFunctionParameter = 55, - OpFunctionEnd = 56, - OpFunctionCall = 57, - OpVariable = 59, - OpImageTexelPointer = 60, - OpLoad = 61, - OpStore = 62, - OpCopyMemory = 63, - OpCopyMemorySized = 64, - OpAccessChain = 65, - OpInBoundsAccessChain = 66, - OpPtrAccessChain = 67, - OpArrayLength = 68, - OpGenericPtrMemSemantics = 69, - OpInBoundsPtrAccessChain = 70, - OpDecorate = 71, - OpMemberDecorate = 72, - OpDecorationGroup = 73, - OpGroupDecorate = 74, - OpGroupMemberDecorate = 75, - OpVectorExtractDynamic = 77, - OpVectorInsertDynamic = 78, - OpVectorShuffle = 79, - OpCompositeConstruct = 80, - OpCompositeExtract = 81, - OpCompositeInsert = 82, - OpCopyObject = 83, - OpTranspose = 84, - OpSampledImage = 86, - OpImageSampleImplicitLod = 87, - OpImageSampleExplicitLod = 88, - OpImageSampleDrefImplicitLod = 89, - OpImageSampleDrefExplicitLod = 90, - OpImageSampleProjImplicitLod = 91, - OpImageSampleProjExplicitLod = 92, - OpImageSampleProjDrefImplicitLod = 93, - OpImageSampleProjDrefExplicitLod = 94, - OpImageFetch = 95, - OpImageGather = 96, - OpImageDrefGather = 97, - OpImageRead = 98, - OpImageWrite = 99, - OpImage = 100, - OpImageQueryFormat = 101, - OpImageQueryOrder = 102, - OpImageQuerySizeLod = 103, - OpImageQuerySize = 104, - OpImageQueryLod = 105, - OpImageQueryLevels = 106, - OpImageQuerySamples = 107, - OpConvertFToU = 109, - OpConvertFToS = 110, - OpConvertSToF = 111, - OpConvertUToF = 112, - OpUConvert = 113, - OpSConvert = 114, - OpFConvert = 115, - OpQuantizeToF16 = 116, - OpConvertPtrToU = 117, - OpSatConvertSToU = 118, - OpSatConvertUToS = 119, - OpConvertUToPtr = 120, - OpPtrCastToGeneric = 121, - OpGenericCastToPtr = 122, - OpGenericCastToPtrExplicit = 123, - OpBitcast = 124, - OpSNegate = 126, - OpFNegate = 127, - OpIAdd = 128, - OpFAdd = 129, - OpISub = 130, - OpFSub = 131, - OpIMul = 132, - OpFMul = 133, - OpUDiv = 134, - OpSDiv = 135, - OpFDiv = 136, - OpUMod = 137, - OpSRem = 138, - OpSMod = 139, - OpFRem = 140, - OpFMod = 141, - OpVectorTimesScalar = 142, - OpMatrixTimesScalar = 143, - OpVectorTimesMatrix = 144, - OpMatrixTimesVector = 145, - OpMatrixTimesMatrix = 146, - OpOuterProduct = 147, - OpDot = 148, - OpIAddCarry = 149, - OpISubBorrow = 150, - OpUMulExtended = 151, - OpSMulExtended = 152, - OpAny = 154, - OpAll = 155, - OpIsNan = 156, - OpIsInf = 157, - OpIsFinite = 158, - OpIsNormal = 159, - OpSignBitSet = 160, - OpLessOrGreater = 161, - OpOrdered = 162, - OpUnordered = 163, - OpLogicalEqual = 164, - OpLogicalNotEqual = 165, - OpLogicalOr = 166, - OpLogicalAnd = 167, - OpLogicalNot = 168, - OpSelect = 169, - OpIEqual = 170, - OpINotEqual = 171, - OpUGreaterThan = 172, - OpSGreaterThan = 173, - OpUGreaterThanEqual = 174, - OpSGreaterThanEqual = 175, - OpULessThan = 176, - OpSLessThan = 177, - OpULessThanEqual = 178, - OpSLessThanEqual = 179, - OpFOrdEqual = 180, - OpFUnordEqual = 181, - OpFOrdNotEqual = 182, - OpFUnordNotEqual = 183, - OpFOrdLessThan = 184, - OpFUnordLessThan = 185, - OpFOrdGreaterThan = 186, - OpFUnordGreaterThan = 187, - OpFOrdLessThanEqual = 188, - OpFUnordLessThanEqual = 189, - OpFOrdGreaterThanEqual = 190, - OpFUnordGreaterThanEqual = 191, - OpShiftRightLogical = 194, - OpShiftRightArithmetic = 195, - OpShiftLeftLogical = 196, - OpBitwiseOr = 197, - OpBitwiseXor = 198, - OpBitwiseAnd = 199, - OpNot = 200, - OpBitFieldInsert = 201, - OpBitFieldSExtract = 202, - OpBitFieldUExtract = 203, - OpBitReverse = 204, - OpBitCount = 205, - OpDPdx = 207, - OpDPdy = 208, - OpFwidth = 209, - OpDPdxFine = 210, - OpDPdyFine = 211, - OpFwidthFine = 212, - OpDPdxCoarse = 213, - OpDPdyCoarse = 214, - OpFwidthCoarse = 215, - OpEmitVertex = 218, - OpEndPrimitive = 219, - OpEmitStreamVertex = 220, - OpEndStreamPrimitive = 221, - OpControlBarrier = 224, - OpMemoryBarrier = 225, - OpAtomicLoad = 227, - OpAtomicStore = 228, - OpAtomicExchange = 229, - OpAtomicCompareExchange = 230, - OpAtomicCompareExchangeWeak = 231, - OpAtomicIIncrement = 232, - OpAtomicIDecrement = 233, - OpAtomicIAdd = 234, - OpAtomicISub = 235, - OpAtomicSMin = 236, - OpAtomicUMin = 237, - OpAtomicSMax = 238, - OpAtomicUMax = 239, - OpAtomicAnd = 240, - OpAtomicOr = 241, - OpAtomicXor = 242, - OpPhi = 245, - OpLoopMerge = 246, - OpSelectionMerge = 247, - OpLabel = 248, - OpBranch = 249, - OpBranchConditional = 250, - OpSwitch = 251, - OpKill = 252, - OpReturn = 253, - OpReturnValue = 254, - OpUnreachable = 255, - OpLifetimeStart = 256, - OpLifetimeStop = 257, - OpGroupAsyncCopy = 259, - OpGroupWaitEvents = 260, - OpGroupAll = 261, - OpGroupAny = 262, - OpGroupBroadcast = 263, - OpGroupIAdd = 264, - OpGroupFAdd = 265, - OpGroupFMin = 266, - OpGroupUMin = 267, - OpGroupSMin = 268, - OpGroupFMax = 269, - OpGroupUMax = 270, - OpGroupSMax = 271, - OpReadPipe = 274, - OpWritePipe = 275, - OpReservedReadPipe = 276, - OpReservedWritePipe = 277, - OpReserveReadPipePackets = 278, - OpReserveWritePipePackets = 279, - OpCommitReadPipe = 280, - OpCommitWritePipe = 281, - OpIsValidReserveId = 282, - OpGetNumPipePackets = 283, - OpGetMaxPipePackets = 284, - OpGroupReserveReadPipePackets = 285, - OpGroupReserveWritePipePackets = 286, - OpGroupCommitReadPipe = 287, - OpGroupCommitWritePipe = 288, - OpEnqueueMarker = 291, - OpEnqueueKernel = 292, - OpGetKernelNDrangeSubGroupCount = 293, - OpGetKernelNDrangeMaxSubGroupSize = 294, - OpGetKernelWorkGroupSize = 295, - OpGetKernelPreferredWorkGroupSizeMultiple = 296, - OpRetainEvent = 297, - OpReleaseEvent = 298, - OpCreateUserEvent = 299, - OpIsValidEvent = 300, - OpSetUserEventStatus = 301, - OpCaptureEventProfilingInfo = 302, - OpGetDefaultQueue = 303, - OpBuildNDRange = 304, - OpImageSparseSampleImplicitLod = 305, - OpImageSparseSampleExplicitLod = 306, - OpImageSparseSampleDrefImplicitLod = 307, - OpImageSparseSampleDrefExplicitLod = 308, - OpImageSparseSampleProjImplicitLod = 309, - OpImageSparseSampleProjExplicitLod = 310, - OpImageSparseSampleProjDrefImplicitLod = 311, - OpImageSparseSampleProjDrefExplicitLod = 312, - OpImageSparseFetch = 313, - OpImageSparseGather = 314, - OpImageSparseDrefGather = 315, - OpImageSparseTexelsResident = 316, - OpNoLine = 317, - OpAtomicFlagTestAndSet = 318, - OpAtomicFlagClear = 319, - OpImageSparseRead = 320, - OpSizeOf = 321, - OpTypePipeStorage = 322, - OpConstantPipeStorage = 323, - OpCreatePipeFromPipeStorage = 324, - OpGetKernelLocalSizeForSubgroupCount = 325, - OpGetKernelMaxNumSubgroups = 326, - OpTypeNamedBarrier = 327, - OpNamedBarrierInitialize = 328, - OpMemoryNamedBarrier = 329, - OpModuleProcessed = 330, - OpExecutionModeId = 331, - OpDecorateId = 332, - OpGroupNonUniformElect = 333, - OpGroupNonUniformAll = 334, - OpGroupNonUniformAny = 335, - OpGroupNonUniformAllEqual = 336, - OpGroupNonUniformBroadcast = 337, - OpGroupNonUniformBroadcastFirst = 338, - OpGroupNonUniformBallot = 339, - OpGroupNonUniformInverseBallot = 340, - OpGroupNonUniformBallotBitExtract = 341, - OpGroupNonUniformBallotBitCount = 342, - OpGroupNonUniformBallotFindLSB = 343, - OpGroupNonUniformBallotFindMSB = 344, - OpGroupNonUniformShuffle = 345, - OpGroupNonUniformShuffleXor = 346, - OpGroupNonUniformShuffleUp = 347, - OpGroupNonUniformShuffleDown = 348, - OpGroupNonUniformIAdd = 349, - OpGroupNonUniformFAdd = 350, - OpGroupNonUniformIMul = 351, - OpGroupNonUniformFMul = 352, - OpGroupNonUniformSMin = 353, - OpGroupNonUniformUMin = 354, - OpGroupNonUniformFMin = 355, - OpGroupNonUniformSMax = 356, - OpGroupNonUniformUMax = 357, - OpGroupNonUniformFMax = 358, - OpGroupNonUniformBitwiseAnd = 359, - OpGroupNonUniformBitwiseOr = 360, - OpGroupNonUniformBitwiseXor = 361, - OpGroupNonUniformLogicalAnd = 362, - OpGroupNonUniformLogicalOr = 363, - OpGroupNonUniformLogicalXor = 364, - OpGroupNonUniformQuadBroadcast = 365, - OpGroupNonUniformQuadSwap = 366, - OpCopyLogical = 400, - OpPtrEqual = 401, - OpPtrNotEqual = 402, - OpPtrDiff = 403, - OpTerminateInvocation = 4416, - OpSubgroupBallotKHR = 4421, - OpSubgroupFirstInvocationKHR = 4422, - OpSubgroupAllKHR = 4428, - OpSubgroupAnyKHR = 4429, - OpSubgroupAllEqualKHR = 4430, - OpSubgroupReadInvocationKHR = 4432, - OpTraceRayKHR = 4445, - OpExecuteCallableKHR = 4446, - OpConvertUToAccelerationStructureKHR = 4447, - OpIgnoreIntersectionKHR = 4448, - OpTerminateRayKHR = 4449, - OpTypeRayQueryKHR = 4472, - OpRayQueryInitializeKHR = 4473, - OpRayQueryTerminateKHR = 4474, - OpRayQueryGenerateIntersectionKHR = 4475, - OpRayQueryConfirmIntersectionKHR = 4476, - OpRayQueryProceedKHR = 4477, - OpRayQueryGetIntersectionTypeKHR = 4479, - OpGroupIAddNonUniformAMD = 5000, - OpGroupFAddNonUniformAMD = 5001, - OpGroupFMinNonUniformAMD = 5002, - OpGroupUMinNonUniformAMD = 5003, - OpGroupSMinNonUniformAMD = 5004, - OpGroupFMaxNonUniformAMD = 5005, - OpGroupUMaxNonUniformAMD = 5006, - OpGroupSMaxNonUniformAMD = 5007, - OpFragmentMaskFetchAMD = 5011, - OpFragmentFetchAMD = 5012, - OpReadClockKHR = 5056, - OpImageSampleFootprintNV = 5283, - OpGroupNonUniformPartitionNV = 5296, - OpWritePackedPrimitiveIndices4x8NV = 5299, - OpReportIntersectionKHR = 5334, - OpReportIntersectionNV = 5334, - OpIgnoreIntersectionNV = 5335, - OpTerminateRayNV = 5336, - OpTraceNV = 5337, - OpTypeAccelerationStructureKHR = 5341, - OpTypeAccelerationStructureNV = 5341, - OpExecuteCallableNV = 5344, - OpTypeCooperativeMatrixNV = 5358, - OpCooperativeMatrixLoadNV = 5359, - OpCooperativeMatrixStoreNV = 5360, - OpCooperativeMatrixMulAddNV = 5361, - OpCooperativeMatrixLengthNV = 5362, - OpBeginInvocationInterlockEXT = 5364, - OpEndInvocationInterlockEXT = 5365, - OpDemoteToHelperInvocationEXT = 5380, - OpIsHelperInvocationEXT = 5381, - OpSubgroupShuffleINTEL = 5571, - OpSubgroupShuffleDownINTEL = 5572, - OpSubgroupShuffleUpINTEL = 5573, - OpSubgroupShuffleXorINTEL = 5574, - OpSubgroupBlockReadINTEL = 5575, - OpSubgroupBlockWriteINTEL = 5576, - OpSubgroupImageBlockReadINTEL = 5577, - OpSubgroupImageBlockWriteINTEL = 5578, - OpSubgroupImageMediaBlockReadINTEL = 5580, - OpSubgroupImageMediaBlockWriteINTEL = 5581, - OpUCountLeadingZerosINTEL = 5585, - OpUCountTrailingZerosINTEL = 5586, - OpAbsISubINTEL = 5587, - OpAbsUSubINTEL = 5588, - OpIAddSatINTEL = 5589, - OpUAddSatINTEL = 5590, - OpIAverageINTEL = 5591, - OpUAverageINTEL = 5592, - OpIAverageRoundedINTEL = 5593, - OpUAverageRoundedINTEL = 5594, - OpISubSatINTEL = 5595, - OpUSubSatINTEL = 5596, - OpIMul32x16INTEL = 5597, - OpUMul32x16INTEL = 5598, - OpFunctionPointerINTEL = 5600, - OpFunctionPointerCallINTEL = 5601, - OpDecorateString = 5632, - OpDecorateStringGOOGLE = 5632, - OpMemberDecorateString = 5633, - OpMemberDecorateStringGOOGLE = 5633, - OpVmeImageINTEL = 5699, - OpTypeVmeImageINTEL = 5700, - OpTypeAvcImePayloadINTEL = 5701, - OpTypeAvcRefPayloadINTEL = 5702, - OpTypeAvcSicPayloadINTEL = 5703, - OpTypeAvcMcePayloadINTEL = 5704, - OpTypeAvcMceResultINTEL = 5705, - OpTypeAvcImeResultINTEL = 5706, - OpTypeAvcImeResultSingleReferenceStreamoutINTEL = 5707, - OpTypeAvcImeResultDualReferenceStreamoutINTEL = 5708, - OpTypeAvcImeSingleReferenceStreaminINTEL = 5709, - OpTypeAvcImeDualReferenceStreaminINTEL = 5710, - OpTypeAvcRefResultINTEL = 5711, - OpTypeAvcSicResultINTEL = 5712, - OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL = 5713, - OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL = 5714, - OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL = 5715, - OpSubgroupAvcMceSetInterShapePenaltyINTEL = 5716, - OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL = 5717, - OpSubgroupAvcMceSetInterDirectionPenaltyINTEL = 5718, - OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL = 5719, - OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL = 5720, - OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL = 5721, - OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL = 5722, - OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL = 5723, - OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL = 5724, - OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL = 5725, - OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL = 5726, - OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL = 5727, - OpSubgroupAvcMceSetAcOnlyHaarINTEL = 5728, - OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL = 5729, - OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL = 5730, - OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL = 5731, - OpSubgroupAvcMceConvertToImePayloadINTEL = 5732, - OpSubgroupAvcMceConvertToImeResultINTEL = 5733, - OpSubgroupAvcMceConvertToRefPayloadINTEL = 5734, - OpSubgroupAvcMceConvertToRefResultINTEL = 5735, - OpSubgroupAvcMceConvertToSicPayloadINTEL = 5736, - OpSubgroupAvcMceConvertToSicResultINTEL = 5737, - OpSubgroupAvcMceGetMotionVectorsINTEL = 5738, - OpSubgroupAvcMceGetInterDistortionsINTEL = 5739, - OpSubgroupAvcMceGetBestInterDistortionsINTEL = 5740, - OpSubgroupAvcMceGetInterMajorShapeINTEL = 5741, - OpSubgroupAvcMceGetInterMinorShapeINTEL = 5742, - OpSubgroupAvcMceGetInterDirectionsINTEL = 5743, - OpSubgroupAvcMceGetInterMotionVectorCountINTEL = 5744, - OpSubgroupAvcMceGetInterReferenceIdsINTEL = 5745, - OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL = 5746, - OpSubgroupAvcImeInitializeINTEL = 5747, - OpSubgroupAvcImeSetSingleReferenceINTEL = 5748, - OpSubgroupAvcImeSetDualReferenceINTEL = 5749, - OpSubgroupAvcImeRefWindowSizeINTEL = 5750, - OpSubgroupAvcImeAdjustRefOffsetINTEL = 5751, - OpSubgroupAvcImeConvertToMcePayloadINTEL = 5752, - OpSubgroupAvcImeSetMaxMotionVectorCountINTEL = 5753, - OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL = 5754, - OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL = 5755, - OpSubgroupAvcImeSetWeightedSadINTEL = 5756, - OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL = 5757, - OpSubgroupAvcImeEvaluateWithDualReferenceINTEL = 5758, - OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL = 5759, - OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL = 5760, - OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL = 5761, - OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL = 5762, - OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL = 5763, - OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL = 5764, - OpSubgroupAvcImeConvertToMceResultINTEL = 5765, - OpSubgroupAvcImeGetSingleReferenceStreaminINTEL = 5766, - OpSubgroupAvcImeGetDualReferenceStreaminINTEL = 5767, - OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL = 5768, - OpSubgroupAvcImeStripDualReferenceStreamoutINTEL = 5769, - OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL = 5770, - OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL = 5771, - OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL = 5772, - OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL = 5773, - OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL = 5774, - OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL = 5775, - OpSubgroupAvcImeGetBorderReachedINTEL = 5776, - OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL = 5777, - OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL = 5778, - OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL = 5779, - OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL = 5780, - OpSubgroupAvcFmeInitializeINTEL = 5781, - OpSubgroupAvcBmeInitializeINTEL = 5782, - OpSubgroupAvcRefConvertToMcePayloadINTEL = 5783, - OpSubgroupAvcRefSetBidirectionalMixDisableINTEL = 5784, - OpSubgroupAvcRefSetBilinearFilterEnableINTEL = 5785, - OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL = 5786, - OpSubgroupAvcRefEvaluateWithDualReferenceINTEL = 5787, - OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL = 5788, - OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL = 5789, - OpSubgroupAvcRefConvertToMceResultINTEL = 5790, - OpSubgroupAvcSicInitializeINTEL = 5791, - OpSubgroupAvcSicConfigureSkcINTEL = 5792, - OpSubgroupAvcSicConfigureIpeLumaINTEL = 5793, - OpSubgroupAvcSicConfigureIpeLumaChromaINTEL = 5794, - OpSubgroupAvcSicGetMotionVectorMaskINTEL = 5795, - OpSubgroupAvcSicConvertToMcePayloadINTEL = 5796, - OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL = 5797, - OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL = 5798, - OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL = 5799, - OpSubgroupAvcSicSetBilinearFilterEnableINTEL = 5800, - OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL = 5801, - OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL = 5802, - OpSubgroupAvcSicEvaluateIpeINTEL = 5803, - OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL = 5804, - OpSubgroupAvcSicEvaluateWithDualReferenceINTEL = 5805, - OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL = 5806, - OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL = 5807, - OpSubgroupAvcSicConvertToMceResultINTEL = 5808, - OpSubgroupAvcSicGetIpeLumaShapeINTEL = 5809, - OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL = 5810, - OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL = 5811, - OpSubgroupAvcSicGetPackedIpeLumaModesINTEL = 5812, - OpSubgroupAvcSicGetIpeChromaModeINTEL = 5813, - OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL = 5814, - OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL = 5815, - OpSubgroupAvcSicGetInterRawSadsINTEL = 5816, - OpLoopControlINTEL = 5887, - OpReadPipeBlockingINTEL = 5946, - OpWritePipeBlockingINTEL = 5947, - OpFPGARegINTEL = 5949, - OpRayQueryGetRayTMinKHR = 6016, - OpRayQueryGetRayFlagsKHR = 6017, - OpRayQueryGetIntersectionTKHR = 6018, - OpRayQueryGetIntersectionInstanceCustomIndexKHR = 6019, - OpRayQueryGetIntersectionInstanceIdKHR = 6020, - OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR = 6021, - OpRayQueryGetIntersectionGeometryIndexKHR = 6022, - OpRayQueryGetIntersectionPrimitiveIndexKHR = 6023, - OpRayQueryGetIntersectionBarycentricsKHR = 6024, - OpRayQueryGetIntersectionFrontFaceKHR = 6025, - OpRayQueryGetIntersectionCandidateAABBOpaqueKHR = 6026, - OpRayQueryGetIntersectionObjectRayDirectionKHR = 6027, - OpRayQueryGetIntersectionObjectRayOriginKHR = 6028, - OpRayQueryGetWorldRayDirectionKHR = 6029, - OpRayQueryGetWorldRayOriginKHR = 6030, - OpRayQueryGetIntersectionObjectToWorldKHR = 6031, - OpRayQueryGetIntersectionWorldToObjectKHR = 6032, - OpAtomicFAddEXT = 6035, - OpMax = 0x7fffffff, -}; - -#ifdef SPV_ENABLE_UTILITY_CODE -inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { - *hasResult = *hasResultType = false; - switch (opcode) { - default: /* unknown opcode */ break; - case OpNop: *hasResult = false; *hasResultType = false; break; - case OpUndef: *hasResult = true; *hasResultType = true; break; - case OpSourceContinued: *hasResult = false; *hasResultType = false; break; - case OpSource: *hasResult = false; *hasResultType = false; break; - case OpSourceExtension: *hasResult = false; *hasResultType = false; break; - case OpName: *hasResult = false; *hasResultType = false; break; - case OpMemberName: *hasResult = false; *hasResultType = false; break; - case OpString: *hasResult = true; *hasResultType = false; break; - case OpLine: *hasResult = false; *hasResultType = false; break; - case OpExtension: *hasResult = false; *hasResultType = false; break; - case OpExtInstImport: *hasResult = true; *hasResultType = false; break; - case OpExtInst: *hasResult = true; *hasResultType = true; break; - case OpMemoryModel: *hasResult = false; *hasResultType = false; break; - case OpEntryPoint: *hasResult = false; *hasResultType = false; break; - case OpExecutionMode: *hasResult = false; *hasResultType = false; break; - case OpCapability: *hasResult = false; *hasResultType = false; break; - case OpTypeVoid: *hasResult = true; *hasResultType = false; break; - case OpTypeBool: *hasResult = true; *hasResultType = false; break; - case OpTypeInt: *hasResult = true; *hasResultType = false; break; - case OpTypeFloat: *hasResult = true; *hasResultType = false; break; - case OpTypeVector: *hasResult = true; *hasResultType = false; break; - case OpTypeMatrix: *hasResult = true; *hasResultType = false; break; - case OpTypeImage: *hasResult = true; *hasResultType = false; break; - case OpTypeSampler: *hasResult = true; *hasResultType = false; break; - case OpTypeSampledImage: *hasResult = true; *hasResultType = false; break; - case OpTypeArray: *hasResult = true; *hasResultType = false; break; - case OpTypeRuntimeArray: *hasResult = true; *hasResultType = false; break; - case OpTypeStruct: *hasResult = true; *hasResultType = false; break; - case OpTypeOpaque: *hasResult = true; *hasResultType = false; break; - case OpTypePointer: *hasResult = true; *hasResultType = false; break; - case OpTypeFunction: *hasResult = true; *hasResultType = false; break; - case OpTypeEvent: *hasResult = true; *hasResultType = false; break; - case OpTypeDeviceEvent: *hasResult = true; *hasResultType = false; break; - case OpTypeReserveId: *hasResult = true; *hasResultType = false; break; - case OpTypeQueue: *hasResult = true; *hasResultType = false; break; - case OpTypePipe: *hasResult = true; *hasResultType = false; break; - case OpTypeForwardPointer: *hasResult = false; *hasResultType = false; break; - case OpConstantTrue: *hasResult = true; *hasResultType = true; break; - case OpConstantFalse: *hasResult = true; *hasResultType = true; break; - case OpConstant: *hasResult = true; *hasResultType = true; break; - case OpConstantComposite: *hasResult = true; *hasResultType = true; break; - case OpConstantSampler: *hasResult = true; *hasResultType = true; break; - case OpConstantNull: *hasResult = true; *hasResultType = true; break; - case OpSpecConstantTrue: *hasResult = true; *hasResultType = true; break; - case OpSpecConstantFalse: *hasResult = true; *hasResultType = true; break; - case OpSpecConstant: *hasResult = true; *hasResultType = true; break; - case OpSpecConstantComposite: *hasResult = true; *hasResultType = true; break; - case OpSpecConstantOp: *hasResult = true; *hasResultType = true; break; - case OpFunction: *hasResult = true; *hasResultType = true; break; - case OpFunctionParameter: *hasResult = true; *hasResultType = true; break; - case OpFunctionEnd: *hasResult = false; *hasResultType = false; break; - case OpFunctionCall: *hasResult = true; *hasResultType = true; break; - case OpVariable: *hasResult = true; *hasResultType = true; break; - case OpImageTexelPointer: *hasResult = true; *hasResultType = true; break; - case OpLoad: *hasResult = true; *hasResultType = true; break; - case OpStore: *hasResult = false; *hasResultType = false; break; - case OpCopyMemory: *hasResult = false; *hasResultType = false; break; - case OpCopyMemorySized: *hasResult = false; *hasResultType = false; break; - case OpAccessChain: *hasResult = true; *hasResultType = true; break; - case OpInBoundsAccessChain: *hasResult = true; *hasResultType = true; break; - case OpPtrAccessChain: *hasResult = true; *hasResultType = true; break; - case OpArrayLength: *hasResult = true; *hasResultType = true; break; - case OpGenericPtrMemSemantics: *hasResult = true; *hasResultType = true; break; - case OpInBoundsPtrAccessChain: *hasResult = true; *hasResultType = true; break; - case OpDecorate: *hasResult = false; *hasResultType = false; break; - case OpMemberDecorate: *hasResult = false; *hasResultType = false; break; - case OpDecorationGroup: *hasResult = true; *hasResultType = false; break; - case OpGroupDecorate: *hasResult = false; *hasResultType = false; break; - case OpGroupMemberDecorate: *hasResult = false; *hasResultType = false; break; - case OpVectorExtractDynamic: *hasResult = true; *hasResultType = true; break; - case OpVectorInsertDynamic: *hasResult = true; *hasResultType = true; break; - case OpVectorShuffle: *hasResult = true; *hasResultType = true; break; - case OpCompositeConstruct: *hasResult = true; *hasResultType = true; break; - case OpCompositeExtract: *hasResult = true; *hasResultType = true; break; - case OpCompositeInsert: *hasResult = true; *hasResultType = true; break; - case OpCopyObject: *hasResult = true; *hasResultType = true; break; - case OpTranspose: *hasResult = true; *hasResultType = true; break; - case OpSampledImage: *hasResult = true; *hasResultType = true; break; - case OpImageSampleImplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSampleExplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSampleDrefImplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSampleDrefExplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSampleProjImplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSampleProjExplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSampleProjDrefImplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSampleProjDrefExplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageFetch: *hasResult = true; *hasResultType = true; break; - case OpImageGather: *hasResult = true; *hasResultType = true; break; - case OpImageDrefGather: *hasResult = true; *hasResultType = true; break; - case OpImageRead: *hasResult = true; *hasResultType = true; break; - case OpImageWrite: *hasResult = false; *hasResultType = false; break; - case OpImage: *hasResult = true; *hasResultType = true; break; - case OpImageQueryFormat: *hasResult = true; *hasResultType = true; break; - case OpImageQueryOrder: *hasResult = true; *hasResultType = true; break; - case OpImageQuerySizeLod: *hasResult = true; *hasResultType = true; break; - case OpImageQuerySize: *hasResult = true; *hasResultType = true; break; - case OpImageQueryLod: *hasResult = true; *hasResultType = true; break; - case OpImageQueryLevels: *hasResult = true; *hasResultType = true; break; - case OpImageQuerySamples: *hasResult = true; *hasResultType = true; break; - case OpConvertFToU: *hasResult = true; *hasResultType = true; break; - case OpConvertFToS: *hasResult = true; *hasResultType = true; break; - case OpConvertSToF: *hasResult = true; *hasResultType = true; break; - case OpConvertUToF: *hasResult = true; *hasResultType = true; break; - case OpUConvert: *hasResult = true; *hasResultType = true; break; - case OpSConvert: *hasResult = true; *hasResultType = true; break; - case OpFConvert: *hasResult = true; *hasResultType = true; break; - case OpQuantizeToF16: *hasResult = true; *hasResultType = true; break; - case OpConvertPtrToU: *hasResult = true; *hasResultType = true; break; - case OpSatConvertSToU: *hasResult = true; *hasResultType = true; break; - case OpSatConvertUToS: *hasResult = true; *hasResultType = true; break; - case OpConvertUToPtr: *hasResult = true; *hasResultType = true; break; - case OpPtrCastToGeneric: *hasResult = true; *hasResultType = true; break; - case OpGenericCastToPtr: *hasResult = true; *hasResultType = true; break; - case OpGenericCastToPtrExplicit: *hasResult = true; *hasResultType = true; break; - case OpBitcast: *hasResult = true; *hasResultType = true; break; - case OpSNegate: *hasResult = true; *hasResultType = true; break; - case OpFNegate: *hasResult = true; *hasResultType = true; break; - case OpIAdd: *hasResult = true; *hasResultType = true; break; - case OpFAdd: *hasResult = true; *hasResultType = true; break; - case OpISub: *hasResult = true; *hasResultType = true; break; - case OpFSub: *hasResult = true; *hasResultType = true; break; - case OpIMul: *hasResult = true; *hasResultType = true; break; - case OpFMul: *hasResult = true; *hasResultType = true; break; - case OpUDiv: *hasResult = true; *hasResultType = true; break; - case OpSDiv: *hasResult = true; *hasResultType = true; break; - case OpFDiv: *hasResult = true; *hasResultType = true; break; - case OpUMod: *hasResult = true; *hasResultType = true; break; - case OpSRem: *hasResult = true; *hasResultType = true; break; - case OpSMod: *hasResult = true; *hasResultType = true; break; - case OpFRem: *hasResult = true; *hasResultType = true; break; - case OpFMod: *hasResult = true; *hasResultType = true; break; - case OpVectorTimesScalar: *hasResult = true; *hasResultType = true; break; - case OpMatrixTimesScalar: *hasResult = true; *hasResultType = true; break; - case OpVectorTimesMatrix: *hasResult = true; *hasResultType = true; break; - case OpMatrixTimesVector: *hasResult = true; *hasResultType = true; break; - case OpMatrixTimesMatrix: *hasResult = true; *hasResultType = true; break; - case OpOuterProduct: *hasResult = true; *hasResultType = true; break; - case OpDot: *hasResult = true; *hasResultType = true; break; - case OpIAddCarry: *hasResult = true; *hasResultType = true; break; - case OpISubBorrow: *hasResult = true; *hasResultType = true; break; - case OpUMulExtended: *hasResult = true; *hasResultType = true; break; - case OpSMulExtended: *hasResult = true; *hasResultType = true; break; - case OpAny: *hasResult = true; *hasResultType = true; break; - case OpAll: *hasResult = true; *hasResultType = true; break; - case OpIsNan: *hasResult = true; *hasResultType = true; break; - case OpIsInf: *hasResult = true; *hasResultType = true; break; - case OpIsFinite: *hasResult = true; *hasResultType = true; break; - case OpIsNormal: *hasResult = true; *hasResultType = true; break; - case OpSignBitSet: *hasResult = true; *hasResultType = true; break; - case OpLessOrGreater: *hasResult = true; *hasResultType = true; break; - case OpOrdered: *hasResult = true; *hasResultType = true; break; - case OpUnordered: *hasResult = true; *hasResultType = true; break; - case OpLogicalEqual: *hasResult = true; *hasResultType = true; break; - case OpLogicalNotEqual: *hasResult = true; *hasResultType = true; break; - case OpLogicalOr: *hasResult = true; *hasResultType = true; break; - case OpLogicalAnd: *hasResult = true; *hasResultType = true; break; - case OpLogicalNot: *hasResult = true; *hasResultType = true; break; - case OpSelect: *hasResult = true; *hasResultType = true; break; - case OpIEqual: *hasResult = true; *hasResultType = true; break; - case OpINotEqual: *hasResult = true; *hasResultType = true; break; - case OpUGreaterThan: *hasResult = true; *hasResultType = true; break; - case OpSGreaterThan: *hasResult = true; *hasResultType = true; break; - case OpUGreaterThanEqual: *hasResult = true; *hasResultType = true; break; - case OpSGreaterThanEqual: *hasResult = true; *hasResultType = true; break; - case OpULessThan: *hasResult = true; *hasResultType = true; break; - case OpSLessThan: *hasResult = true; *hasResultType = true; break; - case OpULessThanEqual: *hasResult = true; *hasResultType = true; break; - case OpSLessThanEqual: *hasResult = true; *hasResultType = true; break; - case OpFOrdEqual: *hasResult = true; *hasResultType = true; break; - case OpFUnordEqual: *hasResult = true; *hasResultType = true; break; - case OpFOrdNotEqual: *hasResult = true; *hasResultType = true; break; - case OpFUnordNotEqual: *hasResult = true; *hasResultType = true; break; - case OpFOrdLessThan: *hasResult = true; *hasResultType = true; break; - case OpFUnordLessThan: *hasResult = true; *hasResultType = true; break; - case OpFOrdGreaterThan: *hasResult = true; *hasResultType = true; break; - case OpFUnordGreaterThan: *hasResult = true; *hasResultType = true; break; - case OpFOrdLessThanEqual: *hasResult = true; *hasResultType = true; break; - case OpFUnordLessThanEqual: *hasResult = true; *hasResultType = true; break; - case OpFOrdGreaterThanEqual: *hasResult = true; *hasResultType = true; break; - case OpFUnordGreaterThanEqual: *hasResult = true; *hasResultType = true; break; - case OpShiftRightLogical: *hasResult = true; *hasResultType = true; break; - case OpShiftRightArithmetic: *hasResult = true; *hasResultType = true; break; - case OpShiftLeftLogical: *hasResult = true; *hasResultType = true; break; - case OpBitwiseOr: *hasResult = true; *hasResultType = true; break; - case OpBitwiseXor: *hasResult = true; *hasResultType = true; break; - case OpBitwiseAnd: *hasResult = true; *hasResultType = true; break; - case OpNot: *hasResult = true; *hasResultType = true; break; - case OpBitFieldInsert: *hasResult = true; *hasResultType = true; break; - case OpBitFieldSExtract: *hasResult = true; *hasResultType = true; break; - case OpBitFieldUExtract: *hasResult = true; *hasResultType = true; break; - case OpBitReverse: *hasResult = true; *hasResultType = true; break; - case OpBitCount: *hasResult = true; *hasResultType = true; break; - case OpDPdx: *hasResult = true; *hasResultType = true; break; - case OpDPdy: *hasResult = true; *hasResultType = true; break; - case OpFwidth: *hasResult = true; *hasResultType = true; break; - case OpDPdxFine: *hasResult = true; *hasResultType = true; break; - case OpDPdyFine: *hasResult = true; *hasResultType = true; break; - case OpFwidthFine: *hasResult = true; *hasResultType = true; break; - case OpDPdxCoarse: *hasResult = true; *hasResultType = true; break; - case OpDPdyCoarse: *hasResult = true; *hasResultType = true; break; - case OpFwidthCoarse: *hasResult = true; *hasResultType = true; break; - case OpEmitVertex: *hasResult = false; *hasResultType = false; break; - case OpEndPrimitive: *hasResult = false; *hasResultType = false; break; - case OpEmitStreamVertex: *hasResult = false; *hasResultType = false; break; - case OpEndStreamPrimitive: *hasResult = false; *hasResultType = false; break; - case OpControlBarrier: *hasResult = false; *hasResultType = false; break; - case OpMemoryBarrier: *hasResult = false; *hasResultType = false; break; - case OpAtomicLoad: *hasResult = true; *hasResultType = true; break; - case OpAtomicStore: *hasResult = false; *hasResultType = false; break; - case OpAtomicExchange: *hasResult = true; *hasResultType = true; break; - case OpAtomicCompareExchange: *hasResult = true; *hasResultType = true; break; - case OpAtomicCompareExchangeWeak: *hasResult = true; *hasResultType = true; break; - case OpAtomicIIncrement: *hasResult = true; *hasResultType = true; break; - case OpAtomicIDecrement: *hasResult = true; *hasResultType = true; break; - case OpAtomicIAdd: *hasResult = true; *hasResultType = true; break; - case OpAtomicISub: *hasResult = true; *hasResultType = true; break; - case OpAtomicSMin: *hasResult = true; *hasResultType = true; break; - case OpAtomicUMin: *hasResult = true; *hasResultType = true; break; - case OpAtomicSMax: *hasResult = true; *hasResultType = true; break; - case OpAtomicUMax: *hasResult = true; *hasResultType = true; break; - case OpAtomicAnd: *hasResult = true; *hasResultType = true; break; - case OpAtomicOr: *hasResult = true; *hasResultType = true; break; - case OpAtomicXor: *hasResult = true; *hasResultType = true; break; - case OpPhi: *hasResult = true; *hasResultType = true; break; - case OpLoopMerge: *hasResult = false; *hasResultType = false; break; - case OpSelectionMerge: *hasResult = false; *hasResultType = false; break; - case OpLabel: *hasResult = true; *hasResultType = false; break; - case OpBranch: *hasResult = false; *hasResultType = false; break; - case OpBranchConditional: *hasResult = false; *hasResultType = false; break; - case OpSwitch: *hasResult = false; *hasResultType = false; break; - case OpKill: *hasResult = false; *hasResultType = false; break; - case OpReturn: *hasResult = false; *hasResultType = false; break; - case OpReturnValue: *hasResult = false; *hasResultType = false; break; - case OpUnreachable: *hasResult = false; *hasResultType = false; break; - case OpLifetimeStart: *hasResult = false; *hasResultType = false; break; - case OpLifetimeStop: *hasResult = false; *hasResultType = false; break; - case OpGroupAsyncCopy: *hasResult = true; *hasResultType = true; break; - case OpGroupWaitEvents: *hasResult = false; *hasResultType = false; break; - case OpGroupAll: *hasResult = true; *hasResultType = true; break; - case OpGroupAny: *hasResult = true; *hasResultType = true; break; - case OpGroupBroadcast: *hasResult = true; *hasResultType = true; break; - case OpGroupIAdd: *hasResult = true; *hasResultType = true; break; - case OpGroupFAdd: *hasResult = true; *hasResultType = true; break; - case OpGroupFMin: *hasResult = true; *hasResultType = true; break; - case OpGroupUMin: *hasResult = true; *hasResultType = true; break; - case OpGroupSMin: *hasResult = true; *hasResultType = true; break; - case OpGroupFMax: *hasResult = true; *hasResultType = true; break; - case OpGroupUMax: *hasResult = true; *hasResultType = true; break; - case OpGroupSMax: *hasResult = true; *hasResultType = true; break; - case OpReadPipe: *hasResult = true; *hasResultType = true; break; - case OpWritePipe: *hasResult = true; *hasResultType = true; break; - case OpReservedReadPipe: *hasResult = true; *hasResultType = true; break; - case OpReservedWritePipe: *hasResult = true; *hasResultType = true; break; - case OpReserveReadPipePackets: *hasResult = true; *hasResultType = true; break; - case OpReserveWritePipePackets: *hasResult = true; *hasResultType = true; break; - case OpCommitReadPipe: *hasResult = false; *hasResultType = false; break; - case OpCommitWritePipe: *hasResult = false; *hasResultType = false; break; - case OpIsValidReserveId: *hasResult = true; *hasResultType = true; break; - case OpGetNumPipePackets: *hasResult = true; *hasResultType = true; break; - case OpGetMaxPipePackets: *hasResult = true; *hasResultType = true; break; - case OpGroupReserveReadPipePackets: *hasResult = true; *hasResultType = true; break; - case OpGroupReserveWritePipePackets: *hasResult = true; *hasResultType = true; break; - case OpGroupCommitReadPipe: *hasResult = false; *hasResultType = false; break; - case OpGroupCommitWritePipe: *hasResult = false; *hasResultType = false; break; - case OpEnqueueMarker: *hasResult = true; *hasResultType = true; break; - case OpEnqueueKernel: *hasResult = true; *hasResultType = true; break; - case OpGetKernelNDrangeSubGroupCount: *hasResult = true; *hasResultType = true; break; - case OpGetKernelNDrangeMaxSubGroupSize: *hasResult = true; *hasResultType = true; break; - case OpGetKernelWorkGroupSize: *hasResult = true; *hasResultType = true; break; - case OpGetKernelPreferredWorkGroupSizeMultiple: *hasResult = true; *hasResultType = true; break; - case OpRetainEvent: *hasResult = false; *hasResultType = false; break; - case OpReleaseEvent: *hasResult = false; *hasResultType = false; break; - case OpCreateUserEvent: *hasResult = true; *hasResultType = true; break; - case OpIsValidEvent: *hasResult = true; *hasResultType = true; break; - case OpSetUserEventStatus: *hasResult = false; *hasResultType = false; break; - case OpCaptureEventProfilingInfo: *hasResult = false; *hasResultType = false; break; - case OpGetDefaultQueue: *hasResult = true; *hasResultType = true; break; - case OpBuildNDRange: *hasResult = true; *hasResultType = true; break; - case OpImageSparseSampleImplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSparseSampleExplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSparseSampleDrefImplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSparseSampleDrefExplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSparseSampleProjImplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSparseSampleProjExplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSparseSampleProjDrefImplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSparseSampleProjDrefExplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSparseFetch: *hasResult = true; *hasResultType = true; break; - case OpImageSparseGather: *hasResult = true; *hasResultType = true; break; - case OpImageSparseDrefGather: *hasResult = true; *hasResultType = true; break; - case OpImageSparseTexelsResident: *hasResult = true; *hasResultType = true; break; - case OpNoLine: *hasResult = false; *hasResultType = false; break; - case OpAtomicFlagTestAndSet: *hasResult = true; *hasResultType = true; break; - case OpAtomicFlagClear: *hasResult = false; *hasResultType = false; break; - case OpImageSparseRead: *hasResult = true; *hasResultType = true; break; - case OpSizeOf: *hasResult = true; *hasResultType = true; break; - case OpTypePipeStorage: *hasResult = true; *hasResultType = false; break; - case OpConstantPipeStorage: *hasResult = true; *hasResultType = true; break; - case OpCreatePipeFromPipeStorage: *hasResult = true; *hasResultType = true; break; - case OpGetKernelLocalSizeForSubgroupCount: *hasResult = true; *hasResultType = true; break; - case OpGetKernelMaxNumSubgroups: *hasResult = true; *hasResultType = true; break; - case OpTypeNamedBarrier: *hasResult = true; *hasResultType = false; break; - case OpNamedBarrierInitialize: *hasResult = true; *hasResultType = true; break; - case OpMemoryNamedBarrier: *hasResult = false; *hasResultType = false; break; - case OpModuleProcessed: *hasResult = false; *hasResultType = false; break; - case OpExecutionModeId: *hasResult = false; *hasResultType = false; break; - case OpDecorateId: *hasResult = false; *hasResultType = false; break; - case OpGroupNonUniformElect: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformAll: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformAny: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformAllEqual: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformBroadcast: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformBroadcastFirst: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformBallot: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformInverseBallot: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformBallotBitExtract: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformBallotBitCount: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformBallotFindLSB: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformBallotFindMSB: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformShuffle: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformShuffleXor: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformShuffleUp: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformShuffleDown: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformIAdd: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformFAdd: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformIMul: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformFMul: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformSMin: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformUMin: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformFMin: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformSMax: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformUMax: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformFMax: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformBitwiseAnd: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformBitwiseOr: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformBitwiseXor: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformLogicalAnd: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformLogicalOr: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformLogicalXor: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformQuadBroadcast: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformQuadSwap: *hasResult = true; *hasResultType = true; break; - case OpCopyLogical: *hasResult = true; *hasResultType = true; break; - case OpPtrEqual: *hasResult = true; *hasResultType = true; break; - case OpPtrNotEqual: *hasResult = true; *hasResultType = true; break; - case OpPtrDiff: *hasResult = true; *hasResultType = true; break; - case OpTerminateInvocation: *hasResult = false; *hasResultType = false; break; - case OpSubgroupBallotKHR: *hasResult = true; *hasResultType = true; break; - case OpSubgroupFirstInvocationKHR: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAllKHR: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAnyKHR: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAllEqualKHR: *hasResult = true; *hasResultType = true; break; - case OpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break; - case OpTraceRayKHR: *hasResult = false; *hasResultType = false; break; - case OpExecuteCallableKHR: *hasResult = false; *hasResultType = false; break; - case OpConvertUToAccelerationStructureKHR: *hasResult = true; *hasResultType = true; break; - case OpIgnoreIntersectionKHR: *hasResult = false; *hasResultType = false; break; - case OpTerminateRayKHR: *hasResult = false; *hasResultType = false; break; - case OpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break; - case OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break; - case OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break; - case OpRayQueryGenerateIntersectionKHR: *hasResult = false; *hasResultType = false; break; - case OpRayQueryConfirmIntersectionKHR: *hasResult = false; *hasResultType = false; break; - case OpRayQueryProceedKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionTypeKHR: *hasResult = true; *hasResultType = true; break; - case OpGroupIAddNonUniformAMD: *hasResult = true; *hasResultType = true; break; - case OpGroupFAddNonUniformAMD: *hasResult = true; *hasResultType = true; break; - case OpGroupFMinNonUniformAMD: *hasResult = true; *hasResultType = true; break; - case OpGroupUMinNonUniformAMD: *hasResult = true; *hasResultType = true; break; - case OpGroupSMinNonUniformAMD: *hasResult = true; *hasResultType = true; break; - case OpGroupFMaxNonUniformAMD: *hasResult = true; *hasResultType = true; break; - case OpGroupUMaxNonUniformAMD: *hasResult = true; *hasResultType = true; break; - case OpGroupSMaxNonUniformAMD: *hasResult = true; *hasResultType = true; break; - case OpFragmentMaskFetchAMD: *hasResult = true; *hasResultType = true; break; - case OpFragmentFetchAMD: *hasResult = true; *hasResultType = true; break; - case OpReadClockKHR: *hasResult = true; *hasResultType = true; break; - case OpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break; - case OpWritePackedPrimitiveIndices4x8NV: *hasResult = false; *hasResultType = false; break; - case OpReportIntersectionNV: *hasResult = true; *hasResultType = true; break; - case OpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break; - case OpTerminateRayNV: *hasResult = false; *hasResultType = false; break; - case OpTraceNV: *hasResult = false; *hasResultType = false; break; - case OpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break; - case OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break; - case OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break; - case OpCooperativeMatrixLoadNV: *hasResult = true; *hasResultType = true; break; - case OpCooperativeMatrixStoreNV: *hasResult = false; *hasResultType = false; break; - case OpCooperativeMatrixMulAddNV: *hasResult = true; *hasResultType = true; break; - case OpCooperativeMatrixLengthNV: *hasResult = true; *hasResultType = true; break; - case OpBeginInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break; - case OpEndInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break; - case OpDemoteToHelperInvocationEXT: *hasResult = false; *hasResultType = false; break; - case OpIsHelperInvocationEXT: *hasResult = true; *hasResultType = true; break; - case OpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupShuffleXorINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupBlockReadINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupBlockWriteINTEL: *hasResult = false; *hasResultType = false; break; - case OpSubgroupImageBlockReadINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupImageBlockWriteINTEL: *hasResult = false; *hasResultType = false; break; - case OpSubgroupImageMediaBlockReadINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupImageMediaBlockWriteINTEL: *hasResult = false; *hasResultType = false; break; - case OpUCountLeadingZerosINTEL: *hasResult = true; *hasResultType = true; break; - case OpUCountTrailingZerosINTEL: *hasResult = true; *hasResultType = true; break; - case OpAbsISubINTEL: *hasResult = true; *hasResultType = true; break; - case OpAbsUSubINTEL: *hasResult = true; *hasResultType = true; break; - case OpIAddSatINTEL: *hasResult = true; *hasResultType = true; break; - case OpUAddSatINTEL: *hasResult = true; *hasResultType = true; break; - case OpIAverageINTEL: *hasResult = true; *hasResultType = true; break; - case OpUAverageINTEL: *hasResult = true; *hasResultType = true; break; - case OpIAverageRoundedINTEL: *hasResult = true; *hasResultType = true; break; - case OpUAverageRoundedINTEL: *hasResult = true; *hasResultType = true; break; - case OpISubSatINTEL: *hasResult = true; *hasResultType = true; break; - case OpUSubSatINTEL: *hasResult = true; *hasResultType = true; break; - case OpIMul32x16INTEL: *hasResult = true; *hasResultType = true; break; - case OpUMul32x16INTEL: *hasResult = true; *hasResultType = true; break; - case OpFunctionPointerINTEL: *hasResult = true; *hasResultType = true; break; - case OpFunctionPointerCallINTEL: *hasResult = true; *hasResultType = true; break; - case OpDecorateString: *hasResult = false; *hasResultType = false; break; - case OpMemberDecorateString: *hasResult = false; *hasResultType = false; break; - case OpVmeImageINTEL: *hasResult = true; *hasResultType = true; break; - case OpTypeVmeImageINTEL: *hasResult = true; *hasResultType = false; break; - case OpTypeAvcImePayloadINTEL: *hasResult = true; *hasResultType = false; break; - case OpTypeAvcRefPayloadINTEL: *hasResult = true; *hasResultType = false; break; - case OpTypeAvcSicPayloadINTEL: *hasResult = true; *hasResultType = false; break; - case OpTypeAvcMcePayloadINTEL: *hasResult = true; *hasResultType = false; break; - case OpTypeAvcMceResultINTEL: *hasResult = true; *hasResultType = false; break; - case OpTypeAvcImeResultINTEL: *hasResult = true; *hasResultType = false; break; - case OpTypeAvcImeResultSingleReferenceStreamoutINTEL: *hasResult = true; *hasResultType = false; break; - case OpTypeAvcImeResultDualReferenceStreamoutINTEL: *hasResult = true; *hasResultType = false; break; - case OpTypeAvcImeSingleReferenceStreaminINTEL: *hasResult = true; *hasResultType = false; break; - case OpTypeAvcImeDualReferenceStreaminINTEL: *hasResult = true; *hasResultType = false; break; - case OpTypeAvcRefResultINTEL: *hasResult = true; *hasResultType = false; break; - case OpTypeAvcSicResultINTEL: *hasResult = true; *hasResultType = false; break; - case OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceSetInterShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceSetInterDirectionPenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceSetAcOnlyHaarINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceConvertToImePayloadINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceConvertToImeResultINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceConvertToRefPayloadINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceConvertToRefResultINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceConvertToSicPayloadINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceConvertToSicResultINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetMotionVectorsINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetInterDistortionsINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetBestInterDistortionsINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetInterMajorShapeINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetInterMinorShapeINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetInterDirectionsINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetInterMotionVectorCountINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetInterReferenceIdsINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeInitializeINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeSetSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeSetDualReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeRefWindowSizeINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeAdjustRefOffsetINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeConvertToMcePayloadINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeSetMaxMotionVectorCountINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeSetWeightedSadINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeEvaluateWithDualReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeConvertToMceResultINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeGetSingleReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeGetDualReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeStripDualReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeGetBorderReachedINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcFmeInitializeINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcBmeInitializeINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcRefConvertToMcePayloadINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcRefSetBidirectionalMixDisableINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcRefSetBilinearFilterEnableINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcRefEvaluateWithDualReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcRefConvertToMceResultINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicInitializeINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicConfigureSkcINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicConfigureIpeLumaINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicConfigureIpeLumaChromaINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicGetMotionVectorMaskINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicConvertToMcePayloadINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicSetBilinearFilterEnableINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicEvaluateIpeINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicEvaluateWithDualReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicConvertToMceResultINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicGetIpeLumaShapeINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicGetPackedIpeLumaModesINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicGetIpeChromaModeINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicGetInterRawSadsINTEL: *hasResult = true; *hasResultType = true; break; - case OpLoopControlINTEL: *hasResult = false; *hasResultType = false; break; - case OpReadPipeBlockingINTEL: *hasResult = true; *hasResultType = true; break; - case OpWritePipeBlockingINTEL: *hasResult = true; *hasResultType = true; break; - case OpFPGARegINTEL: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetRayTMinKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetRayFlagsKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionTKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionInstanceCustomIndexKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionInstanceIdKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionGeometryIndexKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionPrimitiveIndexKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionBarycentricsKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionFrontFaceKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionCandidateAABBOpaqueKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionObjectRayDirectionKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionObjectRayOriginKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetWorldRayDirectionKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetWorldRayOriginKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionObjectToWorldKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionWorldToObjectKHR: *hasResult = true; *hasResultType = true; break; - case OpAtomicFAddEXT: *hasResult = true; *hasResultType = true; break; - } -} -#endif /* SPV_ENABLE_UTILITY_CODE */ - -// Overload operator| for mask bit combining - -inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); } -inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); } -inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); } -inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); } -inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); } -inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); } -inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); } -inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); } -inline RayFlagsMask operator|(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) | unsigned(b)); } -inline FragmentShadingRateMask operator|(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) | unsigned(b)); } - -} // end namespace spv - -#endif // #ifndef spirv_HPP - diff --git a/emscripten/include/spirv_cross/spirv_cfg.hpp b/emscripten/include/spirv_cross/spirv_cfg.hpp deleted file mode 100644 index 041526d6..00000000 --- a/emscripten/include/spirv_cross/spirv_cfg.hpp +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright 2016-2021 Arm Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * At your option, you may choose to accept this material under either: - * 1. The Apache License, Version 2.0, found at , or - * 2. The MIT License, found at . - * SPDX-License-Identifier: Apache-2.0 OR MIT. - */ - -#ifndef SPIRV_CROSS_CFG_HPP -#define SPIRV_CROSS_CFG_HPP - -#include "spirv_common.hpp" -#include - -namespace SPIRV_CROSS_NAMESPACE -{ -class Compiler; -class CFG -{ -public: - CFG(Compiler &compiler, const SPIRFunction &function); - - Compiler &get_compiler() - { - return compiler; - } - - const Compiler &get_compiler() const - { - return compiler; - } - - const SPIRFunction &get_function() const - { - return func; - } - - uint32_t get_immediate_dominator(uint32_t block) const - { - auto itr = immediate_dominators.find(block); - if (itr != std::end(immediate_dominators)) - return itr->second; - else - return 0; - } - - uint32_t get_visit_order(uint32_t block) const - { - auto itr = visit_order.find(block); - assert(itr != std::end(visit_order)); - int v = itr->second.get(); - assert(v > 0); - return uint32_t(v); - } - - uint32_t find_common_dominator(uint32_t a, uint32_t b) const; - - const SmallVector &get_preceding_edges(uint32_t block) const - { - auto itr = preceding_edges.find(block); - if (itr != std::end(preceding_edges)) - return itr->second; - else - return empty_vector; - } - - const SmallVector &get_succeeding_edges(uint32_t block) const - { - auto itr = succeeding_edges.find(block); - if (itr != std::end(succeeding_edges)) - return itr->second; - else - return empty_vector; - } - - template - void walk_from(std::unordered_set &seen_blocks, uint32_t block, const Op &op) const - { - if (seen_blocks.count(block)) - return; - seen_blocks.insert(block); - - if (op(block)) - { - for (auto b : get_succeeding_edges(block)) - walk_from(seen_blocks, b, op); - } - } - - uint32_t find_loop_dominator(uint32_t block) const; - - bool node_terminates_control_flow_in_sub_graph(BlockID from, BlockID to) const; - -private: - struct VisitOrder - { - int &get() - { - return v; - } - - const int &get() const - { - return v; - } - - int v = -1; - }; - - Compiler &compiler; - const SPIRFunction &func; - std::unordered_map> preceding_edges; - std::unordered_map> succeeding_edges; - std::unordered_map immediate_dominators; - std::unordered_map visit_order; - SmallVector post_order; - SmallVector empty_vector; - - void add_branch(uint32_t from, uint32_t to); - void build_post_order_visit_order(); - void build_immediate_dominators(); - bool post_order_visit(uint32_t block); - uint32_t visit_count = 0; - - bool is_back_edge(uint32_t to) const; - bool has_visited_forward_edge(uint32_t to) const; -}; - -class DominatorBuilder -{ -public: - DominatorBuilder(const CFG &cfg); - - void add_block(uint32_t block); - uint32_t get_dominator() const - { - return dominator; - } - - void lift_continue_block_dominator(); - -private: - const CFG &cfg; - uint32_t dominator = 0; -}; -} // namespace SPIRV_CROSS_NAMESPACE - -#endif diff --git a/emscripten/include/spirv_cross/spirv_common.hpp b/emscripten/include/spirv_cross/spirv_common.hpp deleted file mode 100644 index 128c4162..00000000 --- a/emscripten/include/spirv_cross/spirv_common.hpp +++ /dev/null @@ -1,1807 +0,0 @@ -/* - * Copyright 2015-2021 Arm Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * At your option, you may choose to accept this material under either: - * 1. The Apache License, Version 2.0, found at , or - * 2. The MIT License, found at . - * SPDX-License-Identifier: Apache-2.0 OR MIT. - */ - -#ifndef SPIRV_CROSS_COMMON_HPP -#define SPIRV_CROSS_COMMON_HPP - -#include "spirv.hpp" -#include "spirv_cross_containers.hpp" -#include "spirv_cross_error_handling.hpp" -#include - -// A bit crude, but allows projects which embed SPIRV-Cross statically to -// effectively hide all the symbols from other projects. -// There is a case where we have: -// - Project A links against SPIRV-Cross statically. -// - Project A links against Project B statically. -// - Project B links against SPIRV-Cross statically (might be a different version). -// This leads to a conflict with extremely bizarre results. -// By overriding the namespace in one of the project builds, we can work around this. -// If SPIRV-Cross is embedded in dynamic libraries, -// prefer using -fvisibility=hidden on GCC/Clang instead. -#ifdef SPIRV_CROSS_NAMESPACE_OVERRIDE -#define SPIRV_CROSS_NAMESPACE SPIRV_CROSS_NAMESPACE_OVERRIDE -#else -#define SPIRV_CROSS_NAMESPACE spirv_cross -#endif - -namespace SPIRV_CROSS_NAMESPACE -{ -namespace inner -{ -template -void join_helper(StringStream<> &stream, T &&t) -{ - stream << std::forward(t); -} - -template -void join_helper(StringStream<> &stream, T &&t, Ts &&... ts) -{ - stream << std::forward(t); - join_helper(stream, std::forward(ts)...); -} -} // namespace inner - -class Bitset -{ -public: - Bitset() = default; - explicit inline Bitset(uint64_t lower_) - : lower(lower_) - { - } - - inline bool get(uint32_t bit) const - { - if (bit < 64) - return (lower & (1ull << bit)) != 0; - else - return higher.count(bit) != 0; - } - - inline void set(uint32_t bit) - { - if (bit < 64) - lower |= 1ull << bit; - else - higher.insert(bit); - } - - inline void clear(uint32_t bit) - { - if (bit < 64) - lower &= ~(1ull << bit); - else - higher.erase(bit); - } - - inline uint64_t get_lower() const - { - return lower; - } - - inline void reset() - { - lower = 0; - higher.clear(); - } - - inline void merge_and(const Bitset &other) - { - lower &= other.lower; - std::unordered_set tmp_set; - for (auto &v : higher) - if (other.higher.count(v) != 0) - tmp_set.insert(v); - higher = std::move(tmp_set); - } - - inline void merge_or(const Bitset &other) - { - lower |= other.lower; - for (auto &v : other.higher) - higher.insert(v); - } - - inline bool operator==(const Bitset &other) const - { - if (lower != other.lower) - return false; - - if (higher.size() != other.higher.size()) - return false; - - for (auto &v : higher) - if (other.higher.count(v) == 0) - return false; - - return true; - } - - inline bool operator!=(const Bitset &other) const - { - return !(*this == other); - } - - template - void for_each_bit(const Op &op) const - { - // TODO: Add ctz-based iteration. - for (uint32_t i = 0; i < 64; i++) - { - if (lower & (1ull << i)) - op(i); - } - - if (higher.empty()) - return; - - // Need to enforce an order here for reproducible results, - // but hitting this path should happen extremely rarely, so having this slow path is fine. - SmallVector bits; - bits.reserve(higher.size()); - for (auto &v : higher) - bits.push_back(v); - std::sort(std::begin(bits), std::end(bits)); - - for (auto &v : bits) - op(v); - } - - inline bool empty() const - { - return lower == 0 && higher.empty(); - } - -private: - // The most common bits to set are all lower than 64, - // so optimize for this case. Bits spilling outside 64 go into a slower data structure. - // In almost all cases, higher data structure will not be used. - uint64_t lower = 0; - std::unordered_set higher; -}; - -// Helper template to avoid lots of nasty string temporary munging. -template -std::string join(Ts &&... ts) -{ - StringStream<> stream; - inner::join_helper(stream, std::forward(ts)...); - return stream.str(); -} - -inline std::string merge(const SmallVector &list, const char *between = ", ") -{ - StringStream<> stream; - for (auto &elem : list) - { - stream << elem; - if (&elem != &list.back()) - stream << between; - } - return stream.str(); -} - -// Make sure we don't accidentally call this with float or doubles with SFINAE. -// Have to use the radix-aware overload. -template ::value, int>::type = 0> -inline std::string convert_to_string(const T &t) -{ - return std::to_string(t); -} - -// Allow implementations to set a convenient standard precision -#ifndef SPIRV_CROSS_FLT_FMT -#define SPIRV_CROSS_FLT_FMT "%.32g" -#endif - -// Disable sprintf and strcat warnings. -// We cannot rely on snprintf and family existing because, ..., MSVC. -#if defined(__clang__) || defined(__GNUC__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#elif defined(_MSC_VER) -#pragma warning(push) -#pragma warning(disable : 4996) -#endif - -static inline void fixup_radix_point(char *str, char radix_point) -{ - // Setting locales is a very risky business in multi-threaded program, - // so just fixup locales instead. We only need to care about the radix point. - if (radix_point != '.') - { - while (*str != '\0') - { - if (*str == radix_point) - *str = '.'; - str++; - } - } -} - -inline std::string convert_to_string(float t, char locale_radix_point) -{ - // std::to_string for floating point values is broken. - // Fallback to something more sane. - char buf[64]; - sprintf(buf, SPIRV_CROSS_FLT_FMT, t); - fixup_radix_point(buf, locale_radix_point); - - // Ensure that the literal is float. - if (!strchr(buf, '.') && !strchr(buf, 'e')) - strcat(buf, ".0"); - return buf; -} - -inline std::string convert_to_string(double t, char locale_radix_point) -{ - // std::to_string for floating point values is broken. - // Fallback to something more sane. - char buf[64]; - sprintf(buf, SPIRV_CROSS_FLT_FMT, t); - fixup_radix_point(buf, locale_radix_point); - - // Ensure that the literal is float. - if (!strchr(buf, '.') && !strchr(buf, 'e')) - strcat(buf, ".0"); - return buf; -} - -template -struct ValueSaver -{ - explicit ValueSaver(T ¤t_) - : current(current_) - , saved(current_) - { - } - - void release() - { - current = saved; - } - - ~ValueSaver() - { - release(); - } - - T ¤t; - T saved; -}; - -#if defined(__clang__) || defined(__GNUC__) -#pragma GCC diagnostic pop -#elif defined(_MSC_VER) -#pragma warning(pop) -#endif - -struct Instruction -{ - uint16_t op = 0; - uint16_t count = 0; - uint32_t offset = 0; - uint32_t length = 0; -}; - -enum Types -{ - TypeNone, - TypeType, - TypeVariable, - TypeConstant, - TypeFunction, - TypeFunctionPrototype, - TypeBlock, - TypeExtension, - TypeExpression, - TypeConstantOp, - TypeCombinedImageSampler, - TypeAccessChain, - TypeUndef, - TypeString, - TypeCount -}; - -template -class TypedID; - -template <> -class TypedID -{ -public: - TypedID() = default; - TypedID(uint32_t id_) - : id(id_) - { - } - - template - TypedID(const TypedID &other) - { - *this = other; - } - - template - TypedID &operator=(const TypedID &other) - { - id = uint32_t(other); - return *this; - } - - // Implicit conversion to u32 is desired here. - // As long as we block implicit conversion between TypedID and TypedID we're good. - operator uint32_t() const - { - return id; - } - - template - operator TypedID() const - { - return TypedID(*this); - } - -private: - uint32_t id = 0; -}; - -template -class TypedID -{ -public: - TypedID() = default; - TypedID(uint32_t id_) - : id(id_) - { - } - - explicit TypedID(const TypedID &other) - : id(uint32_t(other)) - { - } - - operator uint32_t() const - { - return id; - } - -private: - uint32_t id = 0; -}; - -using VariableID = TypedID; -using TypeID = TypedID; -using ConstantID = TypedID; -using FunctionID = TypedID; -using BlockID = TypedID; -using ID = TypedID; - -// Helper for Variant interface. -struct IVariant -{ - virtual ~IVariant() = default; - virtual IVariant *clone(ObjectPoolBase *pool) = 0; - ID self = 0; -}; - -#define SPIRV_CROSS_DECLARE_CLONE(T) \ - IVariant *clone(ObjectPoolBase *pool) override \ - { \ - return static_cast *>(pool)->allocate(*this); \ - } - -struct SPIRUndef : IVariant -{ - enum - { - type = TypeUndef - }; - - explicit SPIRUndef(TypeID basetype_) - : basetype(basetype_) - { - } - TypeID basetype; - - SPIRV_CROSS_DECLARE_CLONE(SPIRUndef) -}; - -struct SPIRString : IVariant -{ - enum - { - type = TypeString - }; - - explicit SPIRString(std::string str_) - : str(std::move(str_)) - { - } - - std::string str; - - SPIRV_CROSS_DECLARE_CLONE(SPIRString) -}; - -// This type is only used by backends which need to access the combined image and sampler IDs separately after -// the OpSampledImage opcode. -struct SPIRCombinedImageSampler : IVariant -{ - enum - { - type = TypeCombinedImageSampler - }; - SPIRCombinedImageSampler(TypeID type_, VariableID image_, VariableID sampler_) - : combined_type(type_) - , image(image_) - , sampler(sampler_) - { - } - TypeID combined_type; - VariableID image; - VariableID sampler; - - SPIRV_CROSS_DECLARE_CLONE(SPIRCombinedImageSampler) -}; - -struct SPIRConstantOp : IVariant -{ - enum - { - type = TypeConstantOp - }; - - SPIRConstantOp(TypeID result_type, spv::Op op, const uint32_t *args, uint32_t length) - : opcode(op) - , basetype(result_type) - { - arguments.reserve(length); - for (uint32_t i = 0; i < length; i++) - arguments.push_back(args[i]); - } - - spv::Op opcode; - SmallVector arguments; - TypeID basetype; - - SPIRV_CROSS_DECLARE_CLONE(SPIRConstantOp) -}; - -struct SPIRType : IVariant -{ - enum - { - type = TypeType - }; - - enum BaseType - { - Unknown, - Void, - Boolean, - SByte, - UByte, - Short, - UShort, - Int, - UInt, - Int64, - UInt64, - AtomicCounter, - Half, - Float, - Double, - Struct, - Image, - SampledImage, - Sampler, - AccelerationStructure, - RayQuery, - - // Keep internal types at the end. - ControlPointArray, - Interpolant, - Char - }; - - // Scalar/vector/matrix support. - BaseType basetype = Unknown; - uint32_t width = 0; - uint32_t vecsize = 1; - uint32_t columns = 1; - - // Arrays, support array of arrays by having a vector of array sizes. - SmallVector array; - - // Array elements can be either specialization constants or specialization ops. - // This array determines how to interpret the array size. - // If an element is true, the element is a literal, - // otherwise, it's an expression, which must be resolved on demand. - // The actual size is not really known until runtime. - SmallVector array_size_literal; - - // Pointers - // Keep track of how many pointer layers we have. - uint32_t pointer_depth = 0; - bool pointer = false; - bool forward_pointer = false; - - spv::StorageClass storage = spv::StorageClassGeneric; - - SmallVector member_types; - - // If member order has been rewritten to handle certain scenarios with Offset, - // allow codegen to rewrite the index. - SmallVector member_type_index_redirection; - - struct ImageType - { - TypeID type; - spv::Dim dim; - bool depth; - bool arrayed; - bool ms; - uint32_t sampled; - spv::ImageFormat format; - spv::AccessQualifier access; - } image; - - // Structs can be declared multiple times if they are used as part of interface blocks. - // We want to detect this so that we only emit the struct definition once. - // Since we cannot rely on OpName to be equal, we need to figure out aliases. - TypeID type_alias = 0; - - // Denotes the type which this type is based on. - // Allows the backend to traverse how a complex type is built up during access chains. - TypeID parent_type = 0; - - // Used in backends to avoid emitting members with conflicting names. - std::unordered_set member_name_cache; - - SPIRV_CROSS_DECLARE_CLONE(SPIRType) -}; - -struct SPIRExtension : IVariant -{ - enum - { - type = TypeExtension - }; - - enum Extension - { - Unsupported, - GLSL, - SPV_debug_info, - SPV_AMD_shader_ballot, - SPV_AMD_shader_explicit_vertex_parameter, - SPV_AMD_shader_trinary_minmax, - SPV_AMD_gcn_shader - }; - - explicit SPIRExtension(Extension ext_) - : ext(ext_) - { - } - - Extension ext; - SPIRV_CROSS_DECLARE_CLONE(SPIRExtension) -}; - -// SPIREntryPoint is not a variant since its IDs are used to decorate OpFunction, -// so in order to avoid conflicts, we can't stick them in the ids array. -struct SPIREntryPoint -{ - SPIREntryPoint(FunctionID self_, spv::ExecutionModel execution_model, const std::string &entry_name) - : self(self_) - , name(entry_name) - , orig_name(entry_name) - , model(execution_model) - { - } - SPIREntryPoint() = default; - - FunctionID self = 0; - std::string name; - std::string orig_name; - SmallVector interface_variables; - - Bitset flags; - struct WorkgroupSize - { - uint32_t x = 0, y = 0, z = 0; - uint32_t constant = 0; // Workgroup size can be expressed as a constant/spec-constant instead. - } workgroup_size; - uint32_t invocations = 0; - uint32_t output_vertices = 0; - spv::ExecutionModel model = spv::ExecutionModelMax; - bool geometry_passthrough = false; -}; - -struct SPIRExpression : IVariant -{ - enum - { - type = TypeExpression - }; - - // Only created by the backend target to avoid creating tons of temporaries. - SPIRExpression(std::string expr, TypeID expression_type_, bool immutable_) - : expression(move(expr)) - , expression_type(expression_type_) - , immutable(immutable_) - { - } - - // If non-zero, prepend expression with to_expression(base_expression). - // Used in amortizing multiple calls to to_expression() - // where in certain cases that would quickly force a temporary when not needed. - ID base_expression = 0; - - std::string expression; - TypeID expression_type = 0; - - // If this expression is a forwarded load, - // allow us to reference the original variable. - ID loaded_from = 0; - - // If this expression will never change, we can avoid lots of temporaries - // in high level source. - // An expression being immutable can be speculative, - // it is assumed that this is true almost always. - bool immutable = false; - - // Before use, this expression must be transposed. - // This is needed for targets which don't support row_major layouts. - bool need_transpose = false; - - // Whether or not this is an access chain expression. - bool access_chain = false; - - // A list of expressions which this expression depends on. - SmallVector expression_dependencies; - - // By reading this expression, we implicitly read these expressions as well. - // Used by access chain Store and Load since we read multiple expressions in this case. - SmallVector implied_read_expressions; - - // The expression was emitted at a certain scope. Lets us track when an expression read means multiple reads. - uint32_t emitted_loop_level = 0; - - SPIRV_CROSS_DECLARE_CLONE(SPIRExpression) -}; - -struct SPIRFunctionPrototype : IVariant -{ - enum - { - type = TypeFunctionPrototype - }; - - explicit SPIRFunctionPrototype(TypeID return_type_) - : return_type(return_type_) - { - } - - TypeID return_type; - SmallVector parameter_types; - - SPIRV_CROSS_DECLARE_CLONE(SPIRFunctionPrototype) -}; - -struct SPIRBlock : IVariant -{ - enum - { - type = TypeBlock - }; - - enum Terminator - { - Unknown, - Direct, // Emit next block directly without a particular condition. - - Select, // Block ends with an if/else block. - MultiSelect, // Block ends with switch statement. - - Return, // Block ends with return. - Unreachable, // Noop - Kill, // Discard - IgnoreIntersection, // Ray Tracing - TerminateRay // Ray Tracing - }; - - enum Merge - { - MergeNone, - MergeLoop, - MergeSelection - }; - - enum Hints - { - HintNone, - HintUnroll, - HintDontUnroll, - HintFlatten, - HintDontFlatten - }; - - enum Method - { - MergeToSelectForLoop, - MergeToDirectForLoop, - MergeToSelectContinueForLoop - }; - - enum ContinueBlockType - { - ContinueNone, - - // Continue block is branchless and has at least one instruction. - ForLoop, - - // Noop continue block. - WhileLoop, - - // Continue block is conditional. - DoWhileLoop, - - // Highly unlikely that anything will use this, - // since it is really awkward/impossible to express in GLSL. - ComplexLoop - }; - - enum : uint32_t - { - NoDominator = 0xffffffffu - }; - - Terminator terminator = Unknown; - Merge merge = MergeNone; - Hints hint = HintNone; - BlockID next_block = 0; - BlockID merge_block = 0; - BlockID continue_block = 0; - - ID return_value = 0; // If 0, return nothing (void). - ID condition = 0; - BlockID true_block = 0; - BlockID false_block = 0; - BlockID default_block = 0; - - SmallVector ops; - - struct Phi - { - ID local_variable; // flush local variable ... - BlockID parent; // If we're in from_block and want to branch into this block ... - VariableID function_variable; // to this function-global "phi" variable first. - }; - - // Before entering this block flush out local variables to magical "phi" variables. - SmallVector phi_variables; - - // Declare these temporaries before beginning the block. - // Used for handling complex continue blocks which have side effects. - SmallVector> declare_temporary; - - // Declare these temporaries, but only conditionally if this block turns out to be - // a complex loop header. - SmallVector> potential_declare_temporary; - - struct Case - { - uint32_t value; - BlockID block; - }; - SmallVector cases; - - // If we have tried to optimize code for this block but failed, - // keep track of this. - bool disable_block_optimization = false; - - // If the continue block is complex, fallback to "dumb" for loops. - bool complex_continue = false; - - // Do we need a ladder variable to defer breaking out of a loop construct after a switch block? - bool need_ladder_break = false; - - // If marked, we have explicitly handled Phi from this block, so skip any flushes related to that on a branch. - // Used to handle an edge case with switch and case-label fallthrough where fall-through writes to Phi. - BlockID ignore_phi_from_block = 0; - - // The dominating block which this block might be within. - // Used in continue; blocks to determine if we really need to write continue. - BlockID loop_dominator = 0; - - // All access to these variables are dominated by this block, - // so before branching anywhere we need to make sure that we declare these variables. - SmallVector dominated_variables; - - // These are variables which should be declared in a for loop header, if we - // fail to use a classic for-loop, - // we remove these variables, and fall back to regular variables outside the loop. - SmallVector loop_variables; - - // Some expressions are control-flow dependent, i.e. any instruction which relies on derivatives or - // sub-group-like operations. - // Make sure that we only use these expressions in the original block. - SmallVector invalidate_expressions; - - SPIRV_CROSS_DECLARE_CLONE(SPIRBlock) -}; - -struct SPIRFunction : IVariant -{ - enum - { - type = TypeFunction - }; - - SPIRFunction(TypeID return_type_, TypeID function_type_) - : return_type(return_type_) - , function_type(function_type_) - { - } - - struct Parameter - { - TypeID type; - ID id; - uint32_t read_count; - uint32_t write_count; - - // Set to true if this parameter aliases a global variable, - // used mostly in Metal where global variables - // have to be passed down to functions as regular arguments. - // However, for this kind of variable, we should not care about - // read and write counts as access to the function arguments - // is not local to the function in question. - bool alias_global_variable; - }; - - // When calling a function, and we're remapping separate image samplers, - // resolve these arguments into combined image samplers and pass them - // as additional arguments in this order. - // It gets more complicated as functions can pull in their own globals - // and combine them with parameters, - // so we need to distinguish if something is local parameter index - // or a global ID. - struct CombinedImageSamplerParameter - { - VariableID id; - VariableID image_id; - VariableID sampler_id; - bool global_image; - bool global_sampler; - bool depth; - }; - - TypeID return_type; - TypeID function_type; - SmallVector arguments; - - // Can be used by backends to add magic arguments. - // Currently used by combined image/sampler implementation. - - SmallVector shadow_arguments; - SmallVector local_variables; - BlockID entry_block = 0; - SmallVector blocks; - SmallVector combined_parameters; - - struct EntryLine - { - uint32_t file_id = 0; - uint32_t line_literal = 0; - }; - EntryLine entry_line; - - void add_local_variable(VariableID id) - { - local_variables.push_back(id); - } - - void add_parameter(TypeID parameter_type, ID id, bool alias_global_variable = false) - { - // Arguments are read-only until proven otherwise. - arguments.push_back({ parameter_type, id, 0u, 0u, alias_global_variable }); - } - - // Hooks to be run when the function returns. - // Mostly used for lowering internal data structures onto flattened structures. - // Need to defer this, because they might rely on things which change during compilation. - // Intentionally not a small vector, this one is rare, and std::function can be large. - Vector> fixup_hooks_out; - - // Hooks to be run when the function begins. - // Mostly used for populating internal data structures from flattened structures. - // Need to defer this, because they might rely on things which change during compilation. - // Intentionally not a small vector, this one is rare, and std::function can be large. - Vector> fixup_hooks_in; - - // On function entry, make sure to copy a constant array into thread addr space to work around - // the case where we are passing a constant array by value to a function on backends which do not - // consider arrays value types. - SmallVector constant_arrays_needed_on_stack; - - bool active = false; - bool flush_undeclared = true; - bool do_combined_parameters = true; - - SPIRV_CROSS_DECLARE_CLONE(SPIRFunction) -}; - -struct SPIRAccessChain : IVariant -{ - enum - { - type = TypeAccessChain - }; - - SPIRAccessChain(TypeID basetype_, spv::StorageClass storage_, std::string base_, std::string dynamic_index_, - int32_t static_index_) - : basetype(basetype_) - , storage(storage_) - , base(std::move(base_)) - , dynamic_index(std::move(dynamic_index_)) - , static_index(static_index_) - { - } - - // The access chain represents an offset into a buffer. - // Some backends need more complicated handling of access chains to be able to use buffers, like HLSL - // which has no usable buffer type ala GLSL SSBOs. - // StructuredBuffer is too limited, so our only option is to deal with ByteAddressBuffer which works with raw addresses. - - TypeID basetype; - spv::StorageClass storage; - std::string base; - std::string dynamic_index; - int32_t static_index; - - VariableID loaded_from = 0; - uint32_t matrix_stride = 0; - uint32_t array_stride = 0; - bool row_major_matrix = false; - bool immutable = false; - - // By reading this expression, we implicitly read these expressions as well. - // Used by access chain Store and Load since we read multiple expressions in this case. - SmallVector implied_read_expressions; - - SPIRV_CROSS_DECLARE_CLONE(SPIRAccessChain) -}; - -struct SPIRVariable : IVariant -{ - enum - { - type = TypeVariable - }; - - SPIRVariable() = default; - SPIRVariable(TypeID basetype_, spv::StorageClass storage_, ID initializer_ = 0, VariableID basevariable_ = 0) - : basetype(basetype_) - , storage(storage_) - , initializer(initializer_) - , basevariable(basevariable_) - { - } - - TypeID basetype = 0; - spv::StorageClass storage = spv::StorageClassGeneric; - uint32_t decoration = 0; - ID initializer = 0; - VariableID basevariable = 0; - - SmallVector dereference_chain; - bool compat_builtin = false; - - // If a variable is shadowed, we only statically assign to it - // and never actually emit a statement for it. - // When we read the variable as an expression, just forward - // shadowed_id as the expression. - bool statically_assigned = false; - ID static_expression = 0; - - // Temporaries which can remain forwarded as long as this variable is not modified. - SmallVector dependees; - bool forwardable = true; - - bool deferred_declaration = false; - bool phi_variable = false; - - // Used to deal with Phi variable flushes. See flush_phi(). - bool allocate_temporary_copy = false; - - bool remapped_variable = false; - uint32_t remapped_components = 0; - - // The block which dominates all access to this variable. - BlockID dominator = 0; - // If true, this variable is a loop variable, when accessing the variable - // outside a loop, - // we should statically forward it. - bool loop_variable = false; - // Set to true while we're inside the for loop. - bool loop_variable_enable = false; - - SPIRFunction::Parameter *parameter = nullptr; - - SPIRV_CROSS_DECLARE_CLONE(SPIRVariable) -}; - -struct SPIRConstant : IVariant -{ - enum - { - type = TypeConstant - }; - - union Constant - { - uint32_t u32; - int32_t i32; - float f32; - - uint64_t u64; - int64_t i64; - double f64; - }; - - struct ConstantVector - { - Constant r[4]; - // If != 0, this element is a specialization constant, and we should keep track of it as such. - ID id[4]; - uint32_t vecsize = 1; - - ConstantVector() - { - memset(r, 0, sizeof(r)); - } - }; - - struct ConstantMatrix - { - ConstantVector c[4]; - // If != 0, this column is a specialization constant, and we should keep track of it as such. - ID id[4]; - uint32_t columns = 1; - }; - - static inline float f16_to_f32(uint16_t u16_value) - { - // Based on the GLM implementation. - int s = (u16_value >> 15) & 0x1; - int e = (u16_value >> 10) & 0x1f; - int m = (u16_value >> 0) & 0x3ff; - - union - { - float f32; - uint32_t u32; - } u; - - if (e == 0) - { - if (m == 0) - { - u.u32 = uint32_t(s) << 31; - return u.f32; - } - else - { - while ((m & 0x400) == 0) - { - m <<= 1; - e--; - } - - e++; - m &= ~0x400; - } - } - else if (e == 31) - { - if (m == 0) - { - u.u32 = (uint32_t(s) << 31) | 0x7f800000u; - return u.f32; - } - else - { - u.u32 = (uint32_t(s) << 31) | 0x7f800000u | (m << 13); - return u.f32; - } - } - - e += 127 - 15; - m <<= 13; - u.u32 = (uint32_t(s) << 31) | (e << 23) | m; - return u.f32; - } - - inline uint32_t specialization_constant_id(uint32_t col, uint32_t row) const - { - return m.c[col].id[row]; - } - - inline uint32_t specialization_constant_id(uint32_t col) const - { - return m.id[col]; - } - - inline uint32_t scalar(uint32_t col = 0, uint32_t row = 0) const - { - return m.c[col].r[row].u32; - } - - inline int16_t scalar_i16(uint32_t col = 0, uint32_t row = 0) const - { - return int16_t(m.c[col].r[row].u32 & 0xffffu); - } - - inline uint16_t scalar_u16(uint32_t col = 0, uint32_t row = 0) const - { - return uint16_t(m.c[col].r[row].u32 & 0xffffu); - } - - inline int8_t scalar_i8(uint32_t col = 0, uint32_t row = 0) const - { - return int8_t(m.c[col].r[row].u32 & 0xffu); - } - - inline uint8_t scalar_u8(uint32_t col = 0, uint32_t row = 0) const - { - return uint8_t(m.c[col].r[row].u32 & 0xffu); - } - - inline float scalar_f16(uint32_t col = 0, uint32_t row = 0) const - { - return f16_to_f32(scalar_u16(col, row)); - } - - inline float scalar_f32(uint32_t col = 0, uint32_t row = 0) const - { - return m.c[col].r[row].f32; - } - - inline int32_t scalar_i32(uint32_t col = 0, uint32_t row = 0) const - { - return m.c[col].r[row].i32; - } - - inline double scalar_f64(uint32_t col = 0, uint32_t row = 0) const - { - return m.c[col].r[row].f64; - } - - inline int64_t scalar_i64(uint32_t col = 0, uint32_t row = 0) const - { - return m.c[col].r[row].i64; - } - - inline uint64_t scalar_u64(uint32_t col = 0, uint32_t row = 0) const - { - return m.c[col].r[row].u64; - } - - inline const ConstantVector &vector() const - { - return m.c[0]; - } - - inline uint32_t vector_size() const - { - return m.c[0].vecsize; - } - - inline uint32_t columns() const - { - return m.columns; - } - - inline void make_null(const SPIRType &constant_type_) - { - m = {}; - m.columns = constant_type_.columns; - for (auto &c : m.c) - c.vecsize = constant_type_.vecsize; - } - - inline bool constant_is_null() const - { - if (specialization) - return false; - if (!subconstants.empty()) - return false; - - for (uint32_t col = 0; col < columns(); col++) - for (uint32_t row = 0; row < vector_size(); row++) - if (scalar_u64(col, row) != 0) - return false; - - return true; - } - - explicit SPIRConstant(uint32_t constant_type_) - : constant_type(constant_type_) - { - } - - SPIRConstant() = default; - - SPIRConstant(TypeID constant_type_, const uint32_t *elements, uint32_t num_elements, bool specialized) - : constant_type(constant_type_) - , specialization(specialized) - { - subconstants.reserve(num_elements); - for (uint32_t i = 0; i < num_elements; i++) - subconstants.push_back(elements[i]); - specialization = specialized; - } - - // Construct scalar (32-bit). - SPIRConstant(TypeID constant_type_, uint32_t v0, bool specialized) - : constant_type(constant_type_) - , specialization(specialized) - { - m.c[0].r[0].u32 = v0; - m.c[0].vecsize = 1; - m.columns = 1; - } - - // Construct scalar (64-bit). - SPIRConstant(TypeID constant_type_, uint64_t v0, bool specialized) - : constant_type(constant_type_) - , specialization(specialized) - { - m.c[0].r[0].u64 = v0; - m.c[0].vecsize = 1; - m.columns = 1; - } - - // Construct vectors and matrices. - SPIRConstant(TypeID constant_type_, const SPIRConstant *const *vector_elements, uint32_t num_elements, - bool specialized) - : constant_type(constant_type_) - , specialization(specialized) - { - bool matrix = vector_elements[0]->m.c[0].vecsize > 1; - - if (matrix) - { - m.columns = num_elements; - - for (uint32_t i = 0; i < num_elements; i++) - { - m.c[i] = vector_elements[i]->m.c[0]; - if (vector_elements[i]->specialization) - m.id[i] = vector_elements[i]->self; - } - } - else - { - m.c[0].vecsize = num_elements; - m.columns = 1; - - for (uint32_t i = 0; i < num_elements; i++) - { - m.c[0].r[i] = vector_elements[i]->m.c[0].r[0]; - if (vector_elements[i]->specialization) - m.c[0].id[i] = vector_elements[i]->self; - } - } - } - - TypeID constant_type = 0; - ConstantMatrix m; - - // If this constant is a specialization constant (i.e. created with OpSpecConstant*). - bool specialization = false; - // If this constant is used as an array length which creates specialization restrictions on some backends. - bool is_used_as_array_length = false; - - // If true, this is a LUT, and should always be declared in the outer scope. - bool is_used_as_lut = false; - - // For composites which are constant arrays, etc. - SmallVector subconstants; - - // Non-Vulkan GLSL, HLSL and sometimes MSL emits defines for each specialization constant, - // and uses them to initialize the constant. This allows the user - // to still be able to specialize the value by supplying corresponding - // preprocessor directives before compiling the shader. - std::string specialization_constant_macro_name; - - SPIRV_CROSS_DECLARE_CLONE(SPIRConstant) -}; - -// Variants have a very specific allocation scheme. -struct ObjectPoolGroup -{ - std::unique_ptr pools[TypeCount]; -}; - -class Variant -{ -public: - explicit Variant(ObjectPoolGroup *group_) - : group(group_) - { - } - - ~Variant() - { - if (holder) - group->pools[type]->free_opaque(holder); - } - - // Marking custom move constructor as noexcept is important. - Variant(Variant &&other) SPIRV_CROSS_NOEXCEPT - { - *this = std::move(other); - } - - // We cannot copy from other variant without our own pool group. - // Have to explicitly copy. - Variant(const Variant &variant) = delete; - - // Marking custom move constructor as noexcept is important. - Variant &operator=(Variant &&other) SPIRV_CROSS_NOEXCEPT - { - if (this != &other) - { - if (holder) - group->pools[type]->free_opaque(holder); - holder = other.holder; - group = other.group; - type = other.type; - allow_type_rewrite = other.allow_type_rewrite; - - other.holder = nullptr; - other.type = TypeNone; - } - return *this; - } - - // This copy/clone should only be called in the Compiler constructor. - // If this is called inside ::compile(), we invalidate any references we took higher in the stack. - // This should never happen. - Variant &operator=(const Variant &other) - { -//#define SPIRV_CROSS_COPY_CONSTRUCTOR_SANITIZE -#ifdef SPIRV_CROSS_COPY_CONSTRUCTOR_SANITIZE - abort(); -#endif - if (this != &other) - { - if (holder) - group->pools[type]->free_opaque(holder); - - if (other.holder) - holder = other.holder->clone(group->pools[other.type].get()); - else - holder = nullptr; - - type = other.type; - allow_type_rewrite = other.allow_type_rewrite; - } - return *this; - } - - void set(IVariant *val, Types new_type) - { - if (holder) - group->pools[type]->free_opaque(holder); - holder = nullptr; - - if (!allow_type_rewrite && type != TypeNone && type != new_type) - { - if (val) - group->pools[new_type]->free_opaque(val); - SPIRV_CROSS_THROW("Overwriting a variant with new type."); - } - - holder = val; - type = new_type; - allow_type_rewrite = false; - } - - template - T *allocate_and_set(Types new_type, Ts &&... ts) - { - T *val = static_cast &>(*group->pools[new_type]).allocate(std::forward(ts)...); - set(val, new_type); - return val; - } - - template - T &get() - { - if (!holder) - SPIRV_CROSS_THROW("nullptr"); - if (static_cast(T::type) != type) - SPIRV_CROSS_THROW("Bad cast"); - return *static_cast(holder); - } - - template - const T &get() const - { - if (!holder) - SPIRV_CROSS_THROW("nullptr"); - if (static_cast(T::type) != type) - SPIRV_CROSS_THROW("Bad cast"); - return *static_cast(holder); - } - - Types get_type() const - { - return type; - } - - ID get_id() const - { - return holder ? holder->self : ID(0); - } - - bool empty() const - { - return !holder; - } - - void reset() - { - if (holder) - group->pools[type]->free_opaque(holder); - holder = nullptr; - type = TypeNone; - } - - void set_allow_type_rewrite() - { - allow_type_rewrite = true; - } - -private: - ObjectPoolGroup *group = nullptr; - IVariant *holder = nullptr; - Types type = TypeNone; - bool allow_type_rewrite = false; -}; - -template -T &variant_get(Variant &var) -{ - return var.get(); -} - -template -const T &variant_get(const Variant &var) -{ - return var.get(); -} - -template -T &variant_set(Variant &var, P &&... args) -{ - auto *ptr = var.allocate_and_set(static_cast(T::type), std::forward

(args)...); - return *ptr; -} - -struct AccessChainMeta -{ - uint32_t storage_physical_type = 0; - bool need_transpose = false; - bool storage_is_packed = false; - bool storage_is_invariant = false; - bool flattened_struct = false; -}; - -enum ExtendedDecorations -{ - // Marks if a buffer block is re-packed, i.e. member declaration might be subject to PhysicalTypeID remapping and padding. - SPIRVCrossDecorationBufferBlockRepacked = 0, - - // A type in a buffer block might be declared with a different physical type than the logical type. - // If this is not set, PhysicalTypeID == the SPIR-V type as declared. - SPIRVCrossDecorationPhysicalTypeID, - - // Marks if the physical type is to be declared with tight packing rules, i.e. packed_floatN on MSL and friends. - // If this is set, PhysicalTypeID might also be set. It can be set to same as logical type if all we're doing - // is converting float3 to packed_float3 for example. - // If this is marked on a struct, it means the struct itself must use only Packed types for all its members. - SPIRVCrossDecorationPhysicalTypePacked, - - // The padding in bytes before declaring this struct member. - // If used on a struct type, marks the target size of a struct. - SPIRVCrossDecorationPaddingTarget, - - SPIRVCrossDecorationInterfaceMemberIndex, - SPIRVCrossDecorationInterfaceOrigID, - SPIRVCrossDecorationResourceIndexPrimary, - // Used for decorations like resource indices for samplers when part of combined image samplers. - // A variable might need to hold two resource indices in this case. - SPIRVCrossDecorationResourceIndexSecondary, - // Used for resource indices for multiplanar images when part of combined image samplers. - SPIRVCrossDecorationResourceIndexTertiary, - SPIRVCrossDecorationResourceIndexQuaternary, - - // Marks a buffer block for using explicit offsets (GLSL/HLSL). - SPIRVCrossDecorationExplicitOffset, - - // Apply to a variable in the Input storage class; marks it as holding the base group passed to vkCmdDispatchBase(), - // or the base vertex and instance indices passed to vkCmdDrawIndexed(). - // In MSL, this is used to adjust the WorkgroupId and GlobalInvocationId variables in compute shaders, - // and to hold the BaseVertex and BaseInstance variables in vertex shaders. - SPIRVCrossDecorationBuiltInDispatchBase, - - // Apply to a variable that is a function parameter; marks it as being a "dynamic" - // combined image-sampler. In MSL, this is used when a function parameter might hold - // either a regular combined image-sampler or one that has an attached sampler - // Y'CbCr conversion. - SPIRVCrossDecorationDynamicImageSampler, - - // Apply to a variable in the Input storage class; marks it as holding the size of the stage - // input grid. - // In MSL, this is used to hold the vertex and instance counts in a tessellation pipeline - // vertex shader. - SPIRVCrossDecorationBuiltInStageInputSize, - - // Apply to any access chain of a tessellation I/O variable; stores the type of the sub-object - // that was chained to, as recorded in the input variable itself. This is used in case the pointer - // is itself used as the base of an access chain, to calculate the original type of the sub-object - // chained to, in case a swizzle needs to be applied. This should not happen normally with valid - // SPIR-V, but the MSL backend can change the type of input variables, necessitating the - // addition of swizzles to keep the generated code compiling. - SPIRVCrossDecorationTessIOOriginalInputTypeID, - - // Apply to any access chain of an interface variable used with pull-model interpolation, where the variable is a - // vector but the resulting pointer is a scalar; stores the component index that is to be accessed by the chain. - // This is used when emitting calls to interpolation functions on the chain in MSL: in this case, the component - // must be applied to the result, since pull-model interpolants in MSL cannot be swizzled directly, but the - // results of interpolation can. - SPIRVCrossDecorationInterpolantComponentExpr, - - SPIRVCrossDecorationCount -}; - -struct Meta -{ - struct Decoration - { - std::string alias; - std::string qualified_alias; - std::string hlsl_semantic; - Bitset decoration_flags; - spv::BuiltIn builtin_type = spv::BuiltInMax; - uint32_t location = 0; - uint32_t component = 0; - uint32_t set = 0; - uint32_t binding = 0; - uint32_t offset = 0; - uint32_t xfb_buffer = 0; - uint32_t xfb_stride = 0; - uint32_t stream = 0; - uint32_t array_stride = 0; - uint32_t matrix_stride = 0; - uint32_t input_attachment = 0; - uint32_t spec_id = 0; - uint32_t index = 0; - spv::FPRoundingMode fp_rounding_mode = spv::FPRoundingModeMax; - bool builtin = false; - - struct Extended - { - Extended() - { - // MSVC 2013 workaround to init like this. - for (auto &v : values) - v = 0; - } - - Bitset flags; - uint32_t values[SPIRVCrossDecorationCount]; - } extended; - }; - - Decoration decoration; - - // Intentionally not a SmallVector. Decoration is large and somewhat rare. - Vector members; - - std::unordered_map decoration_word_offset; - - // For SPV_GOOGLE_hlsl_functionality1. - bool hlsl_is_magic_counter_buffer = false; - // ID for the sibling counter buffer. - uint32_t hlsl_magic_counter_buffer = 0; -}; - -// A user callback that remaps the type of any variable. -// var_name is the declared name of the variable. -// name_of_type is the textual name of the type which will be used in the code unless written to by the callback. -using VariableTypeRemapCallback = - std::function; - -class Hasher -{ -public: - inline void u32(uint32_t value) - { - h = (h * 0x100000001b3ull) ^ value; - } - - inline uint64_t get() const - { - return h; - } - -private: - uint64_t h = 0xcbf29ce484222325ull; -}; - -static inline bool type_is_floating_point(const SPIRType &type) -{ - return type.basetype == SPIRType::Half || type.basetype == SPIRType::Float || type.basetype == SPIRType::Double; -} - -static inline bool type_is_integral(const SPIRType &type) -{ - return type.basetype == SPIRType::SByte || type.basetype == SPIRType::UByte || type.basetype == SPIRType::Short || - type.basetype == SPIRType::UShort || type.basetype == SPIRType::Int || type.basetype == SPIRType::UInt || - type.basetype == SPIRType::Int64 || type.basetype == SPIRType::UInt64; -} - -static inline SPIRType::BaseType to_signed_basetype(uint32_t width) -{ - switch (width) - { - case 8: - return SPIRType::SByte; - case 16: - return SPIRType::Short; - case 32: - return SPIRType::Int; - case 64: - return SPIRType::Int64; - default: - SPIRV_CROSS_THROW("Invalid bit width."); - } -} - -static inline SPIRType::BaseType to_unsigned_basetype(uint32_t width) -{ - switch (width) - { - case 8: - return SPIRType::UByte; - case 16: - return SPIRType::UShort; - case 32: - return SPIRType::UInt; - case 64: - return SPIRType::UInt64; - default: - SPIRV_CROSS_THROW("Invalid bit width."); - } -} - -// Returns true if an arithmetic operation does not change behavior depending on signedness. -static inline bool opcode_is_sign_invariant(spv::Op opcode) -{ - switch (opcode) - { - case spv::OpIEqual: - case spv::OpINotEqual: - case spv::OpISub: - case spv::OpIAdd: - case spv::OpIMul: - case spv::OpShiftLeftLogical: - case spv::OpBitwiseOr: - case spv::OpBitwiseXor: - case spv::OpBitwiseAnd: - return true; - - default: - return false; - } -} - -struct SetBindingPair -{ - uint32_t desc_set; - uint32_t binding; - - inline bool operator==(const SetBindingPair &other) const - { - return desc_set == other.desc_set && binding == other.binding; - } - - inline bool operator<(const SetBindingPair &other) const - { - return desc_set < other.desc_set || (desc_set == other.desc_set && binding < other.binding); - } -}; - -struct StageSetBinding -{ - spv::ExecutionModel model; - uint32_t desc_set; - uint32_t binding; - - inline bool operator==(const StageSetBinding &other) const - { - return model == other.model && desc_set == other.desc_set && binding == other.binding; - } -}; - -struct InternalHasher -{ - inline size_t operator()(const SetBindingPair &value) const - { - // Quality of hash doesn't really matter here. - auto hash_set = std::hash()(value.desc_set); - auto hash_binding = std::hash()(value.binding); - return (hash_set * 0x10001b31) ^ hash_binding; - } - - inline size_t operator()(const StageSetBinding &value) const - { - // Quality of hash doesn't really matter here. - auto hash_model = std::hash()(value.model); - auto hash_set = std::hash()(value.desc_set); - auto tmp_hash = (hash_model * 0x10001b31) ^ hash_set; - return (tmp_hash * 0x10001b31) ^ value.binding; - } -}; - -// Special constant used in a {MSL,HLSL}ResourceBinding desc_set -// element to indicate the bindings for the push constants. -static const uint32_t ResourceBindingPushConstantDescriptorSet = ~(0u); - -// Special constant used in a {MSL,HLSL}ResourceBinding binding -// element to indicate the bindings for the push constants. -static const uint32_t ResourceBindingPushConstantBinding = 0; -} // namespace SPIRV_CROSS_NAMESPACE - -namespace std -{ -template -struct hash> -{ - size_t operator()(const SPIRV_CROSS_NAMESPACE::TypedID &value) const - { - return std::hash()(value); - } -}; -} // namespace std - -#endif diff --git a/emscripten/include/spirv_cross/spirv_cross.hpp b/emscripten/include/spirv_cross/spirv_cross.hpp deleted file mode 100644 index c29ce6b4..00000000 --- a/emscripten/include/spirv_cross/spirv_cross.hpp +++ /dev/null @@ -1,1085 +0,0 @@ -/* - * Copyright 2015-2021 Arm Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * At your option, you may choose to accept this material under either: - * 1. The Apache License, Version 2.0, found at , or - * 2. The MIT License, found at . - * SPDX-License-Identifier: Apache-2.0 OR MIT. - */ - -#ifndef SPIRV_CROSS_HPP -#define SPIRV_CROSS_HPP - -#include "spirv.hpp" -#include "spirv_cfg.hpp" -#include "spirv_cross_parsed_ir.hpp" - -namespace SPIRV_CROSS_NAMESPACE -{ -struct Resource -{ - // Resources are identified with their SPIR-V ID. - // This is the ID of the OpVariable. - ID id; - - // The type ID of the variable which includes arrays and all type modifications. - // This type ID is not suitable for parsing OpMemberDecoration of a struct and other decorations in general - // since these modifications typically happen on the base_type_id. - TypeID type_id; - - // The base type of the declared resource. - // This type is the base type which ignores pointers and arrays of the type_id. - // This is mostly useful to parse decorations of the underlying type. - // base_type_id can also be obtained with get_type(get_type(type_id).self). - TypeID base_type_id; - - // The declared name (OpName) of the resource. - // For Buffer blocks, the name actually reflects the externally - // visible Block name. - // - // This name can be retrieved again by using either - // get_name(id) or get_name(base_type_id) depending if it's a buffer block or not. - // - // This name can be an empty string in which case get_fallback_name(id) can be - // used which obtains a suitable fallback identifier for an ID. - std::string name; -}; - -struct ShaderResources -{ - SmallVector uniform_buffers; - SmallVector storage_buffers; - SmallVector stage_inputs; - SmallVector stage_outputs; - SmallVector subpass_inputs; - SmallVector storage_images; - SmallVector sampled_images; - SmallVector atomic_counters; - SmallVector acceleration_structures; - - // There can only be one push constant block, - // but keep the vector in case this restriction is lifted in the future. - SmallVector push_constant_buffers; - - // For Vulkan GLSL and HLSL source, - // these correspond to separate texture2D and samplers respectively. - SmallVector separate_images; - SmallVector separate_samplers; -}; - -struct CombinedImageSampler -{ - // The ID of the sampler2D variable. - VariableID combined_id; - // The ID of the texture2D variable. - VariableID image_id; - // The ID of the sampler variable. - VariableID sampler_id; -}; - -struct SpecializationConstant -{ - // The ID of the specialization constant. - ConstantID id; - // The constant ID of the constant, used in Vulkan during pipeline creation. - uint32_t constant_id; -}; - -struct BufferRange -{ - unsigned index; - size_t offset; - size_t range; -}; - -enum BufferPackingStandard -{ - BufferPackingStd140, - BufferPackingStd430, - BufferPackingStd140EnhancedLayout, - BufferPackingStd430EnhancedLayout, - BufferPackingHLSLCbuffer, - BufferPackingHLSLCbufferPackOffset, - BufferPackingScalar, - BufferPackingScalarEnhancedLayout -}; - -struct EntryPoint -{ - std::string name; - spv::ExecutionModel execution_model; -}; - -class Compiler -{ -public: - friend class CFG; - friend class DominatorBuilder; - - // The constructor takes a buffer of SPIR-V words and parses it. - // It will create its own parser, parse the SPIR-V and move the parsed IR - // as if you had called the constructors taking ParsedIR directly. - explicit Compiler(std::vector ir); - Compiler(const uint32_t *ir, size_t word_count); - - // This is more modular. We can also consume a ParsedIR structure directly, either as a move, or copy. - // With copy, we can reuse the same parsed IR for multiple Compiler instances. - explicit Compiler(const ParsedIR &ir); - explicit Compiler(ParsedIR &&ir); - - virtual ~Compiler() = default; - - // After parsing, API users can modify the SPIR-V via reflection and call this - // to disassemble the SPIR-V into the desired langauage. - // Sub-classes actually implement this. - virtual std::string compile(); - - // Gets the identifier (OpName) of an ID. If not defined, an empty string will be returned. - const std::string &get_name(ID id) const; - - // Applies a decoration to an ID. Effectively injects OpDecorate. - void set_decoration(ID id, spv::Decoration decoration, uint32_t argument = 0); - void set_decoration_string(ID id, spv::Decoration decoration, const std::string &argument); - - // Overrides the identifier OpName of an ID. - // Identifiers beginning with underscores or identifiers which contain double underscores - // are reserved by the implementation. - void set_name(ID id, const std::string &name); - - // Gets a bitmask for the decorations which are applied to ID. - // I.e. (1ull << spv::DecorationFoo) | (1ull << spv::DecorationBar) - const Bitset &get_decoration_bitset(ID id) const; - - // Returns whether the decoration has been applied to the ID. - bool has_decoration(ID id, spv::Decoration decoration) const; - - // Gets the value for decorations which take arguments. - // If the decoration is a boolean (i.e. spv::DecorationNonWritable), - // 1 will be returned. - // If decoration doesn't exist or decoration is not recognized, - // 0 will be returned. - uint32_t get_decoration(ID id, spv::Decoration decoration) const; - const std::string &get_decoration_string(ID id, spv::Decoration decoration) const; - - // Removes the decoration for an ID. - void unset_decoration(ID id, spv::Decoration decoration); - - // Gets the SPIR-V type associated with ID. - // Mostly used with Resource::type_id and Resource::base_type_id to parse the underlying type of a resource. - const SPIRType &get_type(TypeID id) const; - - // Gets the SPIR-V type of a variable. - const SPIRType &get_type_from_variable(VariableID id) const; - - // Gets the underlying storage class for an OpVariable. - spv::StorageClass get_storage_class(VariableID id) const; - - // If get_name() is an empty string, get the fallback name which will be used - // instead in the disassembled source. - virtual const std::string get_fallback_name(ID id) const; - - // If get_name() of a Block struct is an empty string, get the fallback name. - // This needs to be per-variable as multiple variables can use the same block type. - virtual const std::string get_block_fallback_name(VariableID id) const; - - // Given an OpTypeStruct in ID, obtain the identifier for member number "index". - // This may be an empty string. - const std::string &get_member_name(TypeID id, uint32_t index) const; - - // Given an OpTypeStruct in ID, obtain the OpMemberDecoration for member number "index". - uint32_t get_member_decoration(TypeID id, uint32_t index, spv::Decoration decoration) const; - const std::string &get_member_decoration_string(TypeID id, uint32_t index, spv::Decoration decoration) const; - - // Sets the member identifier for OpTypeStruct ID, member number "index". - void set_member_name(TypeID id, uint32_t index, const std::string &name); - - // Returns the qualified member identifier for OpTypeStruct ID, member number "index", - // or an empty string if no qualified alias exists - const std::string &get_member_qualified_name(TypeID type_id, uint32_t index) const; - - // Gets the decoration mask for a member of a struct, similar to get_decoration_mask. - const Bitset &get_member_decoration_bitset(TypeID id, uint32_t index) const; - - // Returns whether the decoration has been applied to a member of a struct. - bool has_member_decoration(TypeID id, uint32_t index, spv::Decoration decoration) const; - - // Similar to set_decoration, but for struct members. - void set_member_decoration(TypeID id, uint32_t index, spv::Decoration decoration, uint32_t argument = 0); - void set_member_decoration_string(TypeID id, uint32_t index, spv::Decoration decoration, - const std::string &argument); - - // Unsets a member decoration, similar to unset_decoration. - void unset_member_decoration(TypeID id, uint32_t index, spv::Decoration decoration); - - // Gets the fallback name for a member, similar to get_fallback_name. - virtual const std::string get_fallback_member_name(uint32_t index) const - { - return join("_", index); - } - - // Returns a vector of which members of a struct are potentially in use by a - // SPIR-V shader. The granularity of this analysis is per-member of a struct. - // This can be used for Buffer (UBO), BufferBlock/StorageBuffer (SSBO) and PushConstant blocks. - // ID is the Resource::id obtained from get_shader_resources(). - SmallVector get_active_buffer_ranges(VariableID id) const; - - // Returns the effective size of a buffer block. - size_t get_declared_struct_size(const SPIRType &struct_type) const; - - // Returns the effective size of a buffer block, with a given array size - // for a runtime array. - // SSBOs are typically declared as runtime arrays. get_declared_struct_size() will return 0 for the size. - // This is not very helpful for applications which might need to know the array stride of its last member. - // This can be done through the API, but it is not very intuitive how to accomplish this, so here we provide a helper function - // to query the size of the buffer, assuming that the last member has a certain size. - // If the buffer does not contain a runtime array, array_size is ignored, and the function will behave as - // get_declared_struct_size(). - // To get the array stride of the last member, something like: - // get_declared_struct_size_runtime_array(type, 1) - get_declared_struct_size_runtime_array(type, 0) will work. - size_t get_declared_struct_size_runtime_array(const SPIRType &struct_type, size_t array_size) const; - - // Returns the effective size of a buffer block struct member. - size_t get_declared_struct_member_size(const SPIRType &struct_type, uint32_t index) const; - - // Returns a set of all global variables which are statically accessed - // by the control flow graph from the current entry point. - // Only variables which change the interface for a shader are returned, that is, - // variables with storage class of Input, Output, Uniform, UniformConstant, PushConstant and AtomicCounter - // storage classes are returned. - // - // To use the returned set as the filter for which variables are used during compilation, - // this set can be moved to set_enabled_interface_variables(). - std::unordered_set get_active_interface_variables() const; - - // Sets the interface variables which are used during compilation. - // By default, all variables are used. - // Once set, compile() will only consider the set in active_variables. - void set_enabled_interface_variables(std::unordered_set active_variables); - - // Query shader resources, use ids with reflection interface to modify or query binding points, etc. - ShaderResources get_shader_resources() const; - - // Query shader resources, but only return the variables which are part of active_variables. - // E.g.: get_shader_resources(get_active_variables()) to only return the variables which are statically - // accessed. - ShaderResources get_shader_resources(const std::unordered_set &active_variables) const; - - // Remapped variables are considered built-in variables and a backend will - // not emit a declaration for this variable. - // This is mostly useful for making use of builtins which are dependent on extensions. - void set_remapped_variable_state(VariableID id, bool remap_enable); - bool get_remapped_variable_state(VariableID id) const; - - // For subpassInput variables which are remapped to plain variables, - // the number of components in the remapped - // variable must be specified as the backing type of subpass inputs are opaque. - void set_subpass_input_remapped_components(VariableID id, uint32_t components); - uint32_t get_subpass_input_remapped_components(VariableID id) const; - - // All operations work on the current entry point. - // Entry points can be swapped out with set_entry_point(). - // Entry points should be set right after the constructor completes as some reflection functions traverse the graph from the entry point. - // Resource reflection also depends on the entry point. - // By default, the current entry point is set to the first OpEntryPoint which appears in the SPIR-V module. - - // Some shader languages restrict the names that can be given to entry points, and the - // corresponding backend will automatically rename an entry point name, during the call - // to compile() if it is illegal. For example, the common entry point name main() is - // illegal in MSL, and is renamed to an alternate name by the MSL backend. - // Given the original entry point name contained in the SPIR-V, this function returns - // the name, as updated by the backend during the call to compile(). If the name is not - // illegal, and has not been renamed, or if this function is called before compile(), - // this function will simply return the same name. - - // New variants of entry point query and reflection. - // Names for entry points in the SPIR-V module may alias if they belong to different execution models. - // To disambiguate, we must pass along with the entry point names the execution model. - SmallVector get_entry_points_and_stages() const; - void set_entry_point(const std::string &entry, spv::ExecutionModel execution_model); - - // Renames an entry point from old_name to new_name. - // If old_name is currently selected as the current entry point, it will continue to be the current entry point, - // albeit with a new name. - // get_entry_points() is essentially invalidated at this point. - void rename_entry_point(const std::string &old_name, const std::string &new_name, - spv::ExecutionModel execution_model); - const SPIREntryPoint &get_entry_point(const std::string &name, spv::ExecutionModel execution_model) const; - SPIREntryPoint &get_entry_point(const std::string &name, spv::ExecutionModel execution_model); - const std::string &get_cleansed_entry_point_name(const std::string &name, - spv::ExecutionModel execution_model) const; - - // Traverses all reachable opcodes and sets active_builtins to a bitmask of all builtin variables which are accessed in the shader. - void update_active_builtins(); - bool has_active_builtin(spv::BuiltIn builtin, spv::StorageClass storage); - - // Query and modify OpExecutionMode. - const Bitset &get_execution_mode_bitset() const; - - void unset_execution_mode(spv::ExecutionMode mode); - void set_execution_mode(spv::ExecutionMode mode, uint32_t arg0 = 0, uint32_t arg1 = 0, uint32_t arg2 = 0); - - // Gets argument for an execution mode (LocalSize, Invocations, OutputVertices). - // For LocalSize, the index argument is used to select the dimension (X = 0, Y = 1, Z = 2). - // For execution modes which do not have arguments, 0 is returned. - uint32_t get_execution_mode_argument(spv::ExecutionMode mode, uint32_t index = 0) const; - spv::ExecutionModel get_execution_model() const; - - bool is_tessellation_shader() const; - - // In SPIR-V, the compute work group size can be represented by a constant vector, in which case - // the LocalSize execution mode is ignored. - // - // This constant vector can be a constant vector, specialization constant vector, or partly specialized constant vector. - // To modify and query work group dimensions which are specialization constants, SPIRConstant values must be modified - // directly via get_constant() rather than using LocalSize directly. This function will return which constants should be modified. - // - // To modify dimensions which are *not* specialization constants, set_execution_mode should be used directly. - // Arguments to set_execution_mode which are specialization constants are effectively ignored during compilation. - // NOTE: This is somewhat different from how SPIR-V works. In SPIR-V, the constant vector will completely replace LocalSize, - // while in this interface, LocalSize is only ignored for specialization constants. - // - // The specialization constant will be written to x, y and z arguments. - // If the component is not a specialization constant, a zeroed out struct will be written. - // The return value is the constant ID of the builtin WorkGroupSize, but this is not expected to be useful - // for most use cases. - uint32_t get_work_group_size_specialization_constants(SpecializationConstant &x, SpecializationConstant &y, - SpecializationConstant &z) const; - - // Analyzes all OpImageFetch (texelFetch) opcodes and checks if there are instances where - // said instruction is used without a combined image sampler. - // GLSL targets do not support the use of texelFetch without a sampler. - // To workaround this, we must inject a dummy sampler which can be used to form a sampler2D at the call-site of - // texelFetch as necessary. - // - // This must be called before build_combined_image_samplers(). - // build_combined_image_samplers() may refer to the ID returned by this method if the returned ID is non-zero. - // The return value will be the ID of a sampler object if a dummy sampler is necessary, or 0 if no sampler object - // is required. - // - // If the returned ID is non-zero, it can be decorated with set/bindings as desired before calling compile(). - // Calling this function also invalidates get_active_interface_variables(), so this should be called - // before that function. - VariableID build_dummy_sampler_for_combined_images(); - - // Analyzes all separate image and samplers used from the currently selected entry point, - // and re-routes them all to a combined image sampler instead. - // This is required to "support" separate image samplers in targets which do not natively support - // this feature, like GLSL/ESSL. - // - // This must be called before compile() if such remapping is desired. - // This call will add new sampled images to the SPIR-V, - // so it will appear in reflection if get_shader_resources() is called after build_combined_image_samplers. - // - // If any image/sampler remapping was found, no separate image/samplers will appear in the decompiled output, - // but will still appear in reflection. - // - // The resulting samplers will be void of any decorations like name, descriptor sets and binding points, - // so this can be added before compile() if desired. - // - // Combined image samplers originating from this set are always considered active variables. - // Arrays of separate samplers are not supported, but arrays of separate images are supported. - // Array of images + sampler -> Array of combined image samplers. - void build_combined_image_samplers(); - - // Gets a remapping for the combined image samplers. - const SmallVector &get_combined_image_samplers() const - { - return combined_image_samplers; - } - - // Set a new variable type remap callback. - // The type remapping is designed to allow global interface variable to assume more special types. - // A typical example here is to remap sampler2D into samplerExternalOES, which currently isn't supported - // directly by SPIR-V. - // - // In compile() while emitting code, - // for every variable that is declared, including function parameters, the callback will be called - // and the API user has a chance to change the textual representation of the type used to declare the variable. - // The API user can detect special patterns in names to guide the remapping. - void set_variable_type_remap_callback(VariableTypeRemapCallback cb) - { - variable_remap_callback = std::move(cb); - } - - // API for querying which specialization constants exist. - // To modify a specialization constant before compile(), use get_constant(constant.id), - // then update constants directly in the SPIRConstant data structure. - // For composite types, the subconstants can be iterated over and modified. - // constant_type is the SPIRType for the specialization constant, - // which can be queried to determine which fields in the unions should be poked at. - SmallVector get_specialization_constants() const; - SPIRConstant &get_constant(ConstantID id); - const SPIRConstant &get_constant(ConstantID id) const; - - uint32_t get_current_id_bound() const - { - return uint32_t(ir.ids.size()); - } - - // API for querying buffer objects. - // The type passed in here should be the base type of a resource, i.e. - // get_type(resource.base_type_id) - // as decorations are set in the basic Block type. - // The type passed in here must have these decorations set, or an exception is raised. - // Only UBOs and SSBOs or sub-structs which are part of these buffer types will have these decorations set. - uint32_t type_struct_member_offset(const SPIRType &type, uint32_t index) const; - uint32_t type_struct_member_array_stride(const SPIRType &type, uint32_t index) const; - uint32_t type_struct_member_matrix_stride(const SPIRType &type, uint32_t index) const; - - // Gets the offset in SPIR-V words (uint32_t) for a decoration which was originally declared in the SPIR-V binary. - // The offset will point to one or more uint32_t literals which can be modified in-place before using the SPIR-V binary. - // Note that adding or removing decorations using the reflection API will not change the behavior of this function. - // If the decoration was declared, sets the word_offset to an offset into the provided SPIR-V binary buffer and returns true, - // otherwise, returns false. - // If the decoration does not have any value attached to it (e.g. DecorationRelaxedPrecision), this function will also return false. - bool get_binary_offset_for_decoration(VariableID id, spv::Decoration decoration, uint32_t &word_offset) const; - - // HLSL counter buffer reflection interface. - // Append/Consume/Increment/Decrement in HLSL is implemented as two "neighbor" buffer objects where - // one buffer implements the storage, and a single buffer containing just a lone "int" implements the counter. - // To SPIR-V these will be exposed as two separate buffers, but glslang HLSL frontend emits a special indentifier - // which lets us link the two buffers together. - - // Queries if a variable ID is a counter buffer which "belongs" to a regular buffer object. - - // If SPV_GOOGLE_hlsl_functionality1 is used, this can be used even with a stripped SPIR-V module. - // Otherwise, this query is purely based on OpName identifiers as found in the SPIR-V module, and will - // only return true if OpSource was reported HLSL. - // To rely on this functionality, ensure that the SPIR-V module is not stripped. - - bool buffer_is_hlsl_counter_buffer(VariableID id) const; - - // Queries if a buffer object has a neighbor "counter" buffer. - // If so, the ID of that counter buffer will be returned in counter_id. - // If SPV_GOOGLE_hlsl_functionality1 is used, this can be used even with a stripped SPIR-V module. - // Otherwise, this query is purely based on OpName identifiers as found in the SPIR-V module, and will - // only return true if OpSource was reported HLSL. - // To rely on this functionality, ensure that the SPIR-V module is not stripped. - bool buffer_get_hlsl_counter_buffer(VariableID id, uint32_t &counter_id) const; - - // Gets the list of all SPIR-V Capabilities which were declared in the SPIR-V module. - const SmallVector &get_declared_capabilities() const; - - // Gets the list of all SPIR-V extensions which were declared in the SPIR-V module. - const SmallVector &get_declared_extensions() const; - - // When declaring buffer blocks in GLSL, the name declared in the GLSL source - // might not be the same as the name declared in the SPIR-V module due to naming conflicts. - // In this case, SPIRV-Cross needs to find a fallback-name, and it might only - // be possible to know this name after compiling to GLSL. - // This is particularly important for HLSL input and UAVs which tends to reuse the same block type - // for multiple distinct blocks. For these cases it is not possible to modify the name of the type itself - // because it might be unique. Instead, you can use this interface to check after compilation which - // name was actually used if your input SPIR-V tends to have this problem. - // For other names like remapped names for variables, etc, it's generally enough to query the name of the variables - // after compiling, block names are an exception to this rule. - // ID is the name of a variable as returned by Resource::id, and must be a variable with a Block-like type. - // - // This also applies to HLSL cbuffers. - std::string get_remapped_declared_block_name(VariableID id) const; - - // For buffer block variables, get the decorations for that variable. - // Sometimes, decorations for buffer blocks are found in member decorations instead - // of direct decorations on the variable itself. - // The most common use here is to check if a buffer is readonly or writeonly. - Bitset get_buffer_block_flags(VariableID id) const; - -protected: - const uint32_t *stream(const Instruction &instr) const - { - // If we're not going to use any arguments, just return nullptr. - // We want to avoid case where we return an out of range pointer - // that trips debug assertions on some platforms. - if (!instr.length) - return nullptr; - - if (instr.offset + instr.length > ir.spirv.size()) - SPIRV_CROSS_THROW("Compiler::stream() out of range."); - return &ir.spirv[instr.offset]; - } - - ParsedIR ir; - // Marks variables which have global scope and variables which can alias with other variables - // (SSBO, image load store, etc) - SmallVector global_variables; - SmallVector aliased_variables; - - SPIRFunction *current_function = nullptr; - SPIRBlock *current_block = nullptr; - uint32_t current_loop_level = 0; - std::unordered_set active_interface_variables; - bool check_active_interface_variables = false; - - void add_loop_level(); - - void set_initializers(SPIRExpression &e) - { - e.emitted_loop_level = current_loop_level; - } - - template - void set_initializers(const T &) - { - } - - // If our IDs are out of range here as part of opcodes, throw instead of - // undefined behavior. - template - T &set(uint32_t id, P &&... args) - { - ir.add_typed_id(static_cast(T::type), id); - auto &var = variant_set(ir.ids[id], std::forward

(args)...); - var.self = id; - set_initializers(var); - return var; - } - - template - T &get(uint32_t id) - { - return variant_get(ir.ids[id]); - } - - template - T *maybe_get(uint32_t id) - { - if (id >= ir.ids.size()) - return nullptr; - else if (ir.ids[id].get_type() == static_cast(T::type)) - return &get(id); - else - return nullptr; - } - - template - const T &get(uint32_t id) const - { - return variant_get(ir.ids[id]); - } - - template - const T *maybe_get(uint32_t id) const - { - if (id >= ir.ids.size()) - return nullptr; - else if (ir.ids[id].get_type() == static_cast(T::type)) - return &get(id); - else - return nullptr; - } - - // Gets the id of SPIR-V type underlying the given type_id, which might be a pointer. - uint32_t get_pointee_type_id(uint32_t type_id) const; - - // Gets the SPIR-V type underlying the given type, which might be a pointer. - const SPIRType &get_pointee_type(const SPIRType &type) const; - - // Gets the SPIR-V type underlying the given type_id, which might be a pointer. - const SPIRType &get_pointee_type(uint32_t type_id) const; - - // Gets the ID of the SPIR-V type underlying a variable. - uint32_t get_variable_data_type_id(const SPIRVariable &var) const; - - // Gets the SPIR-V type underlying a variable. - SPIRType &get_variable_data_type(const SPIRVariable &var); - - // Gets the SPIR-V type underlying a variable. - const SPIRType &get_variable_data_type(const SPIRVariable &var) const; - - // Gets the SPIR-V element type underlying an array variable. - SPIRType &get_variable_element_type(const SPIRVariable &var); - - // Gets the SPIR-V element type underlying an array variable. - const SPIRType &get_variable_element_type(const SPIRVariable &var) const; - - // Sets the qualified member identifier for OpTypeStruct ID, member number "index". - void set_member_qualified_name(uint32_t type_id, uint32_t index, const std::string &name); - void set_qualified_name(uint32_t id, const std::string &name); - - // Returns if the given type refers to a sampled image. - bool is_sampled_image_type(const SPIRType &type); - - const SPIREntryPoint &get_entry_point() const; - SPIREntryPoint &get_entry_point(); - static bool is_tessellation_shader(spv::ExecutionModel model); - - virtual std::string to_name(uint32_t id, bool allow_alias = true) const; - bool is_builtin_variable(const SPIRVariable &var) const; - bool is_builtin_type(const SPIRType &type) const; - bool is_hidden_variable(const SPIRVariable &var, bool include_builtins = false) const; - bool is_immutable(uint32_t id) const; - bool is_member_builtin(const SPIRType &type, uint32_t index, spv::BuiltIn *builtin) const; - bool is_scalar(const SPIRType &type) const; - bool is_vector(const SPIRType &type) const; - bool is_matrix(const SPIRType &type) const; - bool is_array(const SPIRType &type) const; - uint32_t expression_type_id(uint32_t id) const; - const SPIRType &expression_type(uint32_t id) const; - bool expression_is_lvalue(uint32_t id) const; - bool variable_storage_is_aliased(const SPIRVariable &var); - SPIRVariable *maybe_get_backing_variable(uint32_t chain); - spv::StorageClass get_expression_effective_storage_class(uint32_t ptr); - - void register_read(uint32_t expr, uint32_t chain, bool forwarded); - void register_write(uint32_t chain); - - inline bool is_continue(uint32_t next) const - { - return (ir.block_meta[next] & ParsedIR::BLOCK_META_CONTINUE_BIT) != 0; - } - - inline bool is_single_block_loop(uint32_t next) const - { - auto &block = get(next); - return block.merge == SPIRBlock::MergeLoop && block.continue_block == ID(next); - } - - inline bool is_break(uint32_t next) const - { - return (ir.block_meta[next] & - (ParsedIR::BLOCK_META_LOOP_MERGE_BIT | ParsedIR::BLOCK_META_MULTISELECT_MERGE_BIT)) != 0; - } - - inline bool is_loop_break(uint32_t next) const - { - return (ir.block_meta[next] & ParsedIR::BLOCK_META_LOOP_MERGE_BIT) != 0; - } - - inline bool is_conditional(uint32_t next) const - { - return (ir.block_meta[next] & - (ParsedIR::BLOCK_META_SELECTION_MERGE_BIT | ParsedIR::BLOCK_META_MULTISELECT_MERGE_BIT)) != 0; - } - - // Dependency tracking for temporaries read from variables. - void flush_dependees(SPIRVariable &var); - void flush_all_active_variables(); - void flush_control_dependent_expressions(uint32_t block); - void flush_all_atomic_capable_variables(); - void flush_all_aliased_variables(); - void register_global_read_dependencies(const SPIRBlock &func, uint32_t id); - void register_global_read_dependencies(const SPIRFunction &func, uint32_t id); - std::unordered_set invalid_expressions; - - void update_name_cache(std::unordered_set &cache, std::string &name); - - // A variant which takes two sets of names. The secondary is only used to verify there are no collisions, - // but the set is not updated when we have found a new name. - // Used primarily when adding block interface names. - void update_name_cache(std::unordered_set &cache_primary, - const std::unordered_set &cache_secondary, std::string &name); - - bool function_is_pure(const SPIRFunction &func); - bool block_is_pure(const SPIRBlock &block); - - bool execution_is_branchless(const SPIRBlock &from, const SPIRBlock &to) const; - bool execution_is_direct_branch(const SPIRBlock &from, const SPIRBlock &to) const; - bool execution_is_noop(const SPIRBlock &from, const SPIRBlock &to) const; - SPIRBlock::ContinueBlockType continue_block_type(const SPIRBlock &continue_block) const; - - void force_recompile(); - void clear_force_recompile(); - bool is_forcing_recompilation() const; - bool is_force_recompile = false; - - bool block_is_loop_candidate(const SPIRBlock &block, SPIRBlock::Method method) const; - - bool types_are_logically_equivalent(const SPIRType &a, const SPIRType &b) const; - void inherit_expression_dependencies(uint32_t dst, uint32_t source); - void add_implied_read_expression(SPIRExpression &e, uint32_t source); - void add_implied_read_expression(SPIRAccessChain &e, uint32_t source); - - // For proper multiple entry point support, allow querying if an Input or Output - // variable is part of that entry points interface. - bool interface_variable_exists_in_entry_point(uint32_t id) const; - - SmallVector combined_image_samplers; - - void remap_variable_type_name(const SPIRType &type, const std::string &var_name, std::string &type_name) const - { - if (variable_remap_callback) - variable_remap_callback(type, var_name, type_name); - } - - void set_ir(const ParsedIR &parsed); - void set_ir(ParsedIR &&parsed); - void parse_fixup(); - - // Used internally to implement various traversals for queries. - struct OpcodeHandler - { - virtual ~OpcodeHandler() = default; - - // Return true if traversal should continue. - // If false, traversal will end immediately. - virtual bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) = 0; - - virtual bool follow_function_call(const SPIRFunction &) - { - return true; - } - - virtual void set_current_block(const SPIRBlock &) - { - } - - // Called after returning from a function or when entering a block, - // can be called multiple times per block, - // while set_current_block is only called on block entry. - virtual void rearm_current_block(const SPIRBlock &) - { - } - - virtual bool begin_function_scope(const uint32_t *, uint32_t) - { - return true; - } - - virtual bool end_function_scope(const uint32_t *, uint32_t) - { - return true; - } - }; - - struct BufferAccessHandler : OpcodeHandler - { - BufferAccessHandler(const Compiler &compiler_, SmallVector &ranges_, uint32_t id_) - : compiler(compiler_) - , ranges(ranges_) - , id(id_) - { - } - - bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override; - - const Compiler &compiler; - SmallVector &ranges; - uint32_t id; - - std::unordered_set seen; - }; - - struct InterfaceVariableAccessHandler : OpcodeHandler - { - InterfaceVariableAccessHandler(const Compiler &compiler_, std::unordered_set &variables_) - : compiler(compiler_) - , variables(variables_) - { - } - - bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override; - - const Compiler &compiler; - std::unordered_set &variables; - }; - - struct CombinedImageSamplerHandler : OpcodeHandler - { - CombinedImageSamplerHandler(Compiler &compiler_) - : compiler(compiler_) - { - } - bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override; - bool begin_function_scope(const uint32_t *args, uint32_t length) override; - bool end_function_scope(const uint32_t *args, uint32_t length) override; - - Compiler &compiler; - - // Each function in the call stack needs its own remapping for parameters so we can deduce which global variable each texture/sampler the parameter is statically bound to. - std::stack> parameter_remapping; - std::stack functions; - - uint32_t remap_parameter(uint32_t id); - void push_remap_parameters(const SPIRFunction &func, const uint32_t *args, uint32_t length); - void pop_remap_parameters(); - void register_combined_image_sampler(SPIRFunction &caller, VariableID combined_id, VariableID texture_id, - VariableID sampler_id, bool depth); - }; - - struct DummySamplerForCombinedImageHandler : OpcodeHandler - { - DummySamplerForCombinedImageHandler(Compiler &compiler_) - : compiler(compiler_) - { - } - bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override; - - Compiler &compiler; - bool need_dummy_sampler = false; - }; - - struct ActiveBuiltinHandler : OpcodeHandler - { - ActiveBuiltinHandler(Compiler &compiler_) - : compiler(compiler_) - { - } - - bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override; - Compiler &compiler; - - void handle_builtin(const SPIRType &type, spv::BuiltIn builtin, const Bitset &decoration_flags); - void add_if_builtin(uint32_t id); - void add_if_builtin_or_block(uint32_t id); - void add_if_builtin(uint32_t id, bool allow_blocks); - }; - - bool traverse_all_reachable_opcodes(const SPIRBlock &block, OpcodeHandler &handler) const; - bool traverse_all_reachable_opcodes(const SPIRFunction &block, OpcodeHandler &handler) const; - // This must be an ordered data structure so we always pick the same type aliases. - SmallVector global_struct_cache; - - ShaderResources get_shader_resources(const std::unordered_set *active_variables) const; - - VariableTypeRemapCallback variable_remap_callback; - - bool get_common_basic_type(const SPIRType &type, SPIRType::BaseType &base_type); - - std::unordered_set forced_temporaries; - std::unordered_set forwarded_temporaries; - std::unordered_set suppressed_usage_tracking; - std::unordered_set hoisted_temporaries; - std::unordered_set forced_invariant_temporaries; - - Bitset active_input_builtins; - Bitset active_output_builtins; - uint32_t clip_distance_count = 0; - uint32_t cull_distance_count = 0; - bool position_invariant = false; - - void analyze_parameter_preservation( - SPIRFunction &entry, const CFG &cfg, - const std::unordered_map> &variable_to_blocks, - const std::unordered_map> &complete_write_blocks); - - // If a variable ID or parameter ID is found in this set, a sampler is actually a shadow/comparison sampler. - // SPIR-V does not support this distinction, so we must keep track of this information outside the type system. - // There might be unrelated IDs found in this set which do not correspond to actual variables. - // This set should only be queried for the existence of samplers which are already known to be variables or parameter IDs. - // Similar is implemented for images, as well as if subpass inputs are needed. - std::unordered_set comparison_ids; - bool need_subpass_input = false; - - // In certain backends, we will need to use a dummy sampler to be able to emit code. - // GLSL does not support texelFetch on texture2D objects, but SPIR-V does, - // so we need to workaround by having the application inject a dummy sampler. - uint32_t dummy_sampler_id = 0; - - void analyze_image_and_sampler_usage(); - - struct CombinedImageSamplerDrefHandler : OpcodeHandler - { - CombinedImageSamplerDrefHandler(Compiler &compiler_) - : compiler(compiler_) - { - } - bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override; - - Compiler &compiler; - std::unordered_set dref_combined_samplers; - }; - - struct CombinedImageSamplerUsageHandler : OpcodeHandler - { - CombinedImageSamplerUsageHandler(Compiler &compiler_, - const std::unordered_set &dref_combined_samplers_) - : compiler(compiler_) - , dref_combined_samplers(dref_combined_samplers_) - { - } - - bool begin_function_scope(const uint32_t *args, uint32_t length) override; - bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override; - Compiler &compiler; - const std::unordered_set &dref_combined_samplers; - - std::unordered_map> dependency_hierarchy; - std::unordered_set comparison_ids; - - void add_hierarchy_to_comparison_ids(uint32_t ids); - bool need_subpass_input = false; - void add_dependency(uint32_t dst, uint32_t src); - }; - - void build_function_control_flow_graphs_and_analyze(); - std::unordered_map> function_cfgs; - const CFG &get_cfg_for_current_function() const; - const CFG &get_cfg_for_function(uint32_t id) const; - - struct CFGBuilder : OpcodeHandler - { - explicit CFGBuilder(Compiler &compiler_); - - bool follow_function_call(const SPIRFunction &func) override; - bool handle(spv::Op op, const uint32_t *args, uint32_t length) override; - Compiler &compiler; - std::unordered_map> function_cfgs; - }; - - struct AnalyzeVariableScopeAccessHandler : OpcodeHandler - { - AnalyzeVariableScopeAccessHandler(Compiler &compiler_, SPIRFunction &entry_); - - bool follow_function_call(const SPIRFunction &) override; - void set_current_block(const SPIRBlock &block) override; - - void notify_variable_access(uint32_t id, uint32_t block); - bool id_is_phi_variable(uint32_t id) const; - bool id_is_potential_temporary(uint32_t id) const; - bool handle(spv::Op op, const uint32_t *args, uint32_t length) override; - - Compiler &compiler; - SPIRFunction &entry; - std::unordered_map> accessed_variables_to_block; - std::unordered_map> accessed_temporaries_to_block; - std::unordered_map result_id_to_type; - std::unordered_map> complete_write_variables_to_block; - std::unordered_map> partial_write_variables_to_block; - std::unordered_set access_chain_expressions; - // Access chains used in multiple blocks mean hoisting all the variables used to construct the access chain as not all backends can use pointers. - std::unordered_map> access_chain_children; - const SPIRBlock *current_block = nullptr; - }; - - struct StaticExpressionAccessHandler : OpcodeHandler - { - StaticExpressionAccessHandler(Compiler &compiler_, uint32_t variable_id_); - bool follow_function_call(const SPIRFunction &) override; - bool handle(spv::Op op, const uint32_t *args, uint32_t length) override; - - Compiler &compiler; - uint32_t variable_id; - uint32_t static_expression = 0; - uint32_t write_count = 0; - }; - - struct PhysicalStorageBufferPointerHandler : OpcodeHandler - { - explicit PhysicalStorageBufferPointerHandler(Compiler &compiler_); - bool handle(spv::Op op, const uint32_t *args, uint32_t length) override; - Compiler &compiler; - std::unordered_set types; - }; - void analyze_non_block_pointer_types(); - SmallVector physical_storage_non_block_pointer_types; - - void analyze_variable_scope(SPIRFunction &function, AnalyzeVariableScopeAccessHandler &handler); - void find_function_local_luts(SPIRFunction &function, const AnalyzeVariableScopeAccessHandler &handler, - bool single_function); - bool may_read_undefined_variable_in_block(const SPIRBlock &block, uint32_t var); - - // Finds all resources that are written to from inside the critical section, if present. - // The critical section is delimited by OpBeginInvocationInterlockEXT and - // OpEndInvocationInterlockEXT instructions. In MSL and HLSL, any resources written - // while inside the critical section must be placed in a raster order group. - struct InterlockedResourceAccessHandler : OpcodeHandler - { - InterlockedResourceAccessHandler(Compiler &compiler_, uint32_t entry_point_id) - : compiler(compiler_) - { - call_stack.push_back(entry_point_id); - } - - bool handle(spv::Op op, const uint32_t *args, uint32_t length) override; - bool begin_function_scope(const uint32_t *args, uint32_t length) override; - bool end_function_scope(const uint32_t *args, uint32_t length) override; - - Compiler &compiler; - bool in_crit_sec = false; - - uint32_t interlock_function_id = 0; - bool split_function_case = false; - bool control_flow_interlock = false; - bool use_critical_section = false; - bool call_stack_is_interlocked = false; - SmallVector call_stack; - - void access_potential_resource(uint32_t id); - }; - - struct InterlockedResourceAccessPrepassHandler : OpcodeHandler - { - InterlockedResourceAccessPrepassHandler(Compiler &compiler_, uint32_t entry_point_id) - : compiler(compiler_) - { - call_stack.push_back(entry_point_id); - } - - void rearm_current_block(const SPIRBlock &block) override; - bool handle(spv::Op op, const uint32_t *args, uint32_t length) override; - bool begin_function_scope(const uint32_t *args, uint32_t length) override; - bool end_function_scope(const uint32_t *args, uint32_t length) override; - - Compiler &compiler; - uint32_t interlock_function_id = 0; - uint32_t current_block_id = 0; - bool split_function_case = false; - bool control_flow_interlock = false; - SmallVector call_stack; - }; - - void analyze_interlocked_resource_usage(); - // The set of all resources written while inside the critical section, if present. - std::unordered_set interlocked_resources; - bool interlocked_is_complex = false; - - void make_constant_null(uint32_t id, uint32_t type); - - std::unordered_map declared_block_names; - - bool instruction_to_result_type(uint32_t &result_type, uint32_t &result_id, spv::Op op, const uint32_t *args, - uint32_t length); - - Bitset combined_decoration_for_member(const SPIRType &type, uint32_t index) const; - static bool is_desktop_only_format(spv::ImageFormat format); - - bool image_is_comparison(const SPIRType &type, uint32_t id) const; - - void set_extended_decoration(uint32_t id, ExtendedDecorations decoration, uint32_t value = 0); - uint32_t get_extended_decoration(uint32_t id, ExtendedDecorations decoration) const; - bool has_extended_decoration(uint32_t id, ExtendedDecorations decoration) const; - void unset_extended_decoration(uint32_t id, ExtendedDecorations decoration); - - void set_extended_member_decoration(uint32_t type, uint32_t index, ExtendedDecorations decoration, - uint32_t value = 0); - uint32_t get_extended_member_decoration(uint32_t type, uint32_t index, ExtendedDecorations decoration) const; - bool has_extended_member_decoration(uint32_t type, uint32_t index, ExtendedDecorations decoration) const; - void unset_extended_member_decoration(uint32_t type, uint32_t index, ExtendedDecorations decoration); - - bool type_is_array_of_pointers(const SPIRType &type) const; - bool type_is_top_level_physical_pointer(const SPIRType &type) const; - bool type_is_block_like(const SPIRType &type) const; - bool type_is_opaque_value(const SPIRType &type) const; - - bool reflection_ssbo_instance_name_is_significant() const; - std::string get_remapped_declared_block_name(uint32_t id, bool fallback_prefer_instance_name) const; - - bool flush_phi_required(BlockID from, BlockID to) const; - - uint32_t evaluate_spec_constant_u32(const SPIRConstantOp &spec) const; - uint32_t evaluate_constant_u32(uint32_t id) const; - - bool is_vertex_like_shader() const; - -private: - // Used only to implement the old deprecated get_entry_point() interface. - const SPIREntryPoint &get_first_entry_point(const std::string &name) const; - SPIREntryPoint &get_first_entry_point(const std::string &name); -}; -} // namespace SPIRV_CROSS_NAMESPACE - -#endif diff --git a/emscripten/include/spirv_cross/spirv_cross_containers.hpp b/emscripten/include/spirv_cross/spirv_cross_containers.hpp deleted file mode 100644 index b9c3737c..00000000 --- a/emscripten/include/spirv_cross/spirv_cross_containers.hpp +++ /dev/null @@ -1,747 +0,0 @@ -/* - * Copyright 2019-2021 Hans-Kristian Arntzen - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * At your option, you may choose to accept this material under either: - * 1. The Apache License, Version 2.0, found at , or - * 2. The MIT License, found at . - * SPDX-License-Identifier: Apache-2.0 OR MIT. - */ - -#ifndef SPIRV_CROSS_CONTAINERS_HPP -#define SPIRV_CROSS_CONTAINERS_HPP - -#include "spirv_cross_error_handling.hpp" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef SPIRV_CROSS_NAMESPACE_OVERRIDE -#define SPIRV_CROSS_NAMESPACE SPIRV_CROSS_NAMESPACE_OVERRIDE -#else -#define SPIRV_CROSS_NAMESPACE spirv_cross -#endif - -namespace SPIRV_CROSS_NAMESPACE -{ -#ifndef SPIRV_CROSS_FORCE_STL_TYPES -// std::aligned_storage does not support size == 0, so roll our own. -template -class AlignedBuffer -{ -public: - T *data() - { -#if defined(_MSC_VER) && _MSC_VER < 1900 - // MSVC 2013 workarounds, sigh ... - // Only use this workaround on MSVC 2013 due to some confusion around default initialized unions. - // Spec seems to suggest the memory will be zero-initialized, which is *not* what we want. - return reinterpret_cast(u.aligned_char); -#else - return reinterpret_cast(aligned_char); -#endif - } - -private: -#if defined(_MSC_VER) && _MSC_VER < 1900 - // MSVC 2013 workarounds, sigh ... - union - { - char aligned_char[sizeof(T) * N]; - double dummy_aligner; - } u; -#else - alignas(T) char aligned_char[sizeof(T) * N]; -#endif -}; - -template -class AlignedBuffer -{ -public: - T *data() - { - return nullptr; - } -}; - -// An immutable version of SmallVector which erases type information about storage. -template -class VectorView -{ -public: - T &operator[](size_t i) SPIRV_CROSS_NOEXCEPT - { - return ptr[i]; - } - - const T &operator[](size_t i) const SPIRV_CROSS_NOEXCEPT - { - return ptr[i]; - } - - bool empty() const SPIRV_CROSS_NOEXCEPT - { - return buffer_size == 0; - } - - size_t size() const SPIRV_CROSS_NOEXCEPT - { - return buffer_size; - } - - T *data() SPIRV_CROSS_NOEXCEPT - { - return ptr; - } - - const T *data() const SPIRV_CROSS_NOEXCEPT - { - return ptr; - } - - T *begin() SPIRV_CROSS_NOEXCEPT - { - return ptr; - } - - T *end() SPIRV_CROSS_NOEXCEPT - { - return ptr + buffer_size; - } - - const T *begin() const SPIRV_CROSS_NOEXCEPT - { - return ptr; - } - - const T *end() const SPIRV_CROSS_NOEXCEPT - { - return ptr + buffer_size; - } - - T &front() SPIRV_CROSS_NOEXCEPT - { - return ptr[0]; - } - - const T &front() const SPIRV_CROSS_NOEXCEPT - { - return ptr[0]; - } - - T &back() SPIRV_CROSS_NOEXCEPT - { - return ptr[buffer_size - 1]; - } - - const T &back() const SPIRV_CROSS_NOEXCEPT - { - return ptr[buffer_size - 1]; - } - - // Makes it easier to consume SmallVector. -#if defined(_MSC_VER) && _MSC_VER < 1900 - explicit operator std::vector() const - { - // Another MSVC 2013 workaround. It does not understand lvalue/rvalue qualified operations. - return std::vector(ptr, ptr + buffer_size); - } -#else - // Makes it easier to consume SmallVector. - explicit operator std::vector() const & - { - return std::vector(ptr, ptr + buffer_size); - } - - // If we are converting as an r-value, we can pilfer our elements. - explicit operator std::vector() && - { - return std::vector(std::make_move_iterator(ptr), std::make_move_iterator(ptr + buffer_size)); - } -#endif - - // Avoid sliced copies. Base class should only be read as a reference. - VectorView(const VectorView &) = delete; - void operator=(const VectorView &) = delete; - -protected: - VectorView() = default; - T *ptr = nullptr; - size_t buffer_size = 0; -}; - -// Simple vector which supports up to N elements inline, without malloc/free. -// We use a lot of throwaway vectors all over the place which triggers allocations. -// This class only implements the subset of std::vector we need in SPIRV-Cross. -// It is *NOT* a drop-in replacement in general projects. -template -class SmallVector : public VectorView -{ -public: - SmallVector() SPIRV_CROSS_NOEXCEPT - { - this->ptr = stack_storage.data(); - buffer_capacity = N; - } - - SmallVector(const T *arg_list_begin, const T *arg_list_end) SPIRV_CROSS_NOEXCEPT : SmallVector() - { - auto count = size_t(arg_list_end - arg_list_begin); - reserve(count); - for (size_t i = 0; i < count; i++, arg_list_begin++) - new (&this->ptr[i]) T(*arg_list_begin); - this->buffer_size = count; - } - - SmallVector(std::initializer_list init) SPIRV_CROSS_NOEXCEPT : SmallVector(init.begin(), init.end()) - { - } - - SmallVector(SmallVector &&other) SPIRV_CROSS_NOEXCEPT : SmallVector() - { - *this = std::move(other); - } - - SmallVector &operator=(SmallVector &&other) SPIRV_CROSS_NOEXCEPT - { - clear(); - if (other.ptr != other.stack_storage.data()) - { - // Pilfer allocated pointer. - if (this->ptr != stack_storage.data()) - free(this->ptr); - this->ptr = other.ptr; - this->buffer_size = other.buffer_size; - buffer_capacity = other.buffer_capacity; - other.ptr = nullptr; - other.buffer_size = 0; - other.buffer_capacity = 0; - } - else - { - // Need to move the stack contents individually. - reserve(other.buffer_size); - for (size_t i = 0; i < other.buffer_size; i++) - { - new (&this->ptr[i]) T(std::move(other.ptr[i])); - other.ptr[i].~T(); - } - this->buffer_size = other.buffer_size; - other.buffer_size = 0; - } - return *this; - } - - SmallVector(const SmallVector &other) SPIRV_CROSS_NOEXCEPT : SmallVector() - { - *this = other; - } - - SmallVector &operator=(const SmallVector &other) SPIRV_CROSS_NOEXCEPT - { - if (this == &other) - return *this; - - clear(); - reserve(other.buffer_size); - for (size_t i = 0; i < other.buffer_size; i++) - new (&this->ptr[i]) T(other.ptr[i]); - this->buffer_size = other.buffer_size; - return *this; - } - - explicit SmallVector(size_t count) SPIRV_CROSS_NOEXCEPT : SmallVector() - { - resize(count); - } - - ~SmallVector() - { - clear(); - if (this->ptr != stack_storage.data()) - free(this->ptr); - } - - void clear() SPIRV_CROSS_NOEXCEPT - { - for (size_t i = 0; i < this->buffer_size; i++) - this->ptr[i].~T(); - this->buffer_size = 0; - } - - void push_back(const T &t) SPIRV_CROSS_NOEXCEPT - { - reserve(this->buffer_size + 1); - new (&this->ptr[this->buffer_size]) T(t); - this->buffer_size++; - } - - void push_back(T &&t) SPIRV_CROSS_NOEXCEPT - { - reserve(this->buffer_size + 1); - new (&this->ptr[this->buffer_size]) T(std::move(t)); - this->buffer_size++; - } - - void pop_back() SPIRV_CROSS_NOEXCEPT - { - // Work around false positive warning on GCC 8.3. - // Calling pop_back on empty vector is undefined. - if (!this->empty()) - resize(this->buffer_size - 1); - } - - template - void emplace_back(Ts &&... ts) SPIRV_CROSS_NOEXCEPT - { - reserve(this->buffer_size + 1); - new (&this->ptr[this->buffer_size]) T(std::forward(ts)...); - this->buffer_size++; - } - - void reserve(size_t count) SPIRV_CROSS_NOEXCEPT - { - if ((count > std::numeric_limits::max() / sizeof(T)) || - (count > std::numeric_limits::max() / 2)) - { - // Only way this should ever happen is with garbage input, terminate. - std::terminate(); - } - - if (count > buffer_capacity) - { - size_t target_capacity = buffer_capacity; - if (target_capacity == 0) - target_capacity = 1; - - // Weird parens works around macro issues on Windows if NOMINMAX is not used. - target_capacity = (std::max)(target_capacity, N); - - // Need to ensure there is a POT value of target capacity which is larger than count, - // otherwise this will overflow. - while (target_capacity < count) - target_capacity <<= 1u; - - T *new_buffer = - target_capacity > N ? static_cast(malloc(target_capacity * sizeof(T))) : stack_storage.data(); - - // If we actually fail this malloc, we are hosed anyways, there is no reason to attempt recovery. - if (!new_buffer) - std::terminate(); - - // In case for some reason two allocations both come from same stack. - if (new_buffer != this->ptr) - { - // We don't deal with types which can throw in move constructor. - for (size_t i = 0; i < this->buffer_size; i++) - { - new (&new_buffer[i]) T(std::move(this->ptr[i])); - this->ptr[i].~T(); - } - } - - if (this->ptr != stack_storage.data()) - free(this->ptr); - this->ptr = new_buffer; - buffer_capacity = target_capacity; - } - } - - void insert(T *itr, const T *insert_begin, const T *insert_end) SPIRV_CROSS_NOEXCEPT - { - auto count = size_t(insert_end - insert_begin); - if (itr == this->end()) - { - reserve(this->buffer_size + count); - for (size_t i = 0; i < count; i++, insert_begin++) - new (&this->ptr[this->buffer_size + i]) T(*insert_begin); - this->buffer_size += count; - } - else - { - if (this->buffer_size + count > buffer_capacity) - { - auto target_capacity = this->buffer_size + count; - if (target_capacity == 0) - target_capacity = 1; - if (target_capacity < N) - target_capacity = N; - - while (target_capacity < count) - target_capacity <<= 1u; - - // Need to allocate new buffer. Move everything to a new buffer. - T *new_buffer = - target_capacity > N ? static_cast(malloc(target_capacity * sizeof(T))) : stack_storage.data(); - - // If we actually fail this malloc, we are hosed anyways, there is no reason to attempt recovery. - if (!new_buffer) - std::terminate(); - - // First, move elements from source buffer to new buffer. - // We don't deal with types which can throw in move constructor. - auto *target_itr = new_buffer; - auto *original_source_itr = this->begin(); - - if (new_buffer != this->ptr) - { - while (original_source_itr != itr) - { - new (target_itr) T(std::move(*original_source_itr)); - original_source_itr->~T(); - ++original_source_itr; - ++target_itr; - } - } - - // Copy-construct new elements. - for (auto *source_itr = insert_begin; source_itr != insert_end; ++source_itr, ++target_itr) - new (target_itr) T(*source_itr); - - // Move over the other half. - if (new_buffer != this->ptr || insert_begin != insert_end) - { - while (original_source_itr != this->end()) - { - new (target_itr) T(std::move(*original_source_itr)); - original_source_itr->~T(); - ++original_source_itr; - ++target_itr; - } - } - - if (this->ptr != stack_storage.data()) - free(this->ptr); - this->ptr = new_buffer; - buffer_capacity = target_capacity; - } - else - { - // Move in place, need to be a bit careful about which elements are constructed and which are not. - // Move the end and construct the new elements. - auto *target_itr = this->end() + count; - auto *source_itr = this->end(); - while (target_itr != this->end() && source_itr != itr) - { - --target_itr; - --source_itr; - new (target_itr) T(std::move(*source_itr)); - } - - // For already constructed elements we can move-assign. - std::move_backward(itr, source_itr, target_itr); - - // For the inserts which go to already constructed elements, we can do a plain copy. - while (itr != this->end() && insert_begin != insert_end) - *itr++ = *insert_begin++; - - // For inserts into newly allocated memory, we must copy-construct instead. - while (insert_begin != insert_end) - { - new (itr) T(*insert_begin); - ++itr; - ++insert_begin; - } - } - - this->buffer_size += count; - } - } - - void insert(T *itr, const T &value) SPIRV_CROSS_NOEXCEPT - { - insert(itr, &value, &value + 1); - } - - T *erase(T *itr) SPIRV_CROSS_NOEXCEPT - { - std::move(itr + 1, this->end(), itr); - this->ptr[--this->buffer_size].~T(); - return itr; - } - - void erase(T *start_erase, T *end_erase) SPIRV_CROSS_NOEXCEPT - { - if (end_erase == this->end()) - { - resize(size_t(start_erase - this->begin())); - } - else - { - auto new_size = this->buffer_size - (end_erase - start_erase); - std::move(end_erase, this->end(), start_erase); - resize(new_size); - } - } - - void resize(size_t new_size) SPIRV_CROSS_NOEXCEPT - { - if (new_size < this->buffer_size) - { - for (size_t i = new_size; i < this->buffer_size; i++) - this->ptr[i].~T(); - } - else if (new_size > this->buffer_size) - { - reserve(new_size); - for (size_t i = this->buffer_size; i < new_size; i++) - new (&this->ptr[i]) T(); - } - - this->buffer_size = new_size; - } - -private: - size_t buffer_capacity = 0; - AlignedBuffer stack_storage; -}; - -// A vector without stack storage. -// Could also be a typedef-ed to std::vector, -// but might as well use the one we have. -template -using Vector = SmallVector; - -#else // SPIRV_CROSS_FORCE_STL_TYPES - -template -using SmallVector = std::vector; -template -using Vector = std::vector; -template -using VectorView = std::vector; - -#endif // SPIRV_CROSS_FORCE_STL_TYPES - -// An object pool which we use for allocating IVariant-derived objects. -// We know we are going to allocate a bunch of objects of each type, -// so amortize the mallocs. -class ObjectPoolBase -{ -public: - virtual ~ObjectPoolBase() = default; - virtual void free_opaque(void *ptr) = 0; -}; - -template -class ObjectPool : public ObjectPoolBase -{ -public: - explicit ObjectPool(unsigned start_object_count_ = 16) - : start_object_count(start_object_count_) - { - } - - template - T *allocate(P &&... p) - { - if (vacants.empty()) - { - unsigned num_objects = start_object_count << memory.size(); - T *ptr = static_cast(malloc(num_objects * sizeof(T))); - if (!ptr) - return nullptr; - - for (unsigned i = 0; i < num_objects; i++) - vacants.push_back(&ptr[i]); - - memory.emplace_back(ptr); - } - - T *ptr = vacants.back(); - vacants.pop_back(); - new (ptr) T(std::forward

(p)...); - return ptr; - } - - void free(T *ptr) - { - ptr->~T(); - vacants.push_back(ptr); - } - - void free_opaque(void *ptr) override - { - free(static_cast(ptr)); - } - - void clear() - { - vacants.clear(); - memory.clear(); - } - -protected: - Vector vacants; - - struct MallocDeleter - { - void operator()(T *ptr) - { - ::free(ptr); - } - }; - - SmallVector> memory; - unsigned start_object_count; -}; - -template -class StringStream -{ -public: - StringStream() - { - reset(); - } - - ~StringStream() - { - reset(); - } - - // Disable copies and moves. Makes it easier to implement, and we don't need it. - StringStream(const StringStream &) = delete; - void operator=(const StringStream &) = delete; - - template ::value, int>::type = 0> - StringStream &operator<<(const T &t) - { - auto s = std::to_string(t); - append(s.data(), s.size()); - return *this; - } - - // Only overload this to make float/double conversions ambiguous. - StringStream &operator<<(uint32_t v) - { - auto s = std::to_string(v); - append(s.data(), s.size()); - return *this; - } - - StringStream &operator<<(char c) - { - append(&c, 1); - return *this; - } - - StringStream &operator<<(const std::string &s) - { - append(s.data(), s.size()); - return *this; - } - - StringStream &operator<<(const char *s) - { - append(s, strlen(s)); - return *this; - } - - template - StringStream &operator<<(const char (&s)[N]) - { - append(s, strlen(s)); - return *this; - } - - std::string str() const - { - std::string ret; - size_t target_size = 0; - for (auto &saved : saved_buffers) - target_size += saved.offset; - target_size += current_buffer.offset; - ret.reserve(target_size); - - for (auto &saved : saved_buffers) - ret.insert(ret.end(), saved.buffer, saved.buffer + saved.offset); - ret.insert(ret.end(), current_buffer.buffer, current_buffer.buffer + current_buffer.offset); - return ret; - } - - void reset() - { - for (auto &saved : saved_buffers) - if (saved.buffer != stack_buffer) - free(saved.buffer); - if (current_buffer.buffer != stack_buffer) - free(current_buffer.buffer); - - saved_buffers.clear(); - current_buffer.buffer = stack_buffer; - current_buffer.offset = 0; - current_buffer.size = sizeof(stack_buffer); - } - -private: - struct Buffer - { - char *buffer = nullptr; - size_t offset = 0; - size_t size = 0; - }; - Buffer current_buffer; - char stack_buffer[StackSize]; - SmallVector saved_buffers; - - void append(const char *s, size_t len) - { - size_t avail = current_buffer.size - current_buffer.offset; - if (avail < len) - { - if (avail > 0) - { - memcpy(current_buffer.buffer + current_buffer.offset, s, avail); - s += avail; - len -= avail; - current_buffer.offset += avail; - } - - saved_buffers.push_back(current_buffer); - size_t target_size = len > BlockSize ? len : BlockSize; - current_buffer.buffer = static_cast(malloc(target_size)); - if (!current_buffer.buffer) - SPIRV_CROSS_THROW("Out of memory."); - - memcpy(current_buffer.buffer, s, len); - current_buffer.offset = len; - current_buffer.size = target_size; - } - else - { - memcpy(current_buffer.buffer + current_buffer.offset, s, len); - current_buffer.offset += len; - } - } -}; - -} // namespace SPIRV_CROSS_NAMESPACE - -#endif diff --git a/emscripten/include/spirv_cross/spirv_cross_error_handling.hpp b/emscripten/include/spirv_cross/spirv_cross_error_handling.hpp deleted file mode 100644 index 32af107e..00000000 --- a/emscripten/include/spirv_cross/spirv_cross_error_handling.hpp +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright 2015-2021 Arm Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * At your option, you may choose to accept this material under either: - * 1. The Apache License, Version 2.0, found at , or - * 2. The MIT License, found at . - * SPDX-License-Identifier: Apache-2.0 OR MIT. - */ - -#ifndef SPIRV_CROSS_ERROR_HANDLING -#define SPIRV_CROSS_ERROR_HANDLING - -#include -#include -#include -#ifndef SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS -#include -#endif - -#ifdef SPIRV_CROSS_NAMESPACE_OVERRIDE -#define SPIRV_CROSS_NAMESPACE SPIRV_CROSS_NAMESPACE_OVERRIDE -#else -#define SPIRV_CROSS_NAMESPACE spirv_cross -#endif - -namespace SPIRV_CROSS_NAMESPACE -{ -#ifdef SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS -#if !defined(_MSC_VER) || defined(__clang__) -[[noreturn]] -#elif defined(_MSC_VER) -__declspec(noreturn) -#endif -inline void -report_and_abort(const std::string &msg) -{ -#ifdef NDEBUG - (void)msg; -#else - fprintf(stderr, "There was a compiler error: %s\n", msg.c_str()); -#endif - fflush(stderr); - abort(); -} - -#define SPIRV_CROSS_THROW(x) report_and_abort(x) -#else -class CompilerError : public std::runtime_error -{ -public: - explicit CompilerError(const std::string &str) - : std::runtime_error(str) - { - } -}; - -#define SPIRV_CROSS_THROW(x) throw CompilerError(x) -#endif - -// MSVC 2013 does not have noexcept. We need this for Variant to get move constructor to work correctly -// instead of copy constructor. -// MSVC 2013 ignores that move constructors cannot throw in std::vector, so just don't define it. -#if defined(_MSC_VER) && _MSC_VER < 1900 -#define SPIRV_CROSS_NOEXCEPT -#else -#define SPIRV_CROSS_NOEXCEPT noexcept -#endif - -#if __cplusplus >= 201402l -#define SPIRV_CROSS_DEPRECATED(reason) [[deprecated(reason)]] -#elif defined(__GNUC__) -#define SPIRV_CROSS_DEPRECATED(reason) __attribute__((deprecated)) -#elif defined(_MSC_VER) -#define SPIRV_CROSS_DEPRECATED(reason) __declspec(deprecated(reason)) -#else -#define SPIRV_CROSS_DEPRECATED(reason) -#endif -} // namespace SPIRV_CROSS_NAMESPACE - -#endif diff --git a/emscripten/include/spirv_cross/spirv_cross_parsed_ir.hpp b/emscripten/include/spirv_cross/spirv_cross_parsed_ir.hpp deleted file mode 100644 index 88a06919..00000000 --- a/emscripten/include/spirv_cross/spirv_cross_parsed_ir.hpp +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Copyright 2018-2021 Arm Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * At your option, you may choose to accept this material under either: - * 1. The Apache License, Version 2.0, found at , or - * 2. The MIT License, found at . - * SPDX-License-Identifier: Apache-2.0 OR MIT. - */ - -#ifndef SPIRV_CROSS_PARSED_IR_HPP -#define SPIRV_CROSS_PARSED_IR_HPP - -#include "spirv_common.hpp" -#include -#include - -namespace SPIRV_CROSS_NAMESPACE -{ - -// This data structure holds all information needed to perform cross-compilation and reflection. -// It is the output of the Parser, but any implementation could create this structure. -// It is intentionally very "open" and struct-like with some helper functions to deal with decorations. -// Parser is the reference implementation of how this data structure should be filled in. - -class ParsedIR -{ -private: - // This must be destroyed after the "ids" vector. - std::unique_ptr pool_group; - -public: - ParsedIR(); - - // Due to custom allocations from object pools, we cannot use a default copy constructor. - ParsedIR(const ParsedIR &other); - ParsedIR &operator=(const ParsedIR &other); - - // Moves are unproblematic, but we need to implement it anyways, since MSVC 2013 does not understand - // how to default-implement these. - ParsedIR(ParsedIR &&other) SPIRV_CROSS_NOEXCEPT; - ParsedIR &operator=(ParsedIR &&other) SPIRV_CROSS_NOEXCEPT; - - // Resizes ids, meta and block_meta. - void set_id_bounds(uint32_t bounds); - - // The raw SPIR-V, instructions and opcodes refer to this by offset + count. - std::vector spirv; - - // Holds various data structures which inherit from IVariant. - SmallVector ids; - - // Various meta data for IDs, decorations, names, etc. - std::unordered_map meta; - - // Holds all IDs which have a certain type. - // This is needed so we can iterate through a specific kind of resource quickly, - // and in-order of module declaration. - SmallVector ids_for_type[TypeCount]; - - // Special purpose lists which contain a union of types. - // This is needed so we can declare specialization constants and structs in an interleaved fashion, - // among other things. - // Constants can be of struct type, and struct array sizes can use specialization constants. - SmallVector ids_for_constant_or_type; - SmallVector ids_for_constant_or_variable; - - // Declared capabilities and extensions in the SPIR-V module. - // Not really used except for reflection at the moment. - SmallVector declared_capabilities; - SmallVector declared_extensions; - - // Meta data about blocks. The cross-compiler needs to query if a block is either of these types. - // It is a bitset as there can be more than one tag per block. - enum BlockMetaFlagBits - { - BLOCK_META_LOOP_HEADER_BIT = 1 << 0, - BLOCK_META_CONTINUE_BIT = 1 << 1, - BLOCK_META_LOOP_MERGE_BIT = 1 << 2, - BLOCK_META_SELECTION_MERGE_BIT = 1 << 3, - BLOCK_META_MULTISELECT_MERGE_BIT = 1 << 4 - }; - using BlockMetaFlags = uint8_t; - SmallVector block_meta; - std::unordered_map continue_block_to_loop_header; - - // Normally, we'd stick SPIREntryPoint in ids array, but it conflicts with SPIRFunction. - // Entry points can therefore be seen as some sort of meta structure. - std::unordered_map entry_points; - FunctionID default_entry_point = 0; - - struct Source - { - uint32_t version = 0; - bool es = false; - bool known = false; - bool hlsl = false; - - Source() = default; - }; - - Source source; - - spv::AddressingModel addressing_model = spv::AddressingModelMax; - spv::MemoryModel memory_model = spv::MemoryModelMax; - - // Decoration handling methods. - // Can be useful for simple "raw" reflection. - // However, most members are here because the Parser needs most of these, - // and might as well just have the whole suite of decoration/name handling in one place. - void set_name(ID id, const std::string &name); - const std::string &get_name(ID id) const; - void set_decoration(ID id, spv::Decoration decoration, uint32_t argument = 0); - void set_decoration_string(ID id, spv::Decoration decoration, const std::string &argument); - bool has_decoration(ID id, spv::Decoration decoration) const; - uint32_t get_decoration(ID id, spv::Decoration decoration) const; - const std::string &get_decoration_string(ID id, spv::Decoration decoration) const; - const Bitset &get_decoration_bitset(ID id) const; - void unset_decoration(ID id, spv::Decoration decoration); - - // Decoration handling methods (for members of a struct). - void set_member_name(TypeID id, uint32_t index, const std::string &name); - const std::string &get_member_name(TypeID id, uint32_t index) const; - void set_member_decoration(TypeID id, uint32_t index, spv::Decoration decoration, uint32_t argument = 0); - void set_member_decoration_string(TypeID id, uint32_t index, spv::Decoration decoration, - const std::string &argument); - uint32_t get_member_decoration(TypeID id, uint32_t index, spv::Decoration decoration) const; - const std::string &get_member_decoration_string(TypeID id, uint32_t index, spv::Decoration decoration) const; - bool has_member_decoration(TypeID id, uint32_t index, spv::Decoration decoration) const; - const Bitset &get_member_decoration_bitset(TypeID id, uint32_t index) const; - void unset_member_decoration(TypeID id, uint32_t index, spv::Decoration decoration); - - void mark_used_as_array_length(ID id); - uint32_t increase_bound_by(uint32_t count); - Bitset get_buffer_block_flags(const SPIRVariable &var) const; - Bitset get_buffer_block_type_flags(const SPIRType &type) const; - - void add_typed_id(Types type, ID id); - void remove_typed_id(Types type, ID id); - - class LoopLock - { - public: - explicit LoopLock(uint32_t *counter); - LoopLock(const LoopLock &) = delete; - void operator=(const LoopLock &) = delete; - LoopLock(LoopLock &&other) SPIRV_CROSS_NOEXCEPT; - LoopLock &operator=(LoopLock &&other) SPIRV_CROSS_NOEXCEPT; - ~LoopLock(); - - private: - uint32_t *lock; - }; - - // This must be held while iterating over a type ID array. - // It is undefined if someone calls set<>() while we're iterating over a data structure, so we must - // make sure that this case is avoided. - - // If we have a hard lock, it is an error to call set<>(), and an exception is thrown. - // If we have a soft lock, we silently ignore any additions to the typed arrays. - // This should only be used for physical ID remapping where we need to create an ID, but we will never - // care about iterating over them. - LoopLock create_loop_hard_lock() const; - LoopLock create_loop_soft_lock() const; - - template - void for_each_typed_id(const Op &op) - { - auto loop_lock = create_loop_hard_lock(); - for (auto &id : ids_for_type[T::type]) - { - if (ids[id].get_type() == static_cast(T::type)) - op(id, get(id)); - } - } - - template - void for_each_typed_id(const Op &op) const - { - auto loop_lock = create_loop_hard_lock(); - for (auto &id : ids_for_type[T::type]) - { - if (ids[id].get_type() == static_cast(T::type)) - op(id, get(id)); - } - } - - template - void reset_all_of_type() - { - reset_all_of_type(static_cast(T::type)); - } - - void reset_all_of_type(Types type); - - Meta *find_meta(ID id); - const Meta *find_meta(ID id) const; - - const std::string &get_empty_string() const - { - return empty_string; - } - - void make_constant_null(uint32_t id, uint32_t type, bool add_to_typed_id_set); - - void fixup_reserved_names(); - - static void sanitize_underscores(std::string &str); - static void sanitize_identifier(std::string &str, bool member, bool allow_reserved_prefixes); - static bool is_globally_reserved_identifier(std::string &str, bool allow_reserved_prefixes); - - uint32_t get_spirv_version() const; - -private: - template - T &get(uint32_t id) - { - return variant_get(ids[id]); - } - - template - const T &get(uint32_t id) const - { - return variant_get(ids[id]); - } - - mutable uint32_t loop_iteration_depth_hard = 0; - mutable uint32_t loop_iteration_depth_soft = 0; - std::string empty_string; - Bitset cleared_bitset; - - std::unordered_set meta_needing_name_fixup; -}; -} // namespace SPIRV_CROSS_NAMESPACE - -#endif diff --git a/emscripten/include/spirv_cross/spirv_glsl.hpp b/emscripten/include/spirv_cross/spirv_glsl.hpp deleted file mode 100644 index beb8a8fb..00000000 --- a/emscripten/include/spirv_cross/spirv_glsl.hpp +++ /dev/null @@ -1,908 +0,0 @@ -/* - * Copyright 2015-2021 Arm Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * At your option, you may choose to accept this material under either: - * 1. The Apache License, Version 2.0, found at , or - * 2. The MIT License, found at . - * SPDX-License-Identifier: Apache-2.0 OR MIT. - */ - -#ifndef SPIRV_CROSS_GLSL_HPP -#define SPIRV_CROSS_GLSL_HPP - -#include "GLSL.std.450.h" -#include "spirv_cross.hpp" -#include -#include -#include - -namespace SPIRV_CROSS_NAMESPACE -{ -enum PlsFormat -{ - PlsNone = 0, - - PlsR11FG11FB10F, - PlsR32F, - PlsRG16F, - PlsRGB10A2, - PlsRGBA8, - PlsRG16, - - PlsRGBA8I, - PlsRG16I, - - PlsRGB10A2UI, - PlsRGBA8UI, - PlsRG16UI, - PlsR32UI -}; - -struct PlsRemap -{ - uint32_t id; - PlsFormat format; -}; - -enum AccessChainFlagBits -{ - ACCESS_CHAIN_INDEX_IS_LITERAL_BIT = 1 << 0, - ACCESS_CHAIN_CHAIN_ONLY_BIT = 1 << 1, - ACCESS_CHAIN_PTR_CHAIN_BIT = 1 << 2, - ACCESS_CHAIN_SKIP_REGISTER_EXPRESSION_READ_BIT = 1 << 3, - ACCESS_CHAIN_LITERAL_MSB_FORCE_ID = 1 << 4, - ACCESS_CHAIN_FLATTEN_ALL_MEMBERS_BIT = 1 << 5 -}; -typedef uint32_t AccessChainFlags; - -class CompilerGLSL : public Compiler -{ -public: - struct Options - { - // The shading language version. Corresponds to #version $VALUE. - uint32_t version = 450; - - // Emit the OpenGL ES shading language instead of desktop OpenGL. - bool es = false; - - // Debug option to always emit temporary variables for all expressions. - bool force_temporary = false; - - // If true, Vulkan GLSL features are used instead of GL-compatible features. - // Mostly useful for debugging SPIR-V files. - bool vulkan_semantics = false; - - // If true, gl_PerVertex is explicitly redeclared in vertex, geometry and tessellation shaders. - // The members of gl_PerVertex is determined by which built-ins are declared by the shader. - // This option is ignored in ES versions, as redeclaration in ES is not required, and it depends on a different extension - // (EXT_shader_io_blocks) which makes things a bit more fuzzy. - bool separate_shader_objects = false; - - // Flattens multidimensional arrays, e.g. float foo[a][b][c] into single-dimensional arrays, - // e.g. float foo[a * b * c]. - // This function does not change the actual SPIRType of any object. - // Only the generated code, including declarations of interface variables are changed to be single array dimension. - bool flatten_multidimensional_arrays = false; - - // For older desktop GLSL targets than version 420, the - // GL_ARB_shading_language_420pack extensions is used to be able to support - // layout(binding) on UBOs and samplers. - // If disabled on older targets, binding decorations will be stripped. - bool enable_420pack_extension = true; - - // In non-Vulkan GLSL, emit push constant blocks as UBOs rather than plain uniforms. - bool emit_push_constant_as_uniform_buffer = false; - - // Always emit uniform blocks as plain uniforms, regardless of the GLSL version, even when UBOs are supported. - // Does not apply to shader storage or push constant blocks. - bool emit_uniform_buffer_as_plain_uniforms = false; - - // Emit OpLine directives if present in the module. - // May not correspond exactly to original source, but should be a good approximation. - bool emit_line_directives = false; - - // In cases where readonly/writeonly decoration are not used at all, - // we try to deduce which qualifier(s) we should actually used, since actually emitting - // read-write decoration is very rare, and older glslang/HLSL compilers tend to just emit readwrite as a matter of fact. - // The default (true) is to enable automatic deduction for these cases, but if you trust the decorations set - // by the SPIR-V, it's recommended to set this to false. - bool enable_storage_image_qualifier_deduction = true; - - // On some targets (WebGPU), uninitialized variables are banned. - // If this is enabled, all variables (temporaries, Private, Function) - // which would otherwise be uninitialized will now be initialized to 0 instead. - bool force_zero_initialized_variables = false; - - // In GLSL, force use of I/O block flattening, similar to - // what happens on legacy GLSL targets for blocks and structs. - bool force_flattened_io_blocks = false; - - enum Precision - { - DontCare, - Lowp, - Mediump, - Highp - }; - - struct VertexOptions - { - // "Vertex-like shader" here is any shader stage that can write BuiltInPosition. - - // GLSL: In vertex-like shaders, rewrite [0, w] depth (Vulkan/D3D style) to [-w, w] depth (GL style). - // MSL: In vertex-like shaders, rewrite [-w, w] depth (GL style) to [0, w] depth. - // HLSL: In vertex-like shaders, rewrite [-w, w] depth (GL style) to [0, w] depth. - bool fixup_clipspace = false; - - // In vertex-like shaders, inverts gl_Position.y or equivalent. - bool flip_vert_y = false; - - // GLSL only, for HLSL version of this option, see CompilerHLSL. - // If true, the backend will assume that InstanceIndex will need to apply - // a base instance offset. Set to false if you know you will never use base instance - // functionality as it might remove some internal uniforms. - bool support_nonzero_base_instance = true; - } vertex; - - struct FragmentOptions - { - // Add precision mediump float in ES targets when emitting GLES source. - // Add precision highp int in ES targets when emitting GLES source. - Precision default_float_precision = Mediump; - Precision default_int_precision = Highp; - } fragment; - }; - - void remap_pixel_local_storage(std::vector inputs, std::vector outputs) - { - pls_inputs = std::move(inputs); - pls_outputs = std::move(outputs); - remap_pls_variables(); - } - - // Redirect a subpassInput reading from input_attachment_index to instead load its value from - // the color attachment at location = color_location. Requires ESSL. - void remap_ext_framebuffer_fetch(uint32_t input_attachment_index, uint32_t color_location); - - explicit CompilerGLSL(std::vector spirv_) - : Compiler(std::move(spirv_)) - { - init(); - } - - CompilerGLSL(const uint32_t *ir_, size_t word_count) - : Compiler(ir_, word_count) - { - init(); - } - - explicit CompilerGLSL(const ParsedIR &ir_) - : Compiler(ir_) - { - init(); - } - - explicit CompilerGLSL(ParsedIR &&ir_) - : Compiler(std::move(ir_)) - { - init(); - } - - const Options &get_common_options() const - { - return options; - } - - void set_common_options(const Options &opts) - { - options = opts; - } - - std::string compile() override; - - // Returns the current string held in the conversion buffer. Useful for - // capturing what has been converted so far when compile() throws an error. - std::string get_partial_source(); - - // Adds a line to be added right after #version in GLSL backend. - // This is useful for enabling custom extensions which are outside the scope of SPIRV-Cross. - // This can be combined with variable remapping. - // A new-line will be added. - // - // While add_header_line() is a more generic way of adding arbitrary text to the header - // of a GLSL file, require_extension() should be used when adding extensions since it will - // avoid creating collisions with SPIRV-Cross generated extensions. - // - // Code added via add_header_line() is typically backend-specific. - void add_header_line(const std::string &str); - - // Adds an extension which is required to run this shader, e.g. - // require_extension("GL_KHR_my_extension"); - void require_extension(const std::string &ext); - - // Legacy GLSL compatibility method. - // Takes a uniform or push constant variable and flattens it into a (i|u)vec4 array[N]; array instead. - // For this to work, all types in the block must be the same basic type, e.g. mixing vec2 and vec4 is fine, but - // mixing int and float is not. - // The name of the uniform array will be the same as the interface block name. - void flatten_buffer_block(VariableID id); - - // After compilation, query if a variable ID was used as a depth resource. - // This is meaningful for MSL since descriptor types depend on this knowledge. - // Cases which return true: - // - Images which are declared with depth = 1 image type. - // - Samplers which are statically used at least once with Dref opcodes. - // - Images which are statically used at least once with Dref opcodes. - bool variable_is_depth_or_compare(VariableID id) const; - -protected: - struct ShaderSubgroupSupportHelper - { - // lower enum value = greater priority - enum Candidate - { - KHR_shader_subgroup_ballot, - KHR_shader_subgroup_basic, - KHR_shader_subgroup_vote, - NV_gpu_shader_5, - NV_shader_thread_group, - NV_shader_thread_shuffle, - ARB_shader_ballot, - ARB_shader_group_vote, - AMD_gcn_shader, - - CandidateCount - }; - - static const char *get_extension_name(Candidate c); - static SmallVector get_extra_required_extension_names(Candidate c); - static const char *get_extra_required_extension_predicate(Candidate c); - - enum Feature - { - SubgroupMask = 0, - SubgroupSize = 1, - SubgroupInvocationID = 2, - SubgroupID = 3, - NumSubgroups = 4, - SubgroupBroadcast_First = 5, - SubgroupBallotFindLSB_MSB = 6, - SubgroupAll_Any_AllEqualBool = 7, - SubgroupAllEqualT = 8, - SubgroupElect = 9, - SubgroupBarrier = 10, - SubgroupMemBarrier = 11, - SubgroupBallot = 12, - SubgroupInverseBallot_InclBitCount_ExclBitCout = 13, - SubgroupBallotBitExtract = 14, - SubgroupBallotBitCount = 15, - - FeatureCount - }; - - using FeatureMask = uint32_t; - static_assert(sizeof(FeatureMask) * 8u >= FeatureCount, "Mask type needs more bits."); - - using CandidateVector = SmallVector; - using FeatureVector = SmallVector; - - static FeatureVector get_feature_dependencies(Feature feature); - static FeatureMask get_feature_dependency_mask(Feature feature); - static bool can_feature_be_implemented_without_extensions(Feature feature); - static Candidate get_KHR_extension_for_feature(Feature feature); - - struct Result - { - Result(); - uint32_t weights[CandidateCount]; - }; - - void request_feature(Feature feature); - bool is_feature_requested(Feature feature) const; - Result resolve() const; - - static CandidateVector get_candidates_for_feature(Feature ft, const Result &r); - - private: - static CandidateVector get_candidates_for_feature(Feature ft); - static FeatureMask build_mask(const SmallVector &features); - FeatureMask feature_mask = 0; - }; - - // TODO remove this function when all subgroup ops are supported (or make it always return true) - static bool is_supported_subgroup_op_in_opengl(spv::Op op); - - void reset(); - void emit_function(SPIRFunction &func, const Bitset &return_flags); - - bool has_extension(const std::string &ext) const; - void require_extension_internal(const std::string &ext); - - // Virtualize methods which need to be overridden by subclass targets like C++ and such. - virtual void emit_function_prototype(SPIRFunction &func, const Bitset &return_flags); - - SPIRBlock *current_emitting_block = nullptr; - SPIRBlock *current_emitting_switch = nullptr; - bool current_emitting_switch_fallthrough = false; - - virtual void emit_instruction(const Instruction &instr); - void emit_block_instructions(SPIRBlock &block); - virtual void emit_glsl_op(uint32_t result_type, uint32_t result_id, uint32_t op, const uint32_t *args, - uint32_t count); - virtual void emit_spv_amd_shader_ballot_op(uint32_t result_type, uint32_t result_id, uint32_t op, - const uint32_t *args, uint32_t count); - virtual void emit_spv_amd_shader_explicit_vertex_parameter_op(uint32_t result_type, uint32_t result_id, uint32_t op, - const uint32_t *args, uint32_t count); - virtual void emit_spv_amd_shader_trinary_minmax_op(uint32_t result_type, uint32_t result_id, uint32_t op, - const uint32_t *args, uint32_t count); - virtual void emit_spv_amd_gcn_shader_op(uint32_t result_type, uint32_t result_id, uint32_t op, const uint32_t *args, - uint32_t count); - virtual void emit_header(); - void emit_line_directive(uint32_t file_id, uint32_t line_literal); - void build_workgroup_size(SmallVector &arguments, const SpecializationConstant &x, - const SpecializationConstant &y, const SpecializationConstant &z); - - void request_subgroup_feature(ShaderSubgroupSupportHelper::Feature feature); - - virtual void emit_sampled_image_op(uint32_t result_type, uint32_t result_id, uint32_t image_id, uint32_t samp_id); - virtual void emit_texture_op(const Instruction &i, bool sparse); - virtual std::string to_texture_op(const Instruction &i, bool sparse, bool *forward, - SmallVector &inherited_expressions); - virtual void emit_subgroup_op(const Instruction &i); - virtual std::string type_to_glsl(const SPIRType &type, uint32_t id = 0); - virtual std::string builtin_to_glsl(spv::BuiltIn builtin, spv::StorageClass storage); - virtual void emit_struct_member(const SPIRType &type, uint32_t member_type_id, uint32_t index, - const std::string &qualifier = "", uint32_t base_offset = 0); - virtual void emit_struct_padding_target(const SPIRType &type); - virtual std::string image_type_glsl(const SPIRType &type, uint32_t id = 0); - std::string constant_expression(const SPIRConstant &c); - std::string constant_op_expression(const SPIRConstantOp &cop); - virtual std::string constant_expression_vector(const SPIRConstant &c, uint32_t vector); - virtual void emit_fixup(); - virtual std::string variable_decl(const SPIRType &type, const std::string &name, uint32_t id = 0); - virtual std::string to_func_call_arg(const SPIRFunction::Parameter &arg, uint32_t id); - - struct TextureFunctionBaseArguments - { - // GCC 4.8 workarounds, it doesn't understand '{}' constructor here, use explicit default constructor. - TextureFunctionBaseArguments() = default; - VariableID img = 0; - const SPIRType *imgtype = nullptr; - bool is_fetch = false, is_gather = false, is_proj = false; - }; - - struct TextureFunctionNameArguments - { - // GCC 4.8 workarounds, it doesn't understand '{}' constructor here, use explicit default constructor. - TextureFunctionNameArguments() = default; - TextureFunctionBaseArguments base; - bool has_array_offsets = false, has_offset = false, has_grad = false; - bool has_dref = false, is_sparse_feedback = false, has_min_lod = false; - uint32_t lod = 0; - }; - virtual std::string to_function_name(const TextureFunctionNameArguments &args); - - struct TextureFunctionArguments - { - // GCC 4.8 workarounds, it doesn't understand '{}' constructor here, use explicit default constructor. - TextureFunctionArguments() = default; - TextureFunctionBaseArguments base; - uint32_t coord = 0, coord_components = 0, dref = 0; - uint32_t grad_x = 0, grad_y = 0, lod = 0, coffset = 0, offset = 0; - uint32_t bias = 0, component = 0, sample = 0, sparse_texel = 0, min_lod = 0; - bool nonuniform_expression = false; - }; - virtual std::string to_function_args(const TextureFunctionArguments &args, bool *p_forward); - - void emit_sparse_feedback_temporaries(uint32_t result_type_id, uint32_t id, uint32_t &feedback_id, - uint32_t &texel_id); - uint32_t get_sparse_feedback_texel_id(uint32_t id) const; - virtual void emit_buffer_block(const SPIRVariable &type); - virtual void emit_push_constant_block(const SPIRVariable &var); - virtual void emit_uniform(const SPIRVariable &var); - virtual std::string unpack_expression_type(std::string expr_str, const SPIRType &type, uint32_t physical_type_id, - bool packed_type, bool row_major); - - virtual bool builtin_translates_to_nonarray(spv::BuiltIn builtin) const; - - void emit_copy_logical_type(uint32_t lhs_id, uint32_t lhs_type_id, uint32_t rhs_id, uint32_t rhs_type_id, - SmallVector chain); - - StringStream<> buffer; - - template - inline void statement_inner(T &&t) - { - buffer << std::forward(t); - statement_count++; - } - - template - inline void statement_inner(T &&t, Ts &&... ts) - { - buffer << std::forward(t); - statement_count++; - statement_inner(std::forward(ts)...); - } - - template - inline void statement(Ts &&... ts) - { - if (is_forcing_recompilation()) - { - // Do not bother emitting code while force_recompile is active. - // We will compile again. - statement_count++; - return; - } - - if (redirect_statement) - { - redirect_statement->push_back(join(std::forward(ts)...)); - statement_count++; - } - else - { - for (uint32_t i = 0; i < indent; i++) - buffer << " "; - statement_inner(std::forward(ts)...); - buffer << '\n'; - } - } - - template - inline void statement_no_indent(Ts &&... ts) - { - auto old_indent = indent; - indent = 0; - statement(std::forward(ts)...); - indent = old_indent; - } - - // Used for implementing continue blocks where - // we want to obtain a list of statements we can merge - // on a single line separated by comma. - SmallVector *redirect_statement = nullptr; - const SPIRBlock *current_continue_block = nullptr; - - void begin_scope(); - void end_scope(); - void end_scope(const std::string &trailer); - void end_scope_decl(); - void end_scope_decl(const std::string &decl); - - Options options; - - virtual std::string type_to_array_glsl( - const SPIRType &type); // Allow Metal to use the array template to make arrays a value type - std::string to_array_size(const SPIRType &type, uint32_t index); - uint32_t to_array_size_literal(const SPIRType &type, uint32_t index) const; - uint32_t to_array_size_literal(const SPIRType &type) const; - virtual std::string variable_decl(const SPIRVariable &variable); // Threadgroup arrays can't have a wrapper type - std::string variable_decl_function_local(SPIRVariable &variable); - - void add_local_variable_name(uint32_t id); - void add_resource_name(uint32_t id); - void add_member_name(SPIRType &type, uint32_t name); - void add_function_overload(const SPIRFunction &func); - - virtual bool is_non_native_row_major_matrix(uint32_t id); - virtual bool member_is_non_native_row_major_matrix(const SPIRType &type, uint32_t index); - bool member_is_remapped_physical_type(const SPIRType &type, uint32_t index) const; - bool member_is_packed_physical_type(const SPIRType &type, uint32_t index) const; - virtual std::string convert_row_major_matrix(std::string exp_str, const SPIRType &exp_type, - uint32_t physical_type_id, bool is_packed); - - std::unordered_set local_variable_names; - std::unordered_set resource_names; - std::unordered_set block_input_names; - std::unordered_set block_output_names; - std::unordered_set block_ubo_names; - std::unordered_set block_ssbo_names; - std::unordered_set block_names; // A union of all block_*_names. - std::unordered_map> function_overloads; - std::unordered_map preserved_aliases; - void preserve_alias_on_reset(uint32_t id); - void reset_name_caches(); - - bool processing_entry_point = false; - - // Can be overriden by subclass backends for trivial things which - // shouldn't need polymorphism. - struct BackendVariations - { - std::string discard_literal = "discard"; - std::string demote_literal = "demote"; - std::string null_pointer_literal = ""; - bool float_literal_suffix = false; - bool double_literal_suffix = true; - bool uint32_t_literal_suffix = true; - bool long_long_literal_suffix = false; - const char *basic_int_type = "int"; - const char *basic_uint_type = "uint"; - const char *basic_int8_type = "int8_t"; - const char *basic_uint8_type = "uint8_t"; - const char *basic_int16_type = "int16_t"; - const char *basic_uint16_type = "uint16_t"; - const char *int16_t_literal_suffix = "s"; - const char *uint16_t_literal_suffix = "us"; - const char *nonuniform_qualifier = "nonuniformEXT"; - const char *boolean_mix_function = "mix"; - bool swizzle_is_function = false; - bool shared_is_implied = false; - bool unsized_array_supported = true; - bool explicit_struct_type = false; - bool use_initializer_list = false; - bool use_typed_initializer_list = false; - bool can_declare_struct_inline = true; - bool can_declare_arrays_inline = true; - bool native_row_major_matrix = true; - bool use_constructor_splatting = true; - bool allow_precision_qualifiers = false; - bool can_swizzle_scalar = false; - bool force_gl_in_out_block = false; - bool can_return_array = true; - bool allow_truncated_access_chain = false; - bool supports_extensions = false; - bool supports_empty_struct = false; - bool array_is_value_type = true; - bool buffer_offset_array_is_value_type = true; - bool comparison_image_samples_scalar = false; - bool native_pointers = false; - bool support_small_type_sampling_result = false; - bool support_case_fallthrough = true; - bool use_array_constructor = false; - bool needs_row_major_load_workaround = false; - } backend; - - void emit_struct(SPIRType &type); - void emit_resources(); - void emit_extension_workarounds(spv::ExecutionModel model); - void emit_buffer_block_native(const SPIRVariable &var); - void emit_buffer_reference_block(SPIRType &type, bool forward_declaration); - void emit_buffer_block_legacy(const SPIRVariable &var); - void emit_buffer_block_flattened(const SPIRVariable &type); - void fixup_implicit_builtin_block_names(); - void emit_declared_builtin_block(spv::StorageClass storage, spv::ExecutionModel model); - bool should_force_emit_builtin_block(spv::StorageClass storage); - void emit_push_constant_block_vulkan(const SPIRVariable &var); - void emit_push_constant_block_glsl(const SPIRVariable &var); - void emit_interface_block(const SPIRVariable &type); - void emit_flattened_io_block(const SPIRVariable &var, const char *qual); - void emit_flattened_io_block_struct(const std::string &basename, const SPIRType &type, const char *qual, - const SmallVector &indices); - void emit_flattened_io_block_member(const std::string &basename, const SPIRType &type, const char *qual, - const SmallVector &indices); - void emit_block_chain(SPIRBlock &block); - void emit_hoisted_temporaries(SmallVector> &temporaries); - std::string constant_value_macro_name(uint32_t id); - void emit_constant(const SPIRConstant &constant); - void emit_specialization_constant_op(const SPIRConstantOp &constant); - std::string emit_continue_block(uint32_t continue_block, bool follow_true_block, bool follow_false_block); - bool attempt_emit_loop_header(SPIRBlock &block, SPIRBlock::Method method); - - void branch(BlockID from, BlockID to); - void branch_to_continue(BlockID from, BlockID to); - void branch(BlockID from, uint32_t cond, BlockID true_block, BlockID false_block); - void flush_phi(BlockID from, BlockID to); - void flush_variable_declaration(uint32_t id); - void flush_undeclared_variables(SPIRBlock &block); - void emit_variable_temporary_copies(const SPIRVariable &var); - - bool should_dereference(uint32_t id); - bool should_forward(uint32_t id) const; - bool should_suppress_usage_tracking(uint32_t id) const; - void emit_mix_op(uint32_t result_type, uint32_t id, uint32_t left, uint32_t right, uint32_t lerp); - void emit_nminmax_op(uint32_t result_type, uint32_t id, uint32_t op0, uint32_t op1, GLSLstd450 op); - bool to_trivial_mix_op(const SPIRType &type, std::string &op, uint32_t left, uint32_t right, uint32_t lerp); - void emit_quaternary_func_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, uint32_t op2, - uint32_t op3, const char *op); - void emit_trinary_func_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, uint32_t op2, - const char *op); - void emit_binary_func_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, const char *op); - - void emit_unary_func_op_cast(uint32_t result_type, uint32_t result_id, uint32_t op0, const char *op, - SPIRType::BaseType input_type, SPIRType::BaseType expected_result_type); - void emit_binary_func_op_cast(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, const char *op, - SPIRType::BaseType input_type, bool skip_cast_if_equal_type); - void emit_binary_func_op_cast_clustered(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, - const char *op, SPIRType::BaseType input_type); - void emit_trinary_func_op_cast(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, uint32_t op2, - const char *op, SPIRType::BaseType input_type); - void emit_trinary_func_op_bitextract(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, - uint32_t op2, const char *op, SPIRType::BaseType expected_result_type, - SPIRType::BaseType input_type0, SPIRType::BaseType input_type1, - SPIRType::BaseType input_type2); - void emit_bitfield_insert_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, uint32_t op2, - uint32_t op3, const char *op, SPIRType::BaseType offset_count_type); - - void emit_unary_func_op(uint32_t result_type, uint32_t result_id, uint32_t op0, const char *op); - void emit_unrolled_unary_op(uint32_t result_type, uint32_t result_id, uint32_t operand, const char *op); - void emit_binary_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, const char *op); - void emit_unrolled_binary_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, const char *op, - bool negate, SPIRType::BaseType expected_type); - void emit_binary_op_cast(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, const char *op, - SPIRType::BaseType input_type, bool skip_cast_if_equal_type); - - SPIRType binary_op_bitcast_helper(std::string &cast_op0, std::string &cast_op1, SPIRType::BaseType &input_type, - uint32_t op0, uint32_t op1, bool skip_cast_if_equal_type); - - virtual bool emit_complex_bitcast(uint32_t result_type, uint32_t id, uint32_t op0); - - std::string to_ternary_expression(const SPIRType &result_type, uint32_t select, uint32_t true_value, - uint32_t false_value); - - void emit_unary_op(uint32_t result_type, uint32_t result_id, uint32_t op0, const char *op); - bool expression_is_forwarded(uint32_t id) const; - bool expression_suppresses_usage_tracking(uint32_t id) const; - bool expression_read_implies_multiple_reads(uint32_t id) const; - SPIRExpression &emit_op(uint32_t result_type, uint32_t result_id, const std::string &rhs, bool forward_rhs, - bool suppress_usage_tracking = false); - - void access_chain_internal_append_index(std::string &expr, uint32_t base, const SPIRType *type, - AccessChainFlags flags, bool &access_chain_is_arrayed, uint32_t index); - - std::string access_chain_internal(uint32_t base, const uint32_t *indices, uint32_t count, AccessChainFlags flags, - AccessChainMeta *meta); - - virtual void prepare_access_chain_for_scalar_access(std::string &expr, const SPIRType &type, - spv::StorageClass storage, bool &is_packed); - - std::string access_chain(uint32_t base, const uint32_t *indices, uint32_t count, const SPIRType &target_type, - AccessChainMeta *meta = nullptr, bool ptr_chain = false); - - std::string flattened_access_chain(uint32_t base, const uint32_t *indices, uint32_t count, - const SPIRType &target_type, uint32_t offset, uint32_t matrix_stride, - uint32_t array_stride, bool need_transpose); - std::string flattened_access_chain_struct(uint32_t base, const uint32_t *indices, uint32_t count, - const SPIRType &target_type, uint32_t offset); - std::string flattened_access_chain_matrix(uint32_t base, const uint32_t *indices, uint32_t count, - const SPIRType &target_type, uint32_t offset, uint32_t matrix_stride, - bool need_transpose); - std::string flattened_access_chain_vector(uint32_t base, const uint32_t *indices, uint32_t count, - const SPIRType &target_type, uint32_t offset, uint32_t matrix_stride, - bool need_transpose); - std::pair flattened_access_chain_offset(const SPIRType &basetype, const uint32_t *indices, - uint32_t count, uint32_t offset, - uint32_t word_stride, bool *need_transpose = nullptr, - uint32_t *matrix_stride = nullptr, - uint32_t *array_stride = nullptr, - bool ptr_chain = false); - - const char *index_to_swizzle(uint32_t index); - std::string remap_swizzle(const SPIRType &result_type, uint32_t input_components, const std::string &expr); - std::string declare_temporary(uint32_t type, uint32_t id); - void emit_uninitialized_temporary(uint32_t type, uint32_t id); - SPIRExpression &emit_uninitialized_temporary_expression(uint32_t type, uint32_t id); - void append_global_func_args(const SPIRFunction &func, uint32_t index, SmallVector &arglist); - std::string to_expression(uint32_t id, bool register_expression_read = true); - std::string to_composite_constructor_expression(uint32_t id, bool uses_buffer_offset); - std::string to_rerolled_array_expression(const std::string &expr, const SPIRType &type); - std::string to_enclosed_expression(uint32_t id, bool register_expression_read = true); - std::string to_unpacked_expression(uint32_t id, bool register_expression_read = true); - std::string to_unpacked_row_major_matrix_expression(uint32_t id); - std::string to_enclosed_unpacked_expression(uint32_t id, bool register_expression_read = true); - std::string to_dereferenced_expression(uint32_t id, bool register_expression_read = true); - std::string to_pointer_expression(uint32_t id, bool register_expression_read = true); - std::string to_enclosed_pointer_expression(uint32_t id, bool register_expression_read = true); - std::string to_extract_component_expression(uint32_t id, uint32_t index); - std::string enclose_expression(const std::string &expr); - std::string dereference_expression(const SPIRType &expression_type, const std::string &expr); - std::string address_of_expression(const std::string &expr); - void strip_enclosed_expression(std::string &expr); - std::string to_member_name(const SPIRType &type, uint32_t index); - virtual std::string to_member_reference(uint32_t base, const SPIRType &type, uint32_t index, bool ptr_chain); - std::string to_multi_member_reference(const SPIRType &type, const SmallVector &indices); - std::string type_to_glsl_constructor(const SPIRType &type); - std::string argument_decl(const SPIRFunction::Parameter &arg); - virtual std::string to_qualifiers_glsl(uint32_t id); - void fixup_io_block_patch_qualifiers(const SPIRVariable &var); - void emit_output_variable_initializer(const SPIRVariable &var); - const char *to_precision_qualifiers_glsl(uint32_t id); - virtual const char *to_storage_qualifiers_glsl(const SPIRVariable &var); - const char *flags_to_qualifiers_glsl(const SPIRType &type, const Bitset &flags); - const char *format_to_glsl(spv::ImageFormat format); - virtual std::string layout_for_member(const SPIRType &type, uint32_t index); - virtual std::string to_interpolation_qualifiers(const Bitset &flags); - std::string layout_for_variable(const SPIRVariable &variable); - std::string to_combined_image_sampler(VariableID image_id, VariableID samp_id); - virtual bool skip_argument(uint32_t id) const; - virtual void emit_array_copy(const std::string &lhs, uint32_t rhs_id, spv::StorageClass lhs_storage, - spv::StorageClass rhs_storage); - virtual void emit_block_hints(const SPIRBlock &block); - virtual std::string to_initializer_expression(const SPIRVariable &var); - virtual std::string to_zero_initialized_expression(uint32_t type_id); - bool type_can_zero_initialize(const SPIRType &type) const; - - bool buffer_is_packing_standard(const SPIRType &type, BufferPackingStandard packing, - uint32_t *failed_index = nullptr, uint32_t start_offset = 0, - uint32_t end_offset = ~(0u)); - std::string buffer_to_packing_standard(const SPIRType &type, bool support_std430_without_scalar_layout); - - uint32_t type_to_packed_base_size(const SPIRType &type, BufferPackingStandard packing); - uint32_t type_to_packed_alignment(const SPIRType &type, const Bitset &flags, BufferPackingStandard packing); - uint32_t type_to_packed_array_stride(const SPIRType &type, const Bitset &flags, BufferPackingStandard packing); - uint32_t type_to_packed_size(const SPIRType &type, const Bitset &flags, BufferPackingStandard packing); - - std::string bitcast_glsl(const SPIRType &result_type, uint32_t arg); - virtual std::string bitcast_glsl_op(const SPIRType &result_type, const SPIRType &argument_type); - - std::string bitcast_expression(SPIRType::BaseType target_type, uint32_t arg); - std::string bitcast_expression(const SPIRType &target_type, SPIRType::BaseType expr_type, const std::string &expr); - - std::string build_composite_combiner(uint32_t result_type, const uint32_t *elems, uint32_t length); - bool remove_duplicate_swizzle(std::string &op); - bool remove_unity_swizzle(uint32_t base, std::string &op); - - // Can modify flags to remote readonly/writeonly if image type - // and force recompile. - bool check_atomic_image(uint32_t id); - - virtual void replace_illegal_names(); - void replace_illegal_names(const std::unordered_set &keywords); - virtual void emit_entry_point_declarations(); - - void replace_fragment_output(SPIRVariable &var); - void replace_fragment_outputs(); - std::string legacy_tex_op(const std::string &op, const SPIRType &imgtype, uint32_t id); - - uint32_t indent = 0; - - std::unordered_set emitted_functions; - - // Ensure that we declare phi-variable copies even if the original declaration isn't deferred - std::unordered_set flushed_phi_variables; - - std::unordered_set flattened_buffer_blocks; - std::unordered_map flattened_structs; - - ShaderSubgroupSupportHelper shader_subgroup_supporter; - - std::string load_flattened_struct(const std::string &basename, const SPIRType &type); - std::string to_flattened_struct_member(const std::string &basename, const SPIRType &type, uint32_t index); - void store_flattened_struct(uint32_t lhs_id, uint32_t value); - void store_flattened_struct(const std::string &basename, uint32_t rhs, const SPIRType &type, - const SmallVector &indices); - std::string to_flattened_access_chain_expression(uint32_t id); - - // Usage tracking. If a temporary is used more than once, use the temporary instead to - // avoid AST explosion when SPIRV is generated with pure SSA and doesn't write stuff to variables. - std::unordered_map expression_usage_counts; - void track_expression_read(uint32_t id); - - SmallVector forced_extensions; - SmallVector header_lines; - - // Used when expressions emit extra opcodes with their own unique IDs, - // and we need to reuse the IDs across recompilation loops. - // Currently used by NMin/Max/Clamp implementations. - std::unordered_map extra_sub_expressions; - - SmallVector workaround_ubo_load_overload_types; - void request_workaround_wrapper_overload(TypeID id); - void rewrite_load_for_wrapped_row_major(std::string &expr, TypeID loaded_type, ID ptr); - - uint32_t statement_count = 0; - - inline bool is_legacy() const - { - return (options.es && options.version < 300) || (!options.es && options.version < 130); - } - - inline bool is_legacy_es() const - { - return options.es && options.version < 300; - } - - inline bool is_legacy_desktop() const - { - return !options.es && options.version < 130; - } - - bool requires_transpose_2x2 = false; - bool requires_transpose_3x3 = false; - bool requires_transpose_4x4 = false; - bool ray_tracing_is_khr = false; - void ray_tracing_khr_fixup_locations(); - - bool args_will_forward(uint32_t id, const uint32_t *args, uint32_t num_args, bool pure); - void register_call_out_argument(uint32_t id); - void register_impure_function_call(); - void register_control_dependent_expression(uint32_t expr); - - // GL_EXT_shader_pixel_local_storage support. - std::vector pls_inputs; - std::vector pls_outputs; - std::string pls_decl(const PlsRemap &variable); - const char *to_pls_qualifiers_glsl(const SPIRVariable &variable); - void emit_pls(); - void remap_pls_variables(); - - // GL_EXT_shader_framebuffer_fetch support. - std::vector> subpass_to_framebuffer_fetch_attachment; - std::unordered_set inout_color_attachments; - bool subpass_input_is_framebuffer_fetch(uint32_t id) const; - void emit_inout_fragment_outputs_copy_to_subpass_inputs(); - const SPIRVariable *find_subpass_input_by_attachment_index(uint32_t index) const; - const SPIRVariable *find_color_output_by_location(uint32_t location) const; - - // A variant which takes two sets of name. The secondary is only used to verify there are no collisions, - // but the set is not updated when we have found a new name. - // Used primarily when adding block interface names. - void add_variable(std::unordered_set &variables_primary, - const std::unordered_set &variables_secondary, std::string &name); - - void check_function_call_constraints(const uint32_t *args, uint32_t length); - void handle_invalid_expression(uint32_t id); - void find_static_extensions(); - - std::string emit_for_loop_initializers(const SPIRBlock &block); - void emit_while_loop_initializers(const SPIRBlock &block); - bool for_loop_initializers_are_same_type(const SPIRBlock &block); - bool optimize_read_modify_write(const SPIRType &type, const std::string &lhs, const std::string &rhs); - void fixup_image_load_store_access(); - - bool type_is_empty(const SPIRType &type); - - virtual void declare_undefined_values(); - - bool can_use_io_location(spv::StorageClass storage, bool block); - const Instruction *get_next_instruction_in_block(const Instruction &instr); - static uint32_t mask_relevant_memory_semantics(uint32_t semantics); - - std::string convert_half_to_string(const SPIRConstant &value, uint32_t col, uint32_t row); - std::string convert_float_to_string(const SPIRConstant &value, uint32_t col, uint32_t row); - std::string convert_double_to_string(const SPIRConstant &value, uint32_t col, uint32_t row); - - std::string convert_separate_image_to_expression(uint32_t id); - - // Builtins in GLSL are always specific signedness, but the SPIR-V can declare them - // as either unsigned or signed. - // Sometimes we will need to automatically perform casts on load and store to make this work. - virtual void cast_to_builtin_store(uint32_t target_id, std::string &expr, const SPIRType &expr_type); - virtual void cast_from_builtin_load(uint32_t source_id, std::string &expr, const SPIRType &expr_type); - void unroll_array_from_complex_load(uint32_t target_id, uint32_t source_id, std::string &expr); - void convert_non_uniform_expression(const SPIRType &type, std::string &expr); - - void handle_store_to_invariant_variable(uint32_t store_id, uint32_t value_id); - void disallow_forwarding_in_expression_chain(const SPIRExpression &expr); - - bool expression_is_constant_null(uint32_t id) const; - bool expression_is_non_value_type_array(uint32_t ptr); - virtual void emit_store_statement(uint32_t lhs_expression, uint32_t rhs_expression); - - uint32_t get_integer_width_for_instruction(const Instruction &instr) const; - uint32_t get_integer_width_for_glsl_instruction(GLSLstd450 op, const uint32_t *arguments, uint32_t length) const; - - bool variable_is_lut(const SPIRVariable &var) const; - - char current_locale_radix_character = '.'; - - void fixup_type_alias(); - void reorder_type_alias(); - - void propagate_nonuniform_qualifier(uint32_t id); - - static const char *vector_swizzle(int vecsize, int index); - -private: - void init(); -}; -} // namespace SPIRV_CROSS_NAMESPACE - -#endif diff --git a/emscripten/include/spirv_cross/spirv_msl.hpp b/emscripten/include/spirv_cross/spirv_msl.hpp deleted file mode 100644 index 0cce958d..00000000 --- a/emscripten/include/spirv_cross/spirv_msl.hpp +++ /dev/null @@ -1,1092 +0,0 @@ -/* - * Copyright 2016-2021 The Brenwill Workshop Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * At your option, you may choose to accept this material under either: - * 1. The Apache License, Version 2.0, found at , or - * 2. The MIT License, found at . - * SPDX-License-Identifier: Apache-2.0 OR MIT. - */ - -#ifndef SPIRV_CROSS_MSL_HPP -#define SPIRV_CROSS_MSL_HPP - -#include "spirv_glsl.hpp" -#include -#include -#include -#include -#include - -namespace SPIRV_CROSS_NAMESPACE -{ - -// Indicates the format of a shader input. Currently limited to specifying -// if the input is an 8-bit unsigned integer, 16-bit unsigned integer, or -// some other format. -enum MSLShaderInputFormat -{ - MSL_SHADER_INPUT_FORMAT_OTHER = 0, - MSL_SHADER_INPUT_FORMAT_UINT8 = 1, - MSL_SHADER_INPUT_FORMAT_UINT16 = 2, - MSL_SHADER_INPUT_FORMAT_ANY16 = 3, - MSL_SHADER_INPUT_FORMAT_ANY32 = 4, - - // Deprecated aliases. - MSL_VERTEX_FORMAT_OTHER = MSL_SHADER_INPUT_FORMAT_OTHER, - MSL_VERTEX_FORMAT_UINT8 = MSL_SHADER_INPUT_FORMAT_UINT8, - MSL_VERTEX_FORMAT_UINT16 = MSL_SHADER_INPUT_FORMAT_UINT16, - - MSL_SHADER_INPUT_FORMAT_INT_MAX = 0x7fffffff -}; - -// Defines MSL characteristics of an input variable at a particular location. -// After compilation, it is possible to query whether or not this location was used. -// If vecsize is nonzero, it must be greater than or equal to the vecsize declared in the shader, -// or behavior is undefined. -struct MSLShaderInput -{ - uint32_t location = 0; - MSLShaderInputFormat format = MSL_SHADER_INPUT_FORMAT_OTHER; - spv::BuiltIn builtin = spv::BuiltInMax; - uint32_t vecsize = 0; -}; - -// Matches the binding index of a MSL resource for a binding within a descriptor set. -// Taken together, the stage, desc_set and binding combine to form a reference to a resource -// descriptor used in a particular shading stage. The count field indicates the number of -// resources consumed by this binding, if the binding represents an array of resources. -// If the resource array is a run-time-sized array, which are legal in GLSL or SPIR-V, this value -// will be used to declare the array size in MSL, which does not support run-time-sized arrays. -// For resources that are not held in a run-time-sized array, the count field does not need to be populated. -// If using MSL 2.0 argument buffers, the descriptor set is not marked as a discrete descriptor set, -// and (for iOS only) the resource is not a storage image (sampled != 2), the binding reference we -// remap to will become an [[id(N)]] attribute within the "descriptor set" argument buffer structure. -// For resources which are bound in the "classic" MSL 1.0 way or discrete descriptors, the remap will become a -// [[buffer(N)]], [[texture(N)]] or [[sampler(N)]] depending on the resource types used. -struct MSLResourceBinding -{ - spv::ExecutionModel stage = spv::ExecutionModelMax; - uint32_t desc_set = 0; - uint32_t binding = 0; - uint32_t count = 0; - uint32_t msl_buffer = 0; - uint32_t msl_texture = 0; - uint32_t msl_sampler = 0; -}; - -enum MSLSamplerCoord -{ - MSL_SAMPLER_COORD_NORMALIZED = 0, - MSL_SAMPLER_COORD_PIXEL = 1, - MSL_SAMPLER_INT_MAX = 0x7fffffff -}; - -enum MSLSamplerFilter -{ - MSL_SAMPLER_FILTER_NEAREST = 0, - MSL_SAMPLER_FILTER_LINEAR = 1, - MSL_SAMPLER_FILTER_INT_MAX = 0x7fffffff -}; - -enum MSLSamplerMipFilter -{ - MSL_SAMPLER_MIP_FILTER_NONE = 0, - MSL_SAMPLER_MIP_FILTER_NEAREST = 1, - MSL_SAMPLER_MIP_FILTER_LINEAR = 2, - MSL_SAMPLER_MIP_FILTER_INT_MAX = 0x7fffffff -}; - -enum MSLSamplerAddress -{ - MSL_SAMPLER_ADDRESS_CLAMP_TO_ZERO = 0, - MSL_SAMPLER_ADDRESS_CLAMP_TO_EDGE = 1, - MSL_SAMPLER_ADDRESS_CLAMP_TO_BORDER = 2, - MSL_SAMPLER_ADDRESS_REPEAT = 3, - MSL_SAMPLER_ADDRESS_MIRRORED_REPEAT = 4, - MSL_SAMPLER_ADDRESS_INT_MAX = 0x7fffffff -}; - -enum MSLSamplerCompareFunc -{ - MSL_SAMPLER_COMPARE_FUNC_NEVER = 0, - MSL_SAMPLER_COMPARE_FUNC_LESS = 1, - MSL_SAMPLER_COMPARE_FUNC_LESS_EQUAL = 2, - MSL_SAMPLER_COMPARE_FUNC_GREATER = 3, - MSL_SAMPLER_COMPARE_FUNC_GREATER_EQUAL = 4, - MSL_SAMPLER_COMPARE_FUNC_EQUAL = 5, - MSL_SAMPLER_COMPARE_FUNC_NOT_EQUAL = 6, - MSL_SAMPLER_COMPARE_FUNC_ALWAYS = 7, - MSL_SAMPLER_COMPARE_FUNC_INT_MAX = 0x7fffffff -}; - -enum MSLSamplerBorderColor -{ - MSL_SAMPLER_BORDER_COLOR_TRANSPARENT_BLACK = 0, - MSL_SAMPLER_BORDER_COLOR_OPAQUE_BLACK = 1, - MSL_SAMPLER_BORDER_COLOR_OPAQUE_WHITE = 2, - MSL_SAMPLER_BORDER_COLOR_INT_MAX = 0x7fffffff -}; - -enum MSLFormatResolution -{ - MSL_FORMAT_RESOLUTION_444 = 0, - MSL_FORMAT_RESOLUTION_422, - MSL_FORMAT_RESOLUTION_420, - MSL_FORMAT_RESOLUTION_INT_MAX = 0x7fffffff -}; - -enum MSLChromaLocation -{ - MSL_CHROMA_LOCATION_COSITED_EVEN = 0, - MSL_CHROMA_LOCATION_MIDPOINT, - MSL_CHROMA_LOCATION_INT_MAX = 0x7fffffff -}; - -enum MSLComponentSwizzle -{ - MSL_COMPONENT_SWIZZLE_IDENTITY = 0, - MSL_COMPONENT_SWIZZLE_ZERO, - MSL_COMPONENT_SWIZZLE_ONE, - MSL_COMPONENT_SWIZZLE_R, - MSL_COMPONENT_SWIZZLE_G, - MSL_COMPONENT_SWIZZLE_B, - MSL_COMPONENT_SWIZZLE_A, - MSL_COMPONENT_SWIZZLE_INT_MAX = 0x7fffffff -}; - -enum MSLSamplerYCbCrModelConversion -{ - MSL_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY = 0, - MSL_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_IDENTITY, - MSL_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_BT_709, - MSL_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_BT_601, - MSL_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_BT_2020, - MSL_SAMPLER_YCBCR_MODEL_CONVERSION_INT_MAX = 0x7fffffff -}; - -enum MSLSamplerYCbCrRange -{ - MSL_SAMPLER_YCBCR_RANGE_ITU_FULL = 0, - MSL_SAMPLER_YCBCR_RANGE_ITU_NARROW, - MSL_SAMPLER_YCBCR_RANGE_INT_MAX = 0x7fffffff -}; - -struct MSLConstexprSampler -{ - MSLSamplerCoord coord = MSL_SAMPLER_COORD_NORMALIZED; - MSLSamplerFilter min_filter = MSL_SAMPLER_FILTER_NEAREST; - MSLSamplerFilter mag_filter = MSL_SAMPLER_FILTER_NEAREST; - MSLSamplerMipFilter mip_filter = MSL_SAMPLER_MIP_FILTER_NONE; - MSLSamplerAddress s_address = MSL_SAMPLER_ADDRESS_CLAMP_TO_EDGE; - MSLSamplerAddress t_address = MSL_SAMPLER_ADDRESS_CLAMP_TO_EDGE; - MSLSamplerAddress r_address = MSL_SAMPLER_ADDRESS_CLAMP_TO_EDGE; - MSLSamplerCompareFunc compare_func = MSL_SAMPLER_COMPARE_FUNC_NEVER; - MSLSamplerBorderColor border_color = MSL_SAMPLER_BORDER_COLOR_TRANSPARENT_BLACK; - float lod_clamp_min = 0.0f; - float lod_clamp_max = 1000.0f; - int max_anisotropy = 1; - - // Sampler Y'CbCr conversion parameters - uint32_t planes = 0; - MSLFormatResolution resolution = MSL_FORMAT_RESOLUTION_444; - MSLSamplerFilter chroma_filter = MSL_SAMPLER_FILTER_NEAREST; - MSLChromaLocation x_chroma_offset = MSL_CHROMA_LOCATION_COSITED_EVEN; - MSLChromaLocation y_chroma_offset = MSL_CHROMA_LOCATION_COSITED_EVEN; - MSLComponentSwizzle swizzle[4]; // IDENTITY, IDENTITY, IDENTITY, IDENTITY - MSLSamplerYCbCrModelConversion ycbcr_model = MSL_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY; - MSLSamplerYCbCrRange ycbcr_range = MSL_SAMPLER_YCBCR_RANGE_ITU_FULL; - uint32_t bpc = 8; - - bool compare_enable = false; - bool lod_clamp_enable = false; - bool anisotropy_enable = false; - bool ycbcr_conversion_enable = false; - - MSLConstexprSampler() - { - for (uint32_t i = 0; i < 4; i++) - swizzle[i] = MSL_COMPONENT_SWIZZLE_IDENTITY; - } - bool swizzle_is_identity() const - { - return (swizzle[0] == MSL_COMPONENT_SWIZZLE_IDENTITY && swizzle[1] == MSL_COMPONENT_SWIZZLE_IDENTITY && - swizzle[2] == MSL_COMPONENT_SWIZZLE_IDENTITY && swizzle[3] == MSL_COMPONENT_SWIZZLE_IDENTITY); - } - bool swizzle_has_one_or_zero() const - { - return (swizzle[0] == MSL_COMPONENT_SWIZZLE_ZERO || swizzle[0] == MSL_COMPONENT_SWIZZLE_ONE || - swizzle[1] == MSL_COMPONENT_SWIZZLE_ZERO || swizzle[1] == MSL_COMPONENT_SWIZZLE_ONE || - swizzle[2] == MSL_COMPONENT_SWIZZLE_ZERO || swizzle[2] == MSL_COMPONENT_SWIZZLE_ONE || - swizzle[3] == MSL_COMPONENT_SWIZZLE_ZERO || swizzle[3] == MSL_COMPONENT_SWIZZLE_ONE); - } -}; - -// Special constant used in a MSLResourceBinding desc_set -// element to indicate the bindings for the push constants. -// Kinda deprecated. Just use ResourceBindingPushConstant{DescriptorSet,Binding} directly. -static const uint32_t kPushConstDescSet = ResourceBindingPushConstantDescriptorSet; - -// Special constant used in a MSLResourceBinding binding -// element to indicate the bindings for the push constants. -// Kinda deprecated. Just use ResourceBindingPushConstant{DescriptorSet,Binding} directly. -static const uint32_t kPushConstBinding = ResourceBindingPushConstantBinding; - -// Special constant used in a MSLResourceBinding binding -// element to indicate the buffer binding for swizzle buffers. -static const uint32_t kSwizzleBufferBinding = ~(1u); - -// Special constant used in a MSLResourceBinding binding -// element to indicate the buffer binding for buffer size buffers to support OpArrayLength. -static const uint32_t kBufferSizeBufferBinding = ~(2u); - -// Special constant used in a MSLResourceBinding binding -// element to indicate the buffer binding used for the argument buffer itself. -// This buffer binding should be kept as small as possible as all automatic bindings for buffers -// will start at max(kArgumentBufferBinding) + 1. -static const uint32_t kArgumentBufferBinding = ~(3u); - -static const uint32_t kMaxArgumentBuffers = 8; - -// The arbitrary maximum for the nesting of array of array copies. -static const uint32_t kArrayCopyMultidimMax = 6; - -// Decompiles SPIR-V to Metal Shading Language -class CompilerMSL : public CompilerGLSL -{ -public: - // Options for compiling to Metal Shading Language - struct Options - { - typedef enum - { - iOS = 0, - macOS = 1 - } Platform; - - Platform platform = macOS; - uint32_t msl_version = make_msl_version(1, 2); - uint32_t texel_buffer_texture_width = 4096; // Width of 2D Metal textures used as 1D texel buffers - uint32_t r32ui_linear_texture_alignment = 4; - uint32_t r32ui_alignment_constant_id = 65535; - uint32_t swizzle_buffer_index = 30; - uint32_t indirect_params_buffer_index = 29; - uint32_t shader_output_buffer_index = 28; - uint32_t shader_patch_output_buffer_index = 27; - uint32_t shader_tess_factor_buffer_index = 26; - uint32_t buffer_size_buffer_index = 25; - uint32_t view_mask_buffer_index = 24; - uint32_t dynamic_offsets_buffer_index = 23; - uint32_t shader_input_buffer_index = 22; - uint32_t shader_index_buffer_index = 21; - uint32_t shader_input_wg_index = 0; - uint32_t device_index = 0; - uint32_t enable_frag_output_mask = 0xffffffff; - // Metal doesn't allow setting a fixed sample mask directly in the pipeline. - // We can evade this restriction by ANDing the internal sample_mask output - // of the shader with the additional fixed sample mask. - uint32_t additional_fixed_sample_mask = 0xffffffff; - bool enable_point_size_builtin = true; - bool enable_frag_depth_builtin = true; - bool enable_frag_stencil_ref_builtin = true; - bool disable_rasterization = false; - bool capture_output_to_buffer = false; - bool swizzle_texture_samples = false; - bool tess_domain_origin_lower_left = false; - bool multiview = false; - bool multiview_layered_rendering = true; - bool view_index_from_device_index = false; - bool dispatch_base = false; - bool texture_1D_as_2D = false; - - // Enable use of MSL 2.0 indirect argument buffers. - // MSL 2.0 must also be enabled. - bool argument_buffers = false; - - // Ensures vertex and instance indices start at zero. This reflects the behavior of HLSL with SV_VertexID and SV_InstanceID. - bool enable_base_index_zero = false; - - // Fragment output in MSL must have at least as many components as the render pass. - // Add support to explicit pad out components. - bool pad_fragment_output_components = false; - - // Specifies whether the iOS target version supports the [[base_vertex]] and [[base_instance]] attributes. - bool ios_support_base_vertex_instance = false; - - // Use Metal's native frame-buffer fetch API for subpass inputs. - bool use_framebuffer_fetch_subpasses = false; - - // Enables use of "fma" intrinsic for invariant float math - bool invariant_float_math = false; - - // Emulate texturecube_array with texture2d_array for iOS where this type is not available - bool emulate_cube_array = false; - - // Allow user to enable decoration binding - bool enable_decoration_binding = false; - - // Requires MSL 2.1, use the native support for texel buffers. - bool texture_buffer_native = false; - - // Forces all resources which are part of an argument buffer to be considered active. - // This ensures ABI compatibility between shaders where some resources might be unused, - // and would otherwise declare a different IAB. - bool force_active_argument_buffer_resources = false; - - // Forces the use of plain arrays, which works around certain driver bugs on certain versions - // of Intel Macbooks. See https://github.com/KhronosGroup/SPIRV-Cross/issues/1210. - // May reduce performance in scenarios where arrays are copied around as value-types. - bool force_native_arrays = false; - - // If a shader writes clip distance, also emit user varyings which - // can be read in subsequent stages. - bool enable_clip_distance_user_varying = true; - - // In a tessellation control shader, assume that more than one patch can be processed in a - // single workgroup. This requires changes to the way the InvocationId and PrimitiveId - // builtins are processed, but should result in more efficient usage of the GPU. - bool multi_patch_workgroup = false; - - // If set, a vertex shader will be compiled as part of a tessellation pipeline. - // It will be translated as a compute kernel, so it can use the global invocation ID - // to index the output buffer. - bool vertex_for_tessellation = false; - - // Assume that SubpassData images have multiple layers. Layered input attachments - // are addressed relative to the Layer output from the vertex pipeline. This option - // has no effect with multiview, since all input attachments are assumed to be layered - // and will be addressed using the current ViewIndex. - bool arrayed_subpass_input = false; - - // Whether to use SIMD-group or quadgroup functions to implement group nnon-uniform - // operations. Some GPUs on iOS do not support the SIMD-group functions, only the - // quadgroup functions. - bool ios_use_simdgroup_functions = false; - - // If set, the subgroup size will be assumed to be one, and subgroup-related - // builtins and operations will be emitted accordingly. This mode is intended to - // be used by MoltenVK on hardware/software configurations which do not provide - // sufficient support for subgroups. - bool emulate_subgroups = false; - - // If nonzero, a fixed subgroup size to assume. Metal, similarly to VK_EXT_subgroup_size_control, - // allows the SIMD-group size (aka thread execution width) to vary depending on - // register usage and requirements. In certain circumstances--for example, a pipeline - // in MoltenVK without VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT-- - // this is undesirable. This fixes the value of the SubgroupSize builtin, instead of - // mapping it to the Metal builtin [[thread_execution_width]]. If the thread - // execution width is reduced, the extra invocations will appear to be inactive. - // If zero, the SubgroupSize will be allowed to vary, and the builtin will be mapped - // to the Metal [[thread_execution_width]] builtin. - uint32_t fixed_subgroup_size = 0; - - enum class IndexType - { - None = 0, - UInt16 = 1, - UInt32 = 2 - }; - - // The type of index in the index buffer, if present. For a compute shader, Metal - // requires specifying the indexing at pipeline creation, rather than at draw time - // as with graphics pipelines. This means we must create three different pipelines, - // for no indexing, 16-bit indices, and 32-bit indices. Each requires different - // handling for the gl_VertexIndex builtin. We may as well, then, create three - // different shaders for these three scenarios. - IndexType vertex_index_type = IndexType::None; - - // If set, a dummy [[sample_id]] input is added to a fragment shader if none is present. - // This will force the shader to run at sample rate, assuming Metal does not optimize - // the extra threads away. - bool force_sample_rate_shading = false; - - bool is_ios() const - { - return platform == iOS; - } - - bool is_macos() const - { - return platform == macOS; - } - - void set_msl_version(uint32_t major, uint32_t minor = 0, uint32_t patch = 0) - { - msl_version = make_msl_version(major, minor, patch); - } - - bool supports_msl_version(uint32_t major, uint32_t minor = 0, uint32_t patch = 0) const - { - return msl_version >= make_msl_version(major, minor, patch); - } - - static uint32_t make_msl_version(uint32_t major, uint32_t minor = 0, uint32_t patch = 0) - { - return (major * 10000) + (minor * 100) + patch; - } - }; - - const Options &get_msl_options() const - { - return msl_options; - } - - void set_msl_options(const Options &opts) - { - msl_options = opts; - } - - // Provide feedback to calling API to allow runtime to disable pipeline - // rasterization if vertex shader requires rasterization to be disabled. - bool get_is_rasterization_disabled() const - { - return is_rasterization_disabled && (get_entry_point().model == spv::ExecutionModelVertex || - get_entry_point().model == spv::ExecutionModelTessellationControl || - get_entry_point().model == spv::ExecutionModelTessellationEvaluation); - } - - // Provide feedback to calling API to allow it to pass an auxiliary - // swizzle buffer if the shader needs it. - bool needs_swizzle_buffer() const - { - return used_swizzle_buffer; - } - - // Provide feedback to calling API to allow it to pass a buffer - // containing STORAGE_BUFFER buffer sizes to support OpArrayLength. - bool needs_buffer_size_buffer() const - { - return !buffers_requiring_array_length.empty(); - } - - // Provide feedback to calling API to allow it to pass a buffer - // containing the view mask for the current multiview subpass. - bool needs_view_mask_buffer() const - { - return msl_options.multiview && !msl_options.view_index_from_device_index; - } - - // Provide feedback to calling API to allow it to pass a buffer - // containing the dispatch base workgroup ID. - bool needs_dispatch_base_buffer() const - { - return msl_options.dispatch_base && !msl_options.supports_msl_version(1, 2); - } - - // Provide feedback to calling API to allow it to pass an output - // buffer if the shader needs it. - bool needs_output_buffer() const - { - return capture_output_to_buffer && stage_out_var_id != ID(0); - } - - // Provide feedback to calling API to allow it to pass a patch output - // buffer if the shader needs it. - bool needs_patch_output_buffer() const - { - return capture_output_to_buffer && patch_stage_out_var_id != ID(0); - } - - // Provide feedback to calling API to allow it to pass an input threadgroup - // buffer if the shader needs it. - bool needs_input_threadgroup_mem() const - { - return capture_output_to_buffer && stage_in_var_id != ID(0); - } - - explicit CompilerMSL(std::vector spirv); - CompilerMSL(const uint32_t *ir, size_t word_count); - explicit CompilerMSL(const ParsedIR &ir); - explicit CompilerMSL(ParsedIR &&ir); - - // input is a shader input description used to fix up shader input variables. - // If shader inputs are provided, is_msl_shader_input_used() will return true after - // calling ::compile() if the location was used by the MSL code. - void add_msl_shader_input(const MSLShaderInput &input); - - // resource is a resource binding to indicate the MSL buffer, - // texture or sampler index to use for a particular SPIR-V description set - // and binding. If resource bindings are provided, - // is_msl_resource_binding_used() will return true after calling ::compile() if - // the set/binding combination was used by the MSL code. - void add_msl_resource_binding(const MSLResourceBinding &resource); - - // desc_set and binding are the SPIR-V descriptor set and binding of a buffer resource - // in this shader. index is the index within the dynamic offset buffer to use. This - // function marks that resource as using a dynamic offset (VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC - // or VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC). This function only has any effect if argument buffers - // are enabled. If so, the buffer will have its address adjusted at the beginning of the shader with - // an offset taken from the dynamic offset buffer. - void add_dynamic_buffer(uint32_t desc_set, uint32_t binding, uint32_t index); - - // desc_set and binding are the SPIR-V descriptor set and binding of a buffer resource - // in this shader. This function marks that resource as an inline uniform block - // (VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT). This function only has any effect if argument buffers - // are enabled. If so, the buffer block will be directly embedded into the argument - // buffer, instead of being referenced indirectly via pointer. - void add_inline_uniform_block(uint32_t desc_set, uint32_t binding); - - // When using MSL argument buffers, we can force "classic" MSL 1.0 binding schemes for certain descriptor sets. - // This corresponds to VK_KHR_push_descriptor in Vulkan. - void add_discrete_descriptor_set(uint32_t desc_set); - - // If an argument buffer is large enough, it may need to be in the device storage space rather than - // constant. Opt-in to this behavior here on a per set basis. - void set_argument_buffer_device_address_space(uint32_t desc_set, bool device_storage); - - // Query after compilation is done. This allows you to check if an input location was used by the shader. - bool is_msl_shader_input_used(uint32_t location); - - // NOTE: Only resources which are remapped using add_msl_resource_binding will be reported here. - // Constexpr samplers are always assumed to be emitted. - // No specific MSLResourceBinding remapping is required for constexpr samplers as long as they are remapped - // by remap_constexpr_sampler(_by_binding). - bool is_msl_resource_binding_used(spv::ExecutionModel model, uint32_t set, uint32_t binding) const; - - // This must only be called after a successful call to CompilerMSL::compile(). - // For a variable resource ID obtained through reflection API, report the automatically assigned resource index. - // If the descriptor set was part of an argument buffer, report the [[id(N)]], - // or [[buffer/texture/sampler]] binding for other resources. - // If the resource was a combined image sampler, report the image binding here, - // use the _secondary version of this call to query the sampler half of the resource. - // If no binding exists, uint32_t(-1) is returned. - uint32_t get_automatic_msl_resource_binding(uint32_t id) const; - - // Same as get_automatic_msl_resource_binding, but should only be used for combined image samplers, in which case the - // sampler's binding is returned instead. For any other resource type, -1 is returned. - uint32_t get_automatic_msl_resource_binding_secondary(uint32_t id) const; - - // Same as get_automatic_msl_resource_binding, but should only be used for combined image samplers for multiplanar images, - // in which case the second plane's binding is returned instead. For any other resource type, -1 is returned. - uint32_t get_automatic_msl_resource_binding_tertiary(uint32_t id) const; - - // Same as get_automatic_msl_resource_binding, but should only be used for combined image samplers for triplanar images, - // in which case the third plane's binding is returned instead. For any other resource type, -1 is returned. - uint32_t get_automatic_msl_resource_binding_quaternary(uint32_t id) const; - - // Compiles the SPIR-V code into Metal Shading Language. - std::string compile() override; - - // Remap a sampler with ID to a constexpr sampler. - // Older iOS targets must use constexpr samplers in certain cases (PCF), - // so a static sampler must be used. - // The sampler will not consume a binding, but be declared in the entry point as a constexpr sampler. - // This can be used on both combined image/samplers (sampler2D) or standalone samplers. - // The remapped sampler must not be an array of samplers. - // Prefer remap_constexpr_sampler_by_binding unless you're also doing reflection anyways. - void remap_constexpr_sampler(VariableID id, const MSLConstexprSampler &sampler); - - // Same as remap_constexpr_sampler, except you provide set/binding, rather than variable ID. - // Remaps based on ID take priority over set/binding remaps. - void remap_constexpr_sampler_by_binding(uint32_t desc_set, uint32_t binding, const MSLConstexprSampler &sampler); - - // If using CompilerMSL::Options::pad_fragment_output_components, override the number of components we expect - // to use for a particular location. The default is 4 if number of components is not overridden. - void set_fragment_output_components(uint32_t location, uint32_t components); - - void set_combined_sampler_suffix(const char *suffix); - const char *get_combined_sampler_suffix() const; - -protected: - // An enum of SPIR-V functions that are implemented in additional - // source code that is added to the shader if necessary. - enum SPVFuncImpl - { - SPVFuncImplNone, - SPVFuncImplMod, - SPVFuncImplRadians, - SPVFuncImplDegrees, - SPVFuncImplFindILsb, - SPVFuncImplFindSMsb, - SPVFuncImplFindUMsb, - SPVFuncImplSSign, - SPVFuncImplArrayCopyMultidimBase, - // Unfortunately, we cannot use recursive templates in the MSL compiler properly, - // so stamp out variants up to some arbitrary maximum. - SPVFuncImplArrayCopy = SPVFuncImplArrayCopyMultidimBase + 1, - SPVFuncImplArrayOfArrayCopy2Dim = SPVFuncImplArrayCopyMultidimBase + 2, - SPVFuncImplArrayOfArrayCopy3Dim = SPVFuncImplArrayCopyMultidimBase + 3, - SPVFuncImplArrayOfArrayCopy4Dim = SPVFuncImplArrayCopyMultidimBase + 4, - SPVFuncImplArrayOfArrayCopy5Dim = SPVFuncImplArrayCopyMultidimBase + 5, - SPVFuncImplArrayOfArrayCopy6Dim = SPVFuncImplArrayCopyMultidimBase + 6, - SPVFuncImplTexelBufferCoords, - SPVFuncImplImage2DAtomicCoords, // Emulate texture2D atomic operations - SPVFuncImplFMul, - SPVFuncImplFAdd, - SPVFuncImplCubemapTo2DArrayFace, - SPVFuncImplUnsafeArray, // Allow Metal to use the array template to make arrays a value type - SPVFuncImplInverse4x4, - SPVFuncImplInverse3x3, - SPVFuncImplInverse2x2, - // It is very important that this come before *Swizzle and ChromaReconstruct*, to ensure it's - // emitted before them. - SPVFuncImplForwardArgs, - // Likewise, this must come before *Swizzle. - SPVFuncImplGetSwizzle, - SPVFuncImplTextureSwizzle, - SPVFuncImplGatherSwizzle, - SPVFuncImplGatherCompareSwizzle, - SPVFuncImplSubgroupBroadcast, - SPVFuncImplSubgroupBroadcastFirst, - SPVFuncImplSubgroupBallot, - SPVFuncImplSubgroupBallotBitExtract, - SPVFuncImplSubgroupBallotFindLSB, - SPVFuncImplSubgroupBallotFindMSB, - SPVFuncImplSubgroupBallotBitCount, - SPVFuncImplSubgroupAllEqual, - SPVFuncImplSubgroupShuffle, - SPVFuncImplSubgroupShuffleXor, - SPVFuncImplSubgroupShuffleUp, - SPVFuncImplSubgroupShuffleDown, - SPVFuncImplQuadBroadcast, - SPVFuncImplQuadSwap, - SPVFuncImplReflectScalar, - SPVFuncImplRefractScalar, - SPVFuncImplFaceForwardScalar, - SPVFuncImplChromaReconstructNearest2Plane, - SPVFuncImplChromaReconstructNearest3Plane, - SPVFuncImplChromaReconstructLinear422CositedEven2Plane, - SPVFuncImplChromaReconstructLinear422CositedEven3Plane, - SPVFuncImplChromaReconstructLinear422Midpoint2Plane, - SPVFuncImplChromaReconstructLinear422Midpoint3Plane, - SPVFuncImplChromaReconstructLinear420XCositedEvenYCositedEven2Plane, - SPVFuncImplChromaReconstructLinear420XCositedEvenYCositedEven3Plane, - SPVFuncImplChromaReconstructLinear420XMidpointYCositedEven2Plane, - SPVFuncImplChromaReconstructLinear420XMidpointYCositedEven3Plane, - SPVFuncImplChromaReconstructLinear420XCositedEvenYMidpoint2Plane, - SPVFuncImplChromaReconstructLinear420XCositedEvenYMidpoint3Plane, - SPVFuncImplChromaReconstructLinear420XMidpointYMidpoint2Plane, - SPVFuncImplChromaReconstructLinear420XMidpointYMidpoint3Plane, - SPVFuncImplExpandITUFullRange, - SPVFuncImplExpandITUNarrowRange, - SPVFuncImplConvertYCbCrBT709, - SPVFuncImplConvertYCbCrBT601, - SPVFuncImplConvertYCbCrBT2020, - SPVFuncImplDynamicImageSampler, - }; - - // If the underlying resource has been used for comparison then duplicate loads of that resource must be too - // Use Metal's native frame-buffer fetch API for subpass inputs. - void emit_texture_op(const Instruction &i, bool sparse) override; - void emit_binary_unord_op(uint32_t result_type, uint32_t result_id, uint32_t op0, uint32_t op1, const char *op); - void emit_instruction(const Instruction &instr) override; - void emit_glsl_op(uint32_t result_type, uint32_t result_id, uint32_t op, const uint32_t *args, - uint32_t count) override; - void emit_spv_amd_shader_trinary_minmax_op(uint32_t result_type, uint32_t result_id, uint32_t op, - const uint32_t *args, uint32_t count) override; - void emit_header() override; - void emit_function_prototype(SPIRFunction &func, const Bitset &return_flags) override; - void emit_sampled_image_op(uint32_t result_type, uint32_t result_id, uint32_t image_id, uint32_t samp_id) override; - void emit_subgroup_op(const Instruction &i) override; - std::string to_texture_op(const Instruction &i, bool sparse, bool *forward, - SmallVector &inherited_expressions) override; - void emit_fixup() override; - std::string to_struct_member(const SPIRType &type, uint32_t member_type_id, uint32_t index, - const std::string &qualifier = ""); - void emit_struct_member(const SPIRType &type, uint32_t member_type_id, uint32_t index, - const std::string &qualifier = "", uint32_t base_offset = 0) override; - void emit_struct_padding_target(const SPIRType &type) override; - std::string type_to_glsl(const SPIRType &type, uint32_t id = 0) override; - - // Allow Metal to use the array template to make arrays a value type - std::string type_to_array_glsl(const SPIRType &type) override; - - // Threadgroup arrays can't have a wrapper type - std::string variable_decl(const SPIRVariable &variable) override; - - // GCC workaround of lambdas calling protected functions (for older GCC versions) - std::string variable_decl(const SPIRType &type, const std::string &name, uint32_t id = 0) override; - - std::string image_type_glsl(const SPIRType &type, uint32_t id = 0) override; - std::string sampler_type(const SPIRType &type, uint32_t id); - std::string builtin_to_glsl(spv::BuiltIn builtin, spv::StorageClass storage) override; - std::string to_func_call_arg(const SPIRFunction::Parameter &arg, uint32_t id) override; - std::string to_name(uint32_t id, bool allow_alias = true) const override; - std::string to_function_name(const TextureFunctionNameArguments &args) override; - std::string to_function_args(const TextureFunctionArguments &args, bool *p_forward) override; - std::string to_initializer_expression(const SPIRVariable &var) override; - std::string to_zero_initialized_expression(uint32_t type_id) override; - - std::string unpack_expression_type(std::string expr_str, const SPIRType &type, uint32_t physical_type_id, - bool is_packed, bool row_major) override; - - // Returns true for BuiltInSampleMask because gl_SampleMask[] is an array in SPIR-V, but [[sample_mask]] is a scalar in Metal. - bool builtin_translates_to_nonarray(spv::BuiltIn builtin) const override; - - std::string bitcast_glsl_op(const SPIRType &result_type, const SPIRType &argument_type) override; - bool emit_complex_bitcast(uint32_t result_id, uint32_t id, uint32_t op0) override; - bool skip_argument(uint32_t id) const override; - std::string to_member_reference(uint32_t base, const SPIRType &type, uint32_t index, bool ptr_chain) override; - std::string to_qualifiers_glsl(uint32_t id) override; - void replace_illegal_names() override; - void declare_undefined_values() override; - void declare_constant_arrays(); - - void replace_illegal_entry_point_names(); - void sync_entry_point_aliases_and_names(); - - static const std::unordered_set &get_reserved_keyword_set(); - static const std::unordered_set &get_illegal_func_names(); - - // Constant arrays of non-primitive types (i.e. matrices) won't link properly into Metal libraries - void declare_complex_constant_arrays(); - - bool is_patch_block(const SPIRType &type); - bool is_non_native_row_major_matrix(uint32_t id) override; - bool member_is_non_native_row_major_matrix(const SPIRType &type, uint32_t index) override; - std::string convert_row_major_matrix(std::string exp_str, const SPIRType &exp_type, uint32_t physical_type_id, - bool is_packed) override; - - void preprocess_op_codes(); - void localize_global_variables(); - void extract_global_variables_from_functions(); - void mark_packable_structs(); - void mark_as_packable(SPIRType &type); - - std::unordered_map> function_global_vars; - void extract_global_variables_from_function(uint32_t func_id, std::set &added_arg_ids, - std::unordered_set &global_var_ids, - std::unordered_set &processed_func_ids); - uint32_t add_interface_block(spv::StorageClass storage, bool patch = false); - uint32_t add_interface_block_pointer(uint32_t ib_var_id, spv::StorageClass storage); - - struct InterfaceBlockMeta - { - struct LocationMeta - { - uint32_t num_components = 0; - uint32_t ib_index = ~0u; - }; - std::unordered_map location_meta; - bool strip_array = false; - }; - - void add_variable_to_interface_block(spv::StorageClass storage, const std::string &ib_var_ref, SPIRType &ib_type, - SPIRVariable &var, InterfaceBlockMeta &meta); - void add_composite_variable_to_interface_block(spv::StorageClass storage, const std::string &ib_var_ref, - SPIRType &ib_type, SPIRVariable &var, InterfaceBlockMeta &meta); - void add_plain_variable_to_interface_block(spv::StorageClass storage, const std::string &ib_var_ref, - SPIRType &ib_type, SPIRVariable &var, InterfaceBlockMeta &meta); - void add_plain_member_variable_to_interface_block(spv::StorageClass storage, const std::string &ib_var_ref, - SPIRType &ib_type, SPIRVariable &var, uint32_t index, - InterfaceBlockMeta &meta); - void add_composite_member_variable_to_interface_block(spv::StorageClass storage, const std::string &ib_var_ref, - SPIRType &ib_type, SPIRVariable &var, uint32_t index, - InterfaceBlockMeta &meta); - uint32_t get_accumulated_member_location(const SPIRVariable &var, uint32_t mbr_idx, bool strip_array); - void add_tess_level_input_to_interface_block(const std::string &ib_var_ref, SPIRType &ib_type, SPIRVariable &var); - - void fix_up_interface_member_indices(spv::StorageClass storage, uint32_t ib_type_id); - - void mark_location_as_used_by_shader(uint32_t location, const SPIRType &type, spv::StorageClass storage); - uint32_t ensure_correct_builtin_type(uint32_t type_id, spv::BuiltIn builtin); - uint32_t ensure_correct_input_type(uint32_t type_id, uint32_t location, uint32_t num_components = 0); - - void emit_custom_templates(); - void emit_custom_functions(); - void emit_resources(); - void emit_specialization_constants_and_structs(); - void emit_interface_block(uint32_t ib_var_id); - bool maybe_emit_array_assignment(uint32_t id_lhs, uint32_t id_rhs); - uint32_t get_resource_array_size(uint32_t id) const; - - void fix_up_shader_inputs_outputs(); - - std::string func_type_decl(SPIRType &type); - std::string entry_point_args_classic(bool append_comma); - std::string entry_point_args_argument_buffer(bool append_comma); - std::string entry_point_arg_stage_in(); - void entry_point_args_builtin(std::string &args); - void entry_point_args_discrete_descriptors(std::string &args); - std::string to_qualified_member_name(const SPIRType &type, uint32_t index); - std::string ensure_valid_name(std::string name, std::string pfx); - std::string to_sampler_expression(uint32_t id); - std::string to_swizzle_expression(uint32_t id); - std::string to_buffer_size_expression(uint32_t id); - bool is_sample_rate() const; - bool is_direct_input_builtin(spv::BuiltIn builtin); - std::string builtin_qualifier(spv::BuiltIn builtin); - std::string builtin_type_decl(spv::BuiltIn builtin, uint32_t id = 0); - std::string built_in_func_arg(spv::BuiltIn builtin, bool prefix_comma); - std::string member_attribute_qualifier(const SPIRType &type, uint32_t index); - std::string argument_decl(const SPIRFunction::Parameter &arg); - std::string round_fp_tex_coords(std::string tex_coords, bool coord_is_fp); - uint32_t get_metal_resource_index(SPIRVariable &var, SPIRType::BaseType basetype, uint32_t plane = 0); - uint32_t get_ordered_member_location(uint32_t type_id, uint32_t index, uint32_t *comp = nullptr); - - // MSL packing rules. These compute the effective packing rules as observed by the MSL compiler in the MSL output. - // These values can change depending on various extended decorations which control packing rules. - // We need to make these rules match up with SPIR-V declared rules. - uint32_t get_declared_type_size_msl(const SPIRType &type, bool packed, bool row_major) const; - uint32_t get_declared_type_array_stride_msl(const SPIRType &type, bool packed, bool row_major) const; - uint32_t get_declared_type_matrix_stride_msl(const SPIRType &type, bool packed, bool row_major) const; - uint32_t get_declared_type_alignment_msl(const SPIRType &type, bool packed, bool row_major) const; - - uint32_t get_declared_struct_member_size_msl(const SPIRType &struct_type, uint32_t index) const; - uint32_t get_declared_struct_member_array_stride_msl(const SPIRType &struct_type, uint32_t index) const; - uint32_t get_declared_struct_member_matrix_stride_msl(const SPIRType &struct_type, uint32_t index) const; - uint32_t get_declared_struct_member_alignment_msl(const SPIRType &struct_type, uint32_t index) const; - - uint32_t get_declared_input_size_msl(const SPIRType &struct_type, uint32_t index) const; - uint32_t get_declared_input_array_stride_msl(const SPIRType &struct_type, uint32_t index) const; - uint32_t get_declared_input_matrix_stride_msl(const SPIRType &struct_type, uint32_t index) const; - uint32_t get_declared_input_alignment_msl(const SPIRType &struct_type, uint32_t index) const; - - const SPIRType &get_physical_member_type(const SPIRType &struct_type, uint32_t index) const; - SPIRType get_presumed_input_type(const SPIRType &struct_type, uint32_t index) const; - - uint32_t get_declared_struct_size_msl(const SPIRType &struct_type, bool ignore_alignment = false, - bool ignore_padding = false) const; - - std::string to_component_argument(uint32_t id); - void align_struct(SPIRType &ib_type, std::unordered_set &aligned_structs); - void mark_scalar_layout_structs(const SPIRType &ib_type); - void mark_struct_members_packed(const SPIRType &type); - void ensure_member_packing_rules_msl(SPIRType &ib_type, uint32_t index); - bool validate_member_packing_rules_msl(const SPIRType &type, uint32_t index) const; - std::string get_argument_address_space(const SPIRVariable &argument); - std::string get_type_address_space(const SPIRType &type, uint32_t id, bool argument = false); - const char *to_restrict(uint32_t id, bool space = true); - SPIRType &get_stage_in_struct_type(); - SPIRType &get_stage_out_struct_type(); - SPIRType &get_patch_stage_in_struct_type(); - SPIRType &get_patch_stage_out_struct_type(); - std::string get_tess_factor_struct_name(); - SPIRType &get_uint_type(); - uint32_t get_uint_type_id(); - void emit_atomic_func_op(uint32_t result_type, uint32_t result_id, const char *op, uint32_t mem_order_1, - uint32_t mem_order_2, bool has_mem_order_2, uint32_t op0, uint32_t op1 = 0, - bool op1_is_pointer = false, bool op1_is_literal = false, uint32_t op2 = 0); - const char *get_memory_order(uint32_t spv_mem_sem); - void add_pragma_line(const std::string &line); - void add_typedef_line(const std::string &line); - void emit_barrier(uint32_t id_exe_scope, uint32_t id_mem_scope, uint32_t id_mem_sem); - void emit_array_copy(const std::string &lhs, uint32_t rhs_id, spv::StorageClass lhs_storage, - spv::StorageClass rhs_storage) override; - void build_implicit_builtins(); - uint32_t build_constant_uint_array_pointer(); - void emit_entry_point_declarations() override; - uint32_t builtin_frag_coord_id = 0; - uint32_t builtin_sample_id_id = 0; - uint32_t builtin_sample_mask_id = 0; - uint32_t builtin_vertex_idx_id = 0; - uint32_t builtin_base_vertex_id = 0; - uint32_t builtin_instance_idx_id = 0; - uint32_t builtin_base_instance_id = 0; - uint32_t builtin_view_idx_id = 0; - uint32_t builtin_layer_id = 0; - uint32_t builtin_invocation_id_id = 0; - uint32_t builtin_primitive_id_id = 0; - uint32_t builtin_subgroup_invocation_id_id = 0; - uint32_t builtin_subgroup_size_id = 0; - uint32_t builtin_dispatch_base_id = 0; - uint32_t builtin_stage_input_size_id = 0; - uint32_t builtin_local_invocation_index_id = 0; - uint32_t builtin_workgroup_size_id = 0; - uint32_t swizzle_buffer_id = 0; - uint32_t buffer_size_buffer_id = 0; - uint32_t view_mask_buffer_id = 0; - uint32_t dynamic_offsets_buffer_id = 0; - uint32_t uint_type_id = 0; - - bool does_shader_write_sample_mask = false; - - void cast_to_builtin_store(uint32_t target_id, std::string &expr, const SPIRType &expr_type) override; - void cast_from_builtin_load(uint32_t source_id, std::string &expr, const SPIRType &expr_type) override; - void emit_store_statement(uint32_t lhs_expression, uint32_t rhs_expression) override; - - void analyze_sampled_image_usage(); - - void prepare_access_chain_for_scalar_access(std::string &expr, const SPIRType &type, spv::StorageClass storage, - bool &is_packed) override; - void fix_up_interpolant_access_chain(const uint32_t *ops, uint32_t length); - bool emit_tessellation_access_chain(const uint32_t *ops, uint32_t length); - bool emit_tessellation_io_load(uint32_t result_type, uint32_t id, uint32_t ptr); - bool is_out_of_bounds_tessellation_level(uint32_t id_lhs); - - void ensure_builtin(spv::StorageClass storage, spv::BuiltIn builtin); - - void mark_implicit_builtin(spv::StorageClass storage, spv::BuiltIn builtin, uint32_t id); - - std::string convert_to_f32(const std::string &expr, uint32_t components); - - Options msl_options; - std::set spv_function_implementations; - // Must be ordered to ensure declarations are in a specific order. - std::map inputs_by_location; - std::unordered_map inputs_by_builtin; - std::unordered_set inputs_in_use; - std::unordered_map fragment_output_components; - std::set pragma_lines; - std::set typedef_lines; - SmallVector vars_needing_early_declaration; - - std::unordered_map, InternalHasher> resource_bindings; - - uint32_t next_metal_resource_index_buffer = 0; - uint32_t next_metal_resource_index_texture = 0; - uint32_t next_metal_resource_index_sampler = 0; - // Intentionally uninitialized, works around MSVC 2013 bug. - uint32_t next_metal_resource_ids[kMaxArgumentBuffers]; - - VariableID stage_in_var_id = 0; - VariableID stage_out_var_id = 0; - VariableID patch_stage_in_var_id = 0; - VariableID patch_stage_out_var_id = 0; - VariableID stage_in_ptr_var_id = 0; - VariableID stage_out_ptr_var_id = 0; - - // Handle HLSL-style 0-based vertex/instance index. - enum class TriState - { - Neutral, - No, - Yes - }; - TriState needs_base_vertex_arg = TriState::Neutral; - TriState needs_base_instance_arg = TriState::Neutral; - - bool has_sampled_images = false; - bool builtin_declaration = false; // Handle HLSL-style 0-based vertex/instance index. - - bool is_using_builtin_array = false; // Force the use of C style array declaration. - bool using_builtin_array() const; - - bool is_rasterization_disabled = false; - bool capture_output_to_buffer = false; - bool needs_swizzle_buffer_def = false; - bool used_swizzle_buffer = false; - bool added_builtin_tess_level = false; - bool needs_subgroup_invocation_id = false; - bool needs_subgroup_size = false; - bool needs_sample_id = false; - std::string qual_pos_var_name; - std::string stage_in_var_name = "in"; - std::string stage_out_var_name = "out"; - std::string patch_stage_in_var_name = "patchIn"; - std::string patch_stage_out_var_name = "patchOut"; - std::string sampler_name_suffix = "Smplr"; - std::string swizzle_name_suffix = "Swzl"; - std::string buffer_size_name_suffix = "BufferSize"; - std::string plane_name_suffix = "Plane"; - std::string input_wg_var_name = "gl_in"; - std::string input_buffer_var_name = "spvIn"; - std::string output_buffer_var_name = "spvOut"; - std::string patch_output_buffer_var_name = "spvPatchOut"; - std::string tess_factor_buffer_var_name = "spvTessLevel"; - std::string index_buffer_var_name = "spvIndices"; - spv::Op previous_instruction_opcode = spv::OpNop; - - // Must be ordered since declaration is in a specific order. - std::map constexpr_samplers_by_id; - std::unordered_map constexpr_samplers_by_binding; - const MSLConstexprSampler *find_constexpr_sampler(uint32_t id) const; - - std::unordered_set buffers_requiring_array_length; - SmallVector buffer_arrays; - std::unordered_set atomic_image_vars; // Emulate texture2D atomic operations - std::unordered_set pull_model_inputs; - - // Must be ordered since array is in a specific order. - std::map> buffers_requiring_dynamic_offset; - - SmallVector disabled_frag_outputs; - - std::unordered_set inline_uniform_blocks; - - uint32_t argument_buffer_ids[kMaxArgumentBuffers]; - uint32_t argument_buffer_discrete_mask = 0; - uint32_t argument_buffer_device_storage_mask = 0; - - void analyze_argument_buffers(); - bool descriptor_set_is_argument_buffer(uint32_t desc_set) const; - - uint32_t get_target_components_for_fragment_location(uint32_t location) const; - uint32_t build_extended_vector_type(uint32_t type_id, uint32_t components, - SPIRType::BaseType basetype = SPIRType::Unknown); - uint32_t build_msl_interpolant_type(uint32_t type_id, bool is_noperspective); - - bool suppress_missing_prototypes = false; - - void add_spv_func_and_recompile(SPVFuncImpl spv_func); - - void activate_argument_buffer_resources(); - - bool type_is_msl_framebuffer_fetch(const SPIRType &type) const; - bool is_supported_argument_buffer_type(const SPIRType &type) const; - - // OpcodeHandler that handles several MSL preprocessing operations. - struct OpCodePreprocessor : OpcodeHandler - { - OpCodePreprocessor(CompilerMSL &compiler_) - : compiler(compiler_) - { - } - - bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override; - CompilerMSL::SPVFuncImpl get_spv_func_impl(spv::Op opcode, const uint32_t *args); - void check_resource_write(uint32_t var_id); - - CompilerMSL &compiler; - std::unordered_map result_types; - std::unordered_map image_pointers; // Emulate texture2D atomic operations - bool suppress_missing_prototypes = false; - bool uses_atomics = false; - bool uses_resource_write = false; - bool needs_subgroup_invocation_id = false; - bool needs_subgroup_size = false; - bool needs_sample_id = false; - }; - - // OpcodeHandler that scans for uses of sampled images - struct SampledImageScanner : OpcodeHandler - { - SampledImageScanner(CompilerMSL &compiler_) - : compiler(compiler_) - { - } - - bool handle(spv::Op opcode, const uint32_t *args, uint32_t) override; - - CompilerMSL &compiler; - }; - - // Sorts the members of a SPIRType and associated Meta info based on a settable sorting - // aspect, which defines which aspect of the struct members will be used to sort them. - // Regardless of the sorting aspect, built-in members always appear at the end of the struct. - struct MemberSorter - { - enum SortAspect - { - Location, - LocationReverse, - Offset, - OffsetThenLocationReverse, - Alphabetical - }; - - void sort(); - bool operator()(uint32_t mbr_idx1, uint32_t mbr_idx2); - MemberSorter(SPIRType &t, Meta &m, SortAspect sa); - - SPIRType &type; - Meta &meta; - SortAspect sort_aspect; - }; -}; -} // namespace SPIRV_CROSS_NAMESPACE - -#endif diff --git a/emscripten/include/spirv_cross/spirv_parser.hpp b/emscripten/include/spirv_cross/spirv_parser.hpp deleted file mode 100644 index 7f4a7d85..00000000 --- a/emscripten/include/spirv_cross/spirv_parser.hpp +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2018-2021 Arm Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * At your option, you may choose to accept this material under either: - * 1. The Apache License, Version 2.0, found at , or - * 2. The MIT License, found at . - * SPDX-License-Identifier: Apache-2.0 OR MIT. - */ - -#ifndef SPIRV_CROSS_PARSER_HPP -#define SPIRV_CROSS_PARSER_HPP - -#include "spirv_cross_parsed_ir.hpp" -#include - -namespace SPIRV_CROSS_NAMESPACE -{ -class Parser -{ -public: - Parser(const uint32_t *spirv_data, size_t word_count); - Parser(std::vector spirv); - - void parse(); - - ParsedIR &get_parsed_ir() - { - return ir; - } - -private: - ParsedIR ir; - SPIRFunction *current_function = nullptr; - SPIRBlock *current_block = nullptr; - - void parse(const Instruction &instr); - const uint32_t *stream(const Instruction &instr) const; - - template - T &set(uint32_t id, P &&... args) - { - ir.add_typed_id(static_cast(T::type), id); - auto &var = variant_set(ir.ids[id], std::forward

(args)...); - var.self = id; - return var; - } - - template - T &get(uint32_t id) - { - return variant_get(ir.ids[id]); - } - - template - T *maybe_get(uint32_t id) - { - if (ir.ids[id].get_type() == static_cast(T::type)) - return &get(id); - else - return nullptr; - } - - template - const T &get(uint32_t id) const - { - return variant_get(ir.ids[id]); - } - - template - const T *maybe_get(uint32_t id) const - { - if (ir.ids[id].get_type() == T::type) - return &get(id); - else - return nullptr; - } - - // This must be an ordered data structure so we always pick the same type aliases. - SmallVector global_struct_cache; - SmallVector> forward_pointer_fixups; - - bool types_are_logically_equivalent(const SPIRType &a, const SPIRType &b) const; - bool variable_storage_is_aliased(const SPIRVariable &v) const; -}; -} // namespace SPIRV_CROSS_NAMESPACE - -#endif diff --git a/emscripten/include/uv/uv.h b/emscripten/include/uv/uv.h deleted file mode 100644 index 717c2e57..00000000 --- a/emscripten/include/uv/uv.h +++ /dev/null @@ -1,1611 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -/* See https://github.com/libuv/libuv#documentation for documentation. */ - -#ifndef UV_H -#define UV_H -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef _WIN32 - /* Windows - set up dll import/export decorators. */ -# if defined(BUILDING_UV_SHARED) - /* Building shared library. */ -# define UV_EXTERN __declspec(dllexport) -# elif defined(USING_UV_SHARED) - /* Using shared library. */ -# define UV_EXTERN __declspec(dllimport) -# else - /* Building static library. */ -# define UV_EXTERN /* nothing */ -# endif -#elif __GNUC__ >= 4 -# define UV_EXTERN __attribute__((visibility("default"))) -#else -# define UV_EXTERN /* nothing */ -#endif - -#include "uv/errno.h" -#include "uv/version.h" -#include -#include - -#if defined(_MSC_VER) && _MSC_VER < 1600 -# include "uv/stdint-msvc2008.h" -#else -# include -#endif - -#if defined(_WIN32) -# include "uv/win.h" -#else -# include "uv/unix.h" -#endif - -/* Expand this list if necessary. */ -#define UV_ERRNO_MAP(XX) \ - XX(E2BIG, "argument list too long") \ - XX(EACCES, "permission denied") \ - XX(EADDRINUSE, "address already in use") \ - XX(EADDRNOTAVAIL, "address not available") \ - XX(EAFNOSUPPORT, "address family not supported") \ - XX(EAGAIN, "resource temporarily unavailable") \ - XX(EAI_ADDRFAMILY, "address family not supported") \ - XX(EAI_AGAIN, "temporary failure") \ - XX(EAI_BADFLAGS, "bad ai_flags value") \ - XX(EAI_BADHINTS, "invalid value for hints") \ - XX(EAI_CANCELED, "request canceled") \ - XX(EAI_FAIL, "permanent failure") \ - XX(EAI_FAMILY, "ai_family not supported") \ - XX(EAI_MEMORY, "out of memory") \ - XX(EAI_NODATA, "no address") \ - XX(EAI_NONAME, "unknown node or service") \ - XX(EAI_OVERFLOW, "argument buffer overflow") \ - XX(EAI_PROTOCOL, "resolved protocol is unknown") \ - XX(EAI_SERVICE, "service not available for socket type") \ - XX(EAI_SOCKTYPE, "socket type not supported") \ - XX(EALREADY, "connection already in progress") \ - XX(EBADF, "bad file descriptor") \ - XX(EBUSY, "resource busy or locked") \ - XX(ECANCELED, "operation canceled") \ - XX(ECHARSET, "invalid Unicode character") \ - XX(ECONNABORTED, "software caused connection abort") \ - XX(ECONNREFUSED, "connection refused") \ - XX(ECONNRESET, "connection reset by peer") \ - XX(EDESTADDRREQ, "destination address required") \ - XX(EEXIST, "file already exists") \ - XX(EFAULT, "bad address in system call argument") \ - XX(EFBIG, "file too large") \ - XX(EHOSTUNREACH, "host is unreachable") \ - XX(EINTR, "interrupted system call") \ - XX(EINVAL, "invalid argument") \ - XX(EIO, "i/o error") \ - XX(EISCONN, "socket is already connected") \ - XX(EISDIR, "illegal operation on a directory") \ - XX(ELOOP, "too many symbolic links encountered") \ - XX(EMFILE, "too many open files") \ - XX(EMSGSIZE, "message too long") \ - XX(ENAMETOOLONG, "name too long") \ - XX(ENETDOWN, "network is down") \ - XX(ENETUNREACH, "network is unreachable") \ - XX(ENFILE, "file table overflow") \ - XX(ENOBUFS, "no buffer space available") \ - XX(ENODEV, "no such device") \ - XX(ENOENT, "no such file or directory") \ - XX(ENOMEM, "not enough memory") \ - XX(ENONET, "machine is not on the network") \ - XX(ENOPROTOOPT, "protocol not available") \ - XX(ENOSPC, "no space left on device") \ - XX(ENOSYS, "function not implemented") \ - XX(ENOTCONN, "socket is not connected") \ - XX(ENOTDIR, "not a directory") \ - XX(ENOTEMPTY, "directory not empty") \ - XX(ENOTSOCK, "socket operation on non-socket") \ - XX(ENOTSUP, "operation not supported on socket") \ - XX(EPERM, "operation not permitted") \ - XX(EPIPE, "broken pipe") \ - XX(EPROTO, "protocol error") \ - XX(EPROTONOSUPPORT, "protocol not supported") \ - XX(EPROTOTYPE, "protocol wrong type for socket") \ - XX(ERANGE, "result too large") \ - XX(EROFS, "read-only file system") \ - XX(ESHUTDOWN, "cannot send after transport endpoint shutdown") \ - XX(ESPIPE, "invalid seek") \ - XX(ESRCH, "no such process") \ - XX(ETIMEDOUT, "connection timed out") \ - XX(ETXTBSY, "text file is busy") \ - XX(EXDEV, "cross-device link not permitted") \ - XX(UNKNOWN, "unknown error") \ - XX(EOF, "end of file") \ - XX(ENXIO, "no such device or address") \ - XX(EMLINK, "too many links") \ - XX(EHOSTDOWN, "host is down") \ - XX(EREMOTEIO, "remote I/O error") \ - XX(ENOTTY, "inappropriate ioctl for device") \ - XX(EFTYPE, "inappropriate file type or format") \ - -#define UV_HANDLE_TYPE_MAP(XX) \ - XX(ASYNC, async) \ - XX(CHECK, check) \ - XX(FS_EVENT, fs_event) \ - XX(FS_POLL, fs_poll) \ - XX(HANDLE, handle) \ - XX(IDLE, idle) \ - XX(NAMED_PIPE, pipe) \ - XX(POLL, poll) \ - XX(PREPARE, prepare) \ - XX(PROCESS, process) \ - XX(STREAM, stream) \ - XX(TCP, tcp) \ - XX(TIMER, timer) \ - XX(TTY, tty) \ - XX(UDP, udp) \ - XX(SIGNAL, signal) \ - -#define UV_REQ_TYPE_MAP(XX) \ - XX(REQ, req) \ - XX(CONNECT, connect) \ - XX(WRITE, write) \ - XX(SHUTDOWN, shutdown) \ - XX(UDP_SEND, udp_send) \ - XX(FS, fs) \ - XX(WORK, work) \ - XX(GETADDRINFO, getaddrinfo) \ - XX(GETNAMEINFO, getnameinfo) \ - -typedef enum { -#define XX(code, _) UV_ ## code = UV__ ## code, - UV_ERRNO_MAP(XX) -#undef XX - UV_ERRNO_MAX = UV__EOF - 1 -} uv_errno_t; - -typedef enum { - UV_UNKNOWN_HANDLE = 0, -#define XX(uc, lc) UV_##uc, - UV_HANDLE_TYPE_MAP(XX) -#undef XX - UV_FILE, - UV_HANDLE_TYPE_MAX -} uv_handle_type; - -typedef enum { - UV_UNKNOWN_REQ = 0, -#define XX(uc, lc) UV_##uc, - UV_REQ_TYPE_MAP(XX) -#undef XX - UV_REQ_TYPE_PRIVATE - UV_REQ_TYPE_MAX -} uv_req_type; - - -/* Handle types. */ -typedef struct uv_loop_s uv_loop_t; -typedef struct uv_handle_s uv_handle_t; -typedef struct uv_stream_s uv_stream_t; -typedef struct uv_tcp_s uv_tcp_t; -typedef struct uv_udp_s uv_udp_t; -typedef struct uv_pipe_s uv_pipe_t; -typedef struct uv_tty_s uv_tty_t; -typedef struct uv_poll_s uv_poll_t; -typedef struct uv_timer_s uv_timer_t; -typedef struct uv_prepare_s uv_prepare_t; -typedef struct uv_check_s uv_check_t; -typedef struct uv_idle_s uv_idle_t; -typedef struct uv_async_s uv_async_t; -typedef struct uv_process_s uv_process_t; -typedef struct uv_fs_event_s uv_fs_event_t; -typedef struct uv_fs_poll_s uv_fs_poll_t; -typedef struct uv_signal_s uv_signal_t; - -/* Request types. */ -typedef struct uv_req_s uv_req_t; -typedef struct uv_getaddrinfo_s uv_getaddrinfo_t; -typedef struct uv_getnameinfo_s uv_getnameinfo_t; -typedef struct uv_shutdown_s uv_shutdown_t; -typedef struct uv_write_s uv_write_t; -typedef struct uv_connect_s uv_connect_t; -typedef struct uv_udp_send_s uv_udp_send_t; -typedef struct uv_fs_s uv_fs_t; -typedef struct uv_work_s uv_work_t; - -/* None of the above. */ -typedef struct uv_cpu_info_s uv_cpu_info_t; -typedef struct uv_interface_address_s uv_interface_address_t; -typedef struct uv_dirent_s uv_dirent_t; -typedef struct uv_passwd_s uv_passwd_t; - -typedef enum { - UV_LOOP_BLOCK_SIGNAL -} uv_loop_option; - -typedef enum { - UV_RUN_DEFAULT = 0, - UV_RUN_ONCE, - UV_RUN_NOWAIT -} uv_run_mode; - - -UV_EXTERN unsigned int uv_version(void); -UV_EXTERN const char* uv_version_string(void); - -typedef void* (*uv_malloc_func)(size_t size); -typedef void* (*uv_realloc_func)(void* ptr, size_t size); -typedef void* (*uv_calloc_func)(size_t count, size_t size); -typedef void (*uv_free_func)(void* ptr); - -UV_EXTERN int uv_replace_allocator(uv_malloc_func malloc_func, - uv_realloc_func realloc_func, - uv_calloc_func calloc_func, - uv_free_func free_func); - -UV_EXTERN uv_loop_t* uv_default_loop(void); -UV_EXTERN int uv_loop_init(uv_loop_t* loop); -UV_EXTERN int uv_loop_close(uv_loop_t* loop); -/* - * NOTE: - * This function is DEPRECATED (to be removed after 0.12), users should - * allocate the loop manually and use uv_loop_init instead. - */ -UV_EXTERN uv_loop_t* uv_loop_new(void); -/* - * NOTE: - * This function is DEPRECATED (to be removed after 0.12). Users should use - * uv_loop_close and free the memory manually instead. - */ -UV_EXTERN void uv_loop_delete(uv_loop_t*); -UV_EXTERN size_t uv_loop_size(void); -UV_EXTERN int uv_loop_alive(const uv_loop_t* loop); -UV_EXTERN int uv_loop_configure(uv_loop_t* loop, uv_loop_option option, ...); -UV_EXTERN int uv_loop_fork(uv_loop_t* loop); - -UV_EXTERN int uv_run(uv_loop_t*, uv_run_mode mode); -UV_EXTERN void uv_stop(uv_loop_t*); - -UV_EXTERN void uv_ref(uv_handle_t*); -UV_EXTERN void uv_unref(uv_handle_t*); -UV_EXTERN int uv_has_ref(const uv_handle_t*); - -UV_EXTERN void uv_update_time(uv_loop_t*); -UV_EXTERN uint64_t uv_now(const uv_loop_t*); - -UV_EXTERN int uv_backend_fd(const uv_loop_t*); -UV_EXTERN int uv_backend_timeout(const uv_loop_t*); - -typedef void (*uv_alloc_cb)(uv_handle_t* handle, - size_t suggested_size, - uv_buf_t* buf); -typedef void (*uv_read_cb)(uv_stream_t* stream, - ssize_t nread, - const uv_buf_t* buf); -typedef void (*uv_write_cb)(uv_write_t* req, int status); -typedef void (*uv_connect_cb)(uv_connect_t* req, int status); -typedef void (*uv_shutdown_cb)(uv_shutdown_t* req, int status); -typedef void (*uv_connection_cb)(uv_stream_t* server, int status); -typedef void (*uv_close_cb)(uv_handle_t* handle); -typedef void (*uv_poll_cb)(uv_poll_t* handle, int status, int events); -typedef void (*uv_timer_cb)(uv_timer_t* handle); -typedef void (*uv_async_cb)(uv_async_t* handle); -typedef void (*uv_prepare_cb)(uv_prepare_t* handle); -typedef void (*uv_check_cb)(uv_check_t* handle); -typedef void (*uv_idle_cb)(uv_idle_t* handle); -typedef void (*uv_exit_cb)(uv_process_t*, int64_t exit_status, int term_signal); -typedef void (*uv_walk_cb)(uv_handle_t* handle, void* arg); -typedef void (*uv_fs_cb)(uv_fs_t* req); -typedef void (*uv_work_cb)(uv_work_t* req); -typedef void (*uv_after_work_cb)(uv_work_t* req, int status); -typedef void (*uv_getaddrinfo_cb)(uv_getaddrinfo_t* req, - int status, - struct addrinfo* res); -typedef void (*uv_getnameinfo_cb)(uv_getnameinfo_t* req, - int status, - const char* hostname, - const char* service); - -typedef struct { - long tv_sec; - long tv_nsec; -} uv_timespec_t; - - -typedef struct { - uint64_t st_dev; - uint64_t st_mode; - uint64_t st_nlink; - uint64_t st_uid; - uint64_t st_gid; - uint64_t st_rdev; - uint64_t st_ino; - uint64_t st_size; - uint64_t st_blksize; - uint64_t st_blocks; - uint64_t st_flags; - uint64_t st_gen; - uv_timespec_t st_atim; - uv_timespec_t st_mtim; - uv_timespec_t st_ctim; - uv_timespec_t st_birthtim; -} uv_stat_t; - - -typedef void (*uv_fs_event_cb)(uv_fs_event_t* handle, - const char* filename, - int events, - int status); - -typedef void (*uv_fs_poll_cb)(uv_fs_poll_t* handle, - int status, - const uv_stat_t* prev, - const uv_stat_t* curr); - -typedef void (*uv_signal_cb)(uv_signal_t* handle, int signum); - - -typedef enum { - UV_LEAVE_GROUP = 0, - UV_JOIN_GROUP -} uv_membership; - - -UV_EXTERN int uv_translate_sys_error(int sys_errno); - -UV_EXTERN const char* uv_strerror(int err); -UV_EXTERN char* uv_strerror_r(int err, char* buf, size_t buflen); - -UV_EXTERN const char* uv_err_name(int err); -UV_EXTERN char* uv_err_name_r(int err, char* buf, size_t buflen); - - -#define UV_REQ_FIELDS \ - /* public */ \ - void* data; \ - /* read-only */ \ - uv_req_type type; \ - /* private */ \ - void* reserved[6]; \ - UV_REQ_PRIVATE_FIELDS \ - -/* Abstract base class of all requests. */ -struct uv_req_s { - UV_REQ_FIELDS -}; - - -/* Platform-specific request types. */ -UV_PRIVATE_REQ_TYPES - - -UV_EXTERN int uv_shutdown(uv_shutdown_t* req, - uv_stream_t* handle, - uv_shutdown_cb cb); - -struct uv_shutdown_s { - UV_REQ_FIELDS - uv_stream_t* handle; - uv_shutdown_cb cb; - UV_SHUTDOWN_PRIVATE_FIELDS -}; - - -#define UV_HANDLE_FIELDS \ - /* public */ \ - void* data; \ - /* read-only */ \ - uv_loop_t* loop; \ - uv_handle_type type; \ - /* private */ \ - uv_close_cb close_cb; \ - void* handle_queue[2]; \ - union { \ - int fd; \ - void* reserved[4]; \ - } u; \ - UV_HANDLE_PRIVATE_FIELDS \ - -/* The abstract base class of all handles. */ -struct uv_handle_s { - UV_HANDLE_FIELDS -}; - -UV_EXTERN size_t uv_handle_size(uv_handle_type type); -UV_EXTERN uv_handle_type uv_handle_get_type(const uv_handle_t* handle); -UV_EXTERN const char* uv_handle_type_name(uv_handle_type type); -UV_EXTERN void* uv_handle_get_data(const uv_handle_t* handle); -UV_EXTERN uv_loop_t* uv_handle_get_loop(const uv_handle_t* handle); -UV_EXTERN void uv_handle_set_data(uv_handle_t* handle, void* data); - -UV_EXTERN size_t uv_req_size(uv_req_type type); -UV_EXTERN void* uv_req_get_data(const uv_req_t* req); -UV_EXTERN void uv_req_set_data(uv_req_t* req, void* data); -UV_EXTERN uv_req_type uv_req_get_type(const uv_req_t* req); -UV_EXTERN const char* uv_req_type_name(uv_req_type type); - -UV_EXTERN int uv_is_active(const uv_handle_t* handle); - -UV_EXTERN void uv_walk(uv_loop_t* loop, uv_walk_cb walk_cb, void* arg); - -/* Helpers for ad hoc debugging, no API/ABI stability guaranteed. */ -UV_EXTERN void uv_print_all_handles(uv_loop_t* loop, FILE* stream); -UV_EXTERN void uv_print_active_handles(uv_loop_t* loop, FILE* stream); - -UV_EXTERN void uv_close(uv_handle_t* handle, uv_close_cb close_cb); - -UV_EXTERN int uv_send_buffer_size(uv_handle_t* handle, int* value); -UV_EXTERN int uv_recv_buffer_size(uv_handle_t* handle, int* value); - -UV_EXTERN int uv_fileno(const uv_handle_t* handle, uv_os_fd_t* fd); - -UV_EXTERN uv_buf_t uv_buf_init(char* base, unsigned int len); - - -#define UV_STREAM_FIELDS \ - /* number of bytes queued for writing */ \ - size_t write_queue_size; \ - uv_alloc_cb alloc_cb; \ - uv_read_cb read_cb; \ - /* private */ \ - UV_STREAM_PRIVATE_FIELDS - -/* - * uv_stream_t is a subclass of uv_handle_t. - * - * uv_stream is an abstract class. - * - * uv_stream_t is the parent class of uv_tcp_t, uv_pipe_t and uv_tty_t. - */ -struct uv_stream_s { - UV_HANDLE_FIELDS - UV_STREAM_FIELDS -}; - -UV_EXTERN size_t uv_stream_get_write_queue_size(const uv_stream_t* stream); - -UV_EXTERN int uv_listen(uv_stream_t* stream, int backlog, uv_connection_cb cb); -UV_EXTERN int uv_accept(uv_stream_t* server, uv_stream_t* client); - -UV_EXTERN int uv_read_start(uv_stream_t*, - uv_alloc_cb alloc_cb, - uv_read_cb read_cb); -UV_EXTERN int uv_read_stop(uv_stream_t*); - -UV_EXTERN int uv_write(uv_write_t* req, - uv_stream_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs, - uv_write_cb cb); -UV_EXTERN int uv_write2(uv_write_t* req, - uv_stream_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs, - uv_stream_t* send_handle, - uv_write_cb cb); -UV_EXTERN int uv_try_write(uv_stream_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs); - -/* uv_write_t is a subclass of uv_req_t. */ -struct uv_write_s { - UV_REQ_FIELDS - uv_write_cb cb; - uv_stream_t* send_handle; /* TODO: make private and unix-only in v2.x. */ - uv_stream_t* handle; - UV_WRITE_PRIVATE_FIELDS -}; - - -UV_EXTERN int uv_is_readable(const uv_stream_t* handle); -UV_EXTERN int uv_is_writable(const uv_stream_t* handle); - -UV_EXTERN int uv_stream_set_blocking(uv_stream_t* handle, int blocking); - -UV_EXTERN int uv_is_closing(const uv_handle_t* handle); - - -/* - * uv_tcp_t is a subclass of uv_stream_t. - * - * Represents a TCP stream or TCP server. - */ -struct uv_tcp_s { - UV_HANDLE_FIELDS - UV_STREAM_FIELDS - UV_TCP_PRIVATE_FIELDS -}; - -UV_EXTERN int uv_tcp_init(uv_loop_t*, uv_tcp_t* handle); -UV_EXTERN int uv_tcp_init_ex(uv_loop_t*, uv_tcp_t* handle, unsigned int flags); -UV_EXTERN int uv_tcp_open(uv_tcp_t* handle, uv_os_sock_t sock); -UV_EXTERN int uv_tcp_nodelay(uv_tcp_t* handle, int enable); -UV_EXTERN int uv_tcp_keepalive(uv_tcp_t* handle, - int enable, - unsigned int delay); -UV_EXTERN int uv_tcp_simultaneous_accepts(uv_tcp_t* handle, int enable); - -enum uv_tcp_flags { - /* Used with uv_tcp_bind, when an IPv6 address is used. */ - UV_TCP_IPV6ONLY = 1 -}; - -UV_EXTERN int uv_tcp_bind(uv_tcp_t* handle, - const struct sockaddr* addr, - unsigned int flags); -UV_EXTERN int uv_tcp_getsockname(const uv_tcp_t* handle, - struct sockaddr* name, - int* namelen); -UV_EXTERN int uv_tcp_getpeername(const uv_tcp_t* handle, - struct sockaddr* name, - int* namelen); -UV_EXTERN int uv_tcp_connect(uv_connect_t* req, - uv_tcp_t* handle, - const struct sockaddr* addr, - uv_connect_cb cb); - -/* uv_connect_t is a subclass of uv_req_t. */ -struct uv_connect_s { - UV_REQ_FIELDS - uv_connect_cb cb; - uv_stream_t* handle; - UV_CONNECT_PRIVATE_FIELDS -}; - - -/* - * UDP support. - */ - -enum uv_udp_flags { - /* Disables dual stack mode. */ - UV_UDP_IPV6ONLY = 1, - /* - * Indicates message was truncated because read buffer was too small. The - * remainder was discarded by the OS. Used in uv_udp_recv_cb. - */ - UV_UDP_PARTIAL = 2, - /* - * Indicates if SO_REUSEADDR will be set when binding the handle. - * This sets the SO_REUSEPORT socket flag on the BSDs and OS X. On other - * Unix platforms, it sets the SO_REUSEADDR flag. What that means is that - * multiple threads or processes can bind to the same address without error - * (provided they all set the flag) but only the last one to bind will receive - * any traffic, in effect "stealing" the port from the previous listener. - */ - UV_UDP_REUSEADDR = 4 -}; - -typedef void (*uv_udp_send_cb)(uv_udp_send_t* req, int status); -typedef void (*uv_udp_recv_cb)(uv_udp_t* handle, - ssize_t nread, - const uv_buf_t* buf, - const struct sockaddr* addr, - unsigned flags); - -/* uv_udp_t is a subclass of uv_handle_t. */ -struct uv_udp_s { - UV_HANDLE_FIELDS - /* read-only */ - /* - * Number of bytes queued for sending. This field strictly shows how much - * information is currently queued. - */ - size_t send_queue_size; - /* - * Number of send requests currently in the queue awaiting to be processed. - */ - size_t send_queue_count; - UV_UDP_PRIVATE_FIELDS -}; - -/* uv_udp_send_t is a subclass of uv_req_t. */ -struct uv_udp_send_s { - UV_REQ_FIELDS - uv_udp_t* handle; - uv_udp_send_cb cb; - UV_UDP_SEND_PRIVATE_FIELDS -}; - -UV_EXTERN int uv_udp_init(uv_loop_t*, uv_udp_t* handle); -UV_EXTERN int uv_udp_init_ex(uv_loop_t*, uv_udp_t* handle, unsigned int flags); -UV_EXTERN int uv_udp_open(uv_udp_t* handle, uv_os_sock_t sock); -UV_EXTERN int uv_udp_bind(uv_udp_t* handle, - const struct sockaddr* addr, - unsigned int flags); - -UV_EXTERN int uv_udp_getsockname(const uv_udp_t* handle, - struct sockaddr* name, - int* namelen); -UV_EXTERN int uv_udp_set_membership(uv_udp_t* handle, - const char* multicast_addr, - const char* interface_addr, - uv_membership membership); -UV_EXTERN int uv_udp_set_multicast_loop(uv_udp_t* handle, int on); -UV_EXTERN int uv_udp_set_multicast_ttl(uv_udp_t* handle, int ttl); -UV_EXTERN int uv_udp_set_multicast_interface(uv_udp_t* handle, - const char* interface_addr); -UV_EXTERN int uv_udp_set_broadcast(uv_udp_t* handle, int on); -UV_EXTERN int uv_udp_set_ttl(uv_udp_t* handle, int ttl); -UV_EXTERN int uv_udp_send(uv_udp_send_t* req, - uv_udp_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs, - const struct sockaddr* addr, - uv_udp_send_cb send_cb); -UV_EXTERN int uv_udp_try_send(uv_udp_t* handle, - const uv_buf_t bufs[], - unsigned int nbufs, - const struct sockaddr* addr); -UV_EXTERN int uv_udp_recv_start(uv_udp_t* handle, - uv_alloc_cb alloc_cb, - uv_udp_recv_cb recv_cb); -UV_EXTERN int uv_udp_recv_stop(uv_udp_t* handle); -UV_EXTERN size_t uv_udp_get_send_queue_size(const uv_udp_t* handle); -UV_EXTERN size_t uv_udp_get_send_queue_count(const uv_udp_t* handle); - - -/* - * uv_tty_t is a subclass of uv_stream_t. - * - * Representing a stream for the console. - */ -struct uv_tty_s { - UV_HANDLE_FIELDS - UV_STREAM_FIELDS - UV_TTY_PRIVATE_FIELDS -}; - -typedef enum { - /* Initial/normal terminal mode */ - UV_TTY_MODE_NORMAL, - /* Raw input mode (On Windows, ENABLE_WINDOW_INPUT is also enabled) */ - UV_TTY_MODE_RAW, - /* Binary-safe I/O mode for IPC (Unix-only) */ - UV_TTY_MODE_IO -} uv_tty_mode_t; - -UV_EXTERN int uv_tty_init(uv_loop_t*, uv_tty_t*, uv_file fd, int readable); -UV_EXTERN int uv_tty_set_mode(uv_tty_t*, uv_tty_mode_t mode); -UV_EXTERN int uv_tty_reset_mode(void); -UV_EXTERN int uv_tty_get_winsize(uv_tty_t*, int* width, int* height); - -#ifdef __cplusplus -extern "C++" { - -inline int uv_tty_set_mode(uv_tty_t* handle, int mode) { - return uv_tty_set_mode(handle, static_cast(mode)); -} - -} -#endif - -UV_EXTERN uv_handle_type uv_guess_handle(uv_file file); - -/* - * uv_pipe_t is a subclass of uv_stream_t. - * - * Representing a pipe stream or pipe server. On Windows this is a Named - * Pipe. On Unix this is a Unix domain socket. - */ -struct uv_pipe_s { - UV_HANDLE_FIELDS - UV_STREAM_FIELDS - int ipc; /* non-zero if this pipe is used for passing handles */ - UV_PIPE_PRIVATE_FIELDS -}; - -UV_EXTERN int uv_pipe_init(uv_loop_t*, uv_pipe_t* handle, int ipc); -UV_EXTERN int uv_pipe_open(uv_pipe_t*, uv_file file); -UV_EXTERN int uv_pipe_bind(uv_pipe_t* handle, const char* name); -UV_EXTERN void uv_pipe_connect(uv_connect_t* req, - uv_pipe_t* handle, - const char* name, - uv_connect_cb cb); -UV_EXTERN int uv_pipe_getsockname(const uv_pipe_t* handle, - char* buffer, - size_t* size); -UV_EXTERN int uv_pipe_getpeername(const uv_pipe_t* handle, - char* buffer, - size_t* size); -UV_EXTERN void uv_pipe_pending_instances(uv_pipe_t* handle, int count); -UV_EXTERN int uv_pipe_pending_count(uv_pipe_t* handle); -UV_EXTERN uv_handle_type uv_pipe_pending_type(uv_pipe_t* handle); -UV_EXTERN int uv_pipe_chmod(uv_pipe_t* handle, int flags); - - -struct uv_poll_s { - UV_HANDLE_FIELDS - uv_poll_cb poll_cb; - UV_POLL_PRIVATE_FIELDS -}; - -enum uv_poll_event { - UV_READABLE = 1, - UV_WRITABLE = 2, - UV_DISCONNECT = 4, - UV_PRIORITIZED = 8 -}; - -UV_EXTERN int uv_poll_init(uv_loop_t* loop, uv_poll_t* handle, int fd); -UV_EXTERN int uv_poll_init_socket(uv_loop_t* loop, - uv_poll_t* handle, - uv_os_sock_t socket); -UV_EXTERN int uv_poll_start(uv_poll_t* handle, int events, uv_poll_cb cb); -UV_EXTERN int uv_poll_stop(uv_poll_t* handle); - - -struct uv_prepare_s { - UV_HANDLE_FIELDS - UV_PREPARE_PRIVATE_FIELDS -}; - -UV_EXTERN int uv_prepare_init(uv_loop_t*, uv_prepare_t* prepare); -UV_EXTERN int uv_prepare_start(uv_prepare_t* prepare, uv_prepare_cb cb); -UV_EXTERN int uv_prepare_stop(uv_prepare_t* prepare); - - -struct uv_check_s { - UV_HANDLE_FIELDS - UV_CHECK_PRIVATE_FIELDS -}; - -UV_EXTERN int uv_check_init(uv_loop_t*, uv_check_t* check); -UV_EXTERN int uv_check_start(uv_check_t* check, uv_check_cb cb); -UV_EXTERN int uv_check_stop(uv_check_t* check); - - -struct uv_idle_s { - UV_HANDLE_FIELDS - UV_IDLE_PRIVATE_FIELDS -}; - -UV_EXTERN int uv_idle_init(uv_loop_t*, uv_idle_t* idle); -UV_EXTERN int uv_idle_start(uv_idle_t* idle, uv_idle_cb cb); -UV_EXTERN int uv_idle_stop(uv_idle_t* idle); - - -struct uv_async_s { - UV_HANDLE_FIELDS - UV_ASYNC_PRIVATE_FIELDS -}; - -UV_EXTERN int uv_async_init(uv_loop_t*, - uv_async_t* async, - uv_async_cb async_cb); -UV_EXTERN int uv_async_send(uv_async_t* async); - - -/* - * uv_timer_t is a subclass of uv_handle_t. - * - * Used to get woken up at a specified time in the future. - */ -struct uv_timer_s { - UV_HANDLE_FIELDS - UV_TIMER_PRIVATE_FIELDS -}; - -UV_EXTERN int uv_timer_init(uv_loop_t*, uv_timer_t* handle); -UV_EXTERN int uv_timer_start(uv_timer_t* handle, - uv_timer_cb cb, - uint64_t timeout, - uint64_t repeat); -UV_EXTERN int uv_timer_stop(uv_timer_t* handle); -UV_EXTERN int uv_timer_again(uv_timer_t* handle); -UV_EXTERN void uv_timer_set_repeat(uv_timer_t* handle, uint64_t repeat); -UV_EXTERN uint64_t uv_timer_get_repeat(const uv_timer_t* handle); - - -/* - * uv_getaddrinfo_t is a subclass of uv_req_t. - * - * Request object for uv_getaddrinfo. - */ -struct uv_getaddrinfo_s { - UV_REQ_FIELDS - /* read-only */ - uv_loop_t* loop; - /* struct addrinfo* addrinfo is marked as private, but it really isn't. */ - UV_GETADDRINFO_PRIVATE_FIELDS -}; - - -UV_EXTERN int uv_getaddrinfo(uv_loop_t* loop, - uv_getaddrinfo_t* req, - uv_getaddrinfo_cb getaddrinfo_cb, - const char* node, - const char* service, - const struct addrinfo* hints); -UV_EXTERN void uv_freeaddrinfo(struct addrinfo* ai); - - -/* -* uv_getnameinfo_t is a subclass of uv_req_t. -* -* Request object for uv_getnameinfo. -*/ -struct uv_getnameinfo_s { - UV_REQ_FIELDS - /* read-only */ - uv_loop_t* loop; - /* host and service are marked as private, but they really aren't. */ - UV_GETNAMEINFO_PRIVATE_FIELDS -}; - -UV_EXTERN int uv_getnameinfo(uv_loop_t* loop, - uv_getnameinfo_t* req, - uv_getnameinfo_cb getnameinfo_cb, - const struct sockaddr* addr, - int flags); - - -/* uv_spawn() options. */ -typedef enum { - UV_IGNORE = 0x00, - UV_CREATE_PIPE = 0x01, - UV_INHERIT_FD = 0x02, - UV_INHERIT_STREAM = 0x04, - - /* - * When UV_CREATE_PIPE is specified, UV_READABLE_PIPE and UV_WRITABLE_PIPE - * determine the direction of flow, from the child process' perspective. Both - * flags may be specified to create a duplex data stream. - */ - UV_READABLE_PIPE = 0x10, - UV_WRITABLE_PIPE = 0x20, - - /* - * Open the child pipe handle in overlapped mode on Windows. - * On Unix it is silently ignored. - */ - UV_OVERLAPPED_PIPE = 0x40 -} uv_stdio_flags; - -typedef struct uv_stdio_container_s { - uv_stdio_flags flags; - - union { - uv_stream_t* stream; - int fd; - } data; -} uv_stdio_container_t; - -typedef struct uv_process_options_s { - uv_exit_cb exit_cb; /* Called after the process exits. */ - const char* file; /* Path to program to execute. */ - /* - * Command line arguments. args[0] should be the path to the program. On - * Windows this uses CreateProcess which concatenates the arguments into a - * string this can cause some strange errors. See the note at - * windows_verbatim_arguments. - */ - char** args; - /* - * This will be set as the environ variable in the subprocess. If this is - * NULL then the parents environ will be used. - */ - char** env; - /* - * If non-null this represents a directory the subprocess should execute - * in. Stands for current working directory. - */ - const char* cwd; - /* - * Various flags that control how uv_spawn() behaves. See the definition of - * `enum uv_process_flags` below. - */ - unsigned int flags; - /* - * The `stdio` field points to an array of uv_stdio_container_t structs that - * describe the file descriptors that will be made available to the child - * process. The convention is that stdio[0] points to stdin, fd 1 is used for - * stdout, and fd 2 is stderr. - * - * Note that on windows file descriptors greater than 2 are available to the - * child process only if the child processes uses the MSVCRT runtime. - */ - int stdio_count; - uv_stdio_container_t* stdio; - /* - * Libuv can change the child process' user/group id. This happens only when - * the appropriate bits are set in the flags fields. This is not supported on - * windows; uv_spawn() will fail and set the error to UV_ENOTSUP. - */ - uv_uid_t uid; - uv_gid_t gid; -} uv_process_options_t; - -/* - * These are the flags that can be used for the uv_process_options.flags field. - */ -enum uv_process_flags { - /* - * Set the child process' user id. The user id is supplied in the `uid` field - * of the options struct. This does not work on windows; setting this flag - * will cause uv_spawn() to fail. - */ - UV_PROCESS_SETUID = (1 << 0), - /* - * Set the child process' group id. The user id is supplied in the `gid` - * field of the options struct. This does not work on windows; setting this - * flag will cause uv_spawn() to fail. - */ - UV_PROCESS_SETGID = (1 << 1), - /* - * Do not wrap any arguments in quotes, or perform any other escaping, when - * converting the argument list into a command line string. This option is - * only meaningful on Windows systems. On Unix it is silently ignored. - */ - UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS = (1 << 2), - /* - * Spawn the child process in a detached state - this will make it a process - * group leader, and will effectively enable the child to keep running after - * the parent exits. Note that the child process will still keep the - * parent's event loop alive unless the parent process calls uv_unref() on - * the child's process handle. - */ - UV_PROCESS_DETACHED = (1 << 3), - /* - * Hide the subprocess console window that would normally be created. This - * option is only meaningful on Windows systems. On Unix it is silently - * ignored. - */ - UV_PROCESS_WINDOWS_HIDE = (1 << 4) -}; - -/* - * uv_process_t is a subclass of uv_handle_t. - */ -struct uv_process_s { - UV_HANDLE_FIELDS - uv_exit_cb exit_cb; - int pid; - UV_PROCESS_PRIVATE_FIELDS -}; - -UV_EXTERN int uv_spawn(uv_loop_t* loop, - uv_process_t* handle, - const uv_process_options_t* options); -UV_EXTERN int uv_process_kill(uv_process_t*, int signum); -UV_EXTERN int uv_kill(int pid, int signum); -UV_EXTERN uv_pid_t uv_process_get_pid(const uv_process_t*); - - -/* - * uv_work_t is a subclass of uv_req_t. - */ -struct uv_work_s { - UV_REQ_FIELDS - uv_loop_t* loop; - uv_work_cb work_cb; - uv_after_work_cb after_work_cb; - UV_WORK_PRIVATE_FIELDS -}; - -UV_EXTERN int uv_queue_work(uv_loop_t* loop, - uv_work_t* req, - uv_work_cb work_cb, - uv_after_work_cb after_work_cb); - -UV_EXTERN int uv_cancel(uv_req_t* req); - - -struct uv_cpu_times_s { - uint64_t user; - uint64_t nice; - uint64_t sys; - uint64_t idle; - uint64_t irq; -}; - -struct uv_cpu_info_s { - char* model; - int speed; - struct uv_cpu_times_s cpu_times; -}; - -struct uv_interface_address_s { - char* name; - char phys_addr[6]; - int is_internal; - union { - struct sockaddr_in address4; - struct sockaddr_in6 address6; - } address; - union { - struct sockaddr_in netmask4; - struct sockaddr_in6 netmask6; - } netmask; -}; - -struct uv_passwd_s { - char* username; - long uid; - long gid; - char* shell; - char* homedir; -}; - -typedef enum { - UV_DIRENT_UNKNOWN, - UV_DIRENT_FILE, - UV_DIRENT_DIR, - UV_DIRENT_LINK, - UV_DIRENT_FIFO, - UV_DIRENT_SOCKET, - UV_DIRENT_CHAR, - UV_DIRENT_BLOCK -} uv_dirent_type_t; - -struct uv_dirent_s { - const char* name; - uv_dirent_type_t type; -}; - -UV_EXTERN char** uv_setup_args(int argc, char** argv); -UV_EXTERN int uv_get_process_title(char* buffer, size_t size); -UV_EXTERN int uv_set_process_title(const char* title); -UV_EXTERN int uv_resident_set_memory(size_t* rss); -UV_EXTERN int uv_uptime(double* uptime); -UV_EXTERN uv_os_fd_t uv_get_osfhandle(int fd); -UV_EXTERN int uv_open_osfhandle(uv_os_fd_t os_fd); - -typedef struct { - long tv_sec; - long tv_usec; -} uv_timeval_t; - -typedef struct { - uv_timeval_t ru_utime; /* user CPU time used */ - uv_timeval_t ru_stime; /* system CPU time used */ - uint64_t ru_maxrss; /* maximum resident set size */ - uint64_t ru_ixrss; /* integral shared memory size */ - uint64_t ru_idrss; /* integral unshared data size */ - uint64_t ru_isrss; /* integral unshared stack size */ - uint64_t ru_minflt; /* page reclaims (soft page faults) */ - uint64_t ru_majflt; /* page faults (hard page faults) */ - uint64_t ru_nswap; /* swaps */ - uint64_t ru_inblock; /* block input operations */ - uint64_t ru_oublock; /* block output operations */ - uint64_t ru_msgsnd; /* IPC messages sent */ - uint64_t ru_msgrcv; /* IPC messages received */ - uint64_t ru_nsignals; /* signals received */ - uint64_t ru_nvcsw; /* voluntary context switches */ - uint64_t ru_nivcsw; /* involuntary context switches */ -} uv_rusage_t; - -UV_EXTERN int uv_getrusage(uv_rusage_t* rusage); - -UV_EXTERN int uv_os_homedir(char* buffer, size_t* size); -UV_EXTERN int uv_os_tmpdir(char* buffer, size_t* size); -UV_EXTERN int uv_os_get_passwd(uv_passwd_t* pwd); -UV_EXTERN void uv_os_free_passwd(uv_passwd_t* pwd); -UV_EXTERN uv_pid_t uv_os_getpid(void); -UV_EXTERN uv_pid_t uv_os_getppid(void); - -#define UV_PRIORITY_LOW 19 -#define UV_PRIORITY_BELOW_NORMAL 10 -#define UV_PRIORITY_NORMAL 0 -#define UV_PRIORITY_ABOVE_NORMAL -7 -#define UV_PRIORITY_HIGH -14 -#define UV_PRIORITY_HIGHEST -20 - -UV_EXTERN int uv_os_getpriority(uv_pid_t pid, int* priority); -UV_EXTERN int uv_os_setpriority(uv_pid_t pid, int priority); - -UV_EXTERN int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count); -UV_EXTERN void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count); - -UV_EXTERN int uv_interface_addresses(uv_interface_address_t** addresses, - int* count); -UV_EXTERN void uv_free_interface_addresses(uv_interface_address_t* addresses, - int count); - -UV_EXTERN int uv_os_getenv(const char* name, char* buffer, size_t* size); -UV_EXTERN int uv_os_setenv(const char* name, const char* value); -UV_EXTERN int uv_os_unsetenv(const char* name); - -UV_EXTERN int uv_os_gethostname(char* buffer, size_t* size); - - -typedef enum { - UV_FS_UNKNOWN = -1, - UV_FS_CUSTOM, - UV_FS_OPEN, - UV_FS_CLOSE, - UV_FS_READ, - UV_FS_WRITE, - UV_FS_SENDFILE, - UV_FS_STAT, - UV_FS_LSTAT, - UV_FS_FSTAT, - UV_FS_FTRUNCATE, - UV_FS_UTIME, - UV_FS_FUTIME, - UV_FS_ACCESS, - UV_FS_CHMOD, - UV_FS_FCHMOD, - UV_FS_FSYNC, - UV_FS_FDATASYNC, - UV_FS_UNLINK, - UV_FS_RMDIR, - UV_FS_MKDIR, - UV_FS_MKDTEMP, - UV_FS_RENAME, - UV_FS_SCANDIR, - UV_FS_LINK, - UV_FS_SYMLINK, - UV_FS_READLINK, - UV_FS_CHOWN, - UV_FS_FCHOWN, - UV_FS_REALPATH, - UV_FS_COPYFILE, - UV_FS_LCHOWN -} uv_fs_type; - -/* uv_fs_t is a subclass of uv_req_t. */ -struct uv_fs_s { - UV_REQ_FIELDS - uv_fs_type fs_type; - uv_loop_t* loop; - uv_fs_cb cb; - ssize_t result; - void* ptr; - const char* path; - uv_stat_t statbuf; /* Stores the result of uv_fs_stat() and uv_fs_fstat(). */ - UV_FS_PRIVATE_FIELDS -}; - -UV_EXTERN uv_fs_type uv_fs_get_type(const uv_fs_t*); -UV_EXTERN ssize_t uv_fs_get_result(const uv_fs_t*); -UV_EXTERN void* uv_fs_get_ptr(const uv_fs_t*); -UV_EXTERN const char* uv_fs_get_path(const uv_fs_t*); -UV_EXTERN uv_stat_t* uv_fs_get_statbuf(uv_fs_t*); - -UV_EXTERN void uv_fs_req_cleanup(uv_fs_t* req); -UV_EXTERN int uv_fs_close(uv_loop_t* loop, - uv_fs_t* req, - uv_file file, - uv_fs_cb cb); -UV_EXTERN int uv_fs_open(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - int flags, - int mode, - uv_fs_cb cb); -UV_EXTERN int uv_fs_read(uv_loop_t* loop, - uv_fs_t* req, - uv_file file, - const uv_buf_t bufs[], - unsigned int nbufs, - int64_t offset, - uv_fs_cb cb); -UV_EXTERN int uv_fs_unlink(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - uv_fs_cb cb); -UV_EXTERN int uv_fs_write(uv_loop_t* loop, - uv_fs_t* req, - uv_file file, - const uv_buf_t bufs[], - unsigned int nbufs, - int64_t offset, - uv_fs_cb cb); -/* - * This flag can be used with uv_fs_copyfile() to return an error if the - * destination already exists. - */ -#define UV_FS_COPYFILE_EXCL 0x0001 - -/* - * This flag can be used with uv_fs_copyfile() to attempt to create a reflink. - * If copy-on-write is not supported, a fallback copy mechanism is used. - */ -#define UV_FS_COPYFILE_FICLONE 0x0002 - -/* - * This flag can be used with uv_fs_copyfile() to attempt to create a reflink. - * If copy-on-write is not supported, an error is returned. - */ -#define UV_FS_COPYFILE_FICLONE_FORCE 0x0004 - -UV_EXTERN int uv_fs_copyfile(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - const char* new_path, - int flags, - uv_fs_cb cb); -UV_EXTERN int uv_fs_mkdir(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - int mode, - uv_fs_cb cb); -UV_EXTERN int uv_fs_mkdtemp(uv_loop_t* loop, - uv_fs_t* req, - const char* tpl, - uv_fs_cb cb); -UV_EXTERN int uv_fs_rmdir(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - uv_fs_cb cb); -UV_EXTERN int uv_fs_scandir(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - int flags, - uv_fs_cb cb); -UV_EXTERN int uv_fs_scandir_next(uv_fs_t* req, - uv_dirent_t* ent); -UV_EXTERN int uv_fs_stat(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - uv_fs_cb cb); -UV_EXTERN int uv_fs_fstat(uv_loop_t* loop, - uv_fs_t* req, - uv_file file, - uv_fs_cb cb); -UV_EXTERN int uv_fs_rename(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - const char* new_path, - uv_fs_cb cb); -UV_EXTERN int uv_fs_fsync(uv_loop_t* loop, - uv_fs_t* req, - uv_file file, - uv_fs_cb cb); -UV_EXTERN int uv_fs_fdatasync(uv_loop_t* loop, - uv_fs_t* req, - uv_file file, - uv_fs_cb cb); -UV_EXTERN int uv_fs_ftruncate(uv_loop_t* loop, - uv_fs_t* req, - uv_file file, - int64_t offset, - uv_fs_cb cb); -UV_EXTERN int uv_fs_sendfile(uv_loop_t* loop, - uv_fs_t* req, - uv_file out_fd, - uv_file in_fd, - int64_t in_offset, - size_t length, - uv_fs_cb cb); -UV_EXTERN int uv_fs_access(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - int mode, - uv_fs_cb cb); -UV_EXTERN int uv_fs_chmod(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - int mode, - uv_fs_cb cb); -UV_EXTERN int uv_fs_utime(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - double atime, - double mtime, - uv_fs_cb cb); -UV_EXTERN int uv_fs_futime(uv_loop_t* loop, - uv_fs_t* req, - uv_file file, - double atime, - double mtime, - uv_fs_cb cb); -UV_EXTERN int uv_fs_lstat(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - uv_fs_cb cb); -UV_EXTERN int uv_fs_link(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - const char* new_path, - uv_fs_cb cb); - -/* - * This flag can be used with uv_fs_symlink() on Windows to specify whether - * path argument points to a directory. - */ -#define UV_FS_SYMLINK_DIR 0x0001 - -/* - * This flag can be used with uv_fs_symlink() on Windows to specify whether - * the symlink is to be created using junction points. - */ -#define UV_FS_SYMLINK_JUNCTION 0x0002 - -UV_EXTERN int uv_fs_symlink(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - const char* new_path, - int flags, - uv_fs_cb cb); -UV_EXTERN int uv_fs_readlink(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - uv_fs_cb cb); -UV_EXTERN int uv_fs_realpath(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - uv_fs_cb cb); -UV_EXTERN int uv_fs_fchmod(uv_loop_t* loop, - uv_fs_t* req, - uv_file file, - int mode, - uv_fs_cb cb); -UV_EXTERN int uv_fs_chown(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - uv_uid_t uid, - uv_gid_t gid, - uv_fs_cb cb); -UV_EXTERN int uv_fs_fchown(uv_loop_t* loop, - uv_fs_t* req, - uv_file file, - uv_uid_t uid, - uv_gid_t gid, - uv_fs_cb cb); -UV_EXTERN int uv_fs_lchown(uv_loop_t* loop, - uv_fs_t* req, - const char* path, - uv_uid_t uid, - uv_gid_t gid, - uv_fs_cb cb); - - -enum uv_fs_event { - UV_RENAME = 1, - UV_CHANGE = 2 -}; - - -struct uv_fs_event_s { - UV_HANDLE_FIELDS - /* private */ - char* path; - UV_FS_EVENT_PRIVATE_FIELDS -}; - - -/* - * uv_fs_stat() based polling file watcher. - */ -struct uv_fs_poll_s { - UV_HANDLE_FIELDS - /* Private, don't touch. */ - void* poll_ctx; -}; - -UV_EXTERN int uv_fs_poll_init(uv_loop_t* loop, uv_fs_poll_t* handle); -UV_EXTERN int uv_fs_poll_start(uv_fs_poll_t* handle, - uv_fs_poll_cb poll_cb, - const char* path, - unsigned int interval); -UV_EXTERN int uv_fs_poll_stop(uv_fs_poll_t* handle); -UV_EXTERN int uv_fs_poll_getpath(uv_fs_poll_t* handle, - char* buffer, - size_t* size); - - -struct uv_signal_s { - UV_HANDLE_FIELDS - uv_signal_cb signal_cb; - int signum; - UV_SIGNAL_PRIVATE_FIELDS -}; - -UV_EXTERN int uv_signal_init(uv_loop_t* loop, uv_signal_t* handle); -UV_EXTERN int uv_signal_start(uv_signal_t* handle, - uv_signal_cb signal_cb, - int signum); -UV_EXTERN int uv_signal_start_oneshot(uv_signal_t* handle, - uv_signal_cb signal_cb, - int signum); -UV_EXTERN int uv_signal_stop(uv_signal_t* handle); - -UV_EXTERN void uv_loadavg(double avg[3]); - - -/* - * Flags to be passed to uv_fs_event_start(). - */ -enum uv_fs_event_flags { - /* - * By default, if the fs event watcher is given a directory name, we will - * watch for all events in that directory. This flags overrides this behavior - * and makes fs_event report only changes to the directory entry itself. This - * flag does not affect individual files watched. - * This flag is currently not implemented yet on any backend. - */ - UV_FS_EVENT_WATCH_ENTRY = 1, - - /* - * By default uv_fs_event will try to use a kernel interface such as inotify - * or kqueue to detect events. This may not work on remote filesystems such - * as NFS mounts. This flag makes fs_event fall back to calling stat() on a - * regular interval. - * This flag is currently not implemented yet on any backend. - */ - UV_FS_EVENT_STAT = 2, - - /* - * By default, event watcher, when watching directory, is not registering - * (is ignoring) changes in it's subdirectories. - * This flag will override this behaviour on platforms that support it. - */ - UV_FS_EVENT_RECURSIVE = 4 -}; - - -UV_EXTERN int uv_fs_event_init(uv_loop_t* loop, uv_fs_event_t* handle); -UV_EXTERN int uv_fs_event_start(uv_fs_event_t* handle, - uv_fs_event_cb cb, - const char* path, - unsigned int flags); -UV_EXTERN int uv_fs_event_stop(uv_fs_event_t* handle); -UV_EXTERN int uv_fs_event_getpath(uv_fs_event_t* handle, - char* buffer, - size_t* size); - -UV_EXTERN int uv_ip4_addr(const char* ip, int port, struct sockaddr_in* addr); -UV_EXTERN int uv_ip6_addr(const char* ip, int port, struct sockaddr_in6* addr); - -UV_EXTERN int uv_ip4_name(const struct sockaddr_in* src, char* dst, size_t size); -UV_EXTERN int uv_ip6_name(const struct sockaddr_in6* src, char* dst, size_t size); - -UV_EXTERN int uv_inet_ntop(int af, const void* src, char* dst, size_t size); -UV_EXTERN int uv_inet_pton(int af, const char* src, void* dst); - -#if defined(IF_NAMESIZE) -# define UV_IF_NAMESIZE (IF_NAMESIZE + 1) -#elif defined(IFNAMSIZ) -# define UV_IF_NAMESIZE (IFNAMSIZ + 1) -#else -# define UV_IF_NAMESIZE (16 + 1) -#endif - -UV_EXTERN int uv_if_indextoname(unsigned int ifindex, - char* buffer, - size_t* size); -UV_EXTERN int uv_if_indextoiid(unsigned int ifindex, - char* buffer, - size_t* size); - -UV_EXTERN int uv_exepath(char* buffer, size_t* size); - -UV_EXTERN int uv_cwd(char* buffer, size_t* size); - -UV_EXTERN int uv_chdir(const char* dir); - -UV_EXTERN uint64_t uv_get_free_memory(void); -UV_EXTERN uint64_t uv_get_total_memory(void); - -UV_EXTERN uint64_t uv_hrtime(void); - -UV_EXTERN void uv_disable_stdio_inheritance(void); - -UV_EXTERN int uv_dlopen(const char* filename, uv_lib_t* lib); -UV_EXTERN void uv_dlclose(uv_lib_t* lib); -UV_EXTERN int uv_dlsym(uv_lib_t* lib, const char* name, void** ptr); -UV_EXTERN const char* uv_dlerror(const uv_lib_t* lib); - -UV_EXTERN int uv_mutex_init(uv_mutex_t* handle); -UV_EXTERN int uv_mutex_init_recursive(uv_mutex_t* handle); -UV_EXTERN void uv_mutex_destroy(uv_mutex_t* handle); -UV_EXTERN void uv_mutex_lock(uv_mutex_t* handle); -UV_EXTERN int uv_mutex_trylock(uv_mutex_t* handle); -UV_EXTERN void uv_mutex_unlock(uv_mutex_t* handle); - -UV_EXTERN int uv_rwlock_init(uv_rwlock_t* rwlock); -UV_EXTERN void uv_rwlock_destroy(uv_rwlock_t* rwlock); -UV_EXTERN void uv_rwlock_rdlock(uv_rwlock_t* rwlock); -UV_EXTERN int uv_rwlock_tryrdlock(uv_rwlock_t* rwlock); -UV_EXTERN void uv_rwlock_rdunlock(uv_rwlock_t* rwlock); -UV_EXTERN void uv_rwlock_wrlock(uv_rwlock_t* rwlock); -UV_EXTERN int uv_rwlock_trywrlock(uv_rwlock_t* rwlock); -UV_EXTERN void uv_rwlock_wrunlock(uv_rwlock_t* rwlock); - -UV_EXTERN int uv_sem_init(uv_sem_t* sem, unsigned int value); -UV_EXTERN void uv_sem_destroy(uv_sem_t* sem); -UV_EXTERN void uv_sem_post(uv_sem_t* sem); -UV_EXTERN void uv_sem_wait(uv_sem_t* sem); -UV_EXTERN int uv_sem_trywait(uv_sem_t* sem); - -UV_EXTERN int uv_cond_init(uv_cond_t* cond); -UV_EXTERN void uv_cond_destroy(uv_cond_t* cond); -UV_EXTERN void uv_cond_signal(uv_cond_t* cond); -UV_EXTERN void uv_cond_broadcast(uv_cond_t* cond); - -UV_EXTERN int uv_barrier_init(uv_barrier_t* barrier, unsigned int count); -UV_EXTERN void uv_barrier_destroy(uv_barrier_t* barrier); -UV_EXTERN int uv_barrier_wait(uv_barrier_t* barrier); - -UV_EXTERN void uv_cond_wait(uv_cond_t* cond, uv_mutex_t* mutex); -UV_EXTERN int uv_cond_timedwait(uv_cond_t* cond, - uv_mutex_t* mutex, - uint64_t timeout); - -UV_EXTERN void uv_once(uv_once_t* guard, void (*callback)(void)); - -UV_EXTERN int uv_key_create(uv_key_t* key); -UV_EXTERN void uv_key_delete(uv_key_t* key); -UV_EXTERN void* uv_key_get(uv_key_t* key); -UV_EXTERN void uv_key_set(uv_key_t* key, void* value); - -typedef void (*uv_thread_cb)(void* arg); - -UV_EXTERN int uv_thread_create(uv_thread_t* tid, uv_thread_cb entry, void* arg); -UV_EXTERN uv_thread_t uv_thread_self(void); -UV_EXTERN int uv_thread_join(uv_thread_t *tid); -UV_EXTERN int uv_thread_equal(const uv_thread_t* t1, const uv_thread_t* t2); - -/* The presence of these unions force similar struct layout. */ -#define XX(_, name) uv_ ## name ## _t name; -union uv_any_handle { - UV_HANDLE_TYPE_MAP(XX) -}; - -union uv_any_req { - UV_REQ_TYPE_MAP(XX) -}; -#undef XX - - -struct uv_loop_s { - /* User data - use this for whatever. */ - void* data; - /* Loop reference counting. */ - unsigned int active_handles; - void* handle_queue[2]; - union { - void* unused[2]; - unsigned int count; - } active_reqs; - /* Internal flag to signal loop stop. */ - unsigned int stop_flag; - UV_LOOP_PRIVATE_FIELDS -}; - -UV_EXTERN void* uv_loop_get_data(const uv_loop_t*); -UV_EXTERN void uv_loop_set_data(uv_loop_t*, void* data); - -/* Don't export the private CPP symbols. */ -#undef UV_HANDLE_TYPE_PRIVATE -#undef UV_REQ_TYPE_PRIVATE -#undef UV_REQ_PRIVATE_FIELDS -#undef UV_STREAM_PRIVATE_FIELDS -#undef UV_TCP_PRIVATE_FIELDS -#undef UV_PREPARE_PRIVATE_FIELDS -#undef UV_CHECK_PRIVATE_FIELDS -#undef UV_IDLE_PRIVATE_FIELDS -#undef UV_ASYNC_PRIVATE_FIELDS -#undef UV_TIMER_PRIVATE_FIELDS -#undef UV_GETADDRINFO_PRIVATE_FIELDS -#undef UV_GETNAMEINFO_PRIVATE_FIELDS -#undef UV_FS_REQ_PRIVATE_FIELDS -#undef UV_WORK_PRIVATE_FIELDS -#undef UV_FS_EVENT_PRIVATE_FIELDS -#undef UV_SIGNAL_PRIVATE_FIELDS -#undef UV_LOOP_PRIVATE_FIELDS -#undef UV_LOOP_PRIVATE_PLATFORM_FIELDS -#undef UV__ERR - -#ifdef __cplusplus -} -#endif -#endif /* UV_H */ diff --git a/emscripten/include/uv/uv/aix.h b/emscripten/include/uv/uv/aix.h deleted file mode 100644 index 7dc992fa..00000000 --- a/emscripten/include/uv/uv/aix.h +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -#ifndef UV_AIX_H -#define UV_AIX_H - -#define UV_PLATFORM_LOOP_FIELDS \ - int fs_fd; \ - -#define UV_PLATFORM_FS_EVENT_FIELDS \ - uv__io_t event_watcher; \ - char *dir_filename; \ - -#endif /* UV_AIX_H */ diff --git a/emscripten/include/uv/uv/android-ifaddrs.h b/emscripten/include/uv/uv/android-ifaddrs.h deleted file mode 100644 index 9cd19fec..00000000 --- a/emscripten/include/uv/uv/android-ifaddrs.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 1995, 1999 - * Berkeley Software Design, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp - */ - -#ifndef _IFADDRS_H_ -#define _IFADDRS_H_ - -struct ifaddrs { - struct ifaddrs *ifa_next; - char *ifa_name; - unsigned int ifa_flags; - struct sockaddr *ifa_addr; - struct sockaddr *ifa_netmask; - struct sockaddr *ifa_dstaddr; - void *ifa_data; -}; - -/* - * This may have been defined in . Note that if is - * to be included it must be included before this header file. - */ -#ifndef ifa_broadaddr -#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */ -#endif - -#include - -__BEGIN_DECLS -extern int getifaddrs(struct ifaddrs **ifap); -extern void freeifaddrs(struct ifaddrs *ifa); -__END_DECLS - -#endif diff --git a/emscripten/include/uv/uv/bsd.h b/emscripten/include/uv/uv/bsd.h deleted file mode 100644 index 2d72b3d7..00000000 --- a/emscripten/include/uv/uv/bsd.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -#ifndef UV_BSD_H -#define UV_BSD_H - -#define UV_PLATFORM_FS_EVENT_FIELDS \ - uv__io_t event_watcher; \ - -#define UV_IO_PRIVATE_PLATFORM_FIELDS \ - int rcount; \ - int wcount; \ - -#define UV_HAVE_KQUEUE 1 - -#endif /* UV_BSD_H */ diff --git a/emscripten/include/uv/uv/darwin.h b/emscripten/include/uv/uv/darwin.h deleted file mode 100644 index d2264158..00000000 --- a/emscripten/include/uv/uv/darwin.h +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -#ifndef UV_DARWIN_H -#define UV_DARWIN_H - -#if defined(__APPLE__) && defined(__MACH__) -# include -# include -# include -# include -# define UV_PLATFORM_SEM_T semaphore_t -#endif - -#define UV_IO_PRIVATE_PLATFORM_FIELDS \ - int rcount; \ - int wcount; \ - -#define UV_PLATFORM_LOOP_FIELDS \ - uv_thread_t cf_thread; \ - void* _cf_reserved; \ - void* cf_state; \ - uv_mutex_t cf_mutex; \ - uv_sem_t cf_sem; \ - void* cf_signals[2]; \ - -#define UV_PLATFORM_FS_EVENT_FIELDS \ - uv__io_t event_watcher; \ - char* realpath; \ - int realpath_len; \ - int cf_flags; \ - uv_async_t* cf_cb; \ - void* cf_events[2]; \ - void* cf_member[2]; \ - int cf_error; \ - uv_mutex_t cf_mutex; \ - -#define UV_STREAM_PRIVATE_PLATFORM_FIELDS \ - void* select; \ - -#define UV_HAVE_KQUEUE 1 - -#endif /* UV_DARWIN_H */ diff --git a/emscripten/include/uv/uv/errno.h b/emscripten/include/uv/uv/errno.h deleted file mode 100644 index 8eeb95de..00000000 --- a/emscripten/include/uv/uv/errno.h +++ /dev/null @@ -1,443 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -#ifndef UV_ERRNO_H_ -#define UV_ERRNO_H_ - -#include -#if EDOM > 0 -# define UV__ERR(x) (-(x)) -#else -# define UV__ERR(x) (x) -#endif - -#define UV__EOF (-4095) -#define UV__UNKNOWN (-4094) - -#define UV__EAI_ADDRFAMILY (-3000) -#define UV__EAI_AGAIN (-3001) -#define UV__EAI_BADFLAGS (-3002) -#define UV__EAI_CANCELED (-3003) -#define UV__EAI_FAIL (-3004) -#define UV__EAI_FAMILY (-3005) -#define UV__EAI_MEMORY (-3006) -#define UV__EAI_NODATA (-3007) -#define UV__EAI_NONAME (-3008) -#define UV__EAI_OVERFLOW (-3009) -#define UV__EAI_SERVICE (-3010) -#define UV__EAI_SOCKTYPE (-3011) -#define UV__EAI_BADHINTS (-3013) -#define UV__EAI_PROTOCOL (-3014) - -/* Only map to the system errno on non-Windows platforms. It's apparently - * a fairly common practice for Windows programmers to redefine errno codes. - */ -#if defined(E2BIG) && !defined(_WIN32) -# define UV__E2BIG UV__ERR(E2BIG) -#else -# define UV__E2BIG (-4093) -#endif - -#if defined(EACCES) && !defined(_WIN32) -# define UV__EACCES UV__ERR(EACCES) -#else -# define UV__EACCES (-4092) -#endif - -#if defined(EADDRINUSE) && !defined(_WIN32) -# define UV__EADDRINUSE UV__ERR(EADDRINUSE) -#else -# define UV__EADDRINUSE (-4091) -#endif - -#if defined(EADDRNOTAVAIL) && !defined(_WIN32) -# define UV__EADDRNOTAVAIL UV__ERR(EADDRNOTAVAIL) -#else -# define UV__EADDRNOTAVAIL (-4090) -#endif - -#if defined(EAFNOSUPPORT) && !defined(_WIN32) -# define UV__EAFNOSUPPORT UV__ERR(EAFNOSUPPORT) -#else -# define UV__EAFNOSUPPORT (-4089) -#endif - -#if defined(EAGAIN) && !defined(_WIN32) -# define UV__EAGAIN UV__ERR(EAGAIN) -#else -# define UV__EAGAIN (-4088) -#endif - -#if defined(EALREADY) && !defined(_WIN32) -# define UV__EALREADY UV__ERR(EALREADY) -#else -# define UV__EALREADY (-4084) -#endif - -#if defined(EBADF) && !defined(_WIN32) -# define UV__EBADF UV__ERR(EBADF) -#else -# define UV__EBADF (-4083) -#endif - -#if defined(EBUSY) && !defined(_WIN32) -# define UV__EBUSY UV__ERR(EBUSY) -#else -# define UV__EBUSY (-4082) -#endif - -#if defined(ECANCELED) && !defined(_WIN32) -# define UV__ECANCELED UV__ERR(ECANCELED) -#else -# define UV__ECANCELED (-4081) -#endif - -#if defined(ECHARSET) && !defined(_WIN32) -# define UV__ECHARSET UV__ERR(ECHARSET) -#else -# define UV__ECHARSET (-4080) -#endif - -#if defined(ECONNABORTED) && !defined(_WIN32) -# define UV__ECONNABORTED UV__ERR(ECONNABORTED) -#else -# define UV__ECONNABORTED (-4079) -#endif - -#if defined(ECONNREFUSED) && !defined(_WIN32) -# define UV__ECONNREFUSED UV__ERR(ECONNREFUSED) -#else -# define UV__ECONNREFUSED (-4078) -#endif - -#if defined(ECONNRESET) && !defined(_WIN32) -# define UV__ECONNRESET UV__ERR(ECONNRESET) -#else -# define UV__ECONNRESET (-4077) -#endif - -#if defined(EDESTADDRREQ) && !defined(_WIN32) -# define UV__EDESTADDRREQ UV__ERR(EDESTADDRREQ) -#else -# define UV__EDESTADDRREQ (-4076) -#endif - -#if defined(EEXIST) && !defined(_WIN32) -# define UV__EEXIST UV__ERR(EEXIST) -#else -# define UV__EEXIST (-4075) -#endif - -#if defined(EFAULT) && !defined(_WIN32) -# define UV__EFAULT UV__ERR(EFAULT) -#else -# define UV__EFAULT (-4074) -#endif - -#if defined(EHOSTUNREACH) && !defined(_WIN32) -# define UV__EHOSTUNREACH UV__ERR(EHOSTUNREACH) -#else -# define UV__EHOSTUNREACH (-4073) -#endif - -#if defined(EINTR) && !defined(_WIN32) -# define UV__EINTR UV__ERR(EINTR) -#else -# define UV__EINTR (-4072) -#endif - -#if defined(EINVAL) && !defined(_WIN32) -# define UV__EINVAL UV__ERR(EINVAL) -#else -# define UV__EINVAL (-4071) -#endif - -#if defined(EIO) && !defined(_WIN32) -# define UV__EIO UV__ERR(EIO) -#else -# define UV__EIO (-4070) -#endif - -#if defined(EISCONN) && !defined(_WIN32) -# define UV__EISCONN UV__ERR(EISCONN) -#else -# define UV__EISCONN (-4069) -#endif - -#if defined(EISDIR) && !defined(_WIN32) -# define UV__EISDIR UV__ERR(EISDIR) -#else -# define UV__EISDIR (-4068) -#endif - -#if defined(ELOOP) && !defined(_WIN32) -# define UV__ELOOP UV__ERR(ELOOP) -#else -# define UV__ELOOP (-4067) -#endif - -#if defined(EMFILE) && !defined(_WIN32) -# define UV__EMFILE UV__ERR(EMFILE) -#else -# define UV__EMFILE (-4066) -#endif - -#if defined(EMSGSIZE) && !defined(_WIN32) -# define UV__EMSGSIZE UV__ERR(EMSGSIZE) -#else -# define UV__EMSGSIZE (-4065) -#endif - -#if defined(ENAMETOOLONG) && !defined(_WIN32) -# define UV__ENAMETOOLONG UV__ERR(ENAMETOOLONG) -#else -# define UV__ENAMETOOLONG (-4064) -#endif - -#if defined(ENETDOWN) && !defined(_WIN32) -# define UV__ENETDOWN UV__ERR(ENETDOWN) -#else -# define UV__ENETDOWN (-4063) -#endif - -#if defined(ENETUNREACH) && !defined(_WIN32) -# define UV__ENETUNREACH UV__ERR(ENETUNREACH) -#else -# define UV__ENETUNREACH (-4062) -#endif - -#if defined(ENFILE) && !defined(_WIN32) -# define UV__ENFILE UV__ERR(ENFILE) -#else -# define UV__ENFILE (-4061) -#endif - -#if defined(ENOBUFS) && !defined(_WIN32) -# define UV__ENOBUFS UV__ERR(ENOBUFS) -#else -# define UV__ENOBUFS (-4060) -#endif - -#if defined(ENODEV) && !defined(_WIN32) -# define UV__ENODEV UV__ERR(ENODEV) -#else -# define UV__ENODEV (-4059) -#endif - -#if defined(ENOENT) && !defined(_WIN32) -# define UV__ENOENT UV__ERR(ENOENT) -#else -# define UV__ENOENT (-4058) -#endif - -#if defined(ENOMEM) && !defined(_WIN32) -# define UV__ENOMEM UV__ERR(ENOMEM) -#else -# define UV__ENOMEM (-4057) -#endif - -#if defined(ENONET) && !defined(_WIN32) -# define UV__ENONET UV__ERR(ENONET) -#else -# define UV__ENONET (-4056) -#endif - -#if defined(ENOSPC) && !defined(_WIN32) -# define UV__ENOSPC UV__ERR(ENOSPC) -#else -# define UV__ENOSPC (-4055) -#endif - -#if defined(ENOSYS) && !defined(_WIN32) -# define UV__ENOSYS UV__ERR(ENOSYS) -#else -# define UV__ENOSYS (-4054) -#endif - -#if defined(ENOTCONN) && !defined(_WIN32) -# define UV__ENOTCONN UV__ERR(ENOTCONN) -#else -# define UV__ENOTCONN (-4053) -#endif - -#if defined(ENOTDIR) && !defined(_WIN32) -# define UV__ENOTDIR UV__ERR(ENOTDIR) -#else -# define UV__ENOTDIR (-4052) -#endif - -#if defined(ENOTEMPTY) && !defined(_WIN32) -# define UV__ENOTEMPTY UV__ERR(ENOTEMPTY) -#else -# define UV__ENOTEMPTY (-4051) -#endif - -#if defined(ENOTSOCK) && !defined(_WIN32) -# define UV__ENOTSOCK UV__ERR(ENOTSOCK) -#else -# define UV__ENOTSOCK (-4050) -#endif - -#if defined(ENOTSUP) && !defined(_WIN32) -# define UV__ENOTSUP UV__ERR(ENOTSUP) -#else -# define UV__ENOTSUP (-4049) -#endif - -#if defined(EPERM) && !defined(_WIN32) -# define UV__EPERM UV__ERR(EPERM) -#else -# define UV__EPERM (-4048) -#endif - -#if defined(EPIPE) && !defined(_WIN32) -# define UV__EPIPE UV__ERR(EPIPE) -#else -# define UV__EPIPE (-4047) -#endif - -#if defined(EPROTO) && !defined(_WIN32) -# define UV__EPROTO UV__ERR(EPROTO) -#else -# define UV__EPROTO UV__ERR(4046) -#endif - -#if defined(EPROTONOSUPPORT) && !defined(_WIN32) -# define UV__EPROTONOSUPPORT UV__ERR(EPROTONOSUPPORT) -#else -# define UV__EPROTONOSUPPORT (-4045) -#endif - -#if defined(EPROTOTYPE) && !defined(_WIN32) -# define UV__EPROTOTYPE UV__ERR(EPROTOTYPE) -#else -# define UV__EPROTOTYPE (-4044) -#endif - -#if defined(EROFS) && !defined(_WIN32) -# define UV__EROFS UV__ERR(EROFS) -#else -# define UV__EROFS (-4043) -#endif - -#if defined(ESHUTDOWN) && !defined(_WIN32) -# define UV__ESHUTDOWN UV__ERR(ESHUTDOWN) -#else -# define UV__ESHUTDOWN (-4042) -#endif - -#if defined(ESPIPE) && !defined(_WIN32) -# define UV__ESPIPE UV__ERR(ESPIPE) -#else -# define UV__ESPIPE (-4041) -#endif - -#if defined(ESRCH) && !defined(_WIN32) -# define UV__ESRCH UV__ERR(ESRCH) -#else -# define UV__ESRCH (-4040) -#endif - -#if defined(ETIMEDOUT) && !defined(_WIN32) -# define UV__ETIMEDOUT UV__ERR(ETIMEDOUT) -#else -# define UV__ETIMEDOUT (-4039) -#endif - -#if defined(ETXTBSY) && !defined(_WIN32) -# define UV__ETXTBSY UV__ERR(ETXTBSY) -#else -# define UV__ETXTBSY (-4038) -#endif - -#if defined(EXDEV) && !defined(_WIN32) -# define UV__EXDEV UV__ERR(EXDEV) -#else -# define UV__EXDEV (-4037) -#endif - -#if defined(EFBIG) && !defined(_WIN32) -# define UV__EFBIG UV__ERR(EFBIG) -#else -# define UV__EFBIG (-4036) -#endif - -#if defined(ENOPROTOOPT) && !defined(_WIN32) -# define UV__ENOPROTOOPT UV__ERR(ENOPROTOOPT) -#else -# define UV__ENOPROTOOPT (-4035) -#endif - -#if defined(ERANGE) && !defined(_WIN32) -# define UV__ERANGE UV__ERR(ERANGE) -#else -# define UV__ERANGE (-4034) -#endif - -#if defined(ENXIO) && !defined(_WIN32) -# define UV__ENXIO UV__ERR(ENXIO) -#else -# define UV__ENXIO (-4033) -#endif - -#if defined(EMLINK) && !defined(_WIN32) -# define UV__EMLINK UV__ERR(EMLINK) -#else -# define UV__EMLINK (-4032) -#endif - -/* EHOSTDOWN is not visible on BSD-like systems when _POSIX_C_SOURCE is - * defined. Fortunately, its value is always 64 so it's possible albeit - * icky to hard-code it. - */ -#if defined(EHOSTDOWN) && !defined(_WIN32) -# define UV__EHOSTDOWN UV__ERR(EHOSTDOWN) -#elif defined(__APPLE__) || \ - defined(__DragonFly__) || \ - defined(__FreeBSD__) || \ - defined(__FreeBSD_kernel__) || \ - defined(__NetBSD__) || \ - defined(__OpenBSD__) -# define UV__EHOSTDOWN (-64) -#else -# define UV__EHOSTDOWN (-4031) -#endif - -#if defined(EREMOTEIO) && !defined(_WIN32) -# define UV__EREMOTEIO UV__ERR(EREMOTEIO) -#else -# define UV__EREMOTEIO (-4030) -#endif - -#if defined(ENOTTY) && !defined(_WIN32) -# define UV__ENOTTY UV__ERR(ENOTTY) -#else -# define UV__ENOTTY (-4029) -#endif - -#if defined(EFTYPE) && !defined(_WIN32) -# define UV__EFTYPE UV__ERR(EFTYPE) -#else -# define UV__EFTYPE (-4028) -#endif - - -#endif /* UV_ERRNO_H_ */ diff --git a/emscripten/include/uv/uv/linux.h b/emscripten/include/uv/uv/linux.h deleted file mode 100644 index 9b38405a..00000000 --- a/emscripten/include/uv/uv/linux.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -#ifndef UV_LINUX_H -#define UV_LINUX_H - -#define UV_PLATFORM_LOOP_FIELDS \ - uv__io_t inotify_read_watcher; \ - void* inotify_watchers; \ - int inotify_fd; \ - -#define UV_PLATFORM_FS_EVENT_FIELDS \ - void* watchers[2]; \ - int wd; \ - -#endif /* UV_LINUX_H */ diff --git a/emscripten/include/uv/uv/os390.h b/emscripten/include/uv/uv/os390.h deleted file mode 100644 index 0267d74c..00000000 --- a/emscripten/include/uv/uv/os390.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright libuv project contributors. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -#ifndef UV_MVS_H -#define UV_MVS_H - -#define UV_PLATFORM_SEM_T long - -#define UV_PLATFORM_LOOP_FIELDS \ - void* ep; \ - -#define UV_PLATFORM_FS_EVENT_FIELDS \ - char rfis_rftok[8]; \ - -#endif /* UV_MVS_H */ diff --git a/emscripten/include/uv/uv/posix.h b/emscripten/include/uv/uv/posix.h deleted file mode 100644 index 9a96634d..00000000 --- a/emscripten/include/uv/uv/posix.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright libuv project contributors. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -#ifndef UV_POSIX_H -#define UV_POSIX_H - -#define UV_PLATFORM_LOOP_FIELDS \ - struct pollfd* poll_fds; \ - size_t poll_fds_used; \ - size_t poll_fds_size; \ - unsigned char poll_fds_iterating; \ - -#endif /* UV_POSIX_H */ diff --git a/emscripten/include/uv/uv/pthread-barrier.h b/emscripten/include/uv/uv/pthread-barrier.h deleted file mode 100644 index 07db9b8a..00000000 --- a/emscripten/include/uv/uv/pthread-barrier.h +++ /dev/null @@ -1,69 +0,0 @@ -/* -Copyright (c) 2016, Kari Tristan Helgason - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -#ifndef _UV_PTHREAD_BARRIER_ -#define _UV_PTHREAD_BARRIER_ -#include -#include -#if !defined(__MVS__) -#include /* sem_t */ -#endif - -#define PTHREAD_BARRIER_SERIAL_THREAD 0x12345 -#define UV__PTHREAD_BARRIER_FALLBACK 1 - -/* - * To maintain ABI compatibility with - * libuv v1.x struct is padded according - * to target platform - */ -#if defined(__ANDROID__) -# define UV_BARRIER_STRUCT_PADDING \ - sizeof(pthread_mutex_t) + \ - sizeof(pthread_cond_t) + \ - sizeof(unsigned int) - \ - sizeof(void *) -#elif defined(__APPLE__) -# define UV_BARRIER_STRUCT_PADDING \ - sizeof(pthread_mutex_t) + \ - 2 * sizeof(sem_t) + \ - 2 * sizeof(unsigned int) - \ - sizeof(void *) -#else -# define UV_BARRIER_STRUCT_PADDING 0 -#endif - -typedef struct { - pthread_mutex_t mutex; - pthread_cond_t cond; - unsigned threshold; - unsigned in; - unsigned out; -} _uv_barrier; - -typedef struct { - _uv_barrier* b; - char _pad[UV_BARRIER_STRUCT_PADDING]; -} pthread_barrier_t; - -int pthread_barrier_init(pthread_barrier_t* barrier, - const void* barrier_attr, - unsigned count); - -int pthread_barrier_wait(pthread_barrier_t* barrier); -int pthread_barrier_destroy(pthread_barrier_t *barrier); - -#endif /* _UV_PTHREAD_BARRIER_ */ diff --git a/emscripten/include/uv/uv/stdint-msvc2008.h b/emscripten/include/uv/uv/stdint-msvc2008.h deleted file mode 100644 index d02608a5..00000000 --- a/emscripten/include/uv/uv/stdint-msvc2008.h +++ /dev/null @@ -1,247 +0,0 @@ -// ISO C9x compliant stdint.h for Microsoft Visual Studio -// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 -// -// Copyright (c) 2006-2008 Alexander Chemeris -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// 3. The name of the author may be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _MSC_VER // [ -#error "Use this header only with Microsoft Visual C++ compilers!" -#endif // _MSC_VER ] - -#ifndef _MSC_STDINT_H_ // [ -#define _MSC_STDINT_H_ - -#if _MSC_VER > 1000 -#pragma once -#endif - -#include - -// For Visual Studio 6 in C++ mode and for many Visual Studio versions when -// compiling for ARM we should wrap include with 'extern "C++" {}' -// or compiler give many errors like this: -// error C2733: second C linkage of overloaded function 'wmemchr' not allowed -#ifdef __cplusplus -extern "C" { -#endif -# include -#ifdef __cplusplus -} -#endif - -// Define _W64 macros to mark types changing their size, like intptr_t. -#ifndef _W64 -# if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 -# define _W64 __w64 -# else -# define _W64 -# endif -#endif - - -// 7.18.1 Integer types - -// 7.18.1.1 Exact-width integer types - -// Visual Studio 6 and Embedded Visual C++ 4 doesn't -// realize that, e.g. char has the same size as __int8 -// so we give up on __intX for them. -#if (_MSC_VER < 1300) - typedef signed char int8_t; - typedef signed short int16_t; - typedef signed int int32_t; - typedef unsigned char uint8_t; - typedef unsigned short uint16_t; - typedef unsigned int uint32_t; -#else - typedef signed __int8 int8_t; - typedef signed __int16 int16_t; - typedef signed __int32 int32_t; - typedef unsigned __int8 uint8_t; - typedef unsigned __int16 uint16_t; - typedef unsigned __int32 uint32_t; -#endif -typedef signed __int64 int64_t; -typedef unsigned __int64 uint64_t; - - -// 7.18.1.2 Minimum-width integer types -typedef int8_t int_least8_t; -typedef int16_t int_least16_t; -typedef int32_t int_least32_t; -typedef int64_t int_least64_t; -typedef uint8_t uint_least8_t; -typedef uint16_t uint_least16_t; -typedef uint32_t uint_least32_t; -typedef uint64_t uint_least64_t; - -// 7.18.1.3 Fastest minimum-width integer types -typedef int8_t int_fast8_t; -typedef int16_t int_fast16_t; -typedef int32_t int_fast32_t; -typedef int64_t int_fast64_t; -typedef uint8_t uint_fast8_t; -typedef uint16_t uint_fast16_t; -typedef uint32_t uint_fast32_t; -typedef uint64_t uint_fast64_t; - -// 7.18.1.4 Integer types capable of holding object pointers -#ifdef _WIN64 // [ - typedef signed __int64 intptr_t; - typedef unsigned __int64 uintptr_t; -#else // _WIN64 ][ - typedef _W64 signed int intptr_t; - typedef _W64 unsigned int uintptr_t; -#endif // _WIN64 ] - -// 7.18.1.5 Greatest-width integer types -typedef int64_t intmax_t; -typedef uint64_t uintmax_t; - - -// 7.18.2 Limits of specified-width integer types - -#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259 - -// 7.18.2.1 Limits of exact-width integer types -#define INT8_MIN ((int8_t)_I8_MIN) -#define INT8_MAX _I8_MAX -#define INT16_MIN ((int16_t)_I16_MIN) -#define INT16_MAX _I16_MAX -#define INT32_MIN ((int32_t)_I32_MIN) -#define INT32_MAX _I32_MAX -#define INT64_MIN ((int64_t)_I64_MIN) -#define INT64_MAX _I64_MAX -#define UINT8_MAX _UI8_MAX -#define UINT16_MAX _UI16_MAX -#define UINT32_MAX _UI32_MAX -#define UINT64_MAX _UI64_MAX - -// 7.18.2.2 Limits of minimum-width integer types -#define INT_LEAST8_MIN INT8_MIN -#define INT_LEAST8_MAX INT8_MAX -#define INT_LEAST16_MIN INT16_MIN -#define INT_LEAST16_MAX INT16_MAX -#define INT_LEAST32_MIN INT32_MIN -#define INT_LEAST32_MAX INT32_MAX -#define INT_LEAST64_MIN INT64_MIN -#define INT_LEAST64_MAX INT64_MAX -#define UINT_LEAST8_MAX UINT8_MAX -#define UINT_LEAST16_MAX UINT16_MAX -#define UINT_LEAST32_MAX UINT32_MAX -#define UINT_LEAST64_MAX UINT64_MAX - -// 7.18.2.3 Limits of fastest minimum-width integer types -#define INT_FAST8_MIN INT8_MIN -#define INT_FAST8_MAX INT8_MAX -#define INT_FAST16_MIN INT16_MIN -#define INT_FAST16_MAX INT16_MAX -#define INT_FAST32_MIN INT32_MIN -#define INT_FAST32_MAX INT32_MAX -#define INT_FAST64_MIN INT64_MIN -#define INT_FAST64_MAX INT64_MAX -#define UINT_FAST8_MAX UINT8_MAX -#define UINT_FAST16_MAX UINT16_MAX -#define UINT_FAST32_MAX UINT32_MAX -#define UINT_FAST64_MAX UINT64_MAX - -// 7.18.2.4 Limits of integer types capable of holding object pointers -#ifdef _WIN64 // [ -# define INTPTR_MIN INT64_MIN -# define INTPTR_MAX INT64_MAX -# define UINTPTR_MAX UINT64_MAX -#else // _WIN64 ][ -# define INTPTR_MIN INT32_MIN -# define INTPTR_MAX INT32_MAX -# define UINTPTR_MAX UINT32_MAX -#endif // _WIN64 ] - -// 7.18.2.5 Limits of greatest-width integer types -#define INTMAX_MIN INT64_MIN -#define INTMAX_MAX INT64_MAX -#define UINTMAX_MAX UINT64_MAX - -// 7.18.3 Limits of other integer types - -#ifdef _WIN64 // [ -# define PTRDIFF_MIN _I64_MIN -# define PTRDIFF_MAX _I64_MAX -#else // _WIN64 ][ -# define PTRDIFF_MIN _I32_MIN -# define PTRDIFF_MAX _I32_MAX -#endif // _WIN64 ] - -#define SIG_ATOMIC_MIN INT_MIN -#define SIG_ATOMIC_MAX INT_MAX - -#ifndef SIZE_MAX // [ -# ifdef _WIN64 // [ -# define SIZE_MAX _UI64_MAX -# else // _WIN64 ][ -# define SIZE_MAX _UI32_MAX -# endif // _WIN64 ] -#endif // SIZE_MAX ] - -// WCHAR_MIN and WCHAR_MAX are also defined in -#ifndef WCHAR_MIN // [ -# define WCHAR_MIN 0 -#endif // WCHAR_MIN ] -#ifndef WCHAR_MAX // [ -# define WCHAR_MAX _UI16_MAX -#endif // WCHAR_MAX ] - -#define WINT_MIN 0 -#define WINT_MAX _UI16_MAX - -#endif // __STDC_LIMIT_MACROS ] - - -// 7.18.4 Limits of other integer types - -#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260 - -// 7.18.4.1 Macros for minimum-width integer constants - -#define INT8_C(val) val##i8 -#define INT16_C(val) val##i16 -#define INT32_C(val) val##i32 -#define INT64_C(val) val##i64 - -#define UINT8_C(val) val##ui8 -#define UINT16_C(val) val##ui16 -#define UINT32_C(val) val##ui32 -#define UINT64_C(val) val##ui64 - -// 7.18.4.2 Macros for greatest-width integer constants -#define INTMAX_C INT64_C -#define UINTMAX_C UINT64_C - -#endif // __STDC_CONSTANT_MACROS ] - - -#endif // _MSC_STDINT_H_ ] diff --git a/emscripten/include/uv/uv/sunos.h b/emscripten/include/uv/uv/sunos.h deleted file mode 100644 index 04216642..00000000 --- a/emscripten/include/uv/uv/sunos.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -#ifndef UV_SUNOS_H -#define UV_SUNOS_H - -#include -#include - -/* For the sake of convenience and reduced #ifdef-ery in src/unix/sunos.c, - * add the fs_event fields even when this version of SunOS doesn't support - * file watching. - */ -#define UV_PLATFORM_LOOP_FIELDS \ - uv__io_t fs_event_watcher; \ - int fs_fd; \ - -#if defined(PORT_SOURCE_FILE) - -# define UV_PLATFORM_FS_EVENT_FIELDS \ - file_obj_t fo; \ - int fd; \ - -#endif /* defined(PORT_SOURCE_FILE) */ - -#endif /* UV_SUNOS_H */ diff --git a/emscripten/include/uv/uv/threadpool.h b/emscripten/include/uv/uv/threadpool.h deleted file mode 100644 index 9708ebdd..00000000 --- a/emscripten/include/uv/uv/threadpool.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -/* - * This file is private to libuv. It provides common functionality to both - * Windows and Unix backends. - */ - -#ifndef UV_THREADPOOL_H_ -#define UV_THREADPOOL_H_ - -struct uv__work { - void (*work)(struct uv__work *w); - void (*done)(struct uv__work *w, int status); - struct uv_loop_s* loop; - void* wq[2]; -}; - -#endif /* UV_THREADPOOL_H_ */ diff --git a/emscripten/include/uv/uv/tree.h b/emscripten/include/uv/uv/tree.h deleted file mode 100644 index f936416e..00000000 --- a/emscripten/include/uv/uv/tree.h +++ /dev/null @@ -1,768 +0,0 @@ -/*- - * Copyright 2002 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef UV_TREE_H_ -#define UV_TREE_H_ - -#ifndef UV__UNUSED -# if __GNUC__ -# define UV__UNUSED __attribute__((unused)) -# else -# define UV__UNUSED -# endif -#endif - -/* - * This file defines data structures for different types of trees: - * splay trees and red-black trees. - * - * A splay tree is a self-organizing data structure. Every operation - * on the tree causes a splay to happen. The splay moves the requested - * node to the root of the tree and partly rebalances it. - * - * This has the benefit that request locality causes faster lookups as - * the requested nodes move to the top of the tree. On the other hand, - * every lookup causes memory writes. - * - * The Balance Theorem bounds the total access time for m operations - * and n inserts on an initially empty tree as O((m + n)lg n). The - * amortized cost for a sequence of m accesses to a splay tree is O(lg n); - * - * A red-black tree is a binary search tree with the node color as an - * extra attribute. It fulfills a set of conditions: - * - every search path from the root to a leaf consists of the - * same number of black nodes, - * - each red node (except for the root) has a black parent, - * - each leaf node is black. - * - * Every operation on a red-black tree is bounded as O(lg n). - * The maximum height of a red-black tree is 2lg (n+1). - */ - -#define SPLAY_HEAD(name, type) \ -struct name { \ - struct type *sph_root; /* root of the tree */ \ -} - -#define SPLAY_INITIALIZER(root) \ - { NULL } - -#define SPLAY_INIT(root) do { \ - (root)->sph_root = NULL; \ -} while (/*CONSTCOND*/ 0) - -#define SPLAY_ENTRY(type) \ -struct { \ - struct type *spe_left; /* left element */ \ - struct type *spe_right; /* right element */ \ -} - -#define SPLAY_LEFT(elm, field) (elm)->field.spe_left -#define SPLAY_RIGHT(elm, field) (elm)->field.spe_right -#define SPLAY_ROOT(head) (head)->sph_root -#define SPLAY_EMPTY(head) (SPLAY_ROOT(head) == NULL) - -/* SPLAY_ROTATE_{LEFT,RIGHT} expect that tmp hold SPLAY_{RIGHT,LEFT} */ -#define SPLAY_ROTATE_RIGHT(head, tmp, field) do { \ - SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field); \ - SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ - (head)->sph_root = tmp; \ -} while (/*CONSTCOND*/ 0) - -#define SPLAY_ROTATE_LEFT(head, tmp, field) do { \ - SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \ - SPLAY_LEFT(tmp, field) = (head)->sph_root; \ - (head)->sph_root = tmp; \ -} while (/*CONSTCOND*/ 0) - -#define SPLAY_LINKLEFT(head, tmp, field) do { \ - SPLAY_LEFT(tmp, field) = (head)->sph_root; \ - tmp = (head)->sph_root; \ - (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \ -} while (/*CONSTCOND*/ 0) - -#define SPLAY_LINKRIGHT(head, tmp, field) do { \ - SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ - tmp = (head)->sph_root; \ - (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \ -} while (/*CONSTCOND*/ 0) - -#define SPLAY_ASSEMBLE(head, node, left, right, field) do { \ - SPLAY_RIGHT(left, field) = SPLAY_LEFT((head)->sph_root, field); \ - SPLAY_LEFT(right, field) = SPLAY_RIGHT((head)->sph_root, field); \ - SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(node, field); \ - SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(node, field); \ -} while (/*CONSTCOND*/ 0) - -/* Generates prototypes and inline functions */ - -#define SPLAY_PROTOTYPE(name, type, field, cmp) \ -void name##_SPLAY(struct name *, struct type *); \ -void name##_SPLAY_MINMAX(struct name *, int); \ -struct type *name##_SPLAY_INSERT(struct name *, struct type *); \ -struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \ - \ -/* Finds the node with the same key as elm */ \ -static __inline struct type * \ -name##_SPLAY_FIND(struct name *head, struct type *elm) \ -{ \ - if (SPLAY_EMPTY(head)) \ - return(NULL); \ - name##_SPLAY(head, elm); \ - if ((cmp)(elm, (head)->sph_root) == 0) \ - return (head->sph_root); \ - return (NULL); \ -} \ - \ -static __inline struct type * \ -name##_SPLAY_NEXT(struct name *head, struct type *elm) \ -{ \ - name##_SPLAY(head, elm); \ - if (SPLAY_RIGHT(elm, field) != NULL) { \ - elm = SPLAY_RIGHT(elm, field); \ - while (SPLAY_LEFT(elm, field) != NULL) { \ - elm = SPLAY_LEFT(elm, field); \ - } \ - } else \ - elm = NULL; \ - return (elm); \ -} \ - \ -static __inline struct type * \ -name##_SPLAY_MIN_MAX(struct name *head, int val) \ -{ \ - name##_SPLAY_MINMAX(head, val); \ - return (SPLAY_ROOT(head)); \ -} - -/* Main splay operation. - * Moves node close to the key of elm to top - */ -#define SPLAY_GENERATE(name, type, field, cmp) \ -struct type * \ -name##_SPLAY_INSERT(struct name *head, struct type *elm) \ -{ \ - if (SPLAY_EMPTY(head)) { \ - SPLAY_LEFT(elm, field) = SPLAY_RIGHT(elm, field) = NULL; \ - } else { \ - int __comp; \ - name##_SPLAY(head, elm); \ - __comp = (cmp)(elm, (head)->sph_root); \ - if(__comp < 0) { \ - SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field); \ - SPLAY_RIGHT(elm, field) = (head)->sph_root; \ - SPLAY_LEFT((head)->sph_root, field) = NULL; \ - } else if (__comp > 0) { \ - SPLAY_RIGHT(elm, field) = SPLAY_RIGHT((head)->sph_root, field); \ - SPLAY_LEFT(elm, field) = (head)->sph_root; \ - SPLAY_RIGHT((head)->sph_root, field) = NULL; \ - } else \ - return ((head)->sph_root); \ - } \ - (head)->sph_root = (elm); \ - return (NULL); \ -} \ - \ -struct type * \ -name##_SPLAY_REMOVE(struct name *head, struct type *elm) \ -{ \ - struct type *__tmp; \ - if (SPLAY_EMPTY(head)) \ - return (NULL); \ - name##_SPLAY(head, elm); \ - if ((cmp)(elm, (head)->sph_root) == 0) { \ - if (SPLAY_LEFT((head)->sph_root, field) == NULL) { \ - (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \ - } else { \ - __tmp = SPLAY_RIGHT((head)->sph_root, field); \ - (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \ - name##_SPLAY(head, elm); \ - SPLAY_RIGHT((head)->sph_root, field) = __tmp; \ - } \ - return (elm); \ - } \ - return (NULL); \ -} \ - \ -void \ -name##_SPLAY(struct name *head, struct type *elm) \ -{ \ - struct type __node, *__left, *__right, *__tmp; \ - int __comp; \ - \ - SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL; \ - __left = __right = &__node; \ - \ - while ((__comp = (cmp)(elm, (head)->sph_root)) != 0) { \ - if (__comp < 0) { \ - __tmp = SPLAY_LEFT((head)->sph_root, field); \ - if (__tmp == NULL) \ - break; \ - if ((cmp)(elm, __tmp) < 0){ \ - SPLAY_ROTATE_RIGHT(head, __tmp, field); \ - if (SPLAY_LEFT((head)->sph_root, field) == NULL) \ - break; \ - } \ - SPLAY_LINKLEFT(head, __right, field); \ - } else if (__comp > 0) { \ - __tmp = SPLAY_RIGHT((head)->sph_root, field); \ - if (__tmp == NULL) \ - break; \ - if ((cmp)(elm, __tmp) > 0){ \ - SPLAY_ROTATE_LEFT(head, __tmp, field); \ - if (SPLAY_RIGHT((head)->sph_root, field) == NULL) \ - break; \ - } \ - SPLAY_LINKRIGHT(head, __left, field); \ - } \ - } \ - SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ -} \ - \ -/* Splay with either the minimum or the maximum element \ - * Used to find minimum or maximum element in tree. \ - */ \ -void name##_SPLAY_MINMAX(struct name *head, int __comp) \ -{ \ - struct type __node, *__left, *__right, *__tmp; \ - \ - SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL; \ - __left = __right = &__node; \ - \ - while (1) { \ - if (__comp < 0) { \ - __tmp = SPLAY_LEFT((head)->sph_root, field); \ - if (__tmp == NULL) \ - break; \ - if (__comp < 0){ \ - SPLAY_ROTATE_RIGHT(head, __tmp, field); \ - if (SPLAY_LEFT((head)->sph_root, field) == NULL) \ - break; \ - } \ - SPLAY_LINKLEFT(head, __right, field); \ - } else if (__comp > 0) { \ - __tmp = SPLAY_RIGHT((head)->sph_root, field); \ - if (__tmp == NULL) \ - break; \ - if (__comp > 0) { \ - SPLAY_ROTATE_LEFT(head, __tmp, field); \ - if (SPLAY_RIGHT((head)->sph_root, field) == NULL) \ - break; \ - } \ - SPLAY_LINKRIGHT(head, __left, field); \ - } \ - } \ - SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ -} - -#define SPLAY_NEGINF -1 -#define SPLAY_INF 1 - -#define SPLAY_INSERT(name, x, y) name##_SPLAY_INSERT(x, y) -#define SPLAY_REMOVE(name, x, y) name##_SPLAY_REMOVE(x, y) -#define SPLAY_FIND(name, x, y) name##_SPLAY_FIND(x, y) -#define SPLAY_NEXT(name, x, y) name##_SPLAY_NEXT(x, y) -#define SPLAY_MIN(name, x) (SPLAY_EMPTY(x) ? NULL \ - : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF)) -#define SPLAY_MAX(name, x) (SPLAY_EMPTY(x) ? NULL \ - : name##_SPLAY_MIN_MAX(x, SPLAY_INF)) - -#define SPLAY_FOREACH(x, name, head) \ - for ((x) = SPLAY_MIN(name, head); \ - (x) != NULL; \ - (x) = SPLAY_NEXT(name, head, x)) - -/* Macros that define a red-black tree */ -#define RB_HEAD(name, type) \ -struct name { \ - struct type *rbh_root; /* root of the tree */ \ -} - -#define RB_INITIALIZER(root) \ - { NULL } - -#define RB_INIT(root) do { \ - (root)->rbh_root = NULL; \ -} while (/*CONSTCOND*/ 0) - -#define RB_BLACK 0 -#define RB_RED 1 -#define RB_ENTRY(type) \ -struct { \ - struct type *rbe_left; /* left element */ \ - struct type *rbe_right; /* right element */ \ - struct type *rbe_parent; /* parent element */ \ - int rbe_color; /* node color */ \ -} - -#define RB_LEFT(elm, field) (elm)->field.rbe_left -#define RB_RIGHT(elm, field) (elm)->field.rbe_right -#define RB_PARENT(elm, field) (elm)->field.rbe_parent -#define RB_COLOR(elm, field) (elm)->field.rbe_color -#define RB_ROOT(head) (head)->rbh_root -#define RB_EMPTY(head) (RB_ROOT(head) == NULL) - -#define RB_SET(elm, parent, field) do { \ - RB_PARENT(elm, field) = parent; \ - RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL; \ - RB_COLOR(elm, field) = RB_RED; \ -} while (/*CONSTCOND*/ 0) - -#define RB_SET_BLACKRED(black, red, field) do { \ - RB_COLOR(black, field) = RB_BLACK; \ - RB_COLOR(red, field) = RB_RED; \ -} while (/*CONSTCOND*/ 0) - -#ifndef RB_AUGMENT -#define RB_AUGMENT(x) do {} while (0) -#endif - -#define RB_ROTATE_LEFT(head, elm, tmp, field) do { \ - (tmp) = RB_RIGHT(elm, field); \ - if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field)) != NULL) { \ - RB_PARENT(RB_LEFT(tmp, field), field) = (elm); \ - } \ - RB_AUGMENT(elm); \ - if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \ - if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ - RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ - else \ - RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ - } else \ - (head)->rbh_root = (tmp); \ - RB_LEFT(tmp, field) = (elm); \ - RB_PARENT(elm, field) = (tmp); \ - RB_AUGMENT(tmp); \ - if ((RB_PARENT(tmp, field))) \ - RB_AUGMENT(RB_PARENT(tmp, field)); \ -} while (/*CONSTCOND*/ 0) - -#define RB_ROTATE_RIGHT(head, elm, tmp, field) do { \ - (tmp) = RB_LEFT(elm, field); \ - if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field)) != NULL) { \ - RB_PARENT(RB_RIGHT(tmp, field), field) = (elm); \ - } \ - RB_AUGMENT(elm); \ - if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \ - if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ - RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ - else \ - RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ - } else \ - (head)->rbh_root = (tmp); \ - RB_RIGHT(tmp, field) = (elm); \ - RB_PARENT(elm, field) = (tmp); \ - RB_AUGMENT(tmp); \ - if ((RB_PARENT(tmp, field))) \ - RB_AUGMENT(RB_PARENT(tmp, field)); \ -} while (/*CONSTCOND*/ 0) - -/* Generates prototypes and inline functions */ -#define RB_PROTOTYPE(name, type, field, cmp) \ - RB_PROTOTYPE_INTERNAL(name, type, field, cmp,) -#define RB_PROTOTYPE_STATIC(name, type, field, cmp) \ - RB_PROTOTYPE_INTERNAL(name, type, field, cmp, UV__UNUSED static) -#define RB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr) \ -attr void name##_RB_INSERT_COLOR(struct name *, struct type *); \ -attr void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *);\ -attr struct type *name##_RB_REMOVE(struct name *, struct type *); \ -attr struct type *name##_RB_INSERT(struct name *, struct type *); \ -attr struct type *name##_RB_FIND(struct name *, struct type *); \ -attr struct type *name##_RB_NFIND(struct name *, struct type *); \ -attr struct type *name##_RB_NEXT(struct type *); \ -attr struct type *name##_RB_PREV(struct type *); \ -attr struct type *name##_RB_MINMAX(struct name *, int); \ - \ - -/* Main rb operation. - * Moves node close to the key of elm to top - */ -#define RB_GENERATE(name, type, field, cmp) \ - RB_GENERATE_INTERNAL(name, type, field, cmp,) -#define RB_GENERATE_STATIC(name, type, field, cmp) \ - RB_GENERATE_INTERNAL(name, type, field, cmp, UV__UNUSED static) -#define RB_GENERATE_INTERNAL(name, type, field, cmp, attr) \ -attr void \ -name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \ -{ \ - struct type *parent, *gparent, *tmp; \ - while ((parent = RB_PARENT(elm, field)) != NULL && \ - RB_COLOR(parent, field) == RB_RED) { \ - gparent = RB_PARENT(parent, field); \ - if (parent == RB_LEFT(gparent, field)) { \ - tmp = RB_RIGHT(gparent, field); \ - if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ - RB_COLOR(tmp, field) = RB_BLACK; \ - RB_SET_BLACKRED(parent, gparent, field); \ - elm = gparent; \ - continue; \ - } \ - if (RB_RIGHT(parent, field) == elm) { \ - RB_ROTATE_LEFT(head, parent, tmp, field); \ - tmp = parent; \ - parent = elm; \ - elm = tmp; \ - } \ - RB_SET_BLACKRED(parent, gparent, field); \ - RB_ROTATE_RIGHT(head, gparent, tmp, field); \ - } else { \ - tmp = RB_LEFT(gparent, field); \ - if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ - RB_COLOR(tmp, field) = RB_BLACK; \ - RB_SET_BLACKRED(parent, gparent, field); \ - elm = gparent; \ - continue; \ - } \ - if (RB_LEFT(parent, field) == elm) { \ - RB_ROTATE_RIGHT(head, parent, tmp, field); \ - tmp = parent; \ - parent = elm; \ - elm = tmp; \ - } \ - RB_SET_BLACKRED(parent, gparent, field); \ - RB_ROTATE_LEFT(head, gparent, tmp, field); \ - } \ - } \ - RB_COLOR(head->rbh_root, field) = RB_BLACK; \ -} \ - \ -attr void \ -name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, \ - struct type *elm) \ -{ \ - struct type *tmp; \ - while ((elm == NULL || RB_COLOR(elm, field) == RB_BLACK) && \ - elm != RB_ROOT(head)) { \ - if (RB_LEFT(parent, field) == elm) { \ - tmp = RB_RIGHT(parent, field); \ - if (RB_COLOR(tmp, field) == RB_RED) { \ - RB_SET_BLACKRED(tmp, parent, field); \ - RB_ROTATE_LEFT(head, parent, tmp, field); \ - tmp = RB_RIGHT(parent, field); \ - } \ - if ((RB_LEFT(tmp, field) == NULL || \ - RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) && \ - (RB_RIGHT(tmp, field) == NULL || \ - RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) { \ - RB_COLOR(tmp, field) = RB_RED; \ - elm = parent; \ - parent = RB_PARENT(elm, field); \ - } else { \ - if (RB_RIGHT(tmp, field) == NULL || \ - RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK) { \ - struct type *oleft; \ - if ((oleft = RB_LEFT(tmp, field)) \ - != NULL) \ - RB_COLOR(oleft, field) = RB_BLACK; \ - RB_COLOR(tmp, field) = RB_RED; \ - RB_ROTATE_RIGHT(head, tmp, oleft, field); \ - tmp = RB_RIGHT(parent, field); \ - } \ - RB_COLOR(tmp, field) = RB_COLOR(parent, field); \ - RB_COLOR(parent, field) = RB_BLACK; \ - if (RB_RIGHT(tmp, field)) \ - RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK; \ - RB_ROTATE_LEFT(head, parent, tmp, field); \ - elm = RB_ROOT(head); \ - break; \ - } \ - } else { \ - tmp = RB_LEFT(parent, field); \ - if (RB_COLOR(tmp, field) == RB_RED) { \ - RB_SET_BLACKRED(tmp, parent, field); \ - RB_ROTATE_RIGHT(head, parent, tmp, field); \ - tmp = RB_LEFT(parent, field); \ - } \ - if ((RB_LEFT(tmp, field) == NULL || \ - RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) && \ - (RB_RIGHT(tmp, field) == NULL || \ - RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) { \ - RB_COLOR(tmp, field) = RB_RED; \ - elm = parent; \ - parent = RB_PARENT(elm, field); \ - } else { \ - if (RB_LEFT(tmp, field) == NULL || \ - RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) { \ - struct type *oright; \ - if ((oright = RB_RIGHT(tmp, field)) \ - != NULL) \ - RB_COLOR(oright, field) = RB_BLACK; \ - RB_COLOR(tmp, field) = RB_RED; \ - RB_ROTATE_LEFT(head, tmp, oright, field); \ - tmp = RB_LEFT(parent, field); \ - } \ - RB_COLOR(tmp, field) = RB_COLOR(parent, field); \ - RB_COLOR(parent, field) = RB_BLACK; \ - if (RB_LEFT(tmp, field)) \ - RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK; \ - RB_ROTATE_RIGHT(head, parent, tmp, field); \ - elm = RB_ROOT(head); \ - break; \ - } \ - } \ - } \ - if (elm) \ - RB_COLOR(elm, field) = RB_BLACK; \ -} \ - \ -attr struct type * \ -name##_RB_REMOVE(struct name *head, struct type *elm) \ -{ \ - struct type *child, *parent, *old = elm; \ - int color; \ - if (RB_LEFT(elm, field) == NULL) \ - child = RB_RIGHT(elm, field); \ - else if (RB_RIGHT(elm, field) == NULL) \ - child = RB_LEFT(elm, field); \ - else { \ - struct type *left; \ - elm = RB_RIGHT(elm, field); \ - while ((left = RB_LEFT(elm, field)) != NULL) \ - elm = left; \ - child = RB_RIGHT(elm, field); \ - parent = RB_PARENT(elm, field); \ - color = RB_COLOR(elm, field); \ - if (child) \ - RB_PARENT(child, field) = parent; \ - if (parent) { \ - if (RB_LEFT(parent, field) == elm) \ - RB_LEFT(parent, field) = child; \ - else \ - RB_RIGHT(parent, field) = child; \ - RB_AUGMENT(parent); \ - } else \ - RB_ROOT(head) = child; \ - if (RB_PARENT(elm, field) == old) \ - parent = elm; \ - (elm)->field = (old)->field; \ - if (RB_PARENT(old, field)) { \ - if (RB_LEFT(RB_PARENT(old, field), field) == old) \ - RB_LEFT(RB_PARENT(old, field), field) = elm; \ - else \ - RB_RIGHT(RB_PARENT(old, field), field) = elm; \ - RB_AUGMENT(RB_PARENT(old, field)); \ - } else \ - RB_ROOT(head) = elm; \ - RB_PARENT(RB_LEFT(old, field), field) = elm; \ - if (RB_RIGHT(old, field)) \ - RB_PARENT(RB_RIGHT(old, field), field) = elm; \ - if (parent) { \ - left = parent; \ - do { \ - RB_AUGMENT(left); \ - } while ((left = RB_PARENT(left, field)) != NULL); \ - } \ - goto color; \ - } \ - parent = RB_PARENT(elm, field); \ - color = RB_COLOR(elm, field); \ - if (child) \ - RB_PARENT(child, field) = parent; \ - if (parent) { \ - if (RB_LEFT(parent, field) == elm) \ - RB_LEFT(parent, field) = child; \ - else \ - RB_RIGHT(parent, field) = child; \ - RB_AUGMENT(parent); \ - } else \ - RB_ROOT(head) = child; \ -color: \ - if (color == RB_BLACK) \ - name##_RB_REMOVE_COLOR(head, parent, child); \ - return (old); \ -} \ - \ -/* Inserts a node into the RB tree */ \ -attr struct type * \ -name##_RB_INSERT(struct name *head, struct type *elm) \ -{ \ - struct type *tmp; \ - struct type *parent = NULL; \ - int comp = 0; \ - tmp = RB_ROOT(head); \ - while (tmp) { \ - parent = tmp; \ - comp = (cmp)(elm, parent); \ - if (comp < 0) \ - tmp = RB_LEFT(tmp, field); \ - else if (comp > 0) \ - tmp = RB_RIGHT(tmp, field); \ - else \ - return (tmp); \ - } \ - RB_SET(elm, parent, field); \ - if (parent != NULL) { \ - if (comp < 0) \ - RB_LEFT(parent, field) = elm; \ - else \ - RB_RIGHT(parent, field) = elm; \ - RB_AUGMENT(parent); \ - } else \ - RB_ROOT(head) = elm; \ - name##_RB_INSERT_COLOR(head, elm); \ - return (NULL); \ -} \ - \ -/* Finds the node with the same key as elm */ \ -attr struct type * \ -name##_RB_FIND(struct name *head, struct type *elm) \ -{ \ - struct type *tmp = RB_ROOT(head); \ - int comp; \ - while (tmp) { \ - comp = cmp(elm, tmp); \ - if (comp < 0) \ - tmp = RB_LEFT(tmp, field); \ - else if (comp > 0) \ - tmp = RB_RIGHT(tmp, field); \ - else \ - return (tmp); \ - } \ - return (NULL); \ -} \ - \ -/* Finds the first node greater than or equal to the search key */ \ -attr struct type * \ -name##_RB_NFIND(struct name *head, struct type *elm) \ -{ \ - struct type *tmp = RB_ROOT(head); \ - struct type *res = NULL; \ - int comp; \ - while (tmp) { \ - comp = cmp(elm, tmp); \ - if (comp < 0) { \ - res = tmp; \ - tmp = RB_LEFT(tmp, field); \ - } \ - else if (comp > 0) \ - tmp = RB_RIGHT(tmp, field); \ - else \ - return (tmp); \ - } \ - return (res); \ -} \ - \ -/* ARGSUSED */ \ -attr struct type * \ -name##_RB_NEXT(struct type *elm) \ -{ \ - if (RB_RIGHT(elm, field)) { \ - elm = RB_RIGHT(elm, field); \ - while (RB_LEFT(elm, field)) \ - elm = RB_LEFT(elm, field); \ - } else { \ - if (RB_PARENT(elm, field) && \ - (elm == RB_LEFT(RB_PARENT(elm, field), field))) \ - elm = RB_PARENT(elm, field); \ - else { \ - while (RB_PARENT(elm, field) && \ - (elm == RB_RIGHT(RB_PARENT(elm, field), field))) \ - elm = RB_PARENT(elm, field); \ - elm = RB_PARENT(elm, field); \ - } \ - } \ - return (elm); \ -} \ - \ -/* ARGSUSED */ \ -attr struct type * \ -name##_RB_PREV(struct type *elm) \ -{ \ - if (RB_LEFT(elm, field)) { \ - elm = RB_LEFT(elm, field); \ - while (RB_RIGHT(elm, field)) \ - elm = RB_RIGHT(elm, field); \ - } else { \ - if (RB_PARENT(elm, field) && \ - (elm == RB_RIGHT(RB_PARENT(elm, field), field))) \ - elm = RB_PARENT(elm, field); \ - else { \ - while (RB_PARENT(elm, field) && \ - (elm == RB_LEFT(RB_PARENT(elm, field), field))) \ - elm = RB_PARENT(elm, field); \ - elm = RB_PARENT(elm, field); \ - } \ - } \ - return (elm); \ -} \ - \ -attr struct type * \ -name##_RB_MINMAX(struct name *head, int val) \ -{ \ - struct type *tmp = RB_ROOT(head); \ - struct type *parent = NULL; \ - while (tmp) { \ - parent = tmp; \ - if (val < 0) \ - tmp = RB_LEFT(tmp, field); \ - else \ - tmp = RB_RIGHT(tmp, field); \ - } \ - return (parent); \ -} - -#define RB_NEGINF -1 -#define RB_INF 1 - -#define RB_INSERT(name, x, y) name##_RB_INSERT(x, y) -#define RB_REMOVE(name, x, y) name##_RB_REMOVE(x, y) -#define RB_FIND(name, x, y) name##_RB_FIND(x, y) -#define RB_NFIND(name, x, y) name##_RB_NFIND(x, y) -#define RB_NEXT(name, x, y) name##_RB_NEXT(y) -#define RB_PREV(name, x, y) name##_RB_PREV(y) -#define RB_MIN(name, x) name##_RB_MINMAX(x, RB_NEGINF) -#define RB_MAX(name, x) name##_RB_MINMAX(x, RB_INF) - -#define RB_FOREACH(x, name, head) \ - for ((x) = RB_MIN(name, head); \ - (x) != NULL; \ - (x) = name##_RB_NEXT(x)) - -#define RB_FOREACH_FROM(x, name, y) \ - for ((x) = (y); \ - ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); \ - (x) = (y)) - -#define RB_FOREACH_SAFE(x, name, head, y) \ - for ((x) = RB_MIN(name, head); \ - ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); \ - (x) = (y)) - -#define RB_FOREACH_REVERSE(x, name, head) \ - for ((x) = RB_MAX(name, head); \ - (x) != NULL; \ - (x) = name##_RB_PREV(x)) - -#define RB_FOREACH_REVERSE_FROM(x, name, y) \ - for ((x) = (y); \ - ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \ - (x) = (y)) - -#define RB_FOREACH_REVERSE_SAFE(x, name, head, y) \ - for ((x) = RB_MAX(name, head); \ - ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \ - (x) = (y)) - -#endif /* UV_TREE_H_ */ diff --git a/emscripten/include/uv/uv/unix.h b/emscripten/include/uv/uv/unix.h deleted file mode 100644 index 74a0d643..00000000 --- a/emscripten/include/uv/uv/unix.h +++ /dev/null @@ -1,464 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -#ifndef UV_UNIX_H -#define UV_UNIX_H - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -#if !defined(__MVS__) -#include -#endif -#include -#include - -#include "uv/threadpool.h" - -#if defined(__linux__) -# include "uv/linux.h" -#elif defined (__MVS__) -# include "uv/os390.h" -#elif defined(__PASE__) -# include "uv/posix.h" -#elif defined(_AIX) -# include "uv/aix.h" -#elif defined(__sun) -# include "uv/sunos.h" -#elif defined(__APPLE__) -# include "uv/darwin.h" -#elif defined(__DragonFly__) || \ - defined(__FreeBSD__) || \ - defined(__FreeBSD_kernel__) || \ - defined(__OpenBSD__) || \ - defined(__NetBSD__) -# include "uv/bsd.h" -#elif defined(__CYGWIN__) || defined(__MSYS__) -# include "uv/posix.h" -#endif - -#ifndef PTHREAD_BARRIER_SERIAL_THREAD -# include "uv/pthread-barrier.h" -#endif - -#ifndef NI_MAXHOST -# define NI_MAXHOST 1025 -#endif - -#ifndef NI_MAXSERV -# define NI_MAXSERV 32 -#endif - -#ifndef UV_IO_PRIVATE_PLATFORM_FIELDS -# define UV_IO_PRIVATE_PLATFORM_FIELDS /* empty */ -#endif - -struct uv__io_s; -struct uv_loop_s; - -typedef void (*uv__io_cb)(struct uv_loop_s* loop, - struct uv__io_s* w, - unsigned int events); -typedef struct uv__io_s uv__io_t; - -struct uv__io_s { - uv__io_cb cb; - void* pending_queue[2]; - void* watcher_queue[2]; - unsigned int pevents; /* Pending event mask i.e. mask at next tick. */ - unsigned int events; /* Current event mask. */ - int fd; - UV_IO_PRIVATE_PLATFORM_FIELDS -}; - -#ifndef UV_PLATFORM_SEM_T -# define UV_PLATFORM_SEM_T sem_t -#endif - -#ifndef UV_PLATFORM_LOOP_FIELDS -# define UV_PLATFORM_LOOP_FIELDS /* empty */ -#endif - -#ifndef UV_PLATFORM_FS_EVENT_FIELDS -# define UV_PLATFORM_FS_EVENT_FIELDS /* empty */ -#endif - -#ifndef UV_STREAM_PRIVATE_PLATFORM_FIELDS -# define UV_STREAM_PRIVATE_PLATFORM_FIELDS /* empty */ -#endif - -/* Note: May be cast to struct iovec. See writev(2). */ -typedef struct uv_buf_t { - char* base; - size_t len; -} uv_buf_t; - -typedef int uv_file; -typedef int uv_os_sock_t; -typedef int uv_os_fd_t; -typedef pid_t uv_pid_t; - -#define UV_ONCE_INIT PTHREAD_ONCE_INIT - -typedef pthread_once_t uv_once_t; -typedef pthread_t uv_thread_t; -typedef pthread_mutex_t uv_mutex_t; -typedef pthread_rwlock_t uv_rwlock_t; -typedef UV_PLATFORM_SEM_T uv_sem_t; -typedef pthread_cond_t uv_cond_t; -typedef pthread_key_t uv_key_t; -typedef pthread_barrier_t uv_barrier_t; - - -/* Platform-specific definitions for uv_spawn support. */ -typedef gid_t uv_gid_t; -typedef uid_t uv_uid_t; - -typedef struct dirent uv__dirent_t; - -#if defined(DT_UNKNOWN) -# define HAVE_DIRENT_TYPES -# if defined(DT_REG) -# define UV__DT_FILE DT_REG -# else -# define UV__DT_FILE -1 -# endif -# if defined(DT_DIR) -# define UV__DT_DIR DT_DIR -# else -# define UV__DT_DIR -2 -# endif -# if defined(DT_LNK) -# define UV__DT_LINK DT_LNK -# else -# define UV__DT_LINK -3 -# endif -# if defined(DT_FIFO) -# define UV__DT_FIFO DT_FIFO -# else -# define UV__DT_FIFO -4 -# endif -# if defined(DT_SOCK) -# define UV__DT_SOCKET DT_SOCK -# else -# define UV__DT_SOCKET -5 -# endif -# if defined(DT_CHR) -# define UV__DT_CHAR DT_CHR -# else -# define UV__DT_CHAR -6 -# endif -# if defined(DT_BLK) -# define UV__DT_BLOCK DT_BLK -# else -# define UV__DT_BLOCK -7 -# endif -#endif - -/* Platform-specific definitions for uv_dlopen support. */ -#define UV_DYNAMIC /* empty */ - -typedef struct { - void* handle; - char* errmsg; -} uv_lib_t; - -#define UV_LOOP_PRIVATE_FIELDS \ - unsigned long flags; \ - int backend_fd; \ - void* pending_queue[2]; \ - void* watcher_queue[2]; \ - uv__io_t** watchers; \ - unsigned int nwatchers; \ - unsigned int nfds; \ - void* wq[2]; \ - uv_mutex_t wq_mutex; \ - uv_async_t wq_async; \ - uv_rwlock_t cloexec_lock; \ - uv_handle_t* closing_handles; \ - void* process_handles[2]; \ - void* prepare_handles[2]; \ - void* check_handles[2]; \ - void* idle_handles[2]; \ - void* async_handles[2]; \ - void (*async_unused)(void); /* TODO(bnoordhuis) Remove in libuv v2. */ \ - uv__io_t async_io_watcher; \ - int async_wfd; \ - struct { \ - void* min; \ - unsigned int nelts; \ - } timer_heap; \ - uint64_t timer_counter; \ - uint64_t time; \ - int signal_pipefd[2]; \ - uv__io_t signal_io_watcher; \ - uv_signal_t child_watcher; \ - int emfile_fd; \ - UV_PLATFORM_LOOP_FIELDS \ - -#define UV_REQ_TYPE_PRIVATE /* empty */ - -#define UV_REQ_PRIVATE_FIELDS /* empty */ - -#define UV_PRIVATE_REQ_TYPES /* empty */ - -#define UV_WRITE_PRIVATE_FIELDS \ - void* queue[2]; \ - unsigned int write_index; \ - uv_buf_t* bufs; \ - unsigned int nbufs; \ - int error; \ - uv_buf_t bufsml[4]; \ - -#define UV_CONNECT_PRIVATE_FIELDS \ - void* queue[2]; \ - -#define UV_SHUTDOWN_PRIVATE_FIELDS /* empty */ - -#define UV_UDP_SEND_PRIVATE_FIELDS \ - void* queue[2]; \ - struct sockaddr_storage addr; \ - unsigned int nbufs; \ - uv_buf_t* bufs; \ - ssize_t status; \ - uv_udp_send_cb send_cb; \ - uv_buf_t bufsml[4]; \ - -#define UV_HANDLE_PRIVATE_FIELDS \ - uv_handle_t* next_closing; \ - unsigned int flags; \ - -#define UV_STREAM_PRIVATE_FIELDS \ - uv_connect_t *connect_req; \ - uv_shutdown_t *shutdown_req; \ - uv__io_t io_watcher; \ - void* write_queue[2]; \ - void* write_completed_queue[2]; \ - uv_connection_cb connection_cb; \ - int delayed_error; \ - int accepted_fd; \ - void* queued_fds; \ - UV_STREAM_PRIVATE_PLATFORM_FIELDS \ - -#define UV_TCP_PRIVATE_FIELDS /* empty */ - -#define UV_UDP_PRIVATE_FIELDS \ - uv_alloc_cb alloc_cb; \ - uv_udp_recv_cb recv_cb; \ - uv__io_t io_watcher; \ - void* write_queue[2]; \ - void* write_completed_queue[2]; \ - -#define UV_PIPE_PRIVATE_FIELDS \ - const char* pipe_fname; /* strdup'ed */ - -#define UV_POLL_PRIVATE_FIELDS \ - uv__io_t io_watcher; - -#define UV_PREPARE_PRIVATE_FIELDS \ - uv_prepare_cb prepare_cb; \ - void* queue[2]; \ - -#define UV_CHECK_PRIVATE_FIELDS \ - uv_check_cb check_cb; \ - void* queue[2]; \ - -#define UV_IDLE_PRIVATE_FIELDS \ - uv_idle_cb idle_cb; \ - void* queue[2]; \ - -#define UV_ASYNC_PRIVATE_FIELDS \ - uv_async_cb async_cb; \ - void* queue[2]; \ - int pending; \ - -#define UV_TIMER_PRIVATE_FIELDS \ - uv_timer_cb timer_cb; \ - void* heap_node[3]; \ - uint64_t timeout; \ - uint64_t repeat; \ - uint64_t start_id; - -#define UV_GETADDRINFO_PRIVATE_FIELDS \ - struct uv__work work_req; \ - uv_getaddrinfo_cb cb; \ - struct addrinfo* hints; \ - char* hostname; \ - char* service; \ - struct addrinfo* addrinfo; \ - int retcode; - -#define UV_GETNAMEINFO_PRIVATE_FIELDS \ - struct uv__work work_req; \ - uv_getnameinfo_cb getnameinfo_cb; \ - struct sockaddr_storage storage; \ - int flags; \ - char host[NI_MAXHOST]; \ - char service[NI_MAXSERV]; \ - int retcode; - -#define UV_PROCESS_PRIVATE_FIELDS \ - void* queue[2]; \ - int status; \ - -#define UV_FS_PRIVATE_FIELDS \ - const char *new_path; \ - uv_file file; \ - int flags; \ - mode_t mode; \ - unsigned int nbufs; \ - uv_buf_t* bufs; \ - off_t off; \ - uv_uid_t uid; \ - uv_gid_t gid; \ - double atime; \ - double mtime; \ - struct uv__work work_req; \ - uv_buf_t bufsml[4]; \ - -#define UV_WORK_PRIVATE_FIELDS \ - struct uv__work work_req; - -#define UV_TTY_PRIVATE_FIELDS \ - struct termios orig_termios; \ - int mode; - -#define UV_SIGNAL_PRIVATE_FIELDS \ - /* RB_ENTRY(uv_signal_s) tree_entry; */ \ - struct { \ - struct uv_signal_s* rbe_left; \ - struct uv_signal_s* rbe_right; \ - struct uv_signal_s* rbe_parent; \ - int rbe_color; \ - } tree_entry; \ - /* Use two counters here so we don have to fiddle with atomics. */ \ - unsigned int caught_signals; \ - unsigned int dispatched_signals; - -#define UV_FS_EVENT_PRIVATE_FIELDS \ - uv_fs_event_cb cb; \ - UV_PLATFORM_FS_EVENT_FIELDS \ - -/* fs open() flags supported on this platform: */ -#if defined(O_APPEND) -# define UV_FS_O_APPEND O_APPEND -#else -# define UV_FS_O_APPEND 0 -#endif -#if defined(O_CREAT) -# define UV_FS_O_CREAT O_CREAT -#else -# define UV_FS_O_CREAT 0 -#endif -#if defined(O_DIRECT) -# define UV_FS_O_DIRECT O_DIRECT -#else -# define UV_FS_O_DIRECT 0 -#endif -#if defined(O_DIRECTORY) -# define UV_FS_O_DIRECTORY O_DIRECTORY -#else -# define UV_FS_O_DIRECTORY 0 -#endif -#if defined(O_DSYNC) -# define UV_FS_O_DSYNC O_DSYNC -#else -# define UV_FS_O_DSYNC 0 -#endif -#if defined(O_EXCL) -# define UV_FS_O_EXCL O_EXCL -#else -# define UV_FS_O_EXCL 0 -#endif -#if defined(O_EXLOCK) -# define UV_FS_O_EXLOCK O_EXLOCK -#else -# define UV_FS_O_EXLOCK 0 -#endif -#if defined(O_NOATIME) -# define UV_FS_O_NOATIME O_NOATIME -#else -# define UV_FS_O_NOATIME 0 -#endif -#if defined(O_NOCTTY) -# define UV_FS_O_NOCTTY O_NOCTTY -#else -# define UV_FS_O_NOCTTY 0 -#endif -#if defined(O_NOFOLLOW) -# define UV_FS_O_NOFOLLOW O_NOFOLLOW -#else -# define UV_FS_O_NOFOLLOW 0 -#endif -#if defined(O_NONBLOCK) -# define UV_FS_O_NONBLOCK O_NONBLOCK -#else -# define UV_FS_O_NONBLOCK 0 -#endif -#if defined(O_RDONLY) -# define UV_FS_O_RDONLY O_RDONLY -#else -# define UV_FS_O_RDONLY 0 -#endif -#if defined(O_RDWR) -# define UV_FS_O_RDWR O_RDWR -#else -# define UV_FS_O_RDWR 0 -#endif -#if defined(O_SYMLINK) -# define UV_FS_O_SYMLINK O_SYMLINK -#else -# define UV_FS_O_SYMLINK 0 -#endif -#if defined(O_SYNC) -# define UV_FS_O_SYNC O_SYNC -#else -# define UV_FS_O_SYNC 0 -#endif -#if defined(O_TRUNC) -# define UV_FS_O_TRUNC O_TRUNC -#else -# define UV_FS_O_TRUNC 0 -#endif -#if defined(O_WRONLY) -# define UV_FS_O_WRONLY O_WRONLY -#else -# define UV_FS_O_WRONLY 0 -#endif - -/* fs open() flags supported on other platforms: */ -#define UV_FS_O_RANDOM 0 -#define UV_FS_O_SHORT_LIVED 0 -#define UV_FS_O_SEQUENTIAL 0 -#define UV_FS_O_TEMPORARY 0 - -#endif /* UV_UNIX_H */ diff --git a/emscripten/include/uv/uv/version.h b/emscripten/include/uv/uv/version.h deleted file mode 100644 index 805cd3ba..00000000 --- a/emscripten/include/uv/uv/version.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -#ifndef UV_VERSION_H -#define UV_VERSION_H - - /* - * Versions with the same major number are ABI stable. API is allowed to - * evolve between minor releases, but only in a backwards compatible way. - * Make sure you update the -soname directives in configure.ac - * and uv.gyp whenever you bump UV_VERSION_MAJOR or UV_VERSION_MINOR (but - * not UV_VERSION_PATCH.) - */ - -#define UV_VERSION_MAJOR 1 -#define UV_VERSION_MINOR 23 -#define UV_VERSION_PATCH 1 -#define UV_VERSION_IS_RELEASE 0 -#define UV_VERSION_SUFFIX "dev" - -#define UV_VERSION_HEX ((UV_VERSION_MAJOR << 16) | \ - (UV_VERSION_MINOR << 8) | \ - (UV_VERSION_PATCH)) - -#endif /* UV_VERSION_H */ diff --git a/emscripten/include/uv/uv/win.h b/emscripten/include/uv/uv/win.h deleted file mode 100644 index 13b52d2a..00000000 --- a/emscripten/include/uv/uv/win.h +++ /dev/null @@ -1,676 +0,0 @@ -/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -#ifndef _WIN32_WINNT -# define _WIN32_WINNT 0x0600 -#endif - -#if !defined(_SSIZE_T_) && !defined(_SSIZE_T_DEFINED) && !defined(__SSIZE_T) -typedef intptr_t ssize_t; -# define _SSIZE_T_ -# define _SSIZE_T_DEFINED -#endif - -#include - -#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) -typedef struct pollfd { - SOCKET fd; - short events; - short revents; -} WSAPOLLFD, *PWSAPOLLFD, *LPWSAPOLLFD; -#endif - -#ifndef LOCALE_INVARIANT -# define LOCALE_INVARIANT 0x007f -#endif - -#include -#include -#include - -#include -#include -#include -#include - -#if defined(_MSC_VER) && _MSC_VER < 1600 -# include "uv/stdint-msvc2008.h" -#else -# include -#endif - -#include "uv/tree.h" -#include "uv/threadpool.h" - -#define MAX_PIPENAME_LEN 256 - -#ifndef S_IFLNK -# define S_IFLNK 0xA000 -#endif - -/* Additional signals supported by uv_signal and or uv_kill. The CRT defines - * the following signals already: - * - * #define SIGINT 2 - * #define SIGILL 4 - * #define SIGABRT_COMPAT 6 - * #define SIGFPE 8 - * #define SIGSEGV 11 - * #define SIGTERM 15 - * #define SIGBREAK 21 - * #define SIGABRT 22 - * - * The additional signals have values that are common on other Unix - * variants (Linux and Darwin) - */ -#define SIGHUP 1 -#define SIGKILL 9 -#define SIGWINCH 28 - -/* The CRT defines SIGABRT_COMPAT as 6, which equals SIGABRT on many unix-like - * platforms. However MinGW doesn't define it, so we do. */ -#ifndef SIGABRT_COMPAT -# define SIGABRT_COMPAT 6 -#endif - -/* - * Guids and typedefs for winsock extension functions - * Mingw32 doesn't have these :-( - */ -#ifndef WSAID_ACCEPTEX -# define WSAID_ACCEPTEX \ - {0xb5367df1, 0xcbac, 0x11cf, \ - {0x95, 0xca, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92}} - -# define WSAID_CONNECTEX \ - {0x25a207b9, 0xddf3, 0x4660, \ - {0x8e, 0xe9, 0x76, 0xe5, 0x8c, 0x74, 0x06, 0x3e}} - -# define WSAID_GETACCEPTEXSOCKADDRS \ - {0xb5367df2, 0xcbac, 0x11cf, \ - {0x95, 0xca, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92}} - -# define WSAID_DISCONNECTEX \ - {0x7fda2e11, 0x8630, 0x436f, \ - {0xa0, 0x31, 0xf5, 0x36, 0xa6, 0xee, 0xc1, 0x57}} - -# define WSAID_TRANSMITFILE \ - {0xb5367df0, 0xcbac, 0x11cf, \ - {0x95, 0xca, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92}} - - typedef BOOL (PASCAL *LPFN_ACCEPTEX) - (SOCKET sListenSocket, - SOCKET sAcceptSocket, - PVOID lpOutputBuffer, - DWORD dwReceiveDataLength, - DWORD dwLocalAddressLength, - DWORD dwRemoteAddressLength, - LPDWORD lpdwBytesReceived, - LPOVERLAPPED lpOverlapped); - - typedef BOOL (PASCAL *LPFN_CONNECTEX) - (SOCKET s, - const struct sockaddr* name, - int namelen, - PVOID lpSendBuffer, - DWORD dwSendDataLength, - LPDWORD lpdwBytesSent, - LPOVERLAPPED lpOverlapped); - - typedef void (PASCAL *LPFN_GETACCEPTEXSOCKADDRS) - (PVOID lpOutputBuffer, - DWORD dwReceiveDataLength, - DWORD dwLocalAddressLength, - DWORD dwRemoteAddressLength, - LPSOCKADDR* LocalSockaddr, - LPINT LocalSockaddrLength, - LPSOCKADDR* RemoteSockaddr, - LPINT RemoteSockaddrLength); - - typedef BOOL (PASCAL *LPFN_DISCONNECTEX) - (SOCKET hSocket, - LPOVERLAPPED lpOverlapped, - DWORD dwFlags, - DWORD reserved); - - typedef BOOL (PASCAL *LPFN_TRANSMITFILE) - (SOCKET hSocket, - HANDLE hFile, - DWORD nNumberOfBytesToWrite, - DWORD nNumberOfBytesPerSend, - LPOVERLAPPED lpOverlapped, - LPTRANSMIT_FILE_BUFFERS lpTransmitBuffers, - DWORD dwFlags); - - typedef PVOID RTL_SRWLOCK; - typedef RTL_SRWLOCK SRWLOCK, *PSRWLOCK; -#endif - -typedef int (WSAAPI* LPFN_WSARECV) - (SOCKET socket, - LPWSABUF buffers, - DWORD buffer_count, - LPDWORD bytes, - LPDWORD flags, - LPWSAOVERLAPPED overlapped, - LPWSAOVERLAPPED_COMPLETION_ROUTINE completion_routine); - -typedef int (WSAAPI* LPFN_WSARECVFROM) - (SOCKET socket, - LPWSABUF buffers, - DWORD buffer_count, - LPDWORD bytes, - LPDWORD flags, - struct sockaddr* addr, - LPINT addr_len, - LPWSAOVERLAPPED overlapped, - LPWSAOVERLAPPED_COMPLETION_ROUTINE completion_routine); - -#ifndef _NTDEF_ - typedef LONG NTSTATUS; - typedef NTSTATUS *PNTSTATUS; -#endif - -#ifndef RTL_CONDITION_VARIABLE_INIT - typedef PVOID CONDITION_VARIABLE, *PCONDITION_VARIABLE; -#endif - -typedef struct _AFD_POLL_HANDLE_INFO { - HANDLE Handle; - ULONG Events; - NTSTATUS Status; -} AFD_POLL_HANDLE_INFO, *PAFD_POLL_HANDLE_INFO; - -typedef struct _AFD_POLL_INFO { - LARGE_INTEGER Timeout; - ULONG NumberOfHandles; - ULONG Exclusive; - AFD_POLL_HANDLE_INFO Handles[1]; -} AFD_POLL_INFO, *PAFD_POLL_INFO; - -#define UV_MSAFD_PROVIDER_COUNT 3 - - -/** - * It should be possible to cast uv_buf_t[] to WSABUF[] - * see http://msdn.microsoft.com/en-us/library/ms741542(v=vs.85).aspx - */ -typedef struct uv_buf_t { - ULONG len; - char* base; -} uv_buf_t; - -typedef int uv_file; -typedef SOCKET uv_os_sock_t; -typedef HANDLE uv_os_fd_t; -typedef int uv_pid_t; - -typedef HANDLE uv_thread_t; - -typedef HANDLE uv_sem_t; - -typedef CRITICAL_SECTION uv_mutex_t; - -/* This condition variable implementation is based on the SetEvent solution - * (section 3.2) at http://www.cs.wustl.edu/~schmidt/win32-cv-1.html - * We could not use the SignalObjectAndWait solution (section 3.4) because - * it want the 2nd argument (type uv_mutex_t) of uv_cond_wait() and - * uv_cond_timedwait() to be HANDLEs, but we use CRITICAL_SECTIONs. - */ - -typedef union { - CONDITION_VARIABLE cond_var; - struct { - unsigned int waiters_count; - CRITICAL_SECTION waiters_count_lock; - HANDLE signal_event; - HANDLE broadcast_event; - } unused_; /* TODO: retained for ABI compatibility; remove me in v2.x. */ -} uv_cond_t; - -typedef union { - struct { - unsigned int num_readers_; - CRITICAL_SECTION num_readers_lock_; - HANDLE write_semaphore_; - } state_; - /* TODO: remove me in v2.x. */ - struct { - SRWLOCK unused_; - } unused1_; - /* TODO: remove me in v2.x. */ - struct { - uv_mutex_t unused1_; - uv_mutex_t unused2_; - } unused2_; -} uv_rwlock_t; - -typedef struct { - unsigned int n; - unsigned int count; - uv_mutex_t mutex; - uv_sem_t turnstile1; - uv_sem_t turnstile2; -} uv_barrier_t; - -typedef struct { - DWORD tls_index; -} uv_key_t; - -#define UV_ONCE_INIT { 0, NULL } - -typedef struct uv_once_s { - unsigned char ran; - HANDLE event; -} uv_once_t; - -/* Platform-specific definitions for uv_spawn support. */ -typedef unsigned char uv_uid_t; -typedef unsigned char uv_gid_t; - -typedef struct uv__dirent_s { - int d_type; - char d_name[1]; -} uv__dirent_t; - -#define HAVE_DIRENT_TYPES -#define UV__DT_DIR UV_DIRENT_DIR -#define UV__DT_FILE UV_DIRENT_FILE -#define UV__DT_LINK UV_DIRENT_LINK -#define UV__DT_FIFO UV_DIRENT_FIFO -#define UV__DT_SOCKET UV_DIRENT_SOCKET -#define UV__DT_CHAR UV_DIRENT_CHAR -#define UV__DT_BLOCK UV_DIRENT_BLOCK - -/* Platform-specific definitions for uv_dlopen support. */ -#define UV_DYNAMIC FAR WINAPI -typedef struct { - HMODULE handle; - char* errmsg; -} uv_lib_t; - -#define UV_LOOP_PRIVATE_FIELDS \ - /* The loop's I/O completion port */ \ - HANDLE iocp; \ - /* The current time according to the event loop. in msecs. */ \ - uint64_t time; \ - /* Tail of a single-linked circular queue of pending reqs. If the queue */ \ - /* is empty, tail_ is NULL. If there is only one item, */ \ - /* tail_->next_req == tail_ */ \ - uv_req_t* pending_reqs_tail; \ - /* Head of a single-linked list of closed handles */ \ - uv_handle_t* endgame_handles; \ - /* TODO(bnoordhuis) Stop heap-allocating |timer_heap| in libuv v2.x. */ \ - void* timer_heap; \ - /* Lists of active loop (prepare / check / idle) watchers */ \ - uv_prepare_t* prepare_handles; \ - uv_check_t* check_handles; \ - uv_idle_t* idle_handles; \ - /* This pointer will refer to the prepare/check/idle handle whose */ \ - /* callback is scheduled to be called next. This is needed to allow */ \ - /* safe removal from one of the lists above while that list being */ \ - /* iterated over. */ \ - uv_prepare_t* next_prepare_handle; \ - uv_check_t* next_check_handle; \ - uv_idle_t* next_idle_handle; \ - /* This handle holds the peer sockets for the fast variant of uv_poll_t */ \ - SOCKET poll_peer_sockets[UV_MSAFD_PROVIDER_COUNT]; \ - /* Counter to keep track of active tcp streams */ \ - unsigned int active_tcp_streams; \ - /* Counter to keep track of active udp streams */ \ - unsigned int active_udp_streams; \ - /* Counter to started timer */ \ - uint64_t timer_counter; \ - /* Threadpool */ \ - void* wq[2]; \ - uv_mutex_t wq_mutex; \ - uv_async_t wq_async; - -#define UV_REQ_TYPE_PRIVATE \ - /* TODO: remove the req suffix */ \ - UV_ACCEPT, \ - UV_FS_EVENT_REQ, \ - UV_POLL_REQ, \ - UV_PROCESS_EXIT, \ - UV_READ, \ - UV_UDP_RECV, \ - UV_WAKEUP, \ - UV_SIGNAL_REQ, - -#define UV_REQ_PRIVATE_FIELDS \ - union { \ - /* Used by I/O operations */ \ - struct { \ - OVERLAPPED overlapped; \ - size_t queued_bytes; \ - } io; \ - } u; \ - struct uv_req_s* next_req; - -#define UV_WRITE_PRIVATE_FIELDS \ - int coalesced; \ - uv_buf_t write_buffer; \ - HANDLE event_handle; \ - HANDLE wait_handle; - -#define UV_CONNECT_PRIVATE_FIELDS \ - /* empty */ - -#define UV_SHUTDOWN_PRIVATE_FIELDS \ - /* empty */ - -#define UV_UDP_SEND_PRIVATE_FIELDS \ - /* empty */ - -#define UV_PRIVATE_REQ_TYPES \ - typedef struct uv_pipe_accept_s { \ - UV_REQ_FIELDS \ - HANDLE pipeHandle; \ - struct uv_pipe_accept_s* next_pending; \ - } uv_pipe_accept_t; \ - \ - typedef struct uv_tcp_accept_s { \ - UV_REQ_FIELDS \ - SOCKET accept_socket; \ - char accept_buffer[sizeof(struct sockaddr_storage) * 2 + 32]; \ - HANDLE event_handle; \ - HANDLE wait_handle; \ - struct uv_tcp_accept_s* next_pending; \ - } uv_tcp_accept_t; \ - \ - typedef struct uv_read_s { \ - UV_REQ_FIELDS \ - HANDLE event_handle; \ - HANDLE wait_handle; \ - } uv_read_t; - -#define uv_stream_connection_fields \ - unsigned int write_reqs_pending; \ - uv_shutdown_t* shutdown_req; - -#define uv_stream_server_fields \ - uv_connection_cb connection_cb; - -#define UV_STREAM_PRIVATE_FIELDS \ - unsigned int reqs_pending; \ - int activecnt; \ - uv_read_t read_req; \ - union { \ - struct { uv_stream_connection_fields } conn; \ - struct { uv_stream_server_fields } serv; \ - } stream; - -#define uv_tcp_server_fields \ - uv_tcp_accept_t* accept_reqs; \ - unsigned int processed_accepts; \ - uv_tcp_accept_t* pending_accepts; \ - LPFN_ACCEPTEX func_acceptex; - -#define uv_tcp_connection_fields \ - uv_buf_t read_buffer; \ - LPFN_CONNECTEX func_connectex; - -#define UV_TCP_PRIVATE_FIELDS \ - SOCKET socket; \ - int delayed_error; \ - union { \ - struct { uv_tcp_server_fields } serv; \ - struct { uv_tcp_connection_fields } conn; \ - } tcp; - -#define UV_UDP_PRIVATE_FIELDS \ - SOCKET socket; \ - unsigned int reqs_pending; \ - int activecnt; \ - uv_req_t recv_req; \ - uv_buf_t recv_buffer; \ - struct sockaddr_storage recv_from; \ - int recv_from_len; \ - uv_udp_recv_cb recv_cb; \ - uv_alloc_cb alloc_cb; \ - LPFN_WSARECV func_wsarecv; \ - LPFN_WSARECVFROM func_wsarecvfrom; - -#define uv_pipe_server_fields \ - int pending_instances; \ - uv_pipe_accept_t* accept_reqs; \ - uv_pipe_accept_t* pending_accepts; - -#define uv_pipe_connection_fields \ - uv_timer_t* eof_timer; \ - uv_write_t dummy; /* TODO: retained for ABI compat; remove this in v2.x. */ \ - DWORD ipc_remote_pid; \ - union { \ - uint32_t payload_remaining; \ - uint64_t dummy; /* TODO: retained for ABI compat; remove this in v2.x. */ \ - } ipc_data_frame; \ - void* ipc_xfer_queue[2]; \ - int ipc_xfer_queue_length; \ - uv_write_t* non_overlapped_writes_tail; \ - CRITICAL_SECTION readfile_thread_lock; \ - volatile HANDLE readfile_thread_handle; - -#define UV_PIPE_PRIVATE_FIELDS \ - HANDLE handle; \ - WCHAR* name; \ - union { \ - struct { uv_pipe_server_fields } serv; \ - struct { uv_pipe_connection_fields } conn; \ - } pipe; - -/* TODO: put the parser states in an union - TTY handles are always half-duplex - * so read-state can safely overlap write-state. */ -#define UV_TTY_PRIVATE_FIELDS \ - HANDLE handle; \ - union { \ - struct { \ - /* Used for readable TTY handles */ \ - /* TODO: remove me in v2.x. */ \ - HANDLE unused_; \ - uv_buf_t read_line_buffer; \ - HANDLE read_raw_wait; \ - /* Fields used for translating win keystrokes into vt100 characters */ \ - char last_key[8]; \ - unsigned char last_key_offset; \ - unsigned char last_key_len; \ - WCHAR last_utf16_high_surrogate; \ - INPUT_RECORD last_input_record; \ - } rd; \ - struct { \ - /* Used for writable TTY handles */ \ - /* utf8-to-utf16 conversion state */ \ - unsigned int utf8_codepoint; \ - unsigned char utf8_bytes_left; \ - /* eol conversion state */ \ - unsigned char previous_eol; \ - /* ansi parser state */ \ - unsigned char ansi_parser_state; \ - unsigned char ansi_csi_argc; \ - unsigned short ansi_csi_argv[4]; \ - COORD saved_position; \ - WORD saved_attributes; \ - } wr; \ - } tty; - -#define UV_POLL_PRIVATE_FIELDS \ - SOCKET socket; \ - /* Used in fast mode */ \ - SOCKET peer_socket; \ - AFD_POLL_INFO afd_poll_info_1; \ - AFD_POLL_INFO afd_poll_info_2; \ - /* Used in fast and slow mode. */ \ - uv_req_t poll_req_1; \ - uv_req_t poll_req_2; \ - unsigned char submitted_events_1; \ - unsigned char submitted_events_2; \ - unsigned char mask_events_1; \ - unsigned char mask_events_2; \ - unsigned char events; - -#define UV_TIMER_PRIVATE_FIELDS \ - void* heap_node[3]; \ - int unused; \ - uint64_t timeout; \ - uint64_t repeat; \ - uint64_t start_id; \ - uv_timer_cb timer_cb; - -#define UV_ASYNC_PRIVATE_FIELDS \ - struct uv_req_s async_req; \ - uv_async_cb async_cb; \ - /* char to avoid alignment issues */ \ - char volatile async_sent; - -#define UV_PREPARE_PRIVATE_FIELDS \ - uv_prepare_t* prepare_prev; \ - uv_prepare_t* prepare_next; \ - uv_prepare_cb prepare_cb; - -#define UV_CHECK_PRIVATE_FIELDS \ - uv_check_t* check_prev; \ - uv_check_t* check_next; \ - uv_check_cb check_cb; - -#define UV_IDLE_PRIVATE_FIELDS \ - uv_idle_t* idle_prev; \ - uv_idle_t* idle_next; \ - uv_idle_cb idle_cb; - -#define UV_HANDLE_PRIVATE_FIELDS \ - uv_handle_t* endgame_next; \ - unsigned int flags; - -#define UV_GETADDRINFO_PRIVATE_FIELDS \ - struct uv__work work_req; \ - uv_getaddrinfo_cb getaddrinfo_cb; \ - void* alloc; \ - WCHAR* node; \ - WCHAR* service; \ - /* The addrinfoW field is used to store a pointer to the hints, and */ \ - /* later on to store the result of GetAddrInfoW. The final result will */ \ - /* be converted to struct addrinfo* and stored in the addrinfo field. */ \ - struct addrinfoW* addrinfow; \ - struct addrinfo* addrinfo; \ - int retcode; - -#define UV_GETNAMEINFO_PRIVATE_FIELDS \ - struct uv__work work_req; \ - uv_getnameinfo_cb getnameinfo_cb; \ - struct sockaddr_storage storage; \ - int flags; \ - char host[NI_MAXHOST]; \ - char service[NI_MAXSERV]; \ - int retcode; - -#define UV_PROCESS_PRIVATE_FIELDS \ - struct uv_process_exit_s { \ - UV_REQ_FIELDS \ - } exit_req; \ - BYTE* child_stdio_buffer; \ - int exit_signal; \ - HANDLE wait_handle; \ - HANDLE process_handle; \ - volatile char exit_cb_pending; - -#define UV_FS_PRIVATE_FIELDS \ - struct uv__work work_req; \ - int flags; \ - DWORD sys_errno_; \ - union { \ - /* TODO: remove me in 0.9. */ \ - WCHAR* pathw; \ - int fd; \ - } file; \ - union { \ - struct { \ - int mode; \ - WCHAR* new_pathw; \ - int file_flags; \ - int fd_out; \ - unsigned int nbufs; \ - uv_buf_t* bufs; \ - int64_t offset; \ - uv_buf_t bufsml[4]; \ - } info; \ - struct { \ - double atime; \ - double mtime; \ - } time; \ - } fs; - -#define UV_WORK_PRIVATE_FIELDS \ - struct uv__work work_req; - -#define UV_FS_EVENT_PRIVATE_FIELDS \ - struct uv_fs_event_req_s { \ - UV_REQ_FIELDS \ - } req; \ - HANDLE dir_handle; \ - int req_pending; \ - uv_fs_event_cb cb; \ - WCHAR* filew; \ - WCHAR* short_filew; \ - WCHAR* dirw; \ - char* buffer; - -#define UV_SIGNAL_PRIVATE_FIELDS \ - RB_ENTRY(uv_signal_s) tree_entry; \ - struct uv_req_s signal_req; \ - unsigned long pending_signum; - -#ifndef F_OK -#define F_OK 0 -#endif -#ifndef R_OK -#define R_OK 4 -#endif -#ifndef W_OK -#define W_OK 2 -#endif -#ifndef X_OK -#define X_OK 1 -#endif - -/* fs open() flags supported on this platform: */ -#define UV_FS_O_APPEND _O_APPEND -#define UV_FS_O_CREAT _O_CREAT -#define UV_FS_O_EXCL _O_EXCL -#define UV_FS_O_RANDOM _O_RANDOM -#define UV_FS_O_RDONLY _O_RDONLY -#define UV_FS_O_RDWR _O_RDWR -#define UV_FS_O_SEQUENTIAL _O_SEQUENTIAL -#define UV_FS_O_SHORT_LIVED _O_SHORT_LIVED -#define UV_FS_O_TEMPORARY _O_TEMPORARY -#define UV_FS_O_TRUNC _O_TRUNC -#define UV_FS_O_WRONLY _O_WRONLY - -/* fs open() flags supported on other platforms (or mapped on this platform): */ -#define UV_FS_O_DIRECT 0x02000000 /* FILE_FLAG_NO_BUFFERING */ -#define UV_FS_O_DIRECTORY 0 -#define UV_FS_O_DSYNC 0x04000000 /* FILE_FLAG_WRITE_THROUGH */ -#define UV_FS_O_EXLOCK 0x10000000 /* EXCLUSIVE SHARING MODE */ -#define UV_FS_O_NOATIME 0 -#define UV_FS_O_NOCTTY 0 -#define UV_FS_O_NOFOLLOW 0 -#define UV_FS_O_NONBLOCK 0 -#define UV_FS_O_SYMLINK 0 -#define UV_FS_O_SYNC 0x08000000 /* FILE_FLAG_WRITE_THROUGH */ diff --git a/emscripten/include/webgpu/webgpu.h b/emscripten/include/webgpu/webgpu.h deleted file mode 100644 index d78cf605..00000000 --- a/emscripten/include/webgpu/webgpu.h +++ /dev/null @@ -1,1343 +0,0 @@ -// BSD 3-Clause License -// -// Copyright (c) 2019, "WebGPU native" developers -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifndef WEBGPU_H_ -#define WEBGPU_H_ - -#if defined(WGPU_SHARED_LIBRARY) -# if defined(_WIN32) -# if defined(WGPU_IMPLEMENTATION) -# define WGPU_EXPORT __declspec(dllexport) -# else -# define WGPU_EXPORT __declspec(dllimport) -# endif -# else // defined(_WIN32) -# if defined(WGPU_IMPLEMENTATION) -# define WGPU_EXPORT __attribute__((visibility("default"))) -# else -# define WGPU_EXPORT -# endif -# endif // defined(_WIN32) -#else // defined(WGPU_SHARED_LIBRARY) -# define WGPU_EXPORT -#endif // defined(WGPU_SHARED_LIBRARY) - -#include -#include -#include - -#define WGPU_WHOLE_SIZE (0xffffffffffffffffULL) -// TODO(crbug.com/520): Remove WGPU_STRIDE_UNDEFINED in favor of WGPU_COPY_STRIDE_UNDEFINED. -#define WGPU_STRIDE_UNDEFINED (0xffffffffUL) -#define WGPU_COPY_STRIDE_UNDEFINED (0xffffffffUL) - -typedef uint32_t WGPUFlags; - -typedef struct WGPUAdapterImpl* WGPUAdapter; -typedef struct WGPUBindGroupImpl* WGPUBindGroup; -typedef struct WGPUBindGroupLayoutImpl* WGPUBindGroupLayout; -typedef struct WGPUBufferImpl* WGPUBuffer; -typedef struct WGPUCommandBufferImpl* WGPUCommandBuffer; -typedef struct WGPUCommandEncoderImpl* WGPUCommandEncoder; -typedef struct WGPUComputePassEncoderImpl* WGPUComputePassEncoder; -typedef struct WGPUComputePipelineImpl* WGPUComputePipeline; -typedef struct WGPUDeviceImpl* WGPUDevice; -typedef struct WGPUInstanceImpl* WGPUInstance; -typedef struct WGPUPipelineLayoutImpl* WGPUPipelineLayout; -typedef struct WGPUQuerySetImpl* WGPUQuerySet; -typedef struct WGPUQueueImpl* WGPUQueue; -typedef struct WGPURenderBundleImpl* WGPURenderBundle; -typedef struct WGPURenderBundleEncoderImpl* WGPURenderBundleEncoder; -typedef struct WGPURenderPassEncoderImpl* WGPURenderPassEncoder; -typedef struct WGPURenderPipelineImpl* WGPURenderPipeline; -typedef struct WGPUSamplerImpl* WGPUSampler; -typedef struct WGPUShaderModuleImpl* WGPUShaderModule; -typedef struct WGPUSurfaceImpl* WGPUSurface; -typedef struct WGPUSwapChainImpl* WGPUSwapChain; -typedef struct WGPUTextureImpl* WGPUTexture; -typedef struct WGPUTextureViewImpl* WGPUTextureView; - -typedef enum WGPUAdapterType { - WGPUAdapterType_DiscreteGPU = 0x00000000, - WGPUAdapterType_IntegratedGPU = 0x00000001, - WGPUAdapterType_CPU = 0x00000002, - WGPUAdapterType_Unknown = 0x00000003, - WGPUAdapterType_Force32 = 0x7FFFFFFF -} WGPUAdapterType; - -typedef enum WGPUAddressMode { - WGPUAddressMode_Repeat = 0x00000000, - WGPUAddressMode_MirrorRepeat = 0x00000001, - WGPUAddressMode_ClampToEdge = 0x00000002, - WGPUAddressMode_Force32 = 0x7FFFFFFF -} WGPUAddressMode; - -typedef enum WGPUBackendType { - WGPUBackendType_Null = 0x00000000, - WGPUBackendType_D3D11 = 0x00000001, - WGPUBackendType_D3D12 = 0x00000002, - WGPUBackendType_Metal = 0x00000003, - WGPUBackendType_Vulkan = 0x00000004, - WGPUBackendType_OpenGL = 0x00000005, - WGPUBackendType_OpenGLES = 0x00000006, - WGPUBackendType_Force32 = 0x7FFFFFFF -} WGPUBackendType; - -typedef enum WGPUBindingType { - WGPUBindingType_Undefined = 0x00000000, - WGPUBindingType_UniformBuffer = 0x00000001, - WGPUBindingType_StorageBuffer = 0x00000002, - WGPUBindingType_ReadonlyStorageBuffer = 0x00000003, - WGPUBindingType_Sampler = 0x00000004, - WGPUBindingType_ComparisonSampler = 0x00000005, - WGPUBindingType_SampledTexture = 0x00000006, - WGPUBindingType_MultisampledTexture = 0x00000007, - WGPUBindingType_ReadonlyStorageTexture = 0x00000008, - WGPUBindingType_WriteonlyStorageTexture = 0x00000009, - WGPUBindingType_Force32 = 0x7FFFFFFF -} WGPUBindingType; - -typedef enum WGPUBlendFactor { - WGPUBlendFactor_Zero = 0x00000000, - WGPUBlendFactor_One = 0x00000001, - WGPUBlendFactor_Src = 0x00000002, - WGPUBlendFactor_OneMinusSrc = 0x00000003, - WGPUBlendFactor_SrcAlpha = 0x00000004, - WGPUBlendFactor_OneMinusSrcAlpha = 0x00000005, - WGPUBlendFactor_Dst = 0x00000006, - WGPUBlendFactor_OneMinusDst = 0x00000007, - WGPUBlendFactor_DstAlpha = 0x00000008, - WGPUBlendFactor_OneMinusDstAlpha = 0x00000009, - WGPUBlendFactor_SrcAlphaSaturated = 0x0000000A, - WGPUBlendFactor_Constant = 0x0000000B, - WGPUBlendFactor_OneMinusConstant = 0x0000000C, - WGPUBlendFactor_Force32 = 0x7FFFFFFF -} WGPUBlendFactor; - -typedef enum WGPUBlendOperation { - WGPUBlendOperation_Add = 0x00000000, - WGPUBlendOperation_Subtract = 0x00000001, - WGPUBlendOperation_ReverseSubtract = 0x00000002, - WGPUBlendOperation_Min = 0x00000003, - WGPUBlendOperation_Max = 0x00000004, - WGPUBlendOperation_Force32 = 0x7FFFFFFF -} WGPUBlendOperation; - -typedef enum WGPUBufferBindingType { - WGPUBufferBindingType_Undefined = 0x00000000, - WGPUBufferBindingType_Uniform = 0x00000001, - WGPUBufferBindingType_Storage = 0x00000002, - WGPUBufferBindingType_ReadOnlyStorage = 0x00000003, - WGPUBufferBindingType_Force32 = 0x7FFFFFFF -} WGPUBufferBindingType; - -typedef enum WGPUBufferMapAsyncStatus { - WGPUBufferMapAsyncStatus_Success = 0x00000000, - WGPUBufferMapAsyncStatus_Error = 0x00000001, - WGPUBufferMapAsyncStatus_Unknown = 0x00000002, - WGPUBufferMapAsyncStatus_DeviceLost = 0x00000003, - WGPUBufferMapAsyncStatus_DestroyedBeforeCallback = 0x00000004, - WGPUBufferMapAsyncStatus_UnmappedBeforeCallback = 0x00000005, - WGPUBufferMapAsyncStatus_Force32 = 0x7FFFFFFF -} WGPUBufferMapAsyncStatus; - -typedef enum WGPUCompareFunction { - WGPUCompareFunction_Undefined = 0x00000000, - WGPUCompareFunction_Never = 0x00000001, - WGPUCompareFunction_Less = 0x00000002, - WGPUCompareFunction_LessEqual = 0x00000003, - WGPUCompareFunction_Greater = 0x00000004, - WGPUCompareFunction_GreaterEqual = 0x00000005, - WGPUCompareFunction_Equal = 0x00000006, - WGPUCompareFunction_NotEqual = 0x00000007, - WGPUCompareFunction_Always = 0x00000008, - WGPUCompareFunction_Force32 = 0x7FFFFFFF -} WGPUCompareFunction; - -typedef enum WGPUCreatePipelineAsyncStatus { - WGPUCreatePipelineAsyncStatus_Success = 0x00000000, - WGPUCreatePipelineAsyncStatus_Error = 0x00000001, - WGPUCreatePipelineAsyncStatus_DeviceLost = 0x00000002, - WGPUCreatePipelineAsyncStatus_DeviceDestroyed = 0x00000003, - WGPUCreatePipelineAsyncStatus_Unknown = 0x00000004, - WGPUCreatePipelineAsyncStatus_Force32 = 0x7FFFFFFF -} WGPUCreatePipelineAsyncStatus; - -typedef enum WGPUCullMode { - WGPUCullMode_None = 0x00000000, - WGPUCullMode_Front = 0x00000001, - WGPUCullMode_Back = 0x00000002, - WGPUCullMode_Force32 = 0x7FFFFFFF -} WGPUCullMode; - -typedef enum WGPUErrorFilter { - WGPUErrorFilter_None = 0x00000000, - WGPUErrorFilter_Validation = 0x00000001, - WGPUErrorFilter_OutOfMemory = 0x00000002, - WGPUErrorFilter_Force32 = 0x7FFFFFFF -} WGPUErrorFilter; - -typedef enum WGPUErrorType { - WGPUErrorType_NoError = 0x00000000, - WGPUErrorType_Validation = 0x00000001, - WGPUErrorType_OutOfMemory = 0x00000002, - WGPUErrorType_Unknown = 0x00000003, - WGPUErrorType_DeviceLost = 0x00000004, - WGPUErrorType_Force32 = 0x7FFFFFFF -} WGPUErrorType; - -typedef enum WGPUFilterMode { - WGPUFilterMode_Nearest = 0x00000000, - WGPUFilterMode_Linear = 0x00000001, - WGPUFilterMode_Force32 = 0x7FFFFFFF -} WGPUFilterMode; - -typedef enum WGPUFrontFace { - WGPUFrontFace_CCW = 0x00000000, - WGPUFrontFace_CW = 0x00000001, - WGPUFrontFace_Force32 = 0x7FFFFFFF -} WGPUFrontFace; - -typedef enum WGPUIndexFormat { - WGPUIndexFormat_Undefined = 0x00000000, - WGPUIndexFormat_Uint16 = 0x00000001, - WGPUIndexFormat_Uint32 = 0x00000002, - WGPUIndexFormat_Force32 = 0x7FFFFFFF -} WGPUIndexFormat; - -typedef enum WGPUInputStepMode { - WGPUInputStepMode_Vertex = 0x00000000, - WGPUInputStepMode_Instance = 0x00000001, - WGPUInputStepMode_Force32 = 0x7FFFFFFF -} WGPUInputStepMode; - -typedef enum WGPULoadOp { - WGPULoadOp_Clear = 0x00000000, - WGPULoadOp_Load = 0x00000001, - WGPULoadOp_Force32 = 0x7FFFFFFF -} WGPULoadOp; - -typedef enum WGPUPipelineStatisticName { - WGPUPipelineStatisticName_VertexShaderInvocations = 0x00000000, - WGPUPipelineStatisticName_ClipperInvocations = 0x00000001, - WGPUPipelineStatisticName_ClipperPrimitivesOut = 0x00000002, - WGPUPipelineStatisticName_FragmentShaderInvocations = 0x00000003, - WGPUPipelineStatisticName_ComputeShaderInvocations = 0x00000004, - WGPUPipelineStatisticName_Force32 = 0x7FFFFFFF -} WGPUPipelineStatisticName; - -typedef enum WGPUPresentMode { - WGPUPresentMode_Immediate = 0x00000000, - WGPUPresentMode_Mailbox = 0x00000001, - WGPUPresentMode_Fifo = 0x00000002, - WGPUPresentMode_Force32 = 0x7FFFFFFF -} WGPUPresentMode; - -typedef enum WGPUPrimitiveTopology { - WGPUPrimitiveTopology_PointList = 0x00000000, - WGPUPrimitiveTopology_LineList = 0x00000001, - WGPUPrimitiveTopology_LineStrip = 0x00000002, - WGPUPrimitiveTopology_TriangleList = 0x00000003, - WGPUPrimitiveTopology_TriangleStrip = 0x00000004, - WGPUPrimitiveTopology_Force32 = 0x7FFFFFFF -} WGPUPrimitiveTopology; - -typedef enum WGPUQueryType { - WGPUQueryType_Occlusion = 0x00000000, - WGPUQueryType_PipelineStatistics = 0x00000001, - WGPUQueryType_Timestamp = 0x00000002, - WGPUQueryType_Force32 = 0x7FFFFFFF -} WGPUQueryType; - -typedef enum WGPUQueueWorkDoneStatus { - WGPUQueueWorkDoneStatus_Success = 0x00000000, - WGPUQueueWorkDoneStatus_Error = 0x00000001, - WGPUQueueWorkDoneStatus_Unknown = 0x00000002, - WGPUQueueWorkDoneStatus_DeviceLost = 0x00000003, - WGPUQueueWorkDoneStatus_Force32 = 0x7FFFFFFF -} WGPUQueueWorkDoneStatus; - -typedef enum WGPUSType { - WGPUSType_Invalid = 0x00000000, - WGPUSType_SurfaceDescriptorFromMetalLayer = 0x00000001, - WGPUSType_SurfaceDescriptorFromWindowsHWND = 0x00000002, - WGPUSType_SurfaceDescriptorFromXlib = 0x00000003, - WGPUSType_SurfaceDescriptorFromCanvasHTMLSelector = 0x00000004, - WGPUSType_ShaderModuleSPIRVDescriptor = 0x00000005, - WGPUSType_ShaderModuleWGSLDescriptor = 0x00000006, - WGPUSType_PrimitiveDepthClampingState = 0x00000007, - WGPUSType_Force32 = 0x7FFFFFFF -} WGPUSType; - -typedef enum WGPUSamplerBindingType { - WGPUSamplerBindingType_Undefined = 0x00000000, - WGPUSamplerBindingType_Filtering = 0x00000001, - WGPUSamplerBindingType_NonFiltering = 0x00000002, - WGPUSamplerBindingType_Comparison = 0x00000003, - WGPUSamplerBindingType_Force32 = 0x7FFFFFFF -} WGPUSamplerBindingType; - -typedef enum WGPUStencilOperation { - WGPUStencilOperation_Keep = 0x00000000, - WGPUStencilOperation_Zero = 0x00000001, - WGPUStencilOperation_Replace = 0x00000002, - WGPUStencilOperation_Invert = 0x00000003, - WGPUStencilOperation_IncrementClamp = 0x00000004, - WGPUStencilOperation_DecrementClamp = 0x00000005, - WGPUStencilOperation_IncrementWrap = 0x00000006, - WGPUStencilOperation_DecrementWrap = 0x00000007, - WGPUStencilOperation_Force32 = 0x7FFFFFFF -} WGPUStencilOperation; - -typedef enum WGPUStorageTextureAccess { - WGPUStorageTextureAccess_Undefined = 0x00000000, - WGPUStorageTextureAccess_ReadOnly = 0x00000001, - WGPUStorageTextureAccess_WriteOnly = 0x00000002, - WGPUStorageTextureAccess_Force32 = 0x7FFFFFFF -} WGPUStorageTextureAccess; - -typedef enum WGPUStoreOp { - WGPUStoreOp_Store = 0x00000000, - WGPUStoreOp_Clear = 0x00000001, - WGPUStoreOp_Force32 = 0x7FFFFFFF -} WGPUStoreOp; - -typedef enum WGPUTextureAspect { - WGPUTextureAspect_All = 0x00000000, - WGPUTextureAspect_StencilOnly = 0x00000001, - WGPUTextureAspect_DepthOnly = 0x00000002, - WGPUTextureAspect_Force32 = 0x7FFFFFFF -} WGPUTextureAspect; - -typedef enum WGPUTextureComponentType { - WGPUTextureComponentType_Float = 0x00000000, - WGPUTextureComponentType_Sint = 0x00000001, - WGPUTextureComponentType_Uint = 0x00000002, - WGPUTextureComponentType_DepthComparison = 0x00000003, - WGPUTextureComponentType_Force32 = 0x7FFFFFFF -} WGPUTextureComponentType; - -typedef enum WGPUTextureDimension { - WGPUTextureDimension_1D = 0x00000000, - WGPUTextureDimension_2D = 0x00000001, - WGPUTextureDimension_3D = 0x00000002, - WGPUTextureDimension_Force32 = 0x7FFFFFFF -} WGPUTextureDimension; - -typedef enum WGPUTextureFormat { - WGPUTextureFormat_Undefined = 0x00000000, - WGPUTextureFormat_R8Unorm = 0x00000001, - WGPUTextureFormat_R8Snorm = 0x00000002, - WGPUTextureFormat_R8Uint = 0x00000003, - WGPUTextureFormat_R8Sint = 0x00000004, - WGPUTextureFormat_R16Uint = 0x00000005, - WGPUTextureFormat_R16Sint = 0x00000006, - WGPUTextureFormat_R16Float = 0x00000007, - WGPUTextureFormat_RG8Unorm = 0x00000008, - WGPUTextureFormat_RG8Snorm = 0x00000009, - WGPUTextureFormat_RG8Uint = 0x0000000A, - WGPUTextureFormat_RG8Sint = 0x0000000B, - WGPUTextureFormat_R32Float = 0x0000000C, - WGPUTextureFormat_R32Uint = 0x0000000D, - WGPUTextureFormat_R32Sint = 0x0000000E, - WGPUTextureFormat_RG16Uint = 0x0000000F, - WGPUTextureFormat_RG16Sint = 0x00000010, - WGPUTextureFormat_RG16Float = 0x00000011, - WGPUTextureFormat_RGBA8Unorm = 0x00000012, - WGPUTextureFormat_RGBA8UnormSrgb = 0x00000013, - WGPUTextureFormat_RGBA8Snorm = 0x00000014, - WGPUTextureFormat_RGBA8Uint = 0x00000015, - WGPUTextureFormat_RGBA8Sint = 0x00000016, - WGPUTextureFormat_BGRA8Unorm = 0x00000017, - WGPUTextureFormat_BGRA8UnormSrgb = 0x00000018, - WGPUTextureFormat_RGB10A2Unorm = 0x00000019, - WGPUTextureFormat_RG11B10Ufloat = 0x0000001A, - WGPUTextureFormat_RGB9E5Ufloat = 0x0000001B, - WGPUTextureFormat_RG32Float = 0x0000001C, - WGPUTextureFormat_RG32Uint = 0x0000001D, - WGPUTextureFormat_RG32Sint = 0x0000001E, - WGPUTextureFormat_RGBA16Uint = 0x0000001F, - WGPUTextureFormat_RGBA16Sint = 0x00000020, - WGPUTextureFormat_RGBA16Float = 0x00000021, - WGPUTextureFormat_RGBA32Float = 0x00000022, - WGPUTextureFormat_RGBA32Uint = 0x00000023, - WGPUTextureFormat_RGBA32Sint = 0x00000024, - WGPUTextureFormat_Depth32Float = 0x00000025, - WGPUTextureFormat_Depth24Plus = 0x00000026, - WGPUTextureFormat_Stencil8 = 0x00000027, - WGPUTextureFormat_Depth24PlusStencil8 = 0x00000028, - WGPUTextureFormat_BC1RGBAUnorm = 0x00000029, - WGPUTextureFormat_BC1RGBAUnormSrgb = 0x0000002A, - WGPUTextureFormat_BC2RGBAUnorm = 0x0000002B, - WGPUTextureFormat_BC2RGBAUnormSrgb = 0x0000002C, - WGPUTextureFormat_BC3RGBAUnorm = 0x0000002D, - WGPUTextureFormat_BC3RGBAUnormSrgb = 0x0000002E, - WGPUTextureFormat_BC4RUnorm = 0x0000002F, - WGPUTextureFormat_BC4RSnorm = 0x00000030, - WGPUTextureFormat_BC5RGUnorm = 0x00000031, - WGPUTextureFormat_BC5RGSnorm = 0x00000032, - WGPUTextureFormat_BC6HRGBUfloat = 0x00000033, - WGPUTextureFormat_BC6HRGBFloat = 0x00000034, - WGPUTextureFormat_BC7RGBAUnorm = 0x00000035, - WGPUTextureFormat_BC7RGBAUnormSrgb = 0x00000036, - WGPUTextureFormat_Force32 = 0x7FFFFFFF -} WGPUTextureFormat; - -typedef enum WGPUTextureSampleType { - WGPUTextureSampleType_Undefined = 0x00000000, - WGPUTextureSampleType_Float = 0x00000001, - WGPUTextureSampleType_UnfilterableFloat = 0x00000002, - WGPUTextureSampleType_Depth = 0x00000003, - WGPUTextureSampleType_Sint = 0x00000004, - WGPUTextureSampleType_Uint = 0x00000005, - WGPUTextureSampleType_Force32 = 0x7FFFFFFF -} WGPUTextureSampleType; - -typedef enum WGPUTextureViewDimension { - WGPUTextureViewDimension_Undefined = 0x00000000, - WGPUTextureViewDimension_1D = 0x00000001, - WGPUTextureViewDimension_2D = 0x00000002, - WGPUTextureViewDimension_2DArray = 0x00000003, - WGPUTextureViewDimension_Cube = 0x00000004, - WGPUTextureViewDimension_CubeArray = 0x00000005, - WGPUTextureViewDimension_3D = 0x00000006, - WGPUTextureViewDimension_Force32 = 0x7FFFFFFF -} WGPUTextureViewDimension; - -typedef enum WGPUVertexFormat { - WGPUVertexFormat_Undefined = 0x00000000, - WGPUVertexFormat_Uint8x2 = 0x00000001, - WGPUVertexFormat_Uint8x4 = 0x00000002, - WGPUVertexFormat_Sint8x2 = 0x00000003, - WGPUVertexFormat_Sint8x4 = 0x00000004, - WGPUVertexFormat_Unorm8x2 = 0x00000005, - WGPUVertexFormat_Unorm8x4 = 0x00000006, - WGPUVertexFormat_Snorm8x2 = 0x00000007, - WGPUVertexFormat_Snorm8x4 = 0x00000008, - WGPUVertexFormat_Uint16x2 = 0x00000009, - WGPUVertexFormat_Uint16x4 = 0x0000000A, - WGPUVertexFormat_Sint16x2 = 0x0000000B, - WGPUVertexFormat_Sint16x4 = 0x0000000C, - WGPUVertexFormat_Unorm16x2 = 0x0000000D, - WGPUVertexFormat_Unorm16x4 = 0x0000000E, - WGPUVertexFormat_Snorm16x2 = 0x0000000F, - WGPUVertexFormat_Snorm16x4 = 0x00000010, - WGPUVertexFormat_Float16x2 = 0x00000011, - WGPUVertexFormat_Float16x4 = 0x00000012, - WGPUVertexFormat_Float32 = 0x00000013, - WGPUVertexFormat_Float32x2 = 0x00000014, - WGPUVertexFormat_Float32x3 = 0x00000015, - WGPUVertexFormat_Float32x4 = 0x00000016, - WGPUVertexFormat_Uint32 = 0x00000017, - WGPUVertexFormat_Uint32x2 = 0x00000018, - WGPUVertexFormat_Uint32x3 = 0x00000019, - WGPUVertexFormat_Uint32x4 = 0x0000001A, - WGPUVertexFormat_Sint32 = 0x0000001B, - WGPUVertexFormat_Sint32x2 = 0x0000001C, - WGPUVertexFormat_Sint32x3 = 0x0000001D, - WGPUVertexFormat_Sint32x4 = 0x0000001E, - WGPUVertexFormat_Force32 = 0x7FFFFFFF -} WGPUVertexFormat; - -typedef enum WGPUBufferUsage { - WGPUBufferUsage_None = 0x00000000, - WGPUBufferUsage_MapRead = 0x00000001, - WGPUBufferUsage_MapWrite = 0x00000002, - WGPUBufferUsage_CopySrc = 0x00000004, - WGPUBufferUsage_CopyDst = 0x00000008, - WGPUBufferUsage_Index = 0x00000010, - WGPUBufferUsage_Vertex = 0x00000020, - WGPUBufferUsage_Uniform = 0x00000040, - WGPUBufferUsage_Storage = 0x00000080, - WGPUBufferUsage_Indirect = 0x00000100, - WGPUBufferUsage_QueryResolve = 0x00000200, - WGPUBufferUsage_Force32 = 0x7FFFFFFF -} WGPUBufferUsage; -typedef WGPUFlags WGPUBufferUsageFlags; - -typedef enum WGPUColorWriteMask { - WGPUColorWriteMask_None = 0x00000000, - WGPUColorWriteMask_Red = 0x00000001, - WGPUColorWriteMask_Green = 0x00000002, - WGPUColorWriteMask_Blue = 0x00000004, - WGPUColorWriteMask_Alpha = 0x00000008, - WGPUColorWriteMask_All = 0x0000000F, - WGPUColorWriteMask_Force32 = 0x7FFFFFFF -} WGPUColorWriteMask; -typedef WGPUFlags WGPUColorWriteMaskFlags; - -typedef enum WGPUMapMode { - WGPUMapMode_None = 0x00000000, - WGPUMapMode_Read = 0x00000001, - WGPUMapMode_Write = 0x00000002, - WGPUMapMode_Force32 = 0x7FFFFFFF -} WGPUMapMode; -typedef WGPUFlags WGPUMapModeFlags; - -typedef enum WGPUShaderStage { - WGPUShaderStage_None = 0x00000000, - WGPUShaderStage_Vertex = 0x00000001, - WGPUShaderStage_Fragment = 0x00000002, - WGPUShaderStage_Compute = 0x00000004, - WGPUShaderStage_Force32 = 0x7FFFFFFF -} WGPUShaderStage; -typedef WGPUFlags WGPUShaderStageFlags; - -typedef enum WGPUTextureUsage { - WGPUTextureUsage_None = 0x00000000, - WGPUTextureUsage_CopySrc = 0x00000001, - WGPUTextureUsage_CopyDst = 0x00000002, - WGPUTextureUsage_Sampled = 0x00000004, - WGPUTextureUsage_Storage = 0x00000008, - WGPUTextureUsage_OutputAttachment = 0x00000010, - WGPUTextureUsage_RenderAttachment = 0x00000010, - WGPUTextureUsage_Force32 = 0x7FFFFFFF -} WGPUTextureUsage; -typedef WGPUFlags WGPUTextureUsageFlags; - - -typedef struct WGPUChainedStruct { - struct WGPUChainedStruct const * next; - WGPUSType sType; -} WGPUChainedStruct; - -typedef struct WGPUAdapterProperties { - WGPUChainedStruct const * nextInChain; - uint32_t deviceID; - uint32_t vendorID; - char const * name; - char const * driverDescription; - WGPUAdapterType adapterType; - WGPUBackendType backendType; -} WGPUAdapterProperties; - -typedef struct WGPUBindGroupEntry { - uint32_t binding; - WGPUBuffer buffer; - uint64_t offset; - uint64_t size; - WGPUSampler sampler; - WGPUTextureView textureView; -} WGPUBindGroupEntry; - -typedef struct WGPUBlendComponent { - WGPUBlendOperation operation; - WGPUBlendFactor srcFactor; - WGPUBlendFactor dstFactor; -} WGPUBlendComponent; - -typedef struct WGPUBufferBindingLayout { - WGPUChainedStruct const * nextInChain; - WGPUBufferBindingType type; - bool hasDynamicOffset; - uint64_t minBindingSize; -} WGPUBufferBindingLayout; - -typedef struct WGPUBufferDescriptor { - WGPUChainedStruct const * nextInChain; - char const * label; - WGPUBufferUsageFlags usage; - uint64_t size; - bool mappedAtCreation; -} WGPUBufferDescriptor; - -typedef struct WGPUColor { - double r; - double g; - double b; - double a; -} WGPUColor; - -typedef struct WGPUCommandBufferDescriptor { - WGPUChainedStruct const * nextInChain; - char const * label; -} WGPUCommandBufferDescriptor; - -typedef struct WGPUCommandEncoderDescriptor { - WGPUChainedStruct const * nextInChain; - char const * label; -} WGPUCommandEncoderDescriptor; - -typedef struct WGPUComputePassDescriptor { - WGPUChainedStruct const * nextInChain; - char const * label; -} WGPUComputePassDescriptor; - -typedef struct WGPUDeviceDescriptor { - WGPUChainedStruct const * nextInChain; -} WGPUDeviceDescriptor; - -typedef struct WGPUExtent3D { - uint32_t width; - uint32_t height; - uint32_t depthOrArrayLayers; -} WGPUExtent3D; - -typedef struct WGPUInstanceDescriptor { - WGPUChainedStruct const * nextInChain; -} WGPUInstanceDescriptor; - -typedef struct WGPUMultisampleState { - WGPUChainedStruct const * nextInChain; - uint32_t count; - uint32_t mask; - bool alphaToCoverageEnabled; -} WGPUMultisampleState; - -typedef struct WGPUOrigin3D { - uint32_t x; - uint32_t y; - uint32_t z; -} WGPUOrigin3D; - -typedef struct WGPUPipelineLayoutDescriptor { - WGPUChainedStruct const * nextInChain; - char const * label; - uint32_t bindGroupLayoutCount; - WGPUBindGroupLayout const * bindGroupLayouts; -} WGPUPipelineLayoutDescriptor; - -typedef struct WGPUPrimitiveDepthClampingState { - WGPUChainedStruct chain; - bool clampDepth; -} WGPUPrimitiveDepthClampingState; - -typedef struct WGPUPrimitiveState { - WGPUChainedStruct const * nextInChain; - WGPUPrimitiveTopology topology; - WGPUIndexFormat stripIndexFormat; - WGPUFrontFace frontFace; - WGPUCullMode cullMode; -} WGPUPrimitiveState; - -typedef struct WGPUProgrammableStageDescriptor { - WGPUChainedStruct const * nextInChain; - WGPUShaderModule module; - char const * entryPoint; -} WGPUProgrammableStageDescriptor; - -typedef struct WGPUQuerySetDescriptor { - WGPUChainedStruct const * nextInChain; - char const * label; - WGPUQueryType type; - uint32_t count; - WGPUPipelineStatisticName const * pipelineStatistics; - uint32_t pipelineStatisticsCount; -} WGPUQuerySetDescriptor; - -typedef struct WGPURenderBundleDescriptor { - WGPUChainedStruct const * nextInChain; - char const * label; -} WGPURenderBundleDescriptor; - -typedef struct WGPURenderBundleEncoderDescriptor { - WGPUChainedStruct const * nextInChain; - char const * label; - uint32_t colorFormatsCount; - WGPUTextureFormat const * colorFormats; - WGPUTextureFormat depthStencilFormat; - uint32_t sampleCount; -} WGPURenderBundleEncoderDescriptor; - -typedef struct WGPURenderPassDepthStencilAttachment { - WGPUTextureView view; - WGPULoadOp depthLoadOp; - WGPUStoreOp depthStoreOp; - float clearDepth; - bool depthReadOnly; - WGPULoadOp stencilLoadOp; - WGPUStoreOp stencilStoreOp; - uint32_t clearStencil; - bool stencilReadOnly; -} WGPURenderPassDepthStencilAttachment; - -typedef struct WGPURequestAdapterOptions { - WGPUChainedStruct const * nextInChain; - WGPUSurface compatibleSurface; -} WGPURequestAdapterOptions; - -typedef struct WGPUSamplerBindingLayout { - WGPUChainedStruct const * nextInChain; - WGPUSamplerBindingType type; -} WGPUSamplerBindingLayout; - -typedef struct WGPUSamplerDescriptor { - WGPUChainedStruct const * nextInChain; - char const * label; - WGPUAddressMode addressModeU; - WGPUAddressMode addressModeV; - WGPUAddressMode addressModeW; - WGPUFilterMode magFilter; - WGPUFilterMode minFilter; - WGPUFilterMode mipmapFilter; - float lodMinClamp; - float lodMaxClamp; - WGPUCompareFunction compare; - uint16_t maxAnisotropy; -} WGPUSamplerDescriptor; - -typedef struct WGPUShaderModuleDescriptor { - WGPUChainedStruct const * nextInChain; - char const * label; -} WGPUShaderModuleDescriptor; - -typedef struct WGPUShaderModuleSPIRVDescriptor { - WGPUChainedStruct chain; - uint32_t codeSize; - uint32_t const * code; -} WGPUShaderModuleSPIRVDescriptor; - -typedef struct WGPUShaderModuleWGSLDescriptor { - WGPUChainedStruct chain; - char const * source; -} WGPUShaderModuleWGSLDescriptor; - -typedef struct WGPUStencilFaceState { - WGPUCompareFunction compare; - WGPUStencilOperation failOp; - WGPUStencilOperation depthFailOp; - WGPUStencilOperation passOp; -} WGPUStencilFaceState; - -typedef struct WGPUStorageTextureBindingLayout { - WGPUChainedStruct const * nextInChain; - WGPUStorageTextureAccess access; - WGPUTextureFormat format; - WGPUTextureViewDimension viewDimension; -} WGPUStorageTextureBindingLayout; - -typedef struct WGPUSurfaceDescriptor { - WGPUChainedStruct const * nextInChain; - char const * label; -} WGPUSurfaceDescriptor; - -typedef struct WGPUSurfaceDescriptorFromCanvasHTMLSelector { - WGPUChainedStruct chain; - char const * selector; -} WGPUSurfaceDescriptorFromCanvasHTMLSelector; - -typedef struct WGPUSurfaceDescriptorFromMetalLayer { - WGPUChainedStruct chain; - void * layer; -} WGPUSurfaceDescriptorFromMetalLayer; - -typedef struct WGPUSurfaceDescriptorFromWindowsHWND { - WGPUChainedStruct chain; - void * hinstance; - void * hwnd; -} WGPUSurfaceDescriptorFromWindowsHWND; - -typedef struct WGPUSurfaceDescriptorFromXlib { - WGPUChainedStruct chain; - void * display; - uint32_t window; -} WGPUSurfaceDescriptorFromXlib; - -typedef struct WGPUSwapChainDescriptor { - WGPUChainedStruct const * nextInChain; - char const * label; - WGPUTextureUsageFlags usage; - WGPUTextureFormat format; - uint32_t width; - uint32_t height; - WGPUPresentMode presentMode; -} WGPUSwapChainDescriptor; - -typedef struct WGPUTextureBindingLayout { - WGPUChainedStruct const * nextInChain; - WGPUTextureSampleType sampleType; - WGPUTextureViewDimension viewDimension; - bool multisampled; -} WGPUTextureBindingLayout; - -typedef struct WGPUTextureDataLayout { - WGPUChainedStruct const * nextInChain; - uint64_t offset; - uint32_t bytesPerRow; - uint32_t rowsPerImage; -} WGPUTextureDataLayout; - -typedef struct WGPUTextureViewDescriptor { - WGPUChainedStruct const * nextInChain; - char const * label; - WGPUTextureFormat format; - WGPUTextureViewDimension dimension; - uint32_t baseMipLevel; - uint32_t mipLevelCount; - uint32_t baseArrayLayer; - uint32_t arrayLayerCount; - WGPUTextureAspect aspect; -} WGPUTextureViewDescriptor; - -typedef struct WGPUVertexAttribute { - WGPUVertexFormat format; - uint64_t offset; - uint32_t shaderLocation; -} WGPUVertexAttribute; - -typedef struct WGPUBindGroupDescriptor { - WGPUChainedStruct const * nextInChain; - char const * label; - WGPUBindGroupLayout layout; - uint32_t entryCount; - WGPUBindGroupEntry const * entries; -} WGPUBindGroupDescriptor; - -typedef struct WGPUBindGroupLayoutEntry { - WGPUChainedStruct const * nextInChain; - uint32_t binding; - WGPUShaderStageFlags visibility; - WGPUBufferBindingLayout buffer; - WGPUSamplerBindingLayout sampler; - WGPUTextureBindingLayout texture; - WGPUStorageTextureBindingLayout storageTexture; -} WGPUBindGroupLayoutEntry; - -typedef struct WGPUBlendState { - WGPUBlendComponent color; - WGPUBlendComponent alpha; -} WGPUBlendState; - -typedef struct WGPUComputePipelineDescriptor { - WGPUChainedStruct const * nextInChain; - char const * label; - WGPUPipelineLayout layout; - WGPUProgrammableStageDescriptor computeStage; -} WGPUComputePipelineDescriptor; - -typedef struct WGPUDepthStencilState { - WGPUChainedStruct const * nextInChain; - WGPUTextureFormat format; - bool depthWriteEnabled; - WGPUCompareFunction depthCompare; - WGPUStencilFaceState stencilFront; - WGPUStencilFaceState stencilBack; - uint32_t stencilReadMask; - uint32_t stencilWriteMask; - int32_t depthBias; - float depthBiasSlopeScale; - float depthBiasClamp; -} WGPUDepthStencilState; - -typedef struct WGPUImageCopyBuffer { - WGPUChainedStruct const * nextInChain; - WGPUTextureDataLayout layout; - WGPUBuffer buffer; -} WGPUImageCopyBuffer; - -typedef struct WGPUImageCopyTexture { - WGPUChainedStruct const * nextInChain; - WGPUTexture texture; - uint32_t mipLevel; - WGPUOrigin3D origin; - WGPUTextureAspect aspect; -} WGPUImageCopyTexture; - -typedef struct WGPURenderPassColorAttachment { - WGPUTextureView view; - WGPUTextureView resolveTarget; - WGPULoadOp loadOp; - WGPUStoreOp storeOp; - WGPUColor clearColor; -} WGPURenderPassColorAttachment; - -typedef struct WGPUTextureDescriptor { - WGPUChainedStruct const * nextInChain; - char const * label; - WGPUTextureUsageFlags usage; - WGPUTextureDimension dimension; - WGPUExtent3D size; - WGPUTextureFormat format; - uint32_t mipLevelCount; - uint32_t sampleCount; -} WGPUTextureDescriptor; - -typedef struct WGPUVertexBufferLayout { - uint64_t arrayStride; - WGPUInputStepMode stepMode; - uint32_t attributeCount; - WGPUVertexAttribute const * attributes; -} WGPUVertexBufferLayout; - -typedef struct WGPUBindGroupLayoutDescriptor { - WGPUChainedStruct const * nextInChain; - char const * label; - uint32_t entryCount; - WGPUBindGroupLayoutEntry const * entries; -} WGPUBindGroupLayoutDescriptor; - -typedef struct WGPUColorTargetState { - WGPUChainedStruct const * nextInChain; - WGPUTextureFormat format; - WGPUBlendState const * blend; - WGPUColorWriteMaskFlags writeMask; -} WGPUColorTargetState; - -typedef struct WGPURenderPassDescriptor { - WGPUChainedStruct const * nextInChain; - char const * label; - uint32_t colorAttachmentCount; - WGPURenderPassColorAttachment const * colorAttachments; - WGPURenderPassDepthStencilAttachment const * depthStencilAttachment; - WGPUQuerySet occlusionQuerySet; -} WGPURenderPassDescriptor; - -typedef struct WGPUVertexState { - WGPUChainedStruct const * nextInChain; - WGPUShaderModule module; - char const * entryPoint; - uint32_t bufferCount; - WGPUVertexBufferLayout const * buffers; -} WGPUVertexState; - -typedef struct WGPUFragmentState { - WGPUChainedStruct const * nextInChain; - WGPUShaderModule module; - char const * entryPoint; - uint32_t targetCount; - WGPUColorTargetState const * targets; -} WGPUFragmentState; - -typedef struct WGPURenderPipelineDescriptor2 { - WGPUChainedStruct const * nextInChain; - char const * label; - WGPUPipelineLayout layout; - WGPUVertexState vertex; - WGPUPrimitiveState primitive; - WGPUDepthStencilState const * depthStencil; - WGPUMultisampleState multisample; - WGPUFragmentState const * fragment; -} WGPURenderPipelineDescriptor2; - -#ifdef __cplusplus -extern "C" { -#endif - -typedef void (*WGPUBufferMapCallback)(WGPUBufferMapAsyncStatus status, void * userdata); -typedef void (*WGPUCreateComputePipelineAsyncCallback)(WGPUCreatePipelineAsyncStatus status, WGPUComputePipeline pipeline, char const * message, void * userdata); -typedef void (*WGPUCreateRenderPipelineAsyncCallback)(WGPUCreatePipelineAsyncStatus status, WGPURenderPipeline pipeline, char const * message, void * userdata); -typedef void (*WGPUDeviceLostCallback)(char const * message, void * userdata); -typedef void (*WGPUErrorCallback)(WGPUErrorType type, char const * message, void * userdata); -typedef void (*WGPURequestAdapterCallback)(WGPUAdapter result, void * userdata); -typedef void (*WGPURequestDeviceCallback)(WGPUDevice result, void * userdata); -typedef void (*WGPUQueueWorkDoneCallback)(WGPUQueueWorkDoneStatus status, void * userdata); - -typedef void (*WGPUProc)(void); - -#if !defined(WGPU_SKIP_PROCS) - -typedef WGPUInstance (*WGPUProcCreateInstance)(WGPUInstanceDescriptor const * descriptor); -typedef WGPUProc (*WGPUProcGetProcAddress)(WGPUDevice device, char const * procName); - -// Procs of Adapter -typedef void (*WGPUProcAdapterGetProperties)(WGPUAdapter adapter, WGPUAdapterProperties * properties); -typedef void (*WGPUProcAdapterRequestDevice)(WGPUAdapter adapter, WGPUDeviceDescriptor const * descriptor, WGPURequestDeviceCallback callback, void * userdata); - -// Procs of BindGroup -typedef void (*WGPUProcBindGroupReference)(WGPUBindGroup bindGroup); -typedef void (*WGPUProcBindGroupRelease)(WGPUBindGroup bindGroup); - -// Procs of BindGroupLayout -typedef void (*WGPUProcBindGroupLayoutReference)(WGPUBindGroupLayout bindGroupLayout); -typedef void (*WGPUProcBindGroupLayoutRelease)(WGPUBindGroupLayout bindGroupLayout); - -// Procs of Buffer -typedef void (*WGPUProcBufferDestroy)(WGPUBuffer buffer); -typedef void const * (*WGPUProcBufferGetConstMappedRange)(WGPUBuffer buffer, size_t offset, size_t size); -typedef void * (*WGPUProcBufferGetMappedRange)(WGPUBuffer buffer, size_t offset, size_t size); -typedef void (*WGPUProcBufferMapAsync)(WGPUBuffer buffer, WGPUMapModeFlags mode, size_t offset, size_t size, WGPUBufferMapCallback callback, void * userdata); -typedef void (*WGPUProcBufferUnmap)(WGPUBuffer buffer); -typedef void (*WGPUProcBufferReference)(WGPUBuffer buffer); -typedef void (*WGPUProcBufferRelease)(WGPUBuffer buffer); - -// Procs of CommandBuffer -typedef void (*WGPUProcCommandBufferReference)(WGPUCommandBuffer commandBuffer); -typedef void (*WGPUProcCommandBufferRelease)(WGPUCommandBuffer commandBuffer); - -// Procs of CommandEncoder -typedef WGPUComputePassEncoder (*WGPUProcCommandEncoderBeginComputePass)(WGPUCommandEncoder commandEncoder, WGPUComputePassDescriptor const * descriptor); -typedef WGPURenderPassEncoder (*WGPUProcCommandEncoderBeginRenderPass)(WGPUCommandEncoder commandEncoder, WGPURenderPassDescriptor const * descriptor); -typedef void (*WGPUProcCommandEncoderCopyBufferToBuffer)(WGPUCommandEncoder commandEncoder, WGPUBuffer source, uint64_t sourceOffset, WGPUBuffer destination, uint64_t destinationOffset, uint64_t size); -typedef void (*WGPUProcCommandEncoderCopyBufferToTexture)(WGPUCommandEncoder commandEncoder, WGPUImageCopyBuffer const * source, WGPUImageCopyTexture const * destination, WGPUExtent3D const * copySize); -typedef void (*WGPUProcCommandEncoderCopyTextureToBuffer)(WGPUCommandEncoder commandEncoder, WGPUImageCopyTexture const * source, WGPUImageCopyBuffer const * destination, WGPUExtent3D const * copySize); -typedef void (*WGPUProcCommandEncoderCopyTextureToTexture)(WGPUCommandEncoder commandEncoder, WGPUImageCopyTexture const * source, WGPUImageCopyTexture const * destination, WGPUExtent3D const * copySize); -typedef WGPUCommandBuffer (*WGPUProcCommandEncoderFinish)(WGPUCommandEncoder commandEncoder, WGPUCommandBufferDescriptor const * descriptor); -typedef void (*WGPUProcCommandEncoderInsertDebugMarker)(WGPUCommandEncoder commandEncoder, char const * markerLabel); -typedef void (*WGPUProcCommandEncoderPopDebugGroup)(WGPUCommandEncoder commandEncoder); -typedef void (*WGPUProcCommandEncoderPushDebugGroup)(WGPUCommandEncoder commandEncoder, char const * groupLabel); -typedef void (*WGPUProcCommandEncoderResolveQuerySet)(WGPUCommandEncoder commandEncoder, WGPUQuerySet querySet, uint32_t firstQuery, uint32_t queryCount, WGPUBuffer destination, uint64_t destinationOffset); -typedef void (*WGPUProcCommandEncoderWriteTimestamp)(WGPUCommandEncoder commandEncoder, WGPUQuerySet querySet, uint32_t queryIndex); -typedef void (*WGPUProcCommandEncoderReference)(WGPUCommandEncoder commandEncoder); -typedef void (*WGPUProcCommandEncoderRelease)(WGPUCommandEncoder commandEncoder); - -// Procs of ComputePassEncoder -typedef void (*WGPUProcComputePassEncoderDispatch)(WGPUComputePassEncoder computePassEncoder, uint32_t x, uint32_t y, uint32_t z); -typedef void (*WGPUProcComputePassEncoderDispatchIndirect)(WGPUComputePassEncoder computePassEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset); -typedef void (*WGPUProcComputePassEncoderEndPass)(WGPUComputePassEncoder computePassEncoder); -typedef void (*WGPUProcComputePassEncoderInsertDebugMarker)(WGPUComputePassEncoder computePassEncoder, char const * markerLabel); -typedef void (*WGPUProcComputePassEncoderPopDebugGroup)(WGPUComputePassEncoder computePassEncoder); -typedef void (*WGPUProcComputePassEncoderPushDebugGroup)(WGPUComputePassEncoder computePassEncoder, char const * groupLabel); -typedef void (*WGPUProcComputePassEncoderSetBindGroup)(WGPUComputePassEncoder computePassEncoder, uint32_t groupIndex, WGPUBindGroup group, uint32_t dynamicOffsetCount, uint32_t const * dynamicOffsets); -typedef void (*WGPUProcComputePassEncoderSetPipeline)(WGPUComputePassEncoder computePassEncoder, WGPUComputePipeline pipeline); -typedef void (*WGPUProcComputePassEncoderWriteTimestamp)(WGPUComputePassEncoder computePassEncoder, WGPUQuerySet querySet, uint32_t queryIndex); -typedef void (*WGPUProcComputePassEncoderReference)(WGPUComputePassEncoder computePassEncoder); -typedef void (*WGPUProcComputePassEncoderRelease)(WGPUComputePassEncoder computePassEncoder); - -// Procs of ComputePipeline -typedef WGPUBindGroupLayout (*WGPUProcComputePipelineGetBindGroupLayout)(WGPUComputePipeline computePipeline, uint32_t groupIndex); -typedef void (*WGPUProcComputePipelineReference)(WGPUComputePipeline computePipeline); -typedef void (*WGPUProcComputePipelineRelease)(WGPUComputePipeline computePipeline); - -// Procs of Device -typedef WGPUBindGroup (*WGPUProcDeviceCreateBindGroup)(WGPUDevice device, WGPUBindGroupDescriptor const * descriptor); -typedef WGPUBindGroupLayout (*WGPUProcDeviceCreateBindGroupLayout)(WGPUDevice device, WGPUBindGroupLayoutDescriptor const * descriptor); -typedef WGPUBuffer (*WGPUProcDeviceCreateBuffer)(WGPUDevice device, WGPUBufferDescriptor const * descriptor); -typedef WGPUCommandEncoder (*WGPUProcDeviceCreateCommandEncoder)(WGPUDevice device, WGPUCommandEncoderDescriptor const * descriptor); -typedef WGPUComputePipeline (*WGPUProcDeviceCreateComputePipeline)(WGPUDevice device, WGPUComputePipelineDescriptor const * descriptor); -typedef void (*WGPUProcDeviceCreateComputePipelineAsync)(WGPUDevice device, WGPUComputePipelineDescriptor const * descriptor, WGPUCreateComputePipelineAsyncCallback callback, void * userdata); -typedef WGPUPipelineLayout (*WGPUProcDeviceCreatePipelineLayout)(WGPUDevice device, WGPUPipelineLayoutDescriptor const * descriptor); -typedef WGPUQuerySet (*WGPUProcDeviceCreateQuerySet)(WGPUDevice device, WGPUQuerySetDescriptor const * descriptor); -typedef WGPURenderBundleEncoder (*WGPUProcDeviceCreateRenderBundleEncoder)(WGPUDevice device, WGPURenderBundleEncoderDescriptor const * descriptor); -typedef WGPURenderPipeline (*WGPUProcDeviceCreateRenderPipeline2)(WGPUDevice device, WGPURenderPipelineDescriptor2 const * descriptor); -typedef void (*WGPUProcDeviceCreateRenderPipelineAsync)(WGPUDevice device, WGPURenderPipelineDescriptor2 const * descriptor, WGPUCreateRenderPipelineAsyncCallback callback, void * userdata); -typedef WGPUSampler (*WGPUProcDeviceCreateSampler)(WGPUDevice device, WGPUSamplerDescriptor const * descriptor); -typedef WGPUShaderModule (*WGPUProcDeviceCreateShaderModule)(WGPUDevice device, WGPUShaderModuleDescriptor const * descriptor); -typedef WGPUSwapChain (*WGPUProcDeviceCreateSwapChain)(WGPUDevice device, WGPUSurface surface, WGPUSwapChainDescriptor const * descriptor); -typedef WGPUTexture (*WGPUProcDeviceCreateTexture)(WGPUDevice device, WGPUTextureDescriptor const * descriptor); -typedef WGPUQueue (*WGPUProcDeviceGetQueue)(WGPUDevice device); -typedef bool (*WGPUProcDevicePopErrorScope)(WGPUDevice device, WGPUErrorCallback callback, void * userdata); -typedef void (*WGPUProcDevicePushErrorScope)(WGPUDevice device, WGPUErrorFilter filter); -typedef void (*WGPUProcDeviceSetDeviceLostCallback)(WGPUDevice device, WGPUDeviceLostCallback callback, void * userdata); -typedef void (*WGPUProcDeviceSetUncapturedErrorCallback)(WGPUDevice device, WGPUErrorCallback callback, void * userdata); -typedef void (*WGPUProcDeviceReference)(WGPUDevice device); -typedef void (*WGPUProcDeviceRelease)(WGPUDevice device); - -// Procs of Instance -typedef WGPUSurface (*WGPUProcInstanceCreateSurface)(WGPUInstance instance, WGPUSurfaceDescriptor const * descriptor); -typedef void (*WGPUProcInstanceProcessEvents)(WGPUInstance instance); -typedef void (*WGPUProcInstanceRequestAdapter)(WGPUInstance instance, WGPURequestAdapterOptions const * options, WGPURequestAdapterCallback callback, void * userdata); -typedef void (*WGPUProcInstanceReference)(WGPUInstance instance); -typedef void (*WGPUProcInstanceRelease)(WGPUInstance instance); - -// Procs of PipelineLayout -typedef void (*WGPUProcPipelineLayoutReference)(WGPUPipelineLayout pipelineLayout); -typedef void (*WGPUProcPipelineLayoutRelease)(WGPUPipelineLayout pipelineLayout); - -// Procs of QuerySet -typedef void (*WGPUProcQuerySetDestroy)(WGPUQuerySet querySet); -typedef void (*WGPUProcQuerySetReference)(WGPUQuerySet querySet); -typedef void (*WGPUProcQuerySetRelease)(WGPUQuerySet querySet); - -// Procs of Queue -typedef void (*WGPUProcQueueOnSubmittedWorkDone)(WGPUQueue queue, uint64_t signalValue, WGPUQueueWorkDoneCallback callback, void * userdata); -typedef void (*WGPUProcQueueSubmit)(WGPUQueue queue, uint32_t commandCount, WGPUCommandBuffer const * commands); -typedef void (*WGPUProcQueueWriteBuffer)(WGPUQueue queue, WGPUBuffer buffer, uint64_t bufferOffset, void const * data, size_t size); -typedef void (*WGPUProcQueueWriteTexture)(WGPUQueue queue, WGPUImageCopyTexture const * destination, void const * data, size_t dataSize, WGPUTextureDataLayout const * dataLayout, WGPUExtent3D const * writeSize); -typedef void (*WGPUProcQueueReference)(WGPUQueue queue); -typedef void (*WGPUProcQueueRelease)(WGPUQueue queue); - -// Procs of RenderBundle -typedef void (*WGPUProcRenderBundleReference)(WGPURenderBundle renderBundle); -typedef void (*WGPUProcRenderBundleRelease)(WGPURenderBundle renderBundle); - -// Procs of RenderBundleEncoder -typedef void (*WGPUProcRenderBundleEncoderDraw)(WGPURenderBundleEncoder renderBundleEncoder, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance); -typedef void (*WGPUProcRenderBundleEncoderDrawIndexed)(WGPURenderBundleEncoder renderBundleEncoder, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t baseVertex, uint32_t firstInstance); -typedef void (*WGPUProcRenderBundleEncoderDrawIndexedIndirect)(WGPURenderBundleEncoder renderBundleEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset); -typedef void (*WGPUProcRenderBundleEncoderDrawIndirect)(WGPURenderBundleEncoder renderBundleEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset); -typedef WGPURenderBundle (*WGPUProcRenderBundleEncoderFinish)(WGPURenderBundleEncoder renderBundleEncoder, WGPURenderBundleDescriptor const * descriptor); -typedef void (*WGPUProcRenderBundleEncoderInsertDebugMarker)(WGPURenderBundleEncoder renderBundleEncoder, char const * markerLabel); -typedef void (*WGPUProcRenderBundleEncoderPopDebugGroup)(WGPURenderBundleEncoder renderBundleEncoder); -typedef void (*WGPUProcRenderBundleEncoderPushDebugGroup)(WGPURenderBundleEncoder renderBundleEncoder, char const * groupLabel); -typedef void (*WGPUProcRenderBundleEncoderSetBindGroup)(WGPURenderBundleEncoder renderBundleEncoder, uint32_t groupIndex, WGPUBindGroup group, uint32_t dynamicOffsetCount, uint32_t const * dynamicOffsets); -typedef void (*WGPUProcRenderBundleEncoderSetIndexBuffer)(WGPURenderBundleEncoder renderBundleEncoder, WGPUBuffer buffer, WGPUIndexFormat format, uint64_t offset, uint64_t size); -typedef void (*WGPUProcRenderBundleEncoderSetIndexBufferWithFormat)(WGPURenderBundleEncoder renderBundleEncoder, WGPUBuffer buffer, WGPUIndexFormat format, uint64_t offset, uint64_t size); -typedef void (*WGPUProcRenderBundleEncoderSetPipeline)(WGPURenderBundleEncoder renderBundleEncoder, WGPURenderPipeline pipeline); -typedef void (*WGPUProcRenderBundleEncoderSetVertexBuffer)(WGPURenderBundleEncoder renderBundleEncoder, uint32_t slot, WGPUBuffer buffer, uint64_t offset, uint64_t size); -typedef void (*WGPUProcRenderBundleEncoderReference)(WGPURenderBundleEncoder renderBundleEncoder); -typedef void (*WGPUProcRenderBundleEncoderRelease)(WGPURenderBundleEncoder renderBundleEncoder); - -// Procs of RenderPassEncoder -typedef void (*WGPUProcRenderPassEncoderBeginOcclusionQuery)(WGPURenderPassEncoder renderPassEncoder, uint32_t queryIndex); -typedef void (*WGPUProcRenderPassEncoderDraw)(WGPURenderPassEncoder renderPassEncoder, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance); -typedef void (*WGPUProcRenderPassEncoderDrawIndexed)(WGPURenderPassEncoder renderPassEncoder, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t baseVertex, uint32_t firstInstance); -typedef void (*WGPUProcRenderPassEncoderDrawIndexedIndirect)(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset); -typedef void (*WGPUProcRenderPassEncoderDrawIndirect)(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset); -typedef void (*WGPUProcRenderPassEncoderEndOcclusionQuery)(WGPURenderPassEncoder renderPassEncoder); -typedef void (*WGPUProcRenderPassEncoderEndPass)(WGPURenderPassEncoder renderPassEncoder); -typedef void (*WGPUProcRenderPassEncoderExecuteBundles)(WGPURenderPassEncoder renderPassEncoder, uint32_t bundlesCount, WGPURenderBundle const * bundles); -typedef void (*WGPUProcRenderPassEncoderInsertDebugMarker)(WGPURenderPassEncoder renderPassEncoder, char const * markerLabel); -typedef void (*WGPUProcRenderPassEncoderPopDebugGroup)(WGPURenderPassEncoder renderPassEncoder); -typedef void (*WGPUProcRenderPassEncoderPushDebugGroup)(WGPURenderPassEncoder renderPassEncoder, char const * groupLabel); -typedef void (*WGPUProcRenderPassEncoderSetBindGroup)(WGPURenderPassEncoder renderPassEncoder, uint32_t groupIndex, WGPUBindGroup group, uint32_t dynamicOffsetCount, uint32_t const * dynamicOffsets); -typedef void (*WGPUProcRenderPassEncoderSetBlendConstant)(WGPURenderPassEncoder renderPassEncoder, WGPUColor const * color); -typedef void (*WGPUProcRenderPassEncoderSetIndexBuffer)(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer buffer, WGPUIndexFormat format, uint64_t offset, uint64_t size); -typedef void (*WGPUProcRenderPassEncoderSetIndexBufferWithFormat)(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer buffer, WGPUIndexFormat format, uint64_t offset, uint64_t size); -typedef void (*WGPUProcRenderPassEncoderSetPipeline)(WGPURenderPassEncoder renderPassEncoder, WGPURenderPipeline pipeline); -typedef void (*WGPUProcRenderPassEncoderSetScissorRect)(WGPURenderPassEncoder renderPassEncoder, uint32_t x, uint32_t y, uint32_t width, uint32_t height); -typedef void (*WGPUProcRenderPassEncoderSetStencilReference)(WGPURenderPassEncoder renderPassEncoder, uint32_t reference); -typedef void (*WGPUProcRenderPassEncoderSetVertexBuffer)(WGPURenderPassEncoder renderPassEncoder, uint32_t slot, WGPUBuffer buffer, uint64_t offset, uint64_t size); -typedef void (*WGPUProcRenderPassEncoderSetViewport)(WGPURenderPassEncoder renderPassEncoder, float x, float y, float width, float height, float minDepth, float maxDepth); -typedef void (*WGPUProcRenderPassEncoderWriteTimestamp)(WGPURenderPassEncoder renderPassEncoder, WGPUQuerySet querySet, uint32_t queryIndex); -typedef void (*WGPUProcRenderPassEncoderReference)(WGPURenderPassEncoder renderPassEncoder); -typedef void (*WGPUProcRenderPassEncoderRelease)(WGPURenderPassEncoder renderPassEncoder); - -// Procs of RenderPipeline -typedef WGPUBindGroupLayout (*WGPUProcRenderPipelineGetBindGroupLayout)(WGPURenderPipeline renderPipeline, uint32_t groupIndex); -typedef void (*WGPUProcRenderPipelineReference)(WGPURenderPipeline renderPipeline); -typedef void (*WGPUProcRenderPipelineRelease)(WGPURenderPipeline renderPipeline); - -// Procs of Sampler -typedef void (*WGPUProcSamplerReference)(WGPUSampler sampler); -typedef void (*WGPUProcSamplerRelease)(WGPUSampler sampler); - -// Procs of ShaderModule -typedef void (*WGPUProcShaderModuleReference)(WGPUShaderModule shaderModule); -typedef void (*WGPUProcShaderModuleRelease)(WGPUShaderModule shaderModule); - -// Procs of Surface -typedef void (*WGPUProcSurfaceReference)(WGPUSurface surface); -typedef void (*WGPUProcSurfaceRelease)(WGPUSurface surface); - -// Procs of SwapChain -typedef WGPUTextureView (*WGPUProcSwapChainGetCurrentTextureView)(WGPUSwapChain swapChain); -typedef void (*WGPUProcSwapChainPresent)(WGPUSwapChain swapChain); -typedef void (*WGPUProcSwapChainReference)(WGPUSwapChain swapChain); -typedef void (*WGPUProcSwapChainRelease)(WGPUSwapChain swapChain); - -// Procs of Texture -typedef WGPUTextureView (*WGPUProcTextureCreateView)(WGPUTexture texture, WGPUTextureViewDescriptor const * descriptor); -typedef void (*WGPUProcTextureDestroy)(WGPUTexture texture); -typedef void (*WGPUProcTextureReference)(WGPUTexture texture); -typedef void (*WGPUProcTextureRelease)(WGPUTexture texture); - -// Procs of TextureView -typedef void (*WGPUProcTextureViewReference)(WGPUTextureView textureView); -typedef void (*WGPUProcTextureViewRelease)(WGPUTextureView textureView); - -#endif // !defined(WGPU_SKIP_PROCS) - -#if !defined(WGPU_SKIP_DECLARATIONS) - -WGPU_EXPORT WGPUInstance wgpuCreateInstance(WGPUInstanceDescriptor const * descriptor); -WGPU_EXPORT WGPUProc wgpuGetProcAddress(WGPUDevice device, char const * procName); - -// Methods of Adapter -WGPU_EXPORT void wgpuAdapterGetProperties(WGPUAdapter adapter, WGPUAdapterProperties * properties); -WGPU_EXPORT void wgpuAdapterRequestDevice(WGPUAdapter adapter, WGPUDeviceDescriptor const * descriptor, WGPURequestDeviceCallback callback, void * userdata); - -// Methods of BindGroup -WGPU_EXPORT void wgpuBindGroupReference(WGPUBindGroup bindGroup); -WGPU_EXPORT void wgpuBindGroupRelease(WGPUBindGroup bindGroup); - -// Methods of BindGroupLayout -WGPU_EXPORT void wgpuBindGroupLayoutReference(WGPUBindGroupLayout bindGroupLayout); -WGPU_EXPORT void wgpuBindGroupLayoutRelease(WGPUBindGroupLayout bindGroupLayout); - -// Methods of Buffer -WGPU_EXPORT void wgpuBufferDestroy(WGPUBuffer buffer); -WGPU_EXPORT void const * wgpuBufferGetConstMappedRange(WGPUBuffer buffer, size_t offset, size_t size); -WGPU_EXPORT void * wgpuBufferGetMappedRange(WGPUBuffer buffer, size_t offset, size_t size); -WGPU_EXPORT void wgpuBufferMapAsync(WGPUBuffer buffer, WGPUMapModeFlags mode, size_t offset, size_t size, WGPUBufferMapCallback callback, void * userdata); -WGPU_EXPORT void wgpuBufferUnmap(WGPUBuffer buffer); -WGPU_EXPORT void wgpuBufferReference(WGPUBuffer buffer); -WGPU_EXPORT void wgpuBufferRelease(WGPUBuffer buffer); - -// Methods of CommandBuffer -WGPU_EXPORT void wgpuCommandBufferReference(WGPUCommandBuffer commandBuffer); -WGPU_EXPORT void wgpuCommandBufferRelease(WGPUCommandBuffer commandBuffer); - -// Methods of CommandEncoder -WGPU_EXPORT WGPUComputePassEncoder wgpuCommandEncoderBeginComputePass(WGPUCommandEncoder commandEncoder, WGPUComputePassDescriptor const * descriptor); -WGPU_EXPORT WGPURenderPassEncoder wgpuCommandEncoderBeginRenderPass(WGPUCommandEncoder commandEncoder, WGPURenderPassDescriptor const * descriptor); -WGPU_EXPORT void wgpuCommandEncoderCopyBufferToBuffer(WGPUCommandEncoder commandEncoder, WGPUBuffer source, uint64_t sourceOffset, WGPUBuffer destination, uint64_t destinationOffset, uint64_t size); -WGPU_EXPORT void wgpuCommandEncoderCopyBufferToTexture(WGPUCommandEncoder commandEncoder, WGPUImageCopyBuffer const * source, WGPUImageCopyTexture const * destination, WGPUExtent3D const * copySize); -WGPU_EXPORT void wgpuCommandEncoderCopyTextureToBuffer(WGPUCommandEncoder commandEncoder, WGPUImageCopyTexture const * source, WGPUImageCopyBuffer const * destination, WGPUExtent3D const * copySize); -WGPU_EXPORT void wgpuCommandEncoderCopyTextureToTexture(WGPUCommandEncoder commandEncoder, WGPUImageCopyTexture const * source, WGPUImageCopyTexture const * destination, WGPUExtent3D const * copySize); -WGPU_EXPORT WGPUCommandBuffer wgpuCommandEncoderFinish(WGPUCommandEncoder commandEncoder, WGPUCommandBufferDescriptor const * descriptor); -WGPU_EXPORT void wgpuCommandEncoderInsertDebugMarker(WGPUCommandEncoder commandEncoder, char const * markerLabel); -WGPU_EXPORT void wgpuCommandEncoderPopDebugGroup(WGPUCommandEncoder commandEncoder); -WGPU_EXPORT void wgpuCommandEncoderPushDebugGroup(WGPUCommandEncoder commandEncoder, char const * groupLabel); -WGPU_EXPORT void wgpuCommandEncoderResolveQuerySet(WGPUCommandEncoder commandEncoder, WGPUQuerySet querySet, uint32_t firstQuery, uint32_t queryCount, WGPUBuffer destination, uint64_t destinationOffset); -WGPU_EXPORT void wgpuCommandEncoderWriteTimestamp(WGPUCommandEncoder commandEncoder, WGPUQuerySet querySet, uint32_t queryIndex); -WGPU_EXPORT void wgpuCommandEncoderReference(WGPUCommandEncoder commandEncoder); -WGPU_EXPORT void wgpuCommandEncoderRelease(WGPUCommandEncoder commandEncoder); - -// Methods of ComputePassEncoder -WGPU_EXPORT void wgpuComputePassEncoderDispatch(WGPUComputePassEncoder computePassEncoder, uint32_t x, uint32_t y, uint32_t z); -WGPU_EXPORT void wgpuComputePassEncoderDispatchIndirect(WGPUComputePassEncoder computePassEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset); -WGPU_EXPORT void wgpuComputePassEncoderEndPass(WGPUComputePassEncoder computePassEncoder); -WGPU_EXPORT void wgpuComputePassEncoderInsertDebugMarker(WGPUComputePassEncoder computePassEncoder, char const * markerLabel); -WGPU_EXPORT void wgpuComputePassEncoderPopDebugGroup(WGPUComputePassEncoder computePassEncoder); -WGPU_EXPORT void wgpuComputePassEncoderPushDebugGroup(WGPUComputePassEncoder computePassEncoder, char const * groupLabel); -WGPU_EXPORT void wgpuComputePassEncoderSetBindGroup(WGPUComputePassEncoder computePassEncoder, uint32_t groupIndex, WGPUBindGroup group, uint32_t dynamicOffsetCount, uint32_t const * dynamicOffsets); -WGPU_EXPORT void wgpuComputePassEncoderSetPipeline(WGPUComputePassEncoder computePassEncoder, WGPUComputePipeline pipeline); -WGPU_EXPORT void wgpuComputePassEncoderWriteTimestamp(WGPUComputePassEncoder computePassEncoder, WGPUQuerySet querySet, uint32_t queryIndex); -WGPU_EXPORT void wgpuComputePassEncoderReference(WGPUComputePassEncoder computePassEncoder); -WGPU_EXPORT void wgpuComputePassEncoderRelease(WGPUComputePassEncoder computePassEncoder); - -// Methods of ComputePipeline -WGPU_EXPORT WGPUBindGroupLayout wgpuComputePipelineGetBindGroupLayout(WGPUComputePipeline computePipeline, uint32_t groupIndex); -WGPU_EXPORT void wgpuComputePipelineReference(WGPUComputePipeline computePipeline); -WGPU_EXPORT void wgpuComputePipelineRelease(WGPUComputePipeline computePipeline); - -// Methods of Device -WGPU_EXPORT WGPUBindGroup wgpuDeviceCreateBindGroup(WGPUDevice device, WGPUBindGroupDescriptor const * descriptor); -WGPU_EXPORT WGPUBindGroupLayout wgpuDeviceCreateBindGroupLayout(WGPUDevice device, WGPUBindGroupLayoutDescriptor const * descriptor); -WGPU_EXPORT WGPUBuffer wgpuDeviceCreateBuffer(WGPUDevice device, WGPUBufferDescriptor const * descriptor); -WGPU_EXPORT WGPUCommandEncoder wgpuDeviceCreateCommandEncoder(WGPUDevice device, WGPUCommandEncoderDescriptor const * descriptor); -WGPU_EXPORT WGPUComputePipeline wgpuDeviceCreateComputePipeline(WGPUDevice device, WGPUComputePipelineDescriptor const * descriptor); -WGPU_EXPORT void wgpuDeviceCreateComputePipelineAsync(WGPUDevice device, WGPUComputePipelineDescriptor const * descriptor, WGPUCreateComputePipelineAsyncCallback callback, void * userdata); -WGPU_EXPORT WGPUPipelineLayout wgpuDeviceCreatePipelineLayout(WGPUDevice device, WGPUPipelineLayoutDescriptor const * descriptor); -WGPU_EXPORT WGPUQuerySet wgpuDeviceCreateQuerySet(WGPUDevice device, WGPUQuerySetDescriptor const * descriptor); -WGPU_EXPORT WGPURenderBundleEncoder wgpuDeviceCreateRenderBundleEncoder(WGPUDevice device, WGPURenderBundleEncoderDescriptor const * descriptor); -WGPU_EXPORT WGPURenderPipeline wgpuDeviceCreateRenderPipeline2(WGPUDevice device, WGPURenderPipelineDescriptor2 const * descriptor); -WGPU_EXPORT void wgpuDeviceCreateRenderPipelineAsync(WGPUDevice device, WGPURenderPipelineDescriptor2 const * descriptor, WGPUCreateRenderPipelineAsyncCallback callback, void * userdata); -WGPU_EXPORT WGPUSampler wgpuDeviceCreateSampler(WGPUDevice device, WGPUSamplerDescriptor const * descriptor); -WGPU_EXPORT WGPUShaderModule wgpuDeviceCreateShaderModule(WGPUDevice device, WGPUShaderModuleDescriptor const * descriptor); -WGPU_EXPORT WGPUSwapChain wgpuDeviceCreateSwapChain(WGPUDevice device, WGPUSurface surface, WGPUSwapChainDescriptor const * descriptor); -WGPU_EXPORT WGPUTexture wgpuDeviceCreateTexture(WGPUDevice device, WGPUTextureDescriptor const * descriptor); -WGPU_EXPORT WGPUQueue wgpuDeviceGetQueue(WGPUDevice device); -WGPU_EXPORT bool wgpuDevicePopErrorScope(WGPUDevice device, WGPUErrorCallback callback, void * userdata); -WGPU_EXPORT void wgpuDevicePushErrorScope(WGPUDevice device, WGPUErrorFilter filter); -WGPU_EXPORT void wgpuDeviceSetDeviceLostCallback(WGPUDevice device, WGPUDeviceLostCallback callback, void * userdata); -WGPU_EXPORT void wgpuDeviceSetUncapturedErrorCallback(WGPUDevice device, WGPUErrorCallback callback, void * userdata); -WGPU_EXPORT void wgpuDeviceReference(WGPUDevice device); -WGPU_EXPORT void wgpuDeviceRelease(WGPUDevice device); - -// Methods of Instance -WGPU_EXPORT WGPUSurface wgpuInstanceCreateSurface(WGPUInstance instance, WGPUSurfaceDescriptor const * descriptor); -WGPU_EXPORT void wgpuInstanceProcessEvents(WGPUInstance instance); -WGPU_EXPORT void wgpuInstanceRequestAdapter(WGPUInstance instance, WGPURequestAdapterOptions const * options, WGPURequestAdapterCallback callback, void * userdata); -WGPU_EXPORT void wgpuInstanceReference(WGPUInstance instance); -WGPU_EXPORT void wgpuInstanceRelease(WGPUInstance instance); - -// Methods of PipelineLayout -WGPU_EXPORT void wgpuPipelineLayoutReference(WGPUPipelineLayout pipelineLayout); -WGPU_EXPORT void wgpuPipelineLayoutRelease(WGPUPipelineLayout pipelineLayout); - -// Methods of QuerySet -WGPU_EXPORT void wgpuQuerySetDestroy(WGPUQuerySet querySet); -WGPU_EXPORT void wgpuQuerySetReference(WGPUQuerySet querySet); -WGPU_EXPORT void wgpuQuerySetRelease(WGPUQuerySet querySet); - -// Methods of Queue -WGPU_EXPORT void wgpuQueueOnSubmittedWorkDone(WGPUQueue queue, uint64_t signalValue, WGPUQueueWorkDoneCallback callback, void * userdata); -WGPU_EXPORT void wgpuQueueSubmit(WGPUQueue queue, uint32_t commandCount, WGPUCommandBuffer const * commands); -WGPU_EXPORT void wgpuQueueWriteBuffer(WGPUQueue queue, WGPUBuffer buffer, uint64_t bufferOffset, void const * data, size_t size); -WGPU_EXPORT void wgpuQueueWriteTexture(WGPUQueue queue, WGPUImageCopyTexture const * destination, void const * data, size_t dataSize, WGPUTextureDataLayout const * dataLayout, WGPUExtent3D const * writeSize); -WGPU_EXPORT void wgpuQueueReference(WGPUQueue queue); -WGPU_EXPORT void wgpuQueueRelease(WGPUQueue queue); - -// Methods of RenderBundle -WGPU_EXPORT void wgpuRenderBundleReference(WGPURenderBundle renderBundle); -WGPU_EXPORT void wgpuRenderBundleRelease(WGPURenderBundle renderBundle); - -// Methods of RenderBundleEncoder -WGPU_EXPORT void wgpuRenderBundleEncoderDraw(WGPURenderBundleEncoder renderBundleEncoder, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance); -WGPU_EXPORT void wgpuRenderBundleEncoderDrawIndexed(WGPURenderBundleEncoder renderBundleEncoder, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t baseVertex, uint32_t firstInstance); -WGPU_EXPORT void wgpuRenderBundleEncoderDrawIndexedIndirect(WGPURenderBundleEncoder renderBundleEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset); -WGPU_EXPORT void wgpuRenderBundleEncoderDrawIndirect(WGPURenderBundleEncoder renderBundleEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset); -WGPU_EXPORT WGPURenderBundle wgpuRenderBundleEncoderFinish(WGPURenderBundleEncoder renderBundleEncoder, WGPURenderBundleDescriptor const * descriptor); -WGPU_EXPORT void wgpuRenderBundleEncoderInsertDebugMarker(WGPURenderBundleEncoder renderBundleEncoder, char const * markerLabel); -WGPU_EXPORT void wgpuRenderBundleEncoderPopDebugGroup(WGPURenderBundleEncoder renderBundleEncoder); -WGPU_EXPORT void wgpuRenderBundleEncoderPushDebugGroup(WGPURenderBundleEncoder renderBundleEncoder, char const * groupLabel); -WGPU_EXPORT void wgpuRenderBundleEncoderSetBindGroup(WGPURenderBundleEncoder renderBundleEncoder, uint32_t groupIndex, WGPUBindGroup group, uint32_t dynamicOffsetCount, uint32_t const * dynamicOffsets); -WGPU_EXPORT void wgpuRenderBundleEncoderSetIndexBuffer(WGPURenderBundleEncoder renderBundleEncoder, WGPUBuffer buffer, WGPUIndexFormat format, uint64_t offset, uint64_t size); -WGPU_EXPORT void wgpuRenderBundleEncoderSetIndexBufferWithFormat(WGPURenderBundleEncoder renderBundleEncoder, WGPUBuffer buffer, WGPUIndexFormat format, uint64_t offset, uint64_t size); -WGPU_EXPORT void wgpuRenderBundleEncoderSetPipeline(WGPURenderBundleEncoder renderBundleEncoder, WGPURenderPipeline pipeline); -WGPU_EXPORT void wgpuRenderBundleEncoderSetVertexBuffer(WGPURenderBundleEncoder renderBundleEncoder, uint32_t slot, WGPUBuffer buffer, uint64_t offset, uint64_t size); -WGPU_EXPORT void wgpuRenderBundleEncoderReference(WGPURenderBundleEncoder renderBundleEncoder); -WGPU_EXPORT void wgpuRenderBundleEncoderRelease(WGPURenderBundleEncoder renderBundleEncoder); - -// Methods of RenderPassEncoder -WGPU_EXPORT void wgpuRenderPassEncoderBeginOcclusionQuery(WGPURenderPassEncoder renderPassEncoder, uint32_t queryIndex); -WGPU_EXPORT void wgpuRenderPassEncoderDraw(WGPURenderPassEncoder renderPassEncoder, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance); -WGPU_EXPORT void wgpuRenderPassEncoderDrawIndexed(WGPURenderPassEncoder renderPassEncoder, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t baseVertex, uint32_t firstInstance); -WGPU_EXPORT void wgpuRenderPassEncoderDrawIndexedIndirect(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset); -WGPU_EXPORT void wgpuRenderPassEncoderDrawIndirect(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer indirectBuffer, uint64_t indirectOffset); -WGPU_EXPORT void wgpuRenderPassEncoderEndOcclusionQuery(WGPURenderPassEncoder renderPassEncoder); -WGPU_EXPORT void wgpuRenderPassEncoderEndPass(WGPURenderPassEncoder renderPassEncoder); -WGPU_EXPORT void wgpuRenderPassEncoderExecuteBundles(WGPURenderPassEncoder renderPassEncoder, uint32_t bundlesCount, WGPURenderBundle const * bundles); -WGPU_EXPORT void wgpuRenderPassEncoderInsertDebugMarker(WGPURenderPassEncoder renderPassEncoder, char const * markerLabel); -WGPU_EXPORT void wgpuRenderPassEncoderPopDebugGroup(WGPURenderPassEncoder renderPassEncoder); -WGPU_EXPORT void wgpuRenderPassEncoderPushDebugGroup(WGPURenderPassEncoder renderPassEncoder, char const * groupLabel); -WGPU_EXPORT void wgpuRenderPassEncoderSetBindGroup(WGPURenderPassEncoder renderPassEncoder, uint32_t groupIndex, WGPUBindGroup group, uint32_t dynamicOffsetCount, uint32_t const * dynamicOffsets); -WGPU_EXPORT void wgpuRenderPassEncoderSetBlendConstant(WGPURenderPassEncoder renderPassEncoder, WGPUColor const * color); -WGPU_EXPORT void wgpuRenderPassEncoderSetIndexBuffer(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer buffer, WGPUIndexFormat format, uint64_t offset, uint64_t size); -WGPU_EXPORT void wgpuRenderPassEncoderSetIndexBufferWithFormat(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer buffer, WGPUIndexFormat format, uint64_t offset, uint64_t size); -WGPU_EXPORT void wgpuRenderPassEncoderSetPipeline(WGPURenderPassEncoder renderPassEncoder, WGPURenderPipeline pipeline); -WGPU_EXPORT void wgpuRenderPassEncoderSetScissorRect(WGPURenderPassEncoder renderPassEncoder, uint32_t x, uint32_t y, uint32_t width, uint32_t height); -WGPU_EXPORT void wgpuRenderPassEncoderSetStencilReference(WGPURenderPassEncoder renderPassEncoder, uint32_t reference); -WGPU_EXPORT void wgpuRenderPassEncoderSetVertexBuffer(WGPURenderPassEncoder renderPassEncoder, uint32_t slot, WGPUBuffer buffer, uint64_t offset, uint64_t size); -WGPU_EXPORT void wgpuRenderPassEncoderSetViewport(WGPURenderPassEncoder renderPassEncoder, float x, float y, float width, float height, float minDepth, float maxDepth); -WGPU_EXPORT void wgpuRenderPassEncoderWriteTimestamp(WGPURenderPassEncoder renderPassEncoder, WGPUQuerySet querySet, uint32_t queryIndex); -WGPU_EXPORT void wgpuRenderPassEncoderReference(WGPURenderPassEncoder renderPassEncoder); -WGPU_EXPORT void wgpuRenderPassEncoderRelease(WGPURenderPassEncoder renderPassEncoder); - -// Methods of RenderPipeline -WGPU_EXPORT WGPUBindGroupLayout wgpuRenderPipelineGetBindGroupLayout(WGPURenderPipeline renderPipeline, uint32_t groupIndex); -WGPU_EXPORT void wgpuRenderPipelineReference(WGPURenderPipeline renderPipeline); -WGPU_EXPORT void wgpuRenderPipelineRelease(WGPURenderPipeline renderPipeline); - -// Methods of Sampler -WGPU_EXPORT void wgpuSamplerReference(WGPUSampler sampler); -WGPU_EXPORT void wgpuSamplerRelease(WGPUSampler sampler); - -// Methods of ShaderModule -WGPU_EXPORT void wgpuShaderModuleReference(WGPUShaderModule shaderModule); -WGPU_EXPORT void wgpuShaderModuleRelease(WGPUShaderModule shaderModule); - -// Methods of Surface -WGPU_EXPORT void wgpuSurfaceReference(WGPUSurface surface); -WGPU_EXPORT void wgpuSurfaceRelease(WGPUSurface surface); - -// Methods of SwapChain -WGPU_EXPORT WGPUTextureView wgpuSwapChainGetCurrentTextureView(WGPUSwapChain swapChain); -WGPU_EXPORT void wgpuSwapChainPresent(WGPUSwapChain swapChain); -WGPU_EXPORT void wgpuSwapChainReference(WGPUSwapChain swapChain); -WGPU_EXPORT void wgpuSwapChainRelease(WGPUSwapChain swapChain); - -// Methods of Texture -WGPU_EXPORT WGPUTextureView wgpuTextureCreateView(WGPUTexture texture, WGPUTextureViewDescriptor const * descriptor); -WGPU_EXPORT void wgpuTextureDestroy(WGPUTexture texture); -WGPU_EXPORT void wgpuTextureReference(WGPUTexture texture); -WGPU_EXPORT void wgpuTextureRelease(WGPUTexture texture); - -// Methods of TextureView -WGPU_EXPORT void wgpuTextureViewReference(WGPUTextureView textureView); -WGPU_EXPORT void wgpuTextureViewRelease(WGPUTextureView textureView); - -#endif // !defined(WGPU_SKIP_DECLARATIONS) - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // WEBGPU_H_ diff --git a/emscripten/include/webgpu/webgpu_cpp.h b/emscripten/include/webgpu/webgpu_cpp.h deleted file mode 100644 index 17099d2a..00000000 --- a/emscripten/include/webgpu/webgpu_cpp.h +++ /dev/null @@ -1,1487 +0,0 @@ -#ifndef WEBGPU_CPP_H_ -#define WEBGPU_CPP_H_ - -#include "webgpu/webgpu.h" - -#include - -namespace wgpu { - - template - struct IsDawnBitmask { - static constexpr bool enable = false; - }; - - template - struct LowerBitmask { - static constexpr bool enable = false; - }; - - template - struct LowerBitmask::enable>::type> { - static constexpr bool enable = true; - using type = T; - constexpr static T Lower(T t) { - return t; - } - }; - - template - struct BoolConvertible { - using Integral = typename std::underlying_type::type; - - constexpr BoolConvertible(Integral value) : value(value) { - } - constexpr operator bool() const { - return value != 0; - } - constexpr operator T() const { - return static_cast(value); - } - - Integral value; - }; - - template - struct LowerBitmask> { - static constexpr bool enable = true; - using type = T; - static constexpr type Lower(BoolConvertible t) { - return t; - } - }; - - template ::enable && - LowerBitmask::enable>::type> - constexpr BoolConvertible::type> operator|(T1 left, T2 right) { - using T = typename LowerBitmask::type; - using Integral = typename std::underlying_type::type; - return static_cast(LowerBitmask::Lower(left)) | - static_cast(LowerBitmask::Lower(right)); - } - - template ::enable && - LowerBitmask::enable>::type> - constexpr BoolConvertible::type> operator&(T1 left, T2 right) { - using T = typename LowerBitmask::type; - using Integral = typename std::underlying_type::type; - return static_cast(LowerBitmask::Lower(left)) & - static_cast(LowerBitmask::Lower(right)); - } - - template ::enable && - LowerBitmask::enable>::type> - constexpr BoolConvertible::type> operator^(T1 left, T2 right) { - using T = typename LowerBitmask::type; - using Integral = typename std::underlying_type::type; - return static_cast(LowerBitmask::Lower(left)) ^ - static_cast(LowerBitmask::Lower(right)); - } - - template - constexpr BoolConvertible::type> operator~(T1 t) { - using T = typename LowerBitmask::type; - using Integral = typename std::underlying_type::type; - return ~static_cast(LowerBitmask::Lower(t)); - } - - template ::enable && - LowerBitmask::enable>::type> - constexpr T& operator&=(T& l, T2 right) { - T r = LowerBitmask::Lower(right); - l = l & r; - return l; - } - - template ::enable && - LowerBitmask::enable>::type> - constexpr T& operator|=(T& l, T2 right) { - T r = LowerBitmask::Lower(right); - l = l | r; - return l; - } - - template ::enable && - LowerBitmask::enable>::type> - constexpr T& operator^=(T& l, T2 right) { - T r = LowerBitmask::Lower(right); - l = l ^ r; - return l; - } - - template - constexpr bool HasZeroOrOneBits(T value) { - using Integral = typename std::underlying_type::type; - return (static_cast(value) & (static_cast(value) - 1)) == 0; - } - - static constexpr uint64_t kWholeSize = WGPU_WHOLE_SIZE; - // TODO(crbug.com/520): Remove kStrideUndefined in favor of kCopyStrideUndefined. - static constexpr uint32_t kStrideUndefined = WGPU_STRIDE_UNDEFINED; - static constexpr uint32_t kCopyStrideUndefined = WGPU_COPY_STRIDE_UNDEFINED; - - enum class AdapterType : uint32_t { - DiscreteGPU = 0x00000000, - IntegratedGPU = 0x00000001, - CPU = 0x00000002, - Unknown = 0x00000003, - }; - - enum class AddressMode : uint32_t { - Repeat = 0x00000000, - MirrorRepeat = 0x00000001, - ClampToEdge = 0x00000002, - }; - - enum class BackendType : uint32_t { - Null = 0x00000000, - D3D11 = 0x00000001, - D3D12 = 0x00000002, - Metal = 0x00000003, - Vulkan = 0x00000004, - OpenGL = 0x00000005, - OpenGLES = 0x00000006, - }; - - enum class BlendFactor : uint32_t { - Zero = 0x00000000, - One = 0x00000001, - Src = 0x00000002, - OneMinusSrc = 0x00000003, - SrcAlpha = 0x00000004, - OneMinusSrcAlpha = 0x00000005, - Dst = 0x00000006, - OneMinusDst = 0x00000007, - DstAlpha = 0x00000008, - OneMinusDstAlpha = 0x00000009, - SrcAlphaSaturated = 0x0000000A, - Constant = 0x0000000B, - OneMinusConstant = 0x0000000C, - }; - - enum class BlendOperation : uint32_t { - Add = 0x00000000, - Subtract = 0x00000001, - ReverseSubtract = 0x00000002, - Min = 0x00000003, - Max = 0x00000004, - }; - - enum class BufferBindingType : uint32_t { - Undefined = 0x00000000, - Uniform = 0x00000001, - Storage = 0x00000002, - ReadOnlyStorage = 0x00000003, - }; - - enum class BufferMapAsyncStatus : uint32_t { - Success = 0x00000000, - Error = 0x00000001, - Unknown = 0x00000002, - DeviceLost = 0x00000003, - DestroyedBeforeCallback = 0x00000004, - UnmappedBeforeCallback = 0x00000005, - }; - - enum class CompareFunction : uint32_t { - Undefined = 0x00000000, - Never = 0x00000001, - Less = 0x00000002, - LessEqual = 0x00000003, - Greater = 0x00000004, - GreaterEqual = 0x00000005, - Equal = 0x00000006, - NotEqual = 0x00000007, - Always = 0x00000008, - }; - - enum class CreatePipelineAsyncStatus : uint32_t { - Success = 0x00000000, - Error = 0x00000001, - DeviceLost = 0x00000002, - DeviceDestroyed = 0x00000003, - Unknown = 0x00000004, - }; - - enum class CullMode : uint32_t { - None = 0x00000000, - Front = 0x00000001, - Back = 0x00000002, - }; - - enum class ErrorFilter : uint32_t { - None = 0x00000000, - Validation = 0x00000001, - OutOfMemory = 0x00000002, - }; - - enum class ErrorType : uint32_t { - NoError = 0x00000000, - Validation = 0x00000001, - OutOfMemory = 0x00000002, - Unknown = 0x00000003, - DeviceLost = 0x00000004, - }; - - enum class FilterMode : uint32_t { - Nearest = 0x00000000, - Linear = 0x00000001, - }; - - enum class FrontFace : uint32_t { - CCW = 0x00000000, - CW = 0x00000001, - }; - - enum class IndexFormat : uint32_t { - Undefined = 0x00000000, - Uint16 = 0x00000001, - Uint32 = 0x00000002, - }; - - enum class InputStepMode : uint32_t { - Vertex = 0x00000000, - Instance = 0x00000001, - }; - - enum class LoadOp : uint32_t { - Clear = 0x00000000, - Load = 0x00000001, - }; - - enum class PipelineStatisticName : uint32_t { - VertexShaderInvocations = 0x00000000, - ClipperInvocations = 0x00000001, - ClipperPrimitivesOut = 0x00000002, - FragmentShaderInvocations = 0x00000003, - ComputeShaderInvocations = 0x00000004, - }; - - enum class PresentMode : uint32_t { - Immediate = 0x00000000, - Mailbox = 0x00000001, - Fifo = 0x00000002, - }; - - enum class PrimitiveTopology : uint32_t { - PointList = 0x00000000, - LineList = 0x00000001, - LineStrip = 0x00000002, - TriangleList = 0x00000003, - TriangleStrip = 0x00000004, - }; - - enum class QueryType : uint32_t { - Occlusion = 0x00000000, - PipelineStatistics = 0x00000001, - Timestamp = 0x00000002, - }; - - enum class QueueWorkDoneStatus : uint32_t { - Success = 0x00000000, - Error = 0x00000001, - Unknown = 0x00000002, - DeviceLost = 0x00000003, - }; - - enum class SType : uint32_t { - Invalid = 0x00000000, - SurfaceDescriptorFromMetalLayer = 0x00000001, - SurfaceDescriptorFromWindowsHWND = 0x00000002, - SurfaceDescriptorFromXlib = 0x00000003, - SurfaceDescriptorFromCanvasHTMLSelector = 0x00000004, - ShaderModuleSPIRVDescriptor = 0x00000005, - ShaderModuleWGSLDescriptor = 0x00000006, - PrimitiveDepthClampingState = 0x00000007, - }; - - enum class SamplerBindingType : uint32_t { - Undefined = 0x00000000, - Filtering = 0x00000001, - NonFiltering = 0x00000002, - Comparison = 0x00000003, - }; - - enum class StencilOperation : uint32_t { - Keep = 0x00000000, - Zero = 0x00000001, - Replace = 0x00000002, - Invert = 0x00000003, - IncrementClamp = 0x00000004, - DecrementClamp = 0x00000005, - IncrementWrap = 0x00000006, - DecrementWrap = 0x00000007, - }; - - enum class StorageTextureAccess : uint32_t { - Undefined = 0x00000000, - ReadOnly = 0x00000001, - WriteOnly = 0x00000002, - }; - - enum class StoreOp : uint32_t { - Store = 0x00000000, - Clear = 0x00000001, - }; - - enum class TextureAspect : uint32_t { - All = 0x00000000, - StencilOnly = 0x00000001, - DepthOnly = 0x00000002, - }; - - enum class TextureComponentType : uint32_t { - Float = 0x00000000, - Sint = 0x00000001, - Uint = 0x00000002, - DepthComparison = 0x00000003, - }; - - enum class TextureDimension : uint32_t { - e1D = 0x00000000, - e2D = 0x00000001, - e3D = 0x00000002, - }; - - enum class TextureFormat : uint32_t { - Undefined = 0x00000000, - R8Unorm = 0x00000001, - R8Snorm = 0x00000002, - R8Uint = 0x00000003, - R8Sint = 0x00000004, - R16Uint = 0x00000005, - R16Sint = 0x00000006, - R16Float = 0x00000007, - RG8Unorm = 0x00000008, - RG8Snorm = 0x00000009, - RG8Uint = 0x0000000A, - RG8Sint = 0x0000000B, - R32Float = 0x0000000C, - R32Uint = 0x0000000D, - R32Sint = 0x0000000E, - RG16Uint = 0x0000000F, - RG16Sint = 0x00000010, - RG16Float = 0x00000011, - RGBA8Unorm = 0x00000012, - RGBA8UnormSrgb = 0x00000013, - RGBA8Snorm = 0x00000014, - RGBA8Uint = 0x00000015, - RGBA8Sint = 0x00000016, - BGRA8Unorm = 0x00000017, - BGRA8UnormSrgb = 0x00000018, - RGB10A2Unorm = 0x00000019, - RG11B10Ufloat = 0x0000001A, - RGB9E5Ufloat = 0x0000001B, - RG32Float = 0x0000001C, - RG32Uint = 0x0000001D, - RG32Sint = 0x0000001E, - RGBA16Uint = 0x0000001F, - RGBA16Sint = 0x00000020, - RGBA16Float = 0x00000021, - RGBA32Float = 0x00000022, - RGBA32Uint = 0x00000023, - RGBA32Sint = 0x00000024, - Depth32Float = 0x00000025, - Depth24Plus = 0x00000026, - Stencil8 = 0x00000027, - Depth24PlusStencil8 = 0x00000028, - BC1RGBAUnorm = 0x00000029, - BC1RGBAUnormSrgb = 0x0000002A, - BC2RGBAUnorm = 0x0000002B, - BC2RGBAUnormSrgb = 0x0000002C, - BC3RGBAUnorm = 0x0000002D, - BC3RGBAUnormSrgb = 0x0000002E, - BC4RUnorm = 0x0000002F, - BC4RSnorm = 0x00000030, - BC5RGUnorm = 0x00000031, - BC5RGSnorm = 0x00000032, - BC6HRGBUfloat = 0x00000033, - BC6HRGBFloat = 0x00000034, - BC7RGBAUnorm = 0x00000035, - BC7RGBAUnormSrgb = 0x00000036, - }; - - enum class TextureSampleType : uint32_t { - Undefined = 0x00000000, - Float = 0x00000001, - UnfilterableFloat = 0x00000002, - Depth = 0x00000003, - Sint = 0x00000004, - Uint = 0x00000005, - }; - - enum class TextureViewDimension : uint32_t { - Undefined = 0x00000000, - e1D = 0x00000001, - e2D = 0x00000002, - e2DArray = 0x00000003, - Cube = 0x00000004, - CubeArray = 0x00000005, - e3D = 0x00000006, - }; - - enum class VertexFormat : uint32_t { - Undefined = 0x00000000, - Uint8x2 = 0x00000001, - Uint8x4 = 0x00000002, - Sint8x2 = 0x00000003, - Sint8x4 = 0x00000004, - Unorm8x2 = 0x00000005, - Unorm8x4 = 0x00000006, - Snorm8x2 = 0x00000007, - Snorm8x4 = 0x00000008, - Uint16x2 = 0x00000009, - Uint16x4 = 0x0000000A, - Sint16x2 = 0x0000000B, - Sint16x4 = 0x0000000C, - Unorm16x2 = 0x0000000D, - Unorm16x4 = 0x0000000E, - Snorm16x2 = 0x0000000F, - Snorm16x4 = 0x00000010, - Float16x2 = 0x00000011, - Float16x4 = 0x00000012, - Float32 = 0x00000013, - Float32x2 = 0x00000014, - Float32x3 = 0x00000015, - Float32x4 = 0x00000016, - Uint32 = 0x00000017, - Uint32x2 = 0x00000018, - Uint32x3 = 0x00000019, - Uint32x4 = 0x0000001A, - Sint32 = 0x0000001B, - Sint32x2 = 0x0000001C, - Sint32x3 = 0x0000001D, - Sint32x4 = 0x0000001E, - }; - - - enum class BufferUsage : uint32_t { - None = 0x00000000, - MapRead = 0x00000001, - MapWrite = 0x00000002, - CopySrc = 0x00000004, - CopyDst = 0x00000008, - Index = 0x00000010, - Vertex = 0x00000020, - Uniform = 0x00000040, - Storage = 0x00000080, - Indirect = 0x00000100, - QueryResolve = 0x00000200, - }; - - enum class ColorWriteMask : uint32_t { - None = 0x00000000, - Red = 0x00000001, - Green = 0x00000002, - Blue = 0x00000004, - Alpha = 0x00000008, - All = 0x0000000F, - }; - - enum class MapMode : uint32_t { - None = 0x00000000, - Read = 0x00000001, - Write = 0x00000002, - }; - - enum class ShaderStage : uint32_t { - None = 0x00000000, - Vertex = 0x00000001, - Fragment = 0x00000002, - Compute = 0x00000004, - }; - - enum class TextureUsage : uint32_t { - None = 0x00000000, - CopySrc = 0x00000001, - CopyDst = 0x00000002, - Sampled = 0x00000004, - Storage = 0x00000008, - OutputAttachment = 0x00000010, - RenderAttachment = 0x00000010, - }; - - - template<> - struct IsDawnBitmask { - static constexpr bool enable = true; - }; - - template<> - struct IsDawnBitmask { - static constexpr bool enable = true; - }; - - template<> - struct IsDawnBitmask { - static constexpr bool enable = true; - }; - - template<> - struct IsDawnBitmask { - static constexpr bool enable = true; - }; - - template<> - struct IsDawnBitmask { - static constexpr bool enable = true; - }; - - - using Proc = WGPUProc; - using BufferMapCallback = WGPUBufferMapCallback; - using CreateComputePipelineAsyncCallback = WGPUCreateComputePipelineAsyncCallback; - using CreateRenderPipelineAsyncCallback = WGPUCreateRenderPipelineAsyncCallback; - using DeviceLostCallback = WGPUDeviceLostCallback; - using ErrorCallback = WGPUErrorCallback; - using QueueWorkDoneCallback = WGPUQueueWorkDoneCallback; - - class BindGroup; - class BindGroupLayout; - class Buffer; - class CommandBuffer; - class CommandEncoder; - class ComputePassEncoder; - class ComputePipeline; - class Device; - class Instance; - class PipelineLayout; - class QuerySet; - class Queue; - class RenderBundle; - class RenderBundleEncoder; - class RenderPassEncoder; - class RenderPipeline; - class Sampler; - class ShaderModule; - class Surface; - class SwapChain; - class Texture; - class TextureView; - - struct AdapterProperties; - struct BindGroupEntry; - struct BlendComponent; - struct BufferBindingLayout; - struct BufferDescriptor; - struct Color; - struct CommandBufferDescriptor; - struct CommandEncoderDescriptor; - struct ComputePassDescriptor; - struct Extent3D; - struct InstanceDescriptor; - struct MultisampleState; - struct Origin3D; - struct PipelineLayoutDescriptor; - struct PrimitiveDepthClampingState; - struct PrimitiveState; - struct ProgrammableStageDescriptor; - struct QuerySetDescriptor; - struct RenderBundleDescriptor; - struct RenderBundleEncoderDescriptor; - struct RenderPassDepthStencilAttachment; - struct SamplerBindingLayout; - struct SamplerDescriptor; - struct ShaderModuleDescriptor; - struct ShaderModuleSPIRVDescriptor; - struct ShaderModuleWGSLDescriptor; - struct StencilFaceState; - struct StorageTextureBindingLayout; - struct SurfaceDescriptor; - struct SurfaceDescriptorFromCanvasHTMLSelector; - struct SurfaceDescriptorFromMetalLayer; - struct SurfaceDescriptorFromWindowsHWND; - struct SurfaceDescriptorFromXlib; - struct SwapChainDescriptor; - struct TextureBindingLayout; - struct TextureDataLayout; - struct TextureViewDescriptor; - struct VertexAttribute; - struct BindGroupDescriptor; - struct BindGroupLayoutEntry; - struct BlendState; - struct ComputePipelineDescriptor; - struct DepthStencilState; - struct ImageCopyBuffer; - struct ImageCopyTexture; - struct RenderPassColorAttachment; - struct TextureDescriptor; - struct VertexBufferLayout; - struct BindGroupLayoutDescriptor; - struct ColorTargetState; - struct RenderPassDescriptor; - struct VertexState; - struct FragmentState; - struct RenderPipelineDescriptor2; - - template - class ObjectBase { - public: - ObjectBase() = default; - ObjectBase(CType handle): mHandle(handle) { - if (mHandle) Derived::WGPUReference(mHandle); - } - ~ObjectBase() { - if (mHandle) Derived::WGPURelease(mHandle); - } - - ObjectBase(ObjectBase const& other) - : ObjectBase(other.Get()) { - } - Derived& operator=(ObjectBase const& other) { - if (&other != this) { - if (mHandle) Derived::WGPURelease(mHandle); - mHandle = other.mHandle; - if (mHandle) Derived::WGPUReference(mHandle); - } - - return static_cast(*this); - } - - ObjectBase(ObjectBase&& other) { - mHandle = other.mHandle; - other.mHandle = 0; - } - Derived& operator=(ObjectBase&& other) { - if (&other != this) { - if (mHandle) Derived::WGPURelease(mHandle); - mHandle = other.mHandle; - other.mHandle = 0; - } - - return static_cast(*this); - } - - ObjectBase(std::nullptr_t) {} - Derived& operator=(std::nullptr_t) { - if (mHandle != nullptr) { - Derived::WGPURelease(mHandle); - mHandle = nullptr; - } - return static_cast(*this); - } - - bool operator==(std::nullptr_t) const { - return mHandle == nullptr; - } - bool operator!=(std::nullptr_t) const { - return mHandle != nullptr; - } - - explicit operator bool() const { - return mHandle != nullptr; - } - CType Get() const { - return mHandle; - } - CType Release() { - CType result = mHandle; - mHandle = 0; - return result; - } - static Derived Acquire(CType handle) { - Derived result; - result.mHandle = handle; - return result; - } - - protected: - CType mHandle = nullptr; - }; - - - - class BindGroup : public ObjectBase { - public: - using ObjectBase::ObjectBase; - using ObjectBase::operator=; - - - private: - friend ObjectBase; - static void WGPUReference(WGPUBindGroup handle); - static void WGPURelease(WGPUBindGroup handle); - }; - - class BindGroupLayout : public ObjectBase { - public: - using ObjectBase::ObjectBase; - using ObjectBase::operator=; - - - private: - friend ObjectBase; - static void WGPUReference(WGPUBindGroupLayout handle); - static void WGPURelease(WGPUBindGroupLayout handle); - }; - - class Buffer : public ObjectBase { - public: - using ObjectBase::ObjectBase; - using ObjectBase::operator=; - - void Destroy() const; - void const * GetConstMappedRange(size_t offset = 0, size_t size = 0) const; - void * GetMappedRange(size_t offset = 0, size_t size = 0) const; - void MapAsync(MapMode mode, size_t offset, size_t size, BufferMapCallback callback, void * userdata) const; - void Unmap() const; - - private: - friend ObjectBase; - static void WGPUReference(WGPUBuffer handle); - static void WGPURelease(WGPUBuffer handle); - }; - - class CommandBuffer : public ObjectBase { - public: - using ObjectBase::ObjectBase; - using ObjectBase::operator=; - - - private: - friend ObjectBase; - static void WGPUReference(WGPUCommandBuffer handle); - static void WGPURelease(WGPUCommandBuffer handle); - }; - - class CommandEncoder : public ObjectBase { - public: - using ObjectBase::ObjectBase; - using ObjectBase::operator=; - - ComputePassEncoder BeginComputePass(ComputePassDescriptor const * descriptor = nullptr) const; - RenderPassEncoder BeginRenderPass(RenderPassDescriptor const * descriptor) const; - void CopyBufferToBuffer(Buffer const& source, uint64_t sourceOffset, Buffer const& destination, uint64_t destinationOffset, uint64_t size) const; - void CopyBufferToTexture(ImageCopyBuffer const * source, ImageCopyTexture const * destination, Extent3D const * copySize) const; - void CopyTextureToBuffer(ImageCopyTexture const * source, ImageCopyBuffer const * destination, Extent3D const * copySize) const; - void CopyTextureToTexture(ImageCopyTexture const * source, ImageCopyTexture const * destination, Extent3D const * copySize) const; - CommandBuffer Finish(CommandBufferDescriptor const * descriptor = nullptr) const; - void InsertDebugMarker(char const * markerLabel) const; - void PopDebugGroup() const; - void PushDebugGroup(char const * groupLabel) const; - void ResolveQuerySet(QuerySet const& querySet, uint32_t firstQuery, uint32_t queryCount, Buffer const& destination, uint64_t destinationOffset) const; - void WriteTimestamp(QuerySet const& querySet, uint32_t queryIndex) const; - - private: - friend ObjectBase; - static void WGPUReference(WGPUCommandEncoder handle); - static void WGPURelease(WGPUCommandEncoder handle); - }; - - class ComputePassEncoder : public ObjectBase { - public: - using ObjectBase::ObjectBase; - using ObjectBase::operator=; - - void Dispatch(uint32_t x, uint32_t y = 1, uint32_t z = 1) const; - void DispatchIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const; - void EndPass() const; - void InsertDebugMarker(char const * markerLabel) const; - void PopDebugGroup() const; - void PushDebugGroup(char const * groupLabel) const; - void SetBindGroup(uint32_t groupIndex, BindGroup const& group, uint32_t dynamicOffsetCount = 0, uint32_t const * dynamicOffsets = nullptr) const; - void SetPipeline(ComputePipeline const& pipeline) const; - void WriteTimestamp(QuerySet const& querySet, uint32_t queryIndex) const; - - private: - friend ObjectBase; - static void WGPUReference(WGPUComputePassEncoder handle); - static void WGPURelease(WGPUComputePassEncoder handle); - }; - - class ComputePipeline : public ObjectBase { - public: - using ObjectBase::ObjectBase; - using ObjectBase::operator=; - - BindGroupLayout GetBindGroupLayout(uint32_t groupIndex) const; - - private: - friend ObjectBase; - static void WGPUReference(WGPUComputePipeline handle); - static void WGPURelease(WGPUComputePipeline handle); - }; - - class Device : public ObjectBase { - public: - using ObjectBase::ObjectBase; - using ObjectBase::operator=; - - BindGroup CreateBindGroup(BindGroupDescriptor const * descriptor) const; - BindGroupLayout CreateBindGroupLayout(BindGroupLayoutDescriptor const * descriptor) const; - Buffer CreateBuffer(BufferDescriptor const * descriptor) const; - CommandEncoder CreateCommandEncoder(CommandEncoderDescriptor const * descriptor = nullptr) const; - ComputePipeline CreateComputePipeline(ComputePipelineDescriptor const * descriptor) const; - void CreateComputePipelineAsync(ComputePipelineDescriptor const * descriptor, CreateComputePipelineAsyncCallback callback, void * userdata) const; - PipelineLayout CreatePipelineLayout(PipelineLayoutDescriptor const * descriptor) const; - QuerySet CreateQuerySet(QuerySetDescriptor const * descriptor) const; - RenderBundleEncoder CreateRenderBundleEncoder(RenderBundleEncoderDescriptor const * descriptor) const; - RenderPipeline CreateRenderPipeline2(RenderPipelineDescriptor2 const * descriptor) const; - void CreateRenderPipelineAsync(RenderPipelineDescriptor2 const * descriptor, CreateRenderPipelineAsyncCallback callback, void * userdata) const; - Sampler CreateSampler(SamplerDescriptor const * descriptor = nullptr) const; - ShaderModule CreateShaderModule(ShaderModuleDescriptor const * descriptor) const; - SwapChain CreateSwapChain(Surface const& surface, SwapChainDescriptor const * descriptor) const; - Texture CreateTexture(TextureDescriptor const * descriptor) const; - Queue GetQueue() const; - bool PopErrorScope(ErrorCallback callback, void * userdata) const; - void PushErrorScope(ErrorFilter filter) const; - void SetDeviceLostCallback(DeviceLostCallback callback, void * userdata) const; - void SetUncapturedErrorCallback(ErrorCallback callback, void * userdata) const; - - private: - friend ObjectBase; - static void WGPUReference(WGPUDevice handle); - static void WGPURelease(WGPUDevice handle); - }; - - class Instance : public ObjectBase { - public: - using ObjectBase::ObjectBase; - using ObjectBase::operator=; - - Surface CreateSurface(SurfaceDescriptor const * descriptor) const; - - private: - friend ObjectBase; - static void WGPUReference(WGPUInstance handle); - static void WGPURelease(WGPUInstance handle); - }; - - class PipelineLayout : public ObjectBase { - public: - using ObjectBase::ObjectBase; - using ObjectBase::operator=; - - - private: - friend ObjectBase; - static void WGPUReference(WGPUPipelineLayout handle); - static void WGPURelease(WGPUPipelineLayout handle); - }; - - class QuerySet : public ObjectBase { - public: - using ObjectBase::ObjectBase; - using ObjectBase::operator=; - - void Destroy() const; - - private: - friend ObjectBase; - static void WGPUReference(WGPUQuerySet handle); - static void WGPURelease(WGPUQuerySet handle); - }; - - class Queue : public ObjectBase { - public: - using ObjectBase::ObjectBase; - using ObjectBase::operator=; - - void OnSubmittedWorkDone(uint64_t signalValue, QueueWorkDoneCallback callback, void * userdata) const; - void Submit(uint32_t commandCount, CommandBuffer const * commands) const; - void WriteBuffer(Buffer const& buffer, uint64_t bufferOffset, void const * data, size_t size) const; - void WriteTexture(ImageCopyTexture const * destination, void const * data, size_t dataSize, TextureDataLayout const * dataLayout, Extent3D const * writeSize) const; - - private: - friend ObjectBase; - static void WGPUReference(WGPUQueue handle); - static void WGPURelease(WGPUQueue handle); - }; - - class RenderBundle : public ObjectBase { - public: - using ObjectBase::ObjectBase; - using ObjectBase::operator=; - - - private: - friend ObjectBase; - static void WGPUReference(WGPURenderBundle handle); - static void WGPURelease(WGPURenderBundle handle); - }; - - class RenderBundleEncoder : public ObjectBase { - public: - using ObjectBase::ObjectBase; - using ObjectBase::operator=; - - void Draw(uint32_t vertexCount, uint32_t instanceCount = 1, uint32_t firstVertex = 0, uint32_t firstInstance = 0) const; - void DrawIndexed(uint32_t indexCount, uint32_t instanceCount = 1, uint32_t firstIndex = 0, int32_t baseVertex = 0, uint32_t firstInstance = 0) const; - void DrawIndexedIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const; - void DrawIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const; - RenderBundle Finish(RenderBundleDescriptor const * descriptor = nullptr) const; - void InsertDebugMarker(char const * markerLabel) const; - void PopDebugGroup() const; - void PushDebugGroup(char const * groupLabel) const; - void SetBindGroup(uint32_t groupIndex, BindGroup const& group, uint32_t dynamicOffsetCount = 0, uint32_t const * dynamicOffsets = nullptr) const; - void SetIndexBuffer(Buffer const& buffer, IndexFormat format, uint64_t offset = 0, uint64_t size = 0) const; - void SetIndexBufferWithFormat(Buffer const& buffer, IndexFormat format, uint64_t offset = 0, uint64_t size = 0) const; - void SetPipeline(RenderPipeline const& pipeline) const; - void SetVertexBuffer(uint32_t slot, Buffer const& buffer, uint64_t offset = 0, uint64_t size = 0) const; - - private: - friend ObjectBase; - static void WGPUReference(WGPURenderBundleEncoder handle); - static void WGPURelease(WGPURenderBundleEncoder handle); - }; - - class RenderPassEncoder : public ObjectBase { - public: - using ObjectBase::ObjectBase; - using ObjectBase::operator=; - - void BeginOcclusionQuery(uint32_t queryIndex) const; - void Draw(uint32_t vertexCount, uint32_t instanceCount = 1, uint32_t firstVertex = 0, uint32_t firstInstance = 0) const; - void DrawIndexed(uint32_t indexCount, uint32_t instanceCount = 1, uint32_t firstIndex = 0, int32_t baseVertex = 0, uint32_t firstInstance = 0) const; - void DrawIndexedIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const; - void DrawIndirect(Buffer const& indirectBuffer, uint64_t indirectOffset) const; - void EndOcclusionQuery() const; - void EndPass() const; - void ExecuteBundles(uint32_t bundlesCount, RenderBundle const * bundles) const; - void InsertDebugMarker(char const * markerLabel) const; - void PopDebugGroup() const; - void PushDebugGroup(char const * groupLabel) const; - void SetBindGroup(uint32_t groupIndex, BindGroup const& group, uint32_t dynamicOffsetCount = 0, uint32_t const * dynamicOffsets = nullptr) const; - void SetBlendConstant(Color const * color) const; - void SetIndexBuffer(Buffer const& buffer, IndexFormat format, uint64_t offset = 0, uint64_t size = 0) const; - void SetIndexBufferWithFormat(Buffer const& buffer, IndexFormat format, uint64_t offset = 0, uint64_t size = 0) const; - void SetPipeline(RenderPipeline const& pipeline) const; - void SetScissorRect(uint32_t x, uint32_t y, uint32_t width, uint32_t height) const; - void SetStencilReference(uint32_t reference) const; - void SetVertexBuffer(uint32_t slot, Buffer const& buffer, uint64_t offset = 0, uint64_t size = 0) const; - void SetViewport(float x, float y, float width, float height, float minDepth, float maxDepth) const; - void WriteTimestamp(QuerySet const& querySet, uint32_t queryIndex) const; - - private: - friend ObjectBase; - static void WGPUReference(WGPURenderPassEncoder handle); - static void WGPURelease(WGPURenderPassEncoder handle); - }; - - class RenderPipeline : public ObjectBase { - public: - using ObjectBase::ObjectBase; - using ObjectBase::operator=; - - BindGroupLayout GetBindGroupLayout(uint32_t groupIndex) const; - - private: - friend ObjectBase; - static void WGPUReference(WGPURenderPipeline handle); - static void WGPURelease(WGPURenderPipeline handle); - }; - - class Sampler : public ObjectBase { - public: - using ObjectBase::ObjectBase; - using ObjectBase::operator=; - - - private: - friend ObjectBase; - static void WGPUReference(WGPUSampler handle); - static void WGPURelease(WGPUSampler handle); - }; - - class ShaderModule : public ObjectBase { - public: - using ObjectBase::ObjectBase; - using ObjectBase::operator=; - - - private: - friend ObjectBase; - static void WGPUReference(WGPUShaderModule handle); - static void WGPURelease(WGPUShaderModule handle); - }; - - class Surface : public ObjectBase { - public: - using ObjectBase::ObjectBase; - using ObjectBase::operator=; - - - private: - friend ObjectBase; - static void WGPUReference(WGPUSurface handle); - static void WGPURelease(WGPUSurface handle); - }; - - class SwapChain : public ObjectBase { - public: - using ObjectBase::ObjectBase; - using ObjectBase::operator=; - - TextureView GetCurrentTextureView() const; - void Present() const; - - private: - friend ObjectBase; - static void WGPUReference(WGPUSwapChain handle); - static void WGPURelease(WGPUSwapChain handle); - }; - - class Texture : public ObjectBase { - public: - using ObjectBase::ObjectBase; - using ObjectBase::operator=; - - TextureView CreateView(TextureViewDescriptor const * descriptor = nullptr) const; - void Destroy() const; - - private: - friend ObjectBase; - static void WGPUReference(WGPUTexture handle); - static void WGPURelease(WGPUTexture handle); - }; - - class TextureView : public ObjectBase { - public: - using ObjectBase::ObjectBase; - using ObjectBase::operator=; - - - private: - friend ObjectBase; - static void WGPUReference(WGPUTextureView handle); - static void WGPURelease(WGPUTextureView handle); - }; - - - Instance CreateInstance(InstanceDescriptor const * descriptor = nullptr); - Proc GetProcAddress(Device const& device, const char* procName); - - struct ChainedStruct { - ChainedStruct const * nextInChain = nullptr; - SType sType = SType::Invalid; - }; - - struct AdapterProperties { - ChainedStruct const * nextInChain = nullptr; - uint32_t deviceID; - uint32_t vendorID; - char const * name; - char const * driverDescription; - AdapterType adapterType; - BackendType backendType; - }; - - struct BindGroupEntry { - uint32_t binding; - Buffer buffer = nullptr; - uint64_t offset = 0; - uint64_t size; - Sampler sampler = nullptr; - TextureView textureView = nullptr; - }; - - struct BlendComponent { - BlendOperation operation = BlendOperation::Add; - BlendFactor srcFactor = BlendFactor::One; - BlendFactor dstFactor = BlendFactor::Zero; - }; - - struct BufferBindingLayout { - ChainedStruct const * nextInChain = nullptr; - BufferBindingType type = BufferBindingType::Undefined; - bool hasDynamicOffset = false; - uint64_t minBindingSize = 0; - }; - - struct BufferDescriptor { - ChainedStruct const * nextInChain = nullptr; - char const * label = nullptr; - BufferUsage usage; - uint64_t size; - bool mappedAtCreation = false; - }; - - struct Color { - double r; - double g; - double b; - double a; - }; - - struct CommandBufferDescriptor { - ChainedStruct const * nextInChain = nullptr; - char const * label = nullptr; - }; - - struct CommandEncoderDescriptor { - ChainedStruct const * nextInChain = nullptr; - char const * label = nullptr; - }; - - struct ComputePassDescriptor { - ChainedStruct const * nextInChain = nullptr; - char const * label = nullptr; - }; - - struct Extent3D { - uint32_t width; - uint32_t height = 1; - uint32_t depthOrArrayLayers = 1; - }; - - struct InstanceDescriptor { - ChainedStruct const * nextInChain = nullptr; - }; - - struct MultisampleState { - ChainedStruct const * nextInChain = nullptr; - uint32_t count = 1; - uint32_t mask = 0xFFFFFFFF; - bool alphaToCoverageEnabled = false; - }; - - struct Origin3D { - uint32_t x = 0; - uint32_t y = 0; - uint32_t z = 0; - }; - - struct PipelineLayoutDescriptor { - ChainedStruct const * nextInChain = nullptr; - char const * label = nullptr; - uint32_t bindGroupLayoutCount; - BindGroupLayout const * bindGroupLayouts; - }; - - struct PrimitiveDepthClampingState : ChainedStruct { - PrimitiveDepthClampingState() { - sType = SType::PrimitiveDepthClampingState; - } - alignas(ChainedStruct) bool clampDepth = false; - }; - - struct PrimitiveState { - ChainedStruct const * nextInChain = nullptr; - PrimitiveTopology topology = PrimitiveTopology::TriangleList; - IndexFormat stripIndexFormat = IndexFormat::Undefined; - FrontFace frontFace = FrontFace::CCW; - CullMode cullMode = CullMode::None; - }; - - struct ProgrammableStageDescriptor { - ChainedStruct const * nextInChain = nullptr; - ShaderModule module; - char const * entryPoint; - }; - - struct QuerySetDescriptor { - ChainedStruct const * nextInChain = nullptr; - char const * label = nullptr; - QueryType type; - uint32_t count; - PipelineStatisticName const * pipelineStatistics; - uint32_t pipelineStatisticsCount = 0; - }; - - struct RenderBundleDescriptor { - ChainedStruct const * nextInChain = nullptr; - char const * label = nullptr; - }; - - struct RenderBundleEncoderDescriptor { - ChainedStruct const * nextInChain = nullptr; - char const * label = nullptr; - uint32_t colorFormatsCount; - TextureFormat const * colorFormats; - TextureFormat depthStencilFormat = TextureFormat::Undefined; - uint32_t sampleCount = 1; - }; - - struct RenderPassDepthStencilAttachment { - TextureView view = nullptr; - LoadOp depthLoadOp; - StoreOp depthStoreOp; - float clearDepth; - bool depthReadOnly = false; - LoadOp stencilLoadOp; - StoreOp stencilStoreOp; - uint32_t clearStencil = 0; - bool stencilReadOnly = false; - }; - - struct SamplerBindingLayout { - ChainedStruct const * nextInChain = nullptr; - SamplerBindingType type = SamplerBindingType::Undefined; - }; - - struct SamplerDescriptor { - ChainedStruct const * nextInChain = nullptr; - char const * label = nullptr; - AddressMode addressModeU = AddressMode::ClampToEdge; - AddressMode addressModeV = AddressMode::ClampToEdge; - AddressMode addressModeW = AddressMode::ClampToEdge; - FilterMode magFilter = FilterMode::Nearest; - FilterMode minFilter = FilterMode::Nearest; - FilterMode mipmapFilter = FilterMode::Nearest; - float lodMinClamp = 0.0f; - float lodMaxClamp = 1000.0f; - CompareFunction compare = CompareFunction::Undefined; - uint16_t maxAnisotropy = 1; - }; - - struct ShaderModuleDescriptor { - ChainedStruct const * nextInChain = nullptr; - char const * label = nullptr; - }; - - struct ShaderModuleSPIRVDescriptor : ChainedStruct { - ShaderModuleSPIRVDescriptor() { - sType = SType::ShaderModuleSPIRVDescriptor; - } - alignas(ChainedStruct) uint32_t codeSize; - uint32_t const * code; - }; - - struct ShaderModuleWGSLDescriptor : ChainedStruct { - ShaderModuleWGSLDescriptor() { - sType = SType::ShaderModuleWGSLDescriptor; - } - alignas(ChainedStruct) char const * source; - }; - - struct StencilFaceState { - CompareFunction compare = CompareFunction::Always; - StencilOperation failOp = StencilOperation::Keep; - StencilOperation depthFailOp = StencilOperation::Keep; - StencilOperation passOp = StencilOperation::Keep; - }; - - struct StorageTextureBindingLayout { - ChainedStruct const * nextInChain = nullptr; - StorageTextureAccess access = StorageTextureAccess::Undefined; - TextureFormat format = TextureFormat::Undefined; - TextureViewDimension viewDimension = TextureViewDimension::Undefined; - }; - - struct SurfaceDescriptor { - ChainedStruct const * nextInChain = nullptr; - char const * label = nullptr; - }; - - struct SurfaceDescriptorFromCanvasHTMLSelector : ChainedStruct { - SurfaceDescriptorFromCanvasHTMLSelector() { - sType = SType::SurfaceDescriptorFromCanvasHTMLSelector; - } - alignas(ChainedStruct) char const * selector; - }; - - struct SurfaceDescriptorFromMetalLayer : ChainedStruct { - SurfaceDescriptorFromMetalLayer() { - sType = SType::SurfaceDescriptorFromMetalLayer; - } - alignas(ChainedStruct) void * layer; - }; - - struct SurfaceDescriptorFromWindowsHWND : ChainedStruct { - SurfaceDescriptorFromWindowsHWND() { - sType = SType::SurfaceDescriptorFromWindowsHWND; - } - alignas(ChainedStruct) void * hinstance; - void * hwnd; - }; - - struct SurfaceDescriptorFromXlib : ChainedStruct { - SurfaceDescriptorFromXlib() { - sType = SType::SurfaceDescriptorFromXlib; - } - alignas(ChainedStruct) void * display; - uint32_t window; - }; - - struct SwapChainDescriptor { - ChainedStruct const * nextInChain = nullptr; - char const * label = nullptr; - TextureUsage usage; - TextureFormat format; - uint32_t width; - uint32_t height; - PresentMode presentMode; - }; - - struct TextureBindingLayout { - ChainedStruct const * nextInChain = nullptr; - TextureSampleType sampleType = TextureSampleType::Undefined; - TextureViewDimension viewDimension = TextureViewDimension::Undefined; - bool multisampled = false; - }; - - struct TextureDataLayout { - ChainedStruct const * nextInChain = nullptr; - uint64_t offset = 0; - uint32_t bytesPerRow = WGPU_COPY_STRIDE_UNDEFINED; - uint32_t rowsPerImage = WGPU_COPY_STRIDE_UNDEFINED; - }; - - struct TextureViewDescriptor { - ChainedStruct const * nextInChain = nullptr; - char const * label = nullptr; - TextureFormat format = TextureFormat::Undefined; - TextureViewDimension dimension = TextureViewDimension::Undefined; - uint32_t baseMipLevel = 0; - uint32_t mipLevelCount = 0; - uint32_t baseArrayLayer = 0; - uint32_t arrayLayerCount = 0; - TextureAspect aspect = TextureAspect::All; - }; - - struct VertexAttribute { - VertexFormat format; - uint64_t offset; - uint32_t shaderLocation; - }; - - struct BindGroupDescriptor { - ChainedStruct const * nextInChain = nullptr; - char const * label = nullptr; - BindGroupLayout layout; - uint32_t entryCount; - BindGroupEntry const * entries; - }; - - struct BindGroupLayoutEntry { - ChainedStruct const * nextInChain = nullptr; - uint32_t binding; - ShaderStage visibility; - BufferBindingLayout buffer; - SamplerBindingLayout sampler; - TextureBindingLayout texture; - StorageTextureBindingLayout storageTexture; - }; - - struct BlendState { - BlendComponent color; - BlendComponent alpha; - }; - - struct ComputePipelineDescriptor { - ChainedStruct const * nextInChain = nullptr; - char const * label = nullptr; - PipelineLayout layout = nullptr; - ProgrammableStageDescriptor computeStage; - }; - - struct DepthStencilState { - ChainedStruct const * nextInChain = nullptr; - TextureFormat format; - bool depthWriteEnabled = false; - CompareFunction depthCompare = CompareFunction::Always; - StencilFaceState stencilFront; - StencilFaceState stencilBack; - uint32_t stencilReadMask = 0xFFFFFFFF; - uint32_t stencilWriteMask = 0xFFFFFFFF; - int32_t depthBias = 0; - float depthBiasSlopeScale = 0.0f; - float depthBiasClamp = 0.0f; - }; - - struct ImageCopyBuffer { - ChainedStruct const * nextInChain = nullptr; - TextureDataLayout layout; - Buffer buffer; - }; - - struct ImageCopyTexture { - ChainedStruct const * nextInChain = nullptr; - Texture texture; - uint32_t mipLevel = 0; - Origin3D origin; - TextureAspect aspect = TextureAspect::All; - }; - - struct RenderPassColorAttachment { - TextureView view = nullptr; - TextureView resolveTarget = nullptr; - LoadOp loadOp; - StoreOp storeOp; - Color clearColor; - }; - - struct TextureDescriptor { - ChainedStruct const * nextInChain = nullptr; - char const * label = nullptr; - TextureUsage usage; - TextureDimension dimension = TextureDimension::e2D; - Extent3D size; - TextureFormat format; - uint32_t mipLevelCount = 1; - uint32_t sampleCount = 1; - }; - - struct VertexBufferLayout { - uint64_t arrayStride; - InputStepMode stepMode = InputStepMode::Vertex; - uint32_t attributeCount; - VertexAttribute const * attributes; - }; - - struct BindGroupLayoutDescriptor { - ChainedStruct const * nextInChain = nullptr; - char const * label = nullptr; - uint32_t entryCount; - BindGroupLayoutEntry const * entries; - }; - - struct ColorTargetState { - ChainedStruct const * nextInChain = nullptr; - TextureFormat format; - BlendState const * blend = nullptr; - ColorWriteMask writeMask = ColorWriteMask::All; - }; - - struct RenderPassDescriptor { - ChainedStruct const * nextInChain = nullptr; - char const * label = nullptr; - uint32_t colorAttachmentCount; - RenderPassColorAttachment const * colorAttachments; - RenderPassDepthStencilAttachment const * depthStencilAttachment = nullptr; - QuerySet occlusionQuerySet = nullptr; - }; - - struct VertexState { - ChainedStruct const * nextInChain = nullptr; - ShaderModule module; - char const * entryPoint; - uint32_t bufferCount = 0; - VertexBufferLayout const * buffers; - }; - - struct FragmentState { - ChainedStruct const * nextInChain = nullptr; - ShaderModule module; - char const * entryPoint; - uint32_t targetCount; - ColorTargetState const * targets; - }; - - struct RenderPipelineDescriptor2 { - ChainedStruct const * nextInChain = nullptr; - char const * label = nullptr; - PipelineLayout layout = nullptr; - VertexState vertex; - PrimitiveState primitive; - DepthStencilState const * depthStencil = nullptr; - MultisampleState multisample; - FragmentState const * fragment = nullptr; - }; - - -} // namespace wgpu - -#endif // WEBGPU_CPP_H_