1e5c31af7Sopenharmony_ci# -*- coding: utf-8 -*- 2e5c31af7Sopenharmony_ci 3e5c31af7Sopenharmony_ci#------------------------------------------------------------------------- 4e5c31af7Sopenharmony_ci# drawElements Quality Program utilities 5e5c31af7Sopenharmony_ci# -------------------------------------- 6e5c31af7Sopenharmony_ci# 7e5c31af7Sopenharmony_ci# Copyright 2015 The Android Open Source Project 8e5c31af7Sopenharmony_ci# 9e5c31af7Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 10e5c31af7Sopenharmony_ci# you may not use this file except in compliance with the License. 11e5c31af7Sopenharmony_ci# You may obtain a copy of the License at 12e5c31af7Sopenharmony_ci# 13e5c31af7Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 14e5c31af7Sopenharmony_ci# 15e5c31af7Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 16e5c31af7Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 17e5c31af7Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18e5c31af7Sopenharmony_ci# See the License for the specific language governing permissions and 19e5c31af7Sopenharmony_ci# limitations under the License. 20e5c31af7Sopenharmony_ci# 21e5c31af7Sopenharmony_ci#------------------------------------------------------------------------- 22e5c31af7Sopenharmony_ci 23e5c31af7Sopenharmony_ciimport os 24e5c31af7Sopenharmony_ciimport string 25e5c31af7Sopenharmony_ci 26e5c31af7Sopenharmony_ci# TODO remove 27e5c31af7Sopenharmony_ciimport sys 28e5c31af7Sopenharmony_cisys.path.append(os.path.dirname(os.path.dirname(__file__))) 29e5c31af7Sopenharmony_ci 30e5c31af7Sopenharmony_cifrom src_util import * 31e5c31af7Sopenharmony_cifrom khr_util.gen_str_util import addValuePrefix, genStrUtilProtos, genStrUtilImpls 32e5c31af7Sopenharmony_ci 33e5c31af7Sopenharmony_ci# Bitfield mapping 34e5c31af7Sopenharmony_ciBITFIELD_GROUPS = [ 35e5c31af7Sopenharmony_ci # ClearBufferMask 36e5c31af7Sopenharmony_ci ("BufferMask", ["DEPTH_BUFFER_BIT", "STENCIL_BUFFER_BIT", "COLOR_BUFFER_BIT"]), 37e5c31af7Sopenharmony_ci # MapBufferUsageMask 38e5c31af7Sopenharmony_ci ("BufferMapFlags", [ 39e5c31af7Sopenharmony_ci "MAP_READ_BIT", 40e5c31af7Sopenharmony_ci "MAP_WRITE_BIT", 41e5c31af7Sopenharmony_ci "MAP_INVALIDATE_RANGE_BIT", 42e5c31af7Sopenharmony_ci "MAP_INVALIDATE_BUFFER_BIT", 43e5c31af7Sopenharmony_ci "MAP_FLUSH_EXPLICIT_BIT", 44e5c31af7Sopenharmony_ci "MAP_UNSYNCHRONIZED_BIT" 45e5c31af7Sopenharmony_ci ]), 46e5c31af7Sopenharmony_ci # MemoryBarrierMask 47e5c31af7Sopenharmony_ci ("MemoryBarrierFlags", [ 48e5c31af7Sopenharmony_ci "VERTEX_ATTRIB_ARRAY_BARRIER_BIT", 49e5c31af7Sopenharmony_ci "ELEMENT_ARRAY_BARRIER_BIT", 50e5c31af7Sopenharmony_ci "UNIFORM_BARRIER_BIT", 51e5c31af7Sopenharmony_ci "TEXTURE_FETCH_BARRIER_BIT", 52e5c31af7Sopenharmony_ci "SHADER_IMAGE_ACCESS_BARRIER_BIT", 53e5c31af7Sopenharmony_ci "COMMAND_BARRIER_BIT", 54e5c31af7Sopenharmony_ci "PIXEL_BUFFER_BARRIER_BIT", 55e5c31af7Sopenharmony_ci "TEXTURE_UPDATE_BARRIER_BIT", 56e5c31af7Sopenharmony_ci "BUFFER_UPDATE_BARRIER_BIT", 57e5c31af7Sopenharmony_ci "FRAMEBUFFER_BARRIER_BIT", 58e5c31af7Sopenharmony_ci "TRANSFORM_FEEDBACK_BARRIER_BIT", 59e5c31af7Sopenharmony_ci "ATOMIC_COUNTER_BARRIER_BIT" 60e5c31af7Sopenharmony_ci ]), 61e5c31af7Sopenharmony_ci # ShaderTypeMask 62e5c31af7Sopenharmony_ci ("ShaderTypeMask", [ 63e5c31af7Sopenharmony_ci "VERTEX_SHADER_BIT", 64e5c31af7Sopenharmony_ci "FRAGMENT_SHADER_BIT", 65e5c31af7Sopenharmony_ci "COMPUTE_SHADER_BIT", 66e5c31af7Sopenharmony_ci "GEOMETRY_SHADER_BIT", 67e5c31af7Sopenharmony_ci "TESS_CONTROL_SHADER_BIT", 68e5c31af7Sopenharmony_ci "TESS_EVALUATION_SHADER_BIT" 69e5c31af7Sopenharmony_ci ]), 70e5c31af7Sopenharmony_ci] 71e5c31af7Sopenharmony_ci 72e5c31af7Sopenharmony_ci# Enum mapping 73e5c31af7Sopenharmony_ciENUM_GROUPS = [ 74e5c31af7Sopenharmony_ci # Common enums 75e5c31af7Sopenharmony_ci 76e5c31af7Sopenharmony_ci # ErrorCode 77e5c31af7Sopenharmony_ci ("Error", ["NO_ERROR", "INVALID_ENUM", "INVALID_VALUE", "INVALID_OPERATION", "OUT_OF_MEMORY", 78e5c31af7Sopenharmony_ci "INVALID_FRAMEBUFFER_OPERATION", "CONTEXT_LOST"]), 79e5c31af7Sopenharmony_ci # PixelType, partially 80e5c31af7Sopenharmony_ci ("Type", [ 81e5c31af7Sopenharmony_ci # GLES2 types 82e5c31af7Sopenharmony_ci "BYTE", 83e5c31af7Sopenharmony_ci "UNSIGNED_BYTE", 84e5c31af7Sopenharmony_ci "SHORT", 85e5c31af7Sopenharmony_ci "UNSIGNED_SHORT", 86e5c31af7Sopenharmony_ci "INT", 87e5c31af7Sopenharmony_ci "UNSIGNED_INT", 88e5c31af7Sopenharmony_ci "FLOAT", 89e5c31af7Sopenharmony_ci "FIXED", 90e5c31af7Sopenharmony_ci "UNSIGNED_SHORT_5_6_5", 91e5c31af7Sopenharmony_ci "UNSIGNED_SHORT_4_4_4_4", 92e5c31af7Sopenharmony_ci "UNSIGNED_SHORT_5_5_5_1", 93e5c31af7Sopenharmony_ci 94e5c31af7Sopenharmony_ci # GLES3 types 95e5c31af7Sopenharmony_ci "HALF_FLOAT", 96e5c31af7Sopenharmony_ci "INT_2_10_10_10_REV", 97e5c31af7Sopenharmony_ci "UNSIGNED_INT_2_10_10_10_REV", 98e5c31af7Sopenharmony_ci "UNSIGNED_INT_10F_11F_11F_REV", 99e5c31af7Sopenharmony_ci "UNSIGNED_INT_5_9_9_9_REV", 100e5c31af7Sopenharmony_ci "UNSIGNED_INT_24_8", 101e5c31af7Sopenharmony_ci "FLOAT_32_UNSIGNED_INT_24_8_REV", 102e5c31af7Sopenharmony_ci "SIGNED_NORMALIZED", 103e5c31af7Sopenharmony_ci "UNSIGNED_NORMALIZED", 104e5c31af7Sopenharmony_ci 105e5c31af7Sopenharmony_ci # Extension types 106e5c31af7Sopenharmony_ci "HALF_FLOAT_OES", 107e5c31af7Sopenharmony_ci ]), 108e5c31af7Sopenharmony_ci 109e5c31af7Sopenharmony_ci # GetPName, also GettableState below 110e5c31af7Sopenharmony_ci ("ParamQuery", [ 111e5c31af7Sopenharmony_ci # Generic 112e5c31af7Sopenharmony_ci "LINE_WIDTH", 113e5c31af7Sopenharmony_ci "ALIASED_POINT_SIZE_RANGE", 114e5c31af7Sopenharmony_ci "ALIASED_LINE_WIDTH_RANGE", 115e5c31af7Sopenharmony_ci "CULL_FACE_MODE", 116e5c31af7Sopenharmony_ci "FRONT_FACE", 117e5c31af7Sopenharmony_ci "DEPTH_RANGE", 118e5c31af7Sopenharmony_ci "DEPTH_WRITEMASK", 119e5c31af7Sopenharmony_ci "DEPTH_CLEAR_VALUE", 120e5c31af7Sopenharmony_ci "DEPTH_FUNC", 121e5c31af7Sopenharmony_ci "STENCIL_CLEAR_VALUE", 122e5c31af7Sopenharmony_ci "STENCIL_FUNC", 123e5c31af7Sopenharmony_ci "STENCIL_FAIL", 124e5c31af7Sopenharmony_ci "STENCIL_PASS_DEPTH_FAIL", 125e5c31af7Sopenharmony_ci "STENCIL_PASS_DEPTH_PASS", 126e5c31af7Sopenharmony_ci "STENCIL_REF", 127e5c31af7Sopenharmony_ci "STENCIL_VALUE_MASK", 128e5c31af7Sopenharmony_ci "STENCIL_WRITEMASK", 129e5c31af7Sopenharmony_ci "STENCIL_BACK_FUNC", 130e5c31af7Sopenharmony_ci "STENCIL_BACK_FAIL", 131e5c31af7Sopenharmony_ci "STENCIL_BACK_PASS_DEPTH_FAIL", 132e5c31af7Sopenharmony_ci "STENCIL_BACK_PASS_DEPTH_PASS", 133e5c31af7Sopenharmony_ci "STENCIL_BACK_REF", 134e5c31af7Sopenharmony_ci "STENCIL_BACK_VALUE_MASK", 135e5c31af7Sopenharmony_ci "STENCIL_BACK_WRITEMASK", 136e5c31af7Sopenharmony_ci "VIEWPORT", 137e5c31af7Sopenharmony_ci "SCISSOR_BOX", 138e5c31af7Sopenharmony_ci "SCISSOR_TEST", 139e5c31af7Sopenharmony_ci "COLOR_CLEAR_VALUE", 140e5c31af7Sopenharmony_ci "COLOR_WRITEMASK", 141e5c31af7Sopenharmony_ci "UNPACK_ALIGNMENT", 142e5c31af7Sopenharmony_ci "PACK_ALIGNMENT", 143e5c31af7Sopenharmony_ci "MAX_TEXTURE_SIZE", 144e5c31af7Sopenharmony_ci "MAX_VIEWPORT_DIMS", 145e5c31af7Sopenharmony_ci "SUBPIXEL_BITS", 146e5c31af7Sopenharmony_ci "RED_BITS", 147e5c31af7Sopenharmony_ci "GREEN_BITS", 148e5c31af7Sopenharmony_ci "BLUE_BITS", 149e5c31af7Sopenharmony_ci "ALPHA_BITS", 150e5c31af7Sopenharmony_ci "DEPTH_BITS", 151e5c31af7Sopenharmony_ci "STENCIL_BITS", 152e5c31af7Sopenharmony_ci "POLYGON_OFFSET_UNITS", 153e5c31af7Sopenharmony_ci "POLYGON_OFFSET_FILL", 154e5c31af7Sopenharmony_ci "POLYGON_OFFSET_FACTOR", 155e5c31af7Sopenharmony_ci "TEXTURE_BINDING_2D", 156e5c31af7Sopenharmony_ci "SAMPLE_BUFFERS", 157e5c31af7Sopenharmony_ci "SAMPLES", 158e5c31af7Sopenharmony_ci "SAMPLE_COVERAGE_VALUE", 159e5c31af7Sopenharmony_ci "SAMPLE_COVERAGE_INVERT", 160e5c31af7Sopenharmony_ci 161e5c31af7Sopenharmony_ci "MAX_CUBE_MAP_TEXTURE_SIZE", 162e5c31af7Sopenharmony_ci "MAX_RENDERBUFFER_SIZE", 163e5c31af7Sopenharmony_ci 164e5c31af7Sopenharmony_ci # Program-related 165e5c31af7Sopenharmony_ci "MAX_VERTEX_ATTRIBS", 166e5c31af7Sopenharmony_ci "MAX_VERTEX_UNIFORM_VECTORS", 167e5c31af7Sopenharmony_ci "MAX_VARYING_VECTORS", 168e5c31af7Sopenharmony_ci "MAX_COMBINED_TEXTURE_IMAGE_UNITS", 169e5c31af7Sopenharmony_ci "MAX_VERTEX_TEXTURE_IMAGE_UNITS", 170e5c31af7Sopenharmony_ci "MAX_TEXTURE_IMAGE_UNITS", 171e5c31af7Sopenharmony_ci "MAX_FRAGMENT_UNIFORM_VECTORS" 172e5c31af7Sopenharmony_ci ]), 173e5c31af7Sopenharmony_ci 174e5c31af7Sopenharmony_ci # *missing* 175e5c31af7Sopenharmony_ci # Program query 176e5c31af7Sopenharmony_ci ("ProgramParam", [ 177e5c31af7Sopenharmony_ci "ACTIVE_ATTRIBUTES", 178e5c31af7Sopenharmony_ci "ACTIVE_ATTRIBUTE_MAX_LENGTH", 179e5c31af7Sopenharmony_ci "ACTIVE_UNIFORMS", 180e5c31af7Sopenharmony_ci "ACTIVE_UNIFORM_BLOCKS", 181e5c31af7Sopenharmony_ci "ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH", 182e5c31af7Sopenharmony_ci "ACTIVE_UNIFORM_MAX_LENGTH", 183e5c31af7Sopenharmony_ci "ATTACHED_SHADERS", 184e5c31af7Sopenharmony_ci "DELETE_STATUS", 185e5c31af7Sopenharmony_ci "INFO_LOG_LENGTH", 186e5c31af7Sopenharmony_ci "LINK_STATUS", 187e5c31af7Sopenharmony_ci "PROGRAM_BINARY_RETRIEVABLE_HINT", 188e5c31af7Sopenharmony_ci "TRANSFORM_FEEDBACK_BUFFER_MODE", 189e5c31af7Sopenharmony_ci "TRANSFORM_FEEDBACK_VARYINGS", 190e5c31af7Sopenharmony_ci "TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH", 191e5c31af7Sopenharmony_ci "VALIDATE_STATUS", 192e5c31af7Sopenharmony_ci "GEOMETRY_INPUT_TYPE", 193e5c31af7Sopenharmony_ci "GEOMETRY_OUTPUT_TYPE", 194e5c31af7Sopenharmony_ci "GEOMETRY_VERTICES_OUT", 195e5c31af7Sopenharmony_ci "GEOMETRY_SHADER_INVOCATIONS", 196e5c31af7Sopenharmony_ci "PROGRAM_SEPARABLE", 197e5c31af7Sopenharmony_ci "COMPUTE_WORK_GROUP_SIZE", 198e5c31af7Sopenharmony_ci "ACTIVE_ATOMIC_COUNTER_BUFFERS", 199e5c31af7Sopenharmony_ci "TESS_CONTROL_OUTPUT_VERTICES", 200e5c31af7Sopenharmony_ci "TESS_GEN_MODE", 201e5c31af7Sopenharmony_ci "TESS_GEN_SPACING", 202e5c31af7Sopenharmony_ci "TESS_GEN_VERTEX_ORDER", 203e5c31af7Sopenharmony_ci "TESS_GEN_POINT_MODE", 204e5c31af7Sopenharmony_ci ]), 205e5c31af7Sopenharmony_ci 206e5c31af7Sopenharmony_ci # *missing* 207e5c31af7Sopenharmony_ci # Uniform query 208e5c31af7Sopenharmony_ci ("UniformParam", [ 209e5c31af7Sopenharmony_ci "UNIFORM_TYPE", 210e5c31af7Sopenharmony_ci "UNIFORM_SIZE", 211e5c31af7Sopenharmony_ci "UNIFORM_NAME_LENGTH", 212e5c31af7Sopenharmony_ci "UNIFORM_BLOCK_INDEX", 213e5c31af7Sopenharmony_ci "UNIFORM_OFFSET", 214e5c31af7Sopenharmony_ci "UNIFORM_ARRAY_STRIDE", 215e5c31af7Sopenharmony_ci "UNIFORM_MATRIX_STRIDE", 216e5c31af7Sopenharmony_ci "UNIFORM_IS_ROW_MAJOR" 217e5c31af7Sopenharmony_ci ]), 218e5c31af7Sopenharmony_ci 219e5c31af7Sopenharmony_ci # *missing* 220e5c31af7Sopenharmony_ci # Framebuffers 221e5c31af7Sopenharmony_ci ("FramebufferAttachment", ["COLOR_ATTACHMENT0", "COLOR_ATTACHMENT1", "COLOR_ATTACHMENT2", "COLOR_ATTACHMENT3", 222e5c31af7Sopenharmony_ci "COLOR_ATTACHMENT4", "COLOR_ATTACHMENT5", "COLOR_ATTACHMENT6", "COLOR_ATTACHMENT7", 223e5c31af7Sopenharmony_ci "COLOR_ATTACHMENT8", "COLOR_ATTACHMENT9", "COLOR_ATTACHMENT10", "COLOR_ATTACHMENT11", 224e5c31af7Sopenharmony_ci "COLOR_ATTACHMENT12", "COLOR_ATTACHMENT13", "COLOR_ATTACHMENT14", "COLOR_ATTACHMENT15", 225e5c31af7Sopenharmony_ci "DEPTH_ATTACHMENT", "STENCIL_ATTACHMENT", "DEPTH_STENCIL_ATTACHMENT", 226e5c31af7Sopenharmony_ci "BACK", "FRONT_LEFT", "FRONT_RIGHT", "BACK_LEFT", "BACK_RIGHT", 227e5c31af7Sopenharmony_ci "DEPTH", "STENCIL"]), 228e5c31af7Sopenharmony_ci # *missing* 229e5c31af7Sopenharmony_ci ("FramebufferAttachmentParameter", ["FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE", "FRAMEBUFFER_ATTACHMENT_OBJECT_NAME", 230e5c31af7Sopenharmony_ci "FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL", "FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE", 231e5c31af7Sopenharmony_ci "FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER", "FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE", 232e5c31af7Sopenharmony_ci "FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING", "FRAMEBUFFER_ATTACHMENT_RED_SIZE", 233e5c31af7Sopenharmony_ci "FRAMEBUFFER_ATTACHMENT_GREEN_SIZE", "FRAMEBUFFER_ATTACHMENT_BLUE_SIZE", 234e5c31af7Sopenharmony_ci "FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE", "FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE", 235e5c31af7Sopenharmony_ci "FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE", "FRAMEBUFFER_ATTACHMENT_LAYERED"]), 236e5c31af7Sopenharmony_ci ("FramebufferTarget", ["FRAMEBUFFER", "RENDERBUFFER", "DRAW_FRAMEBUFFER", "READ_FRAMEBUFFER"]), 237e5c31af7Sopenharmony_ci ("FramebufferStatus", ["FRAMEBUFFER_COMPLETE", "FRAMEBUFFER_INCOMPLETE_ATTACHMENT", "FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT", 238e5c31af7Sopenharmony_ci "FRAMEBUFFER_INCOMPLETE_DIMENSIONS", "FRAMEBUFFER_UNSUPPORTED", "FRAMEBUFFER_INCOMPLETE_MULTISAMPLE", 239e5c31af7Sopenharmony_ci "FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS"]), 240e5c31af7Sopenharmony_ci ("FramebufferAttachmentType", ["NONE", "FRAMEBUFFER_DEFAULT", "TEXTURE", "RENDERBUFFER"]), 241e5c31af7Sopenharmony_ci ("FramebufferColorEncoding", ["LINEAR", "SRGB"]), 242e5c31af7Sopenharmony_ci 243e5c31af7Sopenharmony_ci ("FramebufferParameter", [ 244e5c31af7Sopenharmony_ci "FRAMEBUFFER_DEFAULT_WIDTH", 245e5c31af7Sopenharmony_ci "FRAMEBUFFER_DEFAULT_HEIGHT", 246e5c31af7Sopenharmony_ci "FRAMEBUFFER_DEFAULT_SAMPLES", 247e5c31af7Sopenharmony_ci "FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS", 248e5c31af7Sopenharmony_ci "FRAMEBUFFER_DEFAULT_LAYERS", 249e5c31af7Sopenharmony_ci ]), 250e5c31af7Sopenharmony_ci 251e5c31af7Sopenharmony_ci # Renderbuffers 252e5c31af7Sopenharmony_ci ("RenderbufferParameter", ["RENDERBUFFER_WIDTH", "RENDERBUFFER_HEIGHT", "RENDERBUFFER_INTERNAL_FORMAT", "RENDERBUFFER_RED_SIZE", 253e5c31af7Sopenharmony_ci "RENDERBUFFER_GREEN_SIZE", "RENDERBUFFER_BLUE_SIZE", "RENDERBUFFER_ALPHA_SIZE", "RENDERBUFFER_DEPTH_SIZE", 254e5c31af7Sopenharmony_ci "RENDERBUFFER_STENCIL_SIZE", "RENDERBUFFER_SAMPLES"]), 255e5c31af7Sopenharmony_ci 256e5c31af7Sopenharmony_ci # Primitives 257e5c31af7Sopenharmony_ci ("PrimitiveType", ["POINTS", "LINES", "LINE_STRIP", "LINE_LOOP", "TRIANGLES", "TRIANGLE_STRIP", "TRIANGLE_FAN", "LINES_ADJACENCY", "LINE_STRIP_ADJACENCY", "TRIANGLES_ADJACENCY", "TRIANGLE_STRIP_ADJACENCY"]), 258e5c31af7Sopenharmony_ci 259e5c31af7Sopenharmony_ci # Blending 260e5c31af7Sopenharmony_ci ("BlendFactor", ["ZERO", "ONE", "SRC_ALPHA_SATURATE", 261e5c31af7Sopenharmony_ci "SRC_COLOR", "ONE_MINUS_SRC_COLOR", "SRC_ALPHA", "ONE_MINUS_SRC_ALPHA", 262e5c31af7Sopenharmony_ci "SRC1_COLOR", "ONE_MINUS_SRC1_COLOR", "SRC1_ALPHA", "ONE_MINUS_SRC1_ALPHA", 263e5c31af7Sopenharmony_ci "DST_COLOR", "ONE_MINUS_DST_COLOR", "DST_ALPHA", "ONE_MINUS_DST_ALPHA", 264e5c31af7Sopenharmony_ci "CONSTANT_COLOR", "ONE_MINUS_CONSTANT_COLOR", "CONSTANT_ALPHA", "ONE_MINUS_CONSTANT_ALPHA"]), 265e5c31af7Sopenharmony_ci ("BlendEquation", [ 266e5c31af7Sopenharmony_ci "FUNC_ADD", 267e5c31af7Sopenharmony_ci "FUNC_SUBTRACT", 268e5c31af7Sopenharmony_ci "FUNC_REVERSE_SUBTRACT", 269e5c31af7Sopenharmony_ci "MIN", 270e5c31af7Sopenharmony_ci "MAX", 271e5c31af7Sopenharmony_ci "MULTIPLY_KHR", 272e5c31af7Sopenharmony_ci "SCREEN_KHR", 273e5c31af7Sopenharmony_ci "OVERLAY_KHR", 274e5c31af7Sopenharmony_ci "DARKEN_KHR", 275e5c31af7Sopenharmony_ci "LIGHTEN_KHR", 276e5c31af7Sopenharmony_ci "COLORDODGE_KHR", 277e5c31af7Sopenharmony_ci "COLORBURN_KHR", 278e5c31af7Sopenharmony_ci "HARDLIGHT_KHR", 279e5c31af7Sopenharmony_ci "SOFTLIGHT_KHR", 280e5c31af7Sopenharmony_ci "DIFFERENCE_KHR", 281e5c31af7Sopenharmony_ci "EXCLUSION_KHR", 282e5c31af7Sopenharmony_ci "HSL_HUE_KHR", 283e5c31af7Sopenharmony_ci "HSL_SATURATION_KHR", 284e5c31af7Sopenharmony_ci "HSL_COLOR_KHR", 285e5c31af7Sopenharmony_ci "HSL_LUMINOSITY_KHR", 286e5c31af7Sopenharmony_ci ]), 287e5c31af7Sopenharmony_ci 288e5c31af7Sopenharmony_ci # Buffer Objects 289e5c31af7Sopenharmony_ci ("BufferTarget", [ 290e5c31af7Sopenharmony_ci "ARRAY_BUFFER", 291e5c31af7Sopenharmony_ci "ELEMENT_ARRAY_BUFFER", 292e5c31af7Sopenharmony_ci "COPY_READ_BUFFER", 293e5c31af7Sopenharmony_ci "COPY_WRITE_BUFFER", 294e5c31af7Sopenharmony_ci "PIXEL_PACK_BUFFER", 295e5c31af7Sopenharmony_ci "PIXEL_UNPACK_BUFFER", 296e5c31af7Sopenharmony_ci "TRANSFORM_FEEDBACK_BUFFER", 297e5c31af7Sopenharmony_ci "UNIFORM_BUFFER", 298e5c31af7Sopenharmony_ci "DRAW_INDIRECT_BUFFER", 299e5c31af7Sopenharmony_ci "SHADER_STORAGE_BUFFER", 300e5c31af7Sopenharmony_ci "TEXTURE_BUFFER", 301e5c31af7Sopenharmony_ci "DISPATCH_INDIRECT_BUFFER", 302e5c31af7Sopenharmony_ci "ATOMIC_COUNTER_BUFFER", 303e5c31af7Sopenharmony_ci ]), 304e5c31af7Sopenharmony_ci ("BufferBinding", ["ARRAY_BUFFER_BINDING", "ELEMENT_ARRAY_BUFFER_BINDING"]), 305e5c31af7Sopenharmony_ci ("Usage", [ 306e5c31af7Sopenharmony_ci "STREAM_DRAW", 307e5c31af7Sopenharmony_ci "STREAM_READ", 308e5c31af7Sopenharmony_ci "STREAM_COPY", 309e5c31af7Sopenharmony_ci "STATIC_DRAW", 310e5c31af7Sopenharmony_ci "STATIC_READ", 311e5c31af7Sopenharmony_ci "STATIC_COPY", 312e5c31af7Sopenharmony_ci "DYNAMIC_DRAW", 313e5c31af7Sopenharmony_ci "DYNAMIC_READ", 314e5c31af7Sopenharmony_ci "DYNAMIC_COPY"]), 315e5c31af7Sopenharmony_ci ("BufferQuery", ["BUFFER_SIZE", "BUFFER_USAGE", "BUFFER_ACCESS_FLAGS", "BUFFER_MAPPED", "BUFFER_MAP_OFFSET", "BUFFER_MAP_LENGTH"]), 316e5c31af7Sopenharmony_ci 317e5c31af7Sopenharmony_ci # Culling 318e5c31af7Sopenharmony_ci ("Face", ["FRONT", "BACK", "FRONT_AND_BACK"]), 319e5c31af7Sopenharmony_ci 320e5c31af7Sopenharmony_ci # Comparison function 321e5c31af7Sopenharmony_ci ("CompareFunc", ["NEVER", "LESS", "LEQUAL", "GREATER", "EQUAL", "NOTEQUAL", "GEQUAL", "ALWAYS"]), 322e5c31af7Sopenharmony_ci 323e5c31af7Sopenharmony_ci # Enable-disable bit 324e5c31af7Sopenharmony_ci ("EnableCap", ["TEXTURE_2D", "CULL_FACE", "BLEND", "DITHER", "STENCIL_TEST", "DEPTH_TEST", "SCISSOR_TEST", 325e5c31af7Sopenharmony_ci "POLYGON_OFFSET_FILL", "SAMPLE_ALPHA_TO_COVERAGE", "SAMPLE_COVERAGE", 326e5c31af7Sopenharmony_ci "PRIMITIVE_RESTART_FIXED_INDEX", "RASTERIZER_DISCARD", 327e5c31af7Sopenharmony_ci "FRAMEBUFFER_SRGB", "SAMPLE_SHADING", "DEPTH_CLAMP", 328e5c31af7Sopenharmony_ci "PRIMITIVE_RESTART", "SAMPLE_MASK", "DEBUG_OUTPUT", "DEBUG_OUTPUT_SYNCHRONOUS", 329e5c31af7Sopenharmony_ci "BLEND_ADVANCED_COHERENT_KHR"]), 330e5c31af7Sopenharmony_ci 331e5c31af7Sopenharmony_ci # Indexed enable-disable bit 332e5c31af7Sopenharmony_ci ("IndexedEnableCap", ["BLEND"]), 333e5c31af7Sopenharmony_ci 334e5c31af7Sopenharmony_ci # Polygon winding 335e5c31af7Sopenharmony_ci ("Winding", ["CW", "CCW"]), 336e5c31af7Sopenharmony_ci 337e5c31af7Sopenharmony_ci # Hints 338e5c31af7Sopenharmony_ci ("HintMode", ["DONT_CARE", "FASTEST", "NICEST"]), 339e5c31af7Sopenharmony_ci ("Hint", ["GENERATE_MIPMAP_HINT"]), 340e5c31af7Sopenharmony_ci 341e5c31af7Sopenharmony_ci # Stencil ops 342e5c31af7Sopenharmony_ci ("StencilOp", ["ZERO", "KEEP", "REPLACE", "INCR", "DECR", "INVERT", "INCR_WRAP", "DECR_WRAP"]), 343e5c31af7Sopenharmony_ci 344e5c31af7Sopenharmony_ci # Shader type 345e5c31af7Sopenharmony_ci ("ShaderType", [ 346e5c31af7Sopenharmony_ci "VERTEX_SHADER", 347e5c31af7Sopenharmony_ci "FRAGMENT_SHADER", 348e5c31af7Sopenharmony_ci "COMPUTE_SHADER", 349e5c31af7Sopenharmony_ci "TESS_CONTROL_SHADER", 350e5c31af7Sopenharmony_ci "TESS_EVALUATION_SHADER", 351e5c31af7Sopenharmony_ci "GEOMETRY_SHADER", 352e5c31af7Sopenharmony_ci ]), 353e5c31af7Sopenharmony_ci 354e5c31af7Sopenharmony_ci # Buffers 355e5c31af7Sopenharmony_ci ("Buffer", ["COLOR", "DEPTH", "STENCIL", "DEPTH_STENCIL"]), 356e5c31af7Sopenharmony_ci 357e5c31af7Sopenharmony_ci # Invalidate buffer target 358e5c31af7Sopenharmony_ci ("InvalidateAttachment",["COLOR", "DEPTH", "STENCIL", 359e5c31af7Sopenharmony_ci "COLOR_ATTACHMENT0", 360e5c31af7Sopenharmony_ci "COLOR_ATTACHMENT1", 361e5c31af7Sopenharmony_ci "COLOR_ATTACHMENT2", 362e5c31af7Sopenharmony_ci "COLOR_ATTACHMENT3", 363e5c31af7Sopenharmony_ci "COLOR_ATTACHMENT4", 364e5c31af7Sopenharmony_ci "COLOR_ATTACHMENT5", 365e5c31af7Sopenharmony_ci "COLOR_ATTACHMENT6", 366e5c31af7Sopenharmony_ci "COLOR_ATTACHMENT7", 367e5c31af7Sopenharmony_ci "DEPTH_ATTACHMENT", 368e5c31af7Sopenharmony_ci "STENCIL_ATTACHMENT", 369e5c31af7Sopenharmony_ci "DEPTH_STENCIL_ATTACHMENT"]), 370e5c31af7Sopenharmony_ci 371e5c31af7Sopenharmony_ci # Draw/ReadBuffer attachment 372e5c31af7Sopenharmony_ci ("DrawReadBuffer", ["COLOR", "DEPTH", "STENCIL", "BACK", "NONE", 373e5c31af7Sopenharmony_ci "COLOR_ATTACHMENT0", 374e5c31af7Sopenharmony_ci "COLOR_ATTACHMENT1", 375e5c31af7Sopenharmony_ci "COLOR_ATTACHMENT2", 376e5c31af7Sopenharmony_ci "COLOR_ATTACHMENT3", 377e5c31af7Sopenharmony_ci "COLOR_ATTACHMENT4", 378e5c31af7Sopenharmony_ci "COLOR_ATTACHMENT5", 379e5c31af7Sopenharmony_ci "COLOR_ATTACHMENT6", 380e5c31af7Sopenharmony_ci "COLOR_ATTACHMENT7", 381e5c31af7Sopenharmony_ci "DEPTH_ATTACHMENT", 382e5c31af7Sopenharmony_ci "STENCIL_ATTACHMENT", 383e5c31af7Sopenharmony_ci "DEPTH_STENCIL_ATTACHMENT"]), 384e5c31af7Sopenharmony_ci 385e5c31af7Sopenharmony_ci # Textures 386e5c31af7Sopenharmony_ci ("TextureTarget", ["TEXTURE_1D", 387e5c31af7Sopenharmony_ci "TEXTURE_2D", "TEXTURE_CUBE_MAP", 388e5c31af7Sopenharmony_ci "TEXTURE_CUBE_MAP_POSITIVE_X", "TEXTURE_CUBE_MAP_NEGATIVE_X", 389e5c31af7Sopenharmony_ci "TEXTURE_CUBE_MAP_POSITIVE_Y", "TEXTURE_CUBE_MAP_NEGATIVE_Y", 390e5c31af7Sopenharmony_ci "TEXTURE_CUBE_MAP_POSITIVE_Z", "TEXTURE_CUBE_MAP_NEGATIVE_Z", 391e5c31af7Sopenharmony_ci "TEXTURE_3D", "TEXTURE_2D_ARRAY", "TEXTURE_2D_MULTISAMPLE", 392e5c31af7Sopenharmony_ci "TEXTURE_2D_MULTISAMPLE_ARRAY", 393e5c31af7Sopenharmony_ci "TEXTURE_BUFFER", 394e5c31af7Sopenharmony_ci "TEXTURE_CUBE_MAP_ARRAY"]), 395e5c31af7Sopenharmony_ci ("TextureParameter", [ 396e5c31af7Sopenharmony_ci "TEXTURE_WRAP_S", 397e5c31af7Sopenharmony_ci "TEXTURE_WRAP_T", 398e5c31af7Sopenharmony_ci "TEXTURE_WRAP_R", 399e5c31af7Sopenharmony_ci "TEXTURE_BASE_LEVEL", 400e5c31af7Sopenharmony_ci "TEXTURE_MAX_LEVEL", 401e5c31af7Sopenharmony_ci "TEXTURE_COMPARE_MODE", 402e5c31af7Sopenharmony_ci "TEXTURE_COMPARE_FUNC", 403e5c31af7Sopenharmony_ci "TEXTURE_MAX_LOD", 404e5c31af7Sopenharmony_ci "TEXTURE_MIN_LOD", 405e5c31af7Sopenharmony_ci "TEXTURE_SWIZZLE_R", 406e5c31af7Sopenharmony_ci "TEXTURE_SWIZZLE_G", 407e5c31af7Sopenharmony_ci "TEXTURE_SWIZZLE_B", 408e5c31af7Sopenharmony_ci "TEXTURE_SWIZZLE_A", 409e5c31af7Sopenharmony_ci "TEXTURE_MIN_FILTER", 410e5c31af7Sopenharmony_ci "TEXTURE_MAG_FILTER", 411e5c31af7Sopenharmony_ci "DEPTH_STENCIL_TEXTURE_MODE", 412e5c31af7Sopenharmony_ci "TEXTURE_SRGB_DECODE_EXT", 413e5c31af7Sopenharmony_ci "TEXTURE_BORDER_COLOR", 414e5c31af7Sopenharmony_ci 415e5c31af7Sopenharmony_ci # Gettable only 416e5c31af7Sopenharmony_ci "TEXTURE_IMMUTABLE_LEVELS", 417e5c31af7Sopenharmony_ci "TEXTURE_IMMUTABLE_FORMAT", 418e5c31af7Sopenharmony_ci ]), 419e5c31af7Sopenharmony_ci ("TextureLevelParameter", [ 420e5c31af7Sopenharmony_ci "TEXTURE_SAMPLES", 421e5c31af7Sopenharmony_ci "TEXTURE_FIXED_SAMPLE_LOCATIONS", 422e5c31af7Sopenharmony_ci "TEXTURE_WIDTH", 423e5c31af7Sopenharmony_ci "TEXTURE_HEIGHT", 424e5c31af7Sopenharmony_ci "TEXTURE_DEPTH", 425e5c31af7Sopenharmony_ci "TEXTURE_INTERNAL_FORMAT", 426e5c31af7Sopenharmony_ci "TEXTURE_RED_SIZE", 427e5c31af7Sopenharmony_ci "TEXTURE_GREEN_SIZE", 428e5c31af7Sopenharmony_ci "TEXTURE_BLUE_SIZE", 429e5c31af7Sopenharmony_ci "TEXTURE_ALPHA_SIZE", 430e5c31af7Sopenharmony_ci "TEXTURE_DEPTH_SIZE", 431e5c31af7Sopenharmony_ci "TEXTURE_STENCIL_SIZE", 432e5c31af7Sopenharmony_ci "TEXTURE_SHARED_SIZE", 433e5c31af7Sopenharmony_ci "TEXTURE_RED_TYPE", 434e5c31af7Sopenharmony_ci "TEXTURE_GREEN_TYPE", 435e5c31af7Sopenharmony_ci "TEXTURE_BLUE_TYPE", 436e5c31af7Sopenharmony_ci "TEXTURE_ALPHA_TYPE", 437e5c31af7Sopenharmony_ci "TEXTURE_DEPTH_TYPE", 438e5c31af7Sopenharmony_ci "TEXTURE_COMPRESSED", 439e5c31af7Sopenharmony_ci "TEXTURE_BUFFER_DATA_STORE_BINDING", 440e5c31af7Sopenharmony_ci "TEXTURE_BUFFER_OFFSET", 441e5c31af7Sopenharmony_ci "TEXTURE_BUFFER_SIZE", 442e5c31af7Sopenharmony_ci ]), 443e5c31af7Sopenharmony_ci ("RepeatMode", ["REPEAT", "CLAMP_TO_EDGE", "MIRRORED_REPEAT", "CLAMP_TO_BORDER"]), 444e5c31af7Sopenharmony_ci ("TextureFilter", ["NEAREST", "LINEAR", "NEAREST_MIPMAP_NEAREST", "LINEAR_MIPMAP_NEAREST", 445e5c31af7Sopenharmony_ci "NEAREST_MIPMAP_LINEAR", "LINEAR_MIPMAP_LINEAR"]), 446e5c31af7Sopenharmony_ci ("TextureWrapMode", ["REPEAT", "CLAMP_TO_EDGE", "MIRRORED_REPEAT"]), 447e5c31af7Sopenharmony_ci ("TextureSwizzle", ["RED", "GREEN", "BLUE", "ALPHA", "ZERO", "ONE"]), 448e5c31af7Sopenharmony_ci ("TextureCompareMode", ["NONE", "COMPARE_REF_TO_TEXTURE"]), 449e5c31af7Sopenharmony_ci ("CubeMapFace", ["TEXTURE_CUBE_MAP_POSITIVE_X", "TEXTURE_CUBE_MAP_NEGATIVE_X", 450e5c31af7Sopenharmony_ci "TEXTURE_CUBE_MAP_POSITIVE_Y", "TEXTURE_CUBE_MAP_NEGATIVE_Y", 451e5c31af7Sopenharmony_ci "TEXTURE_CUBE_MAP_POSITIVE_Z", "TEXTURE_CUBE_MAP_NEGATIVE_Z"]), 452e5c31af7Sopenharmony_ci ("TextureDepthStencilMode", ["DEPTH_COMPONENT", "STENCIL_INDEX"]), 453e5c31af7Sopenharmony_ci ("PixelStoreParameter", [ 454e5c31af7Sopenharmony_ci "UNPACK_ALIGNMENT", 455e5c31af7Sopenharmony_ci "UNPACK_IMAGE_HEIGHT", 456e5c31af7Sopenharmony_ci "UNPACK_ROW_LENGTH", 457e5c31af7Sopenharmony_ci "UNPACK_SKIP_IMAGES", 458e5c31af7Sopenharmony_ci "UNPACK_SKIP_ROWS", 459e5c31af7Sopenharmony_ci "UNPACK_SKIP_PIXELS", 460e5c31af7Sopenharmony_ci "PACK_ROW_LENGTH", 461e5c31af7Sopenharmony_ci "PACK_SKIP_ROWS", 462e5c31af7Sopenharmony_ci "PACK_SKIP_PIXELS"]), 463e5c31af7Sopenharmony_ci ("UncompressedTextureFormat", [ 464e5c31af7Sopenharmony_ci # GLES2 unsized formats 465e5c31af7Sopenharmony_ci "LUMINANCE", 466e5c31af7Sopenharmony_ci "LUMINANCE_ALPHA", 467e5c31af7Sopenharmony_ci "ALPHA", 468e5c31af7Sopenharmony_ci "RGB", 469e5c31af7Sopenharmony_ci "RGBA", 470e5c31af7Sopenharmony_ci 471e5c31af7Sopenharmony_ci # GLES2 sized formats 472e5c31af7Sopenharmony_ci "RGBA4", 473e5c31af7Sopenharmony_ci "RGB5_A1", 474e5c31af7Sopenharmony_ci "RGB565", 475e5c31af7Sopenharmony_ci "DEPTH_COMPONENT16", 476e5c31af7Sopenharmony_ci "STENCIL_INDEX8", 477e5c31af7Sopenharmony_ci 478e5c31af7Sopenharmony_ci # GLES3 unsized formats 479e5c31af7Sopenharmony_ci "RG", 480e5c31af7Sopenharmony_ci "RED", 481e5c31af7Sopenharmony_ci "RGBA_INTEGER", 482e5c31af7Sopenharmony_ci "RGB_INTEGER", 483e5c31af7Sopenharmony_ci "RG_INTEGER", 484e5c31af7Sopenharmony_ci "RED_INTEGER", 485e5c31af7Sopenharmony_ci "DEPTH_COMPONENT", 486e5c31af7Sopenharmony_ci "DEPTH_STENCIL", 487e5c31af7Sopenharmony_ci 488e5c31af7Sopenharmony_ci # GLES3 sized formats 489e5c31af7Sopenharmony_ci "RGBA32F", 490e5c31af7Sopenharmony_ci "RGBA32I", 491e5c31af7Sopenharmony_ci "RGBA32UI", 492e5c31af7Sopenharmony_ci "RGBA16", 493e5c31af7Sopenharmony_ci "RGBA16_SNORM", 494e5c31af7Sopenharmony_ci "RGBA16F", 495e5c31af7Sopenharmony_ci "RGBA16I", 496e5c31af7Sopenharmony_ci "RGBA16UI", 497e5c31af7Sopenharmony_ci "RGBA8", 498e5c31af7Sopenharmony_ci "RGBA8I", 499e5c31af7Sopenharmony_ci "RGBA8UI", 500e5c31af7Sopenharmony_ci "SRGB8_ALPHA8", 501e5c31af7Sopenharmony_ci "RGB10_A2", 502e5c31af7Sopenharmony_ci "RGB10_A2UI", 503e5c31af7Sopenharmony_ci "RGBA8_SNORM", 504e5c31af7Sopenharmony_ci "RGB8", 505e5c31af7Sopenharmony_ci "R11F_G11F_B10F", 506e5c31af7Sopenharmony_ci "RGB32F", 507e5c31af7Sopenharmony_ci "RGB32I", 508e5c31af7Sopenharmony_ci "RGB32UI", 509e5c31af7Sopenharmony_ci "RGB16", 510e5c31af7Sopenharmony_ci "RGB16_SNORM", 511e5c31af7Sopenharmony_ci "RGB16F", 512e5c31af7Sopenharmony_ci "RGB16I", 513e5c31af7Sopenharmony_ci "RGB16UI", 514e5c31af7Sopenharmony_ci "RGB8_SNORM", 515e5c31af7Sopenharmony_ci "RGB8I", 516e5c31af7Sopenharmony_ci "RGB8UI", 517e5c31af7Sopenharmony_ci "SRGB8", 518e5c31af7Sopenharmony_ci "RGB9_E5", 519e5c31af7Sopenharmony_ci "RG32F", 520e5c31af7Sopenharmony_ci "RG32I", 521e5c31af7Sopenharmony_ci "RG32UI", 522e5c31af7Sopenharmony_ci "RG16", 523e5c31af7Sopenharmony_ci "RG16_SNORM", 524e5c31af7Sopenharmony_ci "RG16F", 525e5c31af7Sopenharmony_ci "RG16I", 526e5c31af7Sopenharmony_ci "RG16UI", 527e5c31af7Sopenharmony_ci "RG8", 528e5c31af7Sopenharmony_ci "RG8I", 529e5c31af7Sopenharmony_ci "RG8UI", 530e5c31af7Sopenharmony_ci "RG8_SNORM", 531e5c31af7Sopenharmony_ci "R32F", 532e5c31af7Sopenharmony_ci "R32I", 533e5c31af7Sopenharmony_ci "R32UI", 534e5c31af7Sopenharmony_ci "R16", 535e5c31af7Sopenharmony_ci "R16_SNORM", 536e5c31af7Sopenharmony_ci "R16F", 537e5c31af7Sopenharmony_ci "R16I", 538e5c31af7Sopenharmony_ci "R16UI", 539e5c31af7Sopenharmony_ci "R8", 540e5c31af7Sopenharmony_ci "R8I", 541e5c31af7Sopenharmony_ci "R8UI", 542e5c31af7Sopenharmony_ci "R8_SNORM", 543e5c31af7Sopenharmony_ci "DEPTH_COMPONENT32F", 544e5c31af7Sopenharmony_ci "DEPTH_COMPONENT24", 545e5c31af7Sopenharmony_ci "DEPTH32F_STENCIL8", 546e5c31af7Sopenharmony_ci "DEPTH24_STENCIL8", 547e5c31af7Sopenharmony_ci 548e5c31af7Sopenharmony_ci # OES_required_internalformat 549e5c31af7Sopenharmony_ci "RGB10", 550e5c31af7Sopenharmony_ci 551e5c31af7Sopenharmony_ci # OES_depth32 552e5c31af7Sopenharmony_ci "DEPTH_COMPONENT32", 553e5c31af7Sopenharmony_ci 554e5c31af7Sopenharmony_ci # EXT_sRGB 555e5c31af7Sopenharmony_ci "SRGB", 556e5c31af7Sopenharmony_ci "SRGB_ALPHA", 557e5c31af7Sopenharmony_ci 558e5c31af7Sopenharmony_ci # GL_EXT_texture_sRGB_R8 & RG8 559e5c31af7Sopenharmony_ci "SR8_EXT", 560e5c31af7Sopenharmony_ci "SRG8_EXT", 561e5c31af7Sopenharmony_ci 562e5c31af7Sopenharmony_ci # GL_EXT_read_format_bgra 563e5c31af7Sopenharmony_ci "BGRA", 564e5c31af7Sopenharmony_ci ]), 565e5c31af7Sopenharmony_ci 566e5c31af7Sopenharmony_ci ("CompressedTextureFormat", [ 567e5c31af7Sopenharmony_ci # ETC2/EAC formats 568e5c31af7Sopenharmony_ci "COMPRESSED_R11_EAC", 569e5c31af7Sopenharmony_ci "COMPRESSED_SIGNED_R11_EAC", 570e5c31af7Sopenharmony_ci "COMPRESSED_RG11_EAC", 571e5c31af7Sopenharmony_ci "COMPRESSED_SIGNED_RG11_EAC", 572e5c31af7Sopenharmony_ci "COMPRESSED_RGB8_ETC2", 573e5c31af7Sopenharmony_ci "COMPRESSED_SRGB8_ETC2", 574e5c31af7Sopenharmony_ci "COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2", 575e5c31af7Sopenharmony_ci "COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2", 576e5c31af7Sopenharmony_ci "COMPRESSED_RGBA8_ETC2_EAC", 577e5c31af7Sopenharmony_ci "COMPRESSED_SRGB8_ALPHA8_ETC2_EAC", 578e5c31af7Sopenharmony_ci 579e5c31af7Sopenharmony_ci # ASTC formats 580e5c31af7Sopenharmony_ci "COMPRESSED_RGBA_ASTC_4x4_KHR", 581e5c31af7Sopenharmony_ci "COMPRESSED_RGBA_ASTC_5x4_KHR", 582e5c31af7Sopenharmony_ci "COMPRESSED_RGBA_ASTC_5x5_KHR", 583e5c31af7Sopenharmony_ci "COMPRESSED_RGBA_ASTC_6x5_KHR", 584e5c31af7Sopenharmony_ci "COMPRESSED_RGBA_ASTC_6x6_KHR", 585e5c31af7Sopenharmony_ci "COMPRESSED_RGBA_ASTC_8x5_KHR", 586e5c31af7Sopenharmony_ci "COMPRESSED_RGBA_ASTC_8x6_KHR", 587e5c31af7Sopenharmony_ci "COMPRESSED_RGBA_ASTC_8x8_KHR", 588e5c31af7Sopenharmony_ci "COMPRESSED_RGBA_ASTC_10x5_KHR", 589e5c31af7Sopenharmony_ci "COMPRESSED_RGBA_ASTC_10x6_KHR", 590e5c31af7Sopenharmony_ci "COMPRESSED_RGBA_ASTC_10x8_KHR", 591e5c31af7Sopenharmony_ci "COMPRESSED_RGBA_ASTC_10x10_KHR", 592e5c31af7Sopenharmony_ci "COMPRESSED_RGBA_ASTC_12x10_KHR", 593e5c31af7Sopenharmony_ci "COMPRESSED_RGBA_ASTC_12x12_KHR", 594e5c31af7Sopenharmony_ci "COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR", 595e5c31af7Sopenharmony_ci "COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR", 596e5c31af7Sopenharmony_ci "COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR", 597e5c31af7Sopenharmony_ci "COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR", 598e5c31af7Sopenharmony_ci "COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR", 599e5c31af7Sopenharmony_ci "COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR", 600e5c31af7Sopenharmony_ci "COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR", 601e5c31af7Sopenharmony_ci "COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR", 602e5c31af7Sopenharmony_ci "COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR", 603e5c31af7Sopenharmony_ci "COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR", 604e5c31af7Sopenharmony_ci "COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR", 605e5c31af7Sopenharmony_ci "COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR", 606e5c31af7Sopenharmony_ci "COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR", 607e5c31af7Sopenharmony_ci "COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR", 608e5c31af7Sopenharmony_ci 609e5c31af7Sopenharmony_ci # EXT_texture_compression_s3tc 610e5c31af7Sopenharmony_ci "COMPRESSED_RGB_S3TC_DXT1_EXT", 611e5c31af7Sopenharmony_ci "COMPRESSED_RGBA_S3TC_DXT1_EXT", 612e5c31af7Sopenharmony_ci "COMPRESSED_RGBA_S3TC_DXT3_EXT", 613e5c31af7Sopenharmony_ci "COMPRESSED_RGBA_S3TC_DXT5_EXT", 614e5c31af7Sopenharmony_ci 615e5c31af7Sopenharmony_ci # IMG_texture_compression_pvrtc 616e5c31af7Sopenharmony_ci "COMPRESSED_RGB_PVRTC_4BPPV1_IMG", 617e5c31af7Sopenharmony_ci "COMPRESSED_RGB_PVRTC_2BPPV1_IMG", 618e5c31af7Sopenharmony_ci "COMPRESSED_RGBA_PVRTC_4BPPV1_IMG", 619e5c31af7Sopenharmony_ci "COMPRESSED_RGBA_PVRTC_2BPPV1_IMG", 620e5c31af7Sopenharmony_ci ]), 621e5c31af7Sopenharmony_ci 622e5c31af7Sopenharmony_ci # Shader var type 623e5c31af7Sopenharmony_ci ("ShaderVarType", [ 624e5c31af7Sopenharmony_ci "FLOAT", 625e5c31af7Sopenharmony_ci "FLOAT_VEC2", 626e5c31af7Sopenharmony_ci "FLOAT_VEC3", 627e5c31af7Sopenharmony_ci "FLOAT_VEC4", 628e5c31af7Sopenharmony_ci "INT", 629e5c31af7Sopenharmony_ci "INT_VEC2", 630e5c31af7Sopenharmony_ci "INT_VEC3", 631e5c31af7Sopenharmony_ci "INT_VEC4", 632e5c31af7Sopenharmony_ci "UNSIGNED_INT", 633e5c31af7Sopenharmony_ci "UNSIGNED_INT_VEC2", 634e5c31af7Sopenharmony_ci "UNSIGNED_INT_VEC3", 635e5c31af7Sopenharmony_ci "UNSIGNED_INT_VEC4", 636e5c31af7Sopenharmony_ci "BOOL", 637e5c31af7Sopenharmony_ci "BOOL_VEC2", 638e5c31af7Sopenharmony_ci "BOOL_VEC3", 639e5c31af7Sopenharmony_ci "BOOL_VEC4", 640e5c31af7Sopenharmony_ci "FLOAT_MAT2", 641e5c31af7Sopenharmony_ci "FLOAT_MAT3", 642e5c31af7Sopenharmony_ci "FLOAT_MAT4", 643e5c31af7Sopenharmony_ci "FLOAT_MAT2x3", 644e5c31af7Sopenharmony_ci "FLOAT_MAT2x4", 645e5c31af7Sopenharmony_ci "FLOAT_MAT3x2", 646e5c31af7Sopenharmony_ci "FLOAT_MAT3x4", 647e5c31af7Sopenharmony_ci "FLOAT_MAT4x2", 648e5c31af7Sopenharmony_ci "FLOAT_MAT4x3", 649e5c31af7Sopenharmony_ci "SAMPLER_2D", 650e5c31af7Sopenharmony_ci "SAMPLER_3D", 651e5c31af7Sopenharmony_ci "SAMPLER_CUBE", 652e5c31af7Sopenharmony_ci "SAMPLER_2D_SHADOW", 653e5c31af7Sopenharmony_ci "SAMPLER_2D_ARRAY", 654e5c31af7Sopenharmony_ci "SAMPLER_2D_ARRAY_SHADOW", 655e5c31af7Sopenharmony_ci "SAMPLER_CUBE_SHADOW", 656e5c31af7Sopenharmony_ci "INT_SAMPLER_2D", 657e5c31af7Sopenharmony_ci "INT_SAMPLER_3D", 658e5c31af7Sopenharmony_ci "INT_SAMPLER_CUBE", 659e5c31af7Sopenharmony_ci "INT_SAMPLER_2D_ARRAY", 660e5c31af7Sopenharmony_ci "UNSIGNED_INT_SAMPLER_2D", 661e5c31af7Sopenharmony_ci "UNSIGNED_INT_SAMPLER_3D", 662e5c31af7Sopenharmony_ci "UNSIGNED_INT_SAMPLER_CUBE", 663e5c31af7Sopenharmony_ci "UNSIGNED_INT_SAMPLER_2D_ARRAY", 664e5c31af7Sopenharmony_ci "SAMPLER_2D_MULTISAMPLE", 665e5c31af7Sopenharmony_ci "INT_SAMPLER_2D_MULTISAMPLE", 666e5c31af7Sopenharmony_ci "UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE", 667e5c31af7Sopenharmony_ci "IMAGE_2D", 668e5c31af7Sopenharmony_ci "IMAGE_3D", 669e5c31af7Sopenharmony_ci "IMAGE_CUBE", 670e5c31af7Sopenharmony_ci "IMAGE_2D_ARRAY", 671e5c31af7Sopenharmony_ci "INT_IMAGE_2D", 672e5c31af7Sopenharmony_ci "INT_IMAGE_3D", 673e5c31af7Sopenharmony_ci "INT_IMAGE_CUBE", 674e5c31af7Sopenharmony_ci "INT_IMAGE_2D_ARRAY", 675e5c31af7Sopenharmony_ci "UNSIGNED_INT_IMAGE_2D", 676e5c31af7Sopenharmony_ci "UNSIGNED_INT_IMAGE_3D", 677e5c31af7Sopenharmony_ci "UNSIGNED_INT_IMAGE_CUBE", 678e5c31af7Sopenharmony_ci "UNSIGNED_INT_IMAGE_2D_ARRAY", 679e5c31af7Sopenharmony_ci "UNSIGNED_INT_ATOMIC_COUNTER", 680e5c31af7Sopenharmony_ci "SAMPLER_2D_MULTISAMPLE_ARRAY", 681e5c31af7Sopenharmony_ci "INT_SAMPLER_2D_MULTISAMPLE_ARRAY", 682e5c31af7Sopenharmony_ci "UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY", 683e5c31af7Sopenharmony_ci "SAMPLER_BUFFER", 684e5c31af7Sopenharmony_ci "INT_SAMPLER_BUFFER", 685e5c31af7Sopenharmony_ci "UNSIGNED_INT_SAMPLER_BUFFER", 686e5c31af7Sopenharmony_ci "IMAGE_BUFFER", 687e5c31af7Sopenharmony_ci "INT_IMAGE_BUFFER", 688e5c31af7Sopenharmony_ci "UNSIGNED_INT_IMAGE_BUFFER", 689e5c31af7Sopenharmony_ci "SAMPLER_CUBE_MAP_ARRAY", 690e5c31af7Sopenharmony_ci "SAMPLER_CUBE_MAP_ARRAY_SHADOW", 691e5c31af7Sopenharmony_ci "INT_SAMPLER_CUBE_MAP_ARRAY", 692e5c31af7Sopenharmony_ci "UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY", 693e5c31af7Sopenharmony_ci "IMAGE_CUBE_MAP_ARRAY", 694e5c31af7Sopenharmony_ci "INT_IMAGE_CUBE_MAP_ARRAY", 695e5c31af7Sopenharmony_ci "UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY", 696e5c31af7Sopenharmony_ci ]), 697e5c31af7Sopenharmony_ci 698e5c31af7Sopenharmony_ci # Shader params 699e5c31af7Sopenharmony_ci ("ShaderParam", [ "SHADER_TYPE", "DELETE_STATUS", "COMPILE_STATUS", "INFO_LOG_LENGTH", "SHADER_SOURCE_LENGTH"]), 700e5c31af7Sopenharmony_ci 701e5c31af7Sopenharmony_ci # Vertex attribute queries 702e5c31af7Sopenharmony_ci ("VertexAttribParameterName", [ 703e5c31af7Sopenharmony_ci "VERTEX_ATTRIB_ARRAY_BUFFER_BINDING", 704e5c31af7Sopenharmony_ci "VERTEX_ATTRIB_ARRAY_ENABLED", 705e5c31af7Sopenharmony_ci "VERTEX_ATTRIB_ARRAY_SIZE", 706e5c31af7Sopenharmony_ci "VERTEX_ATTRIB_ARRAY_STRIDE", 707e5c31af7Sopenharmony_ci "VERTEX_ATTRIB_ARRAY_TYPE", 708e5c31af7Sopenharmony_ci "VERTEX_ATTRIB_ARRAY_NORMALIZED", 709e5c31af7Sopenharmony_ci "VERTEX_ATTRIB_ARRAY_INTEGER", 710e5c31af7Sopenharmony_ci "VERTEX_ATTRIB_ARRAY_DIVISOR", 711e5c31af7Sopenharmony_ci "CURRENT_VERTEX_ATTRIB", 712e5c31af7Sopenharmony_ci "VERTEX_ATTRIB_BINDING", 713e5c31af7Sopenharmony_ci "VERTEX_ATTRIB_RELATIVE_OFFSET", 714e5c31af7Sopenharmony_ci ]), 715e5c31af7Sopenharmony_ci 716e5c31af7Sopenharmony_ci ("Boolean", ["FALSE", "TRUE"]), 717e5c31af7Sopenharmony_ci 718e5c31af7Sopenharmony_ci # GetPName 719e5c31af7Sopenharmony_ci ("GettableState", [ 720e5c31af7Sopenharmony_ci "ELEMENT_ARRAY_BUFFER_BINDING", "ARRAY_BUFFER_BINDING", "VERTEX_ARRAY_BINDING", "VIEWPORT", "DEPTH_RANGE", 721e5c31af7Sopenharmony_ci "TRANSFORM_FEEDBACK_BINDING", "LINE_WIDTH", "CULL_FACE_MODE", "FRONT_FACE", "POLYGON_OFFSET_FACTOR", 722e5c31af7Sopenharmony_ci "POLYGON_OFFSET_UNITS", "SAMPLE_COVERAGE_VALUE", "SAMPLE_COVERAGE_INVERT", "ACTIVE_TEXTURE", "TEXTURE_BINDING_1D", 723e5c31af7Sopenharmony_ci "TEXTURE_BINDING_2D", "TEXTURE_BINDING_3D", "TEXTURE_BINDING_2D_ARRAY", 724e5c31af7Sopenharmony_ci "TEXTURE_BINDING_CUBE_MAP", "SAMPLER_BINDING", "SCISSOR_BOX", "STENCIL_FUNC", "STENCIL_VALUE_MASK", 725e5c31af7Sopenharmony_ci "STENCIL_REF", "STENCIL_FAIL", "STENCIL_PASS_DEPTH_FAIL", "STENCIL_PASS_DEPTH_PASS", "STENCIL_BACK_FUNC", 726e5c31af7Sopenharmony_ci "STENCIL_BACK_VALUE_MASK", "STENCIL_BACK_REF", "STENCIL_BACK_FAIL", "STENCIL_BACK_PASS_DEPTH_FAIL", "STENCIL_BACK_PASS_DEPTH_PASS", 727e5c31af7Sopenharmony_ci "DEPTH_FUNC", "BLEND_SRC_RGB", "BLEND_SRC_ALPHA", "BLEND_DST_RGB", "BLEND_DST_ALPHA", 728e5c31af7Sopenharmony_ci "BLEND_EQUATION_RGB", "BLEND_EQUATION_ALPHA", "BLEND_COLOR", "COLOR_WRITEMASK", "DEPTH_WRITEMASK", 729e5c31af7Sopenharmony_ci "STENCIL_WRITEMASK", "STENCIL_BACK_WRITEMASK", "COLOR_CLEAR_VALUE", "DEPTH_CLEAR_VALUE", "STENCIL_CLEAR_VALUE", 730e5c31af7Sopenharmony_ci "DRAW_FRAMEBUFFER_BINDING", "READ_FRAMEBUFFER_BINDING", "RENDERBUFFER_BINDING", "DRAW_BUFFER0", "DRAW_BUFFER1", 731e5c31af7Sopenharmony_ci "DRAW_BUFFER2", "DRAW_BUFFER3", "DRAW_BUFFER4", "DRAW_BUFFER5", "DRAW_BUFFER6", 732e5c31af7Sopenharmony_ci "DRAW_BUFFER7", "DRAW_BUFFER8", "DRAW_BUFFER9", "DRAW_BUFFER10", "DRAW_BUFFER11", 733e5c31af7Sopenharmony_ci "DRAW_BUFFER12", "DRAW_BUFFER13", "DRAW_BUFFER14", "DRAW_BUFFER15", "READ_BUFFER", 734e5c31af7Sopenharmony_ci "UNPACK_IMAGE_HEIGHT", "UNPACK_SKIP_IMAGES", "UNPACK_ROW_LENGTH", "UNPACK_SKIP_ROWS", "UNPACK_SKIP_PIXELS", 735e5c31af7Sopenharmony_ci "UNPACK_ALIGNMENT", "PACK_ROW_LENGTH", "PACK_SKIP_ROWS", "PACK_SKIP_PIXELS", "PACK_ALIGNMENT", 736e5c31af7Sopenharmony_ci "PIXEL_PACK_BUFFER_BINDING", "PIXEL_UNPACK_BUFFER_BINDING", "CURRENT_PROGRAM", "TRANSFORM_FEEDBACK_BUFFER_BINDING", "TRANSFORM_FEEDBACK_PAUSED", 737e5c31af7Sopenharmony_ci "TRANSFORM_FEEDBACK_ACTIVE", "UNIFORM_BUFFER_BINDING", "GENERATE_MIPMAP_HINT", "FRAGMENT_SHADER_DERIVATIVE_HINT", "MAX_ELEMENT_INDEX", 738e5c31af7Sopenharmony_ci "SUBPIXEL_BITS", "MAX_3D_TEXTURE_SIZE", "MAX_TEXTURE_SIZE", "MAX_ARRAY_TEXTURE_LAYERS", "MAX_TEXTURE_LOD_BIAS", 739e5c31af7Sopenharmony_ci "MAX_CUBE_MAP_TEXTURE_SIZE", "MAX_RENDERBUFFER_SIZE", "MAX_DRAW_BUFFERS", "MAX_COLOR_ATTACHMENTS", "MAX_VIEWPORT_DIMS", 740e5c31af7Sopenharmony_ci "ALIASED_POINT_SIZE_RANGE", "ALIASED_LINE_WIDTH_RANGE", "MAX_ELEMENTS_INDICES", "MAX_ELEMENTS_VERTICES", "COMPRESSED_TEXTURE_FORMATS", 741e5c31af7Sopenharmony_ci "NUM_COMPRESSED_TEXTURE_FORMATS", "PROGRAM_BINARY_FORMATS", "NUM_PROGRAM_BINARY_FORMATS", "SHADER_BINARY_FORMATS", "NUM_SHADER_BINARY_FORMATS", 742e5c31af7Sopenharmony_ci "SHADER_COMPILER", "MAX_SERVER_WAIT_TIMEOUT", "NUM_EXTENSIONS", "MAJOR_VERSION", "MINOR_VERSION", 743e5c31af7Sopenharmony_ci "MAX_VERTEX_ATTRIBS", "MAX_VERTEX_UNIFORM_COMPONENTS", "MAX_VERTEX_UNIFORM_VECTORS", "MAX_VERTEX_UNIFORM_BLOCKS", "MAX_VERTEX_OUTPUT_COMPONENTS", 744e5c31af7Sopenharmony_ci "MAX_VERTEX_TEXTURE_IMAGE_UNITS", "MAX_FRAGMENT_UNIFORM_COMPONENTS", "MAX_FRAGMENT_UNIFORM_VECTORS", "MAX_FRAGMENT_UNIFORM_BLOCKS", "MAX_FRAGMENT_INPUT_COMPONENTS", 745e5c31af7Sopenharmony_ci "MAX_TEXTURE_IMAGE_UNITS", "MIN_PROGRAM_TEXEL_OFFSET", "MAX_PROGRAM_TEXEL_OFFSET", "MAX_UNIFORM_BUFFER_BINDINGS", "MAX_UNIFORM_BLOCK_SIZE", 746e5c31af7Sopenharmony_ci "UNIFORM_BUFFER_OFFSET_ALIGNMENT", "MAX_COMBINED_UNIFORM_BLOCKS", "MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS", "MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS", "MAX_VARYING_COMPONENTS", 747e5c31af7Sopenharmony_ci "MAX_VARYING_VECTORS", "MAX_COMBINED_TEXTURE_IMAGE_UNITS", "MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS", "MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS", "MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS", 748e5c31af7Sopenharmony_ci "SAMPLE_BUFFERS", "SAMPLES", "MAX_SAMPLES", "DEPTH_BITS", "STENCIL_BITS", 749e5c31af7Sopenharmony_ci "IMPLEMENTATION_COLOR_READ_TYPE", "IMPLEMENTATION_COLOR_READ_FORMAT", "COPY_READ_BUFFER_BINDING", "COPY_WRITE_BUFFER_BINDING", "RED_BITS", 750e5c31af7Sopenharmony_ci "GREEN_BITS", "BLUE_BITS", "ALPHA_BITS", "MAX_COLOR_TEXTURE_SAMPLES", "TIMESTAMP", 751e5c31af7Sopenharmony_ci "MAX_DEPTH_TEXTURE_SAMPLES", "MAX_INTEGER_SAMPLES", "TEXTURE_BINDING_2D_MULTISAMPLE", "TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY", "MAX_VERTEX_ATTRIB_STRIDE", 752e5c31af7Sopenharmony_ci "MAX_VERTEX_ATTRIB_BINDINGS", "MAX_VERTEX_ATTRIB_RELATIVE_OFFSET", "MIN_SAMPLE_SHADING_VALUE", "FRAGMENT_INTERPOLATION_OFFSET_BITS", "MAX_FRAGMENT_INTERPOLATION_OFFSET", 753e5c31af7Sopenharmony_ci "MIN_FRAGMENT_INTERPOLATION_OFFSET", "MAX_GEOMETRY_SHADER_INVOCATIONS", "LAYER_PROVOKING_VERTEX", "MAX_GEOMETRY_UNIFORM_COMPONENTS", "MAX_GEOMETRY_SHADER_STORAGE_BLOCKS", 754e5c31af7Sopenharmony_ci "MAX_GEOMETRY_UNIFORM_BLOCKS", "MAX_GEOMETRY_INPUT_COMPONENTS", "MAX_GEOMETRY_OUTPUT_COMPONENTS", "MAX_GEOMETRY_IMAGE_UNIFORMS", "MAX_GEOMETRY_TEXTURE_IMAGE_UNITS", 755e5c31af7Sopenharmony_ci "MAX_GEOMETRY_OUTPUT_VERTICES", "MAX_GEOMETRY_ATOMIC_COUNTERS", "MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS", "MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS", "MAX_FRAMEBUFFER_LAYERS", 756e5c31af7Sopenharmony_ci "PROVOKING_VERTEX", "PRIMITIVE_RESTART_INDEX", "MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS", "MAX_FRAGMENT_ATOMIC_COUNTERS", "MAX_FRAGMENT_IMAGE_UNIFORMS", 757e5c31af7Sopenharmony_ci "MAX_COMPUTE_UNIFORM_BLOCKS", "MAX_COMPUTE_TEXTURE_IMAGE_UNITS", "MAX_COMPUTE_UNIFORM_COMPONENTS", "MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS", "MAX_COMPUTE_ATOMIC_COUNTERS", 758e5c31af7Sopenharmony_ci "MAX_COMPUTE_IMAGE_UNIFORMS", "MAX_COMPUTE_SHADER_STORAGE_BLOCKS", "MAX_FRAGMENT_SHADER_STORAGE_BLOCKS", "MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS", "MAX_VERTEX_ATOMIC_COUNTER_BUFFERS", 759e5c31af7Sopenharmony_ci "MAX_VERTEX_ATOMIC_COUNTERS", "MAX_VERTEX_IMAGE_UNIFORMS", "MAX_VERTEX_SHADER_STORAGE_BLOCKS", "MAX_COMBINED_SHADER_OUTPUT_RESOURCES", "MAX_ATOMIC_COUNTER_BUFFER_BINDINGS", 760e5c31af7Sopenharmony_ci "MAX_ATOMIC_COUNTER_BUFFER_SIZE", "MAX_IMAGE_UNITS", "MAX_COMBINED_ATOMIC_COUNTER_BUFFERS", "MAX_COMBINED_IMAGE_UNIFORMS", "MAX_SHADER_STORAGE_BUFFER_BINDINGS", 761e5c31af7Sopenharmony_ci "MAX_SHADER_STORAGE_BLOCK_SIZE", "MAX_COMBINED_ATOMIC_COUNTERS", "MAX_COMBINED_SHADER_STORAGE_BLOCKS", "SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT", "PRIMITIVE_BOUNDING_BOX_EXT", 762e5c31af7Sopenharmony_ci "DRAW_INDIRECT_BUFFER_BINDING", "MAX_SAMPLE_MASK_WORDS", "PROGRAM_PIPELINE_BINDING", "ATOMIC_COUNTER_BUFFER_BINDING", "SHADER_STORAGE_BUFFER_BINDING", 763e5c31af7Sopenharmony_ci "DISPATCH_INDIRECT_BUFFER_BINDING", "MAX_FRAMEBUFFER_WIDTH", "MAX_FRAMEBUFFER_HEIGHT", "MAX_FRAMEBUFFER_SAMPLES", "MAX_COMPUTE_SHARED_MEMORY_SIZE", 764e5c31af7Sopenharmony_ci "MIN_PROGRAM_TEXTURE_GATHER_OFFSET", "MAX_PROGRAM_TEXTURE_GATHER_OFFSET", "MAX_COMPUTE_WORK_GROUP_INVOCATIONS", "MAX_UNIFORM_LOCATIONS", "MAX_DEBUG_MESSAGE_LENGTH", 765e5c31af7Sopenharmony_ci "MAX_DEBUG_LOGGED_MESSAGES", "MAX_DEBUG_GROUP_STACK_DEPTH", "MAX_LABEL_LENGTH", "CONTEXT_FLAGS", "DEBUG_LOGGED_MESSAGES", 766e5c31af7Sopenharmony_ci "DEBUG_NEXT_LOGGED_MESSAGE_LENGTH", "DEBUG_GROUP_STACK_DEPTH", "MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS", "TEXTURE_BUFFER_OFFSET_ALIGNMENT", "TEXTURE_BUFFER_BINDING", 767e5c31af7Sopenharmony_ci "TEXTURE_BINDING_BUFFER", "MAX_TEXTURE_BUFFER_SIZE", "MAX_PATCH_VERTICES", "MAX_TESS_GEN_LEVEL", "MAX_TESS_CONTROL_UNIFORM_COMPONENTS", 768e5c31af7Sopenharmony_ci "MAX_TESS_EVALUATION_UNIFORM_COMPONENTS", "MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS", "MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS", "MAX_TESS_CONTROL_OUTPUT_COMPONENTS", "MAX_TESS_PATCH_COMPONENTS", 769e5c31af7Sopenharmony_ci "MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS", "MAX_TESS_EVALUATION_OUTPUT_COMPONENTS", "MAX_TESS_CONTROL_UNIFORM_BLOCKS", "MAX_TESS_EVALUATION_UNIFORM_BLOCKS", "MAX_TESS_CONTROL_INPUT_COMPONENTS", 770e5c31af7Sopenharmony_ci "MAX_TESS_EVALUATION_INPUT_COMPONENTS", "MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS", "MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS", "MAX_TESS_CONTROL_ATOMIC_COUNTERS", "MAX_TESS_EVALUATION_ATOMIC_COUNTERS", 771e5c31af7Sopenharmony_ci "MAX_TESS_CONTROL_IMAGE_UNIFORMS", "MAX_TESS_EVALUATION_IMAGE_UNIFORMS", "MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS", "MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS","MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS", 772e5c31af7Sopenharmony_ci "MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS", "PATCH_VERTICES", "PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED" 773e5c31af7Sopenharmony_ci ]), 774e5c31af7Sopenharmony_ci 775e5c31af7Sopenharmony_ci ("GettableIndexedState", [ 776e5c31af7Sopenharmony_ci "TRANSFORM_FEEDBACK_BUFFER_BINDING", 777e5c31af7Sopenharmony_ci "UNIFORM_BUFFER_BINDING", 778e5c31af7Sopenharmony_ci "TRANSFORM_FEEDBACK_BUFFER_START", 779e5c31af7Sopenharmony_ci "TRANSFORM_FEEDBACK_BUFFER_SIZE", 780e5c31af7Sopenharmony_ci "UNIFORM_BUFFER_START", 781e5c31af7Sopenharmony_ci "UNIFORM_BUFFER_SIZE", 782e5c31af7Sopenharmony_ci "SAMPLE_MASK_VALUE", 783e5c31af7Sopenharmony_ci "VERTEX_BINDING_OFFSET", 784e5c31af7Sopenharmony_ci "VERTEX_BINDING_STRIDE", 785e5c31af7Sopenharmony_ci "VERTEX_BINDING_DIVISOR", 786e5c31af7Sopenharmony_ci "VERTEX_BINDING_BUFFER", 787e5c31af7Sopenharmony_ci "MAX_COMPUTE_WORK_GROUP_COUNT", 788e5c31af7Sopenharmony_ci "MAX_COMPUTE_WORK_GROUP_SIZE", 789e5c31af7Sopenharmony_ci "ATOMIC_COUNTER_BUFFER_BINDING", 790e5c31af7Sopenharmony_ci "ATOMIC_COUNTER_BUFFER_START", 791e5c31af7Sopenharmony_ci "ATOMIC_COUNTER_BUFFER_SIZE", 792e5c31af7Sopenharmony_ci "SHADER_STORAGE_BUFFER_BINDING", 793e5c31af7Sopenharmony_ci "SHADER_STORAGE_BUFFER_START", 794e5c31af7Sopenharmony_ci "SHADER_STORAGE_BUFFER_SIZE", 795e5c31af7Sopenharmony_ci "IMAGE_BINDING_NAME", 796e5c31af7Sopenharmony_ci "IMAGE_BINDING_LEVEL", 797e5c31af7Sopenharmony_ci "IMAGE_BINDING_LAYERED", 798e5c31af7Sopenharmony_ci "IMAGE_BINDING_LAYER", 799e5c31af7Sopenharmony_ci "IMAGE_BINDING_ACCESS", 800e5c31af7Sopenharmony_ci "IMAGE_BINDING_FORMAT", 801e5c31af7Sopenharmony_ci "BLEND_EQUATION_RGB", 802e5c31af7Sopenharmony_ci "BLEND_EQUATION_ALPHA", 803e5c31af7Sopenharmony_ci "BLEND_SRC_RGB", 804e5c31af7Sopenharmony_ci "BLEND_SRC_ALPHA", 805e5c31af7Sopenharmony_ci "BLEND_DST_RGB", 806e5c31af7Sopenharmony_ci "BLEND_DST_ALPHA", 807e5c31af7Sopenharmony_ci "COLOR_WRITEMASK", 808e5c31af7Sopenharmony_ci ]), 809e5c31af7Sopenharmony_ci 810e5c31af7Sopenharmony_ci ("GettableString", [ 811e5c31af7Sopenharmony_ci "EXTENSIONS", 812e5c31af7Sopenharmony_ci "RENDERER", 813e5c31af7Sopenharmony_ci "SHADING_LANGUAGE_VERSION", 814e5c31af7Sopenharmony_ci "VENDOR", 815e5c31af7Sopenharmony_ci "VERSION" 816e5c31af7Sopenharmony_ci ]), 817e5c31af7Sopenharmony_ci 818e5c31af7Sopenharmony_ci ("PointerState", [ 819e5c31af7Sopenharmony_ci "DEBUG_CALLBACK_FUNCTION", 820e5c31af7Sopenharmony_ci "DEBUG_CALLBACK_USER_PARAM", 821e5c31af7Sopenharmony_ci ]), 822e5c31af7Sopenharmony_ci 823e5c31af7Sopenharmony_ci ("InternalFormatParameter", ["NUM_SAMPLE_COUNTS", "SAMPLES"]), 824e5c31af7Sopenharmony_ci ("InternalFormatTarget", [ 825e5c31af7Sopenharmony_ci "RENDERBUFFER", 826e5c31af7Sopenharmony_ci "TEXTURE_2D_MULTISAMPLE", 827e5c31af7Sopenharmony_ci "TEXTURE_2D_MULTISAMPLE_ARRAY", 828e5c31af7Sopenharmony_ci "TEXTURE_2D", 829e5c31af7Sopenharmony_ci "TEXTURE_3D", 830e5c31af7Sopenharmony_ci "TEXTURE_2D_ARRAY", 831e5c31af7Sopenharmony_ci "TEXTURE_CUBE_MAP", 832e5c31af7Sopenharmony_ci ]), 833e5c31af7Sopenharmony_ci 834e5c31af7Sopenharmony_ci ("MultisampleParameter", ["SAMPLE_POSITION"]), 835e5c31af7Sopenharmony_ci 836e5c31af7Sopenharmony_ci # Occlusion and timer queries 837e5c31af7Sopenharmony_ci ("QueryTarget", [ 838e5c31af7Sopenharmony_ci "SAMPLES_PASSED", 839e5c31af7Sopenharmony_ci "ANY_SAMPLES_PASSED", 840e5c31af7Sopenharmony_ci "PRIMITIVES_GENERATED", 841e5c31af7Sopenharmony_ci "TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN", 842e5c31af7Sopenharmony_ci "TIME_ELAPSED", 843e5c31af7Sopenharmony_ci ]), 844e5c31af7Sopenharmony_ci 845e5c31af7Sopenharmony_ci ("QueryParam", ["CURRENT_QUERY", "QUERY_COUNTER_BITS"]), 846e5c31af7Sopenharmony_ci ("QueryObjectParam", ["QUERY_RESULT", "QUERY_RESULT_AVAILABLE"]), 847e5c31af7Sopenharmony_ci 848e5c31af7Sopenharmony_ci ("ImageAccess", ["READ_ONLY", "WRITE_ONLY", "READ_WRITE"]), 849e5c31af7Sopenharmony_ci 850e5c31af7Sopenharmony_ci ("ProgramInterface", [ 851e5c31af7Sopenharmony_ci "UNIFORM", 852e5c31af7Sopenharmony_ci "UNIFORM_BLOCK", 853e5c31af7Sopenharmony_ci "ATOMIC_COUNTER_BUFFER", 854e5c31af7Sopenharmony_ci "PROGRAM_INPUT", 855e5c31af7Sopenharmony_ci "PROGRAM_OUTPUT", 856e5c31af7Sopenharmony_ci "TRANSFORM_FEEDBACK_VARYING", 857e5c31af7Sopenharmony_ci "BUFFER_VARIABLE", 858e5c31af7Sopenharmony_ci "SHADER_STORAGE_BLOCK", 859e5c31af7Sopenharmony_ci ]), 860e5c31af7Sopenharmony_ci 861e5c31af7Sopenharmony_ci ("ProgramResourceProperty", [ 862e5c31af7Sopenharmony_ci "ACTIVE_VARIABLES", 863e5c31af7Sopenharmony_ci "BUFFER_BINDING", 864e5c31af7Sopenharmony_ci "NUM_ACTIVE_VARIABLES", 865e5c31af7Sopenharmony_ci "ARRAY_SIZE", 866e5c31af7Sopenharmony_ci "ARRAY_STRIDE", 867e5c31af7Sopenharmony_ci "BLOCK_INDEX", 868e5c31af7Sopenharmony_ci "IS_ROW_MAJOR", 869e5c31af7Sopenharmony_ci "MATRIX_STRIDE", 870e5c31af7Sopenharmony_ci "ATOMIC_COUNTER_BUFFER_INDEX", 871e5c31af7Sopenharmony_ci "BUFFER_DATA_SIZE", 872e5c31af7Sopenharmony_ci "LOCATION", 873e5c31af7Sopenharmony_ci "NAME_LENGTH", 874e5c31af7Sopenharmony_ci "OFFSET", 875e5c31af7Sopenharmony_ci "REFERENCED_BY_VERTEX_SHADER", 876e5c31af7Sopenharmony_ci "REFERENCED_BY_FRAGMENT_SHADER", 877e5c31af7Sopenharmony_ci "REFERENCED_BY_COMPUTE_SHADER", 878e5c31af7Sopenharmony_ci "REFERENCED_BY_GEOMETRY_SHADER", 879e5c31af7Sopenharmony_ci "REFERENCED_BY_TESS_CONTROL_SHADER", 880e5c31af7Sopenharmony_ci "REFERENCED_BY_TESS_EVALUATION_SHADER", 881e5c31af7Sopenharmony_ci "TOP_LEVEL_ARRAY_SIZE", 882e5c31af7Sopenharmony_ci "TOP_LEVEL_ARRAY_STRIDE", 883e5c31af7Sopenharmony_ci "TYPE", 884e5c31af7Sopenharmony_ci "IS_PER_PATCH", 885e5c31af7Sopenharmony_ci ]), 886e5c31af7Sopenharmony_ci 887e5c31af7Sopenharmony_ci ("PrecisionFormatType", ["LOW_FLOAT", "MEDIUM_FLOAT", "HIGH_FLOAT", "LOW_INT", "MEDIUM_INT", "HIGH_INT"]), 888e5c31af7Sopenharmony_ci 889e5c31af7Sopenharmony_ci ("TransformFeedbackTarget", ["TRANSFORM_FEEDBACK"]), 890e5c31af7Sopenharmony_ci 891e5c31af7Sopenharmony_ci ("ProvokingVertex", ["FIRST_VERTEX_CONVENTION", "LAST_VERTEX_CONVENTION", "UNDEFINED_VERTEX"]), 892e5c31af7Sopenharmony_ci 893e5c31af7Sopenharmony_ci ("DebugMessageSource", [ 894e5c31af7Sopenharmony_ci "DEBUG_SOURCE_API", 895e5c31af7Sopenharmony_ci "DEBUG_SOURCE_WINDOW_SYSTEM", 896e5c31af7Sopenharmony_ci "DEBUG_SOURCE_SHADER_COMPILER", 897e5c31af7Sopenharmony_ci "DEBUG_SOURCE_THIRD_PARTY", 898e5c31af7Sopenharmony_ci "DEBUG_SOURCE_APPLICATION", 899e5c31af7Sopenharmony_ci "DEBUG_SOURCE_OTHER", "DONT_CARE" 900e5c31af7Sopenharmony_ci ]), 901e5c31af7Sopenharmony_ci ("DebugMessageType", [ 902e5c31af7Sopenharmony_ci "DEBUG_TYPE_ERROR", 903e5c31af7Sopenharmony_ci "DEBUG_TYPE_DEPRECATED_BEHAVIOR", 904e5c31af7Sopenharmony_ci "DEBUG_TYPE_UNDEFINED_BEHAVIOR", 905e5c31af7Sopenharmony_ci "DEBUG_TYPE_PORTABILITY", 906e5c31af7Sopenharmony_ci "DEBUG_TYPE_PERFORMANCE", 907e5c31af7Sopenharmony_ci "DEBUG_TYPE_OTHER", 908e5c31af7Sopenharmony_ci "DEBUG_TYPE_MARKER", 909e5c31af7Sopenharmony_ci "DEBUG_TYPE_PUSH_GROUP", 910e5c31af7Sopenharmony_ci "DEBUG_TYPE_POP_GROUP", 911e5c31af7Sopenharmony_ci "DONT_CARE" 912e5c31af7Sopenharmony_ci ]), 913e5c31af7Sopenharmony_ci ("DebugMessageSeverity", [ 914e5c31af7Sopenharmony_ci "DEBUG_SEVERITY_HIGH", 915e5c31af7Sopenharmony_ci "DEBUG_SEVERITY_MEDIUM", 916e5c31af7Sopenharmony_ci "DEBUG_SEVERITY_LOW", 917e5c31af7Sopenharmony_ci "DEBUG_SEVERITY_NOTIFICATION", 918e5c31af7Sopenharmony_ci "DONT_CARE" 919e5c31af7Sopenharmony_ci ]), 920e5c31af7Sopenharmony_ci 921e5c31af7Sopenharmony_ci # Pipeline query 922e5c31af7Sopenharmony_ci ("PipelineParam", [ 923e5c31af7Sopenharmony_ci "ACTIVE_PROGRAM", 924e5c31af7Sopenharmony_ci "INFO_LOG_LENGTH", 925e5c31af7Sopenharmony_ci "VALIDATE_STATUS", 926e5c31af7Sopenharmony_ci "VERTEX_SHADER", 927e5c31af7Sopenharmony_ci "FRAGMENT_SHADER", 928e5c31af7Sopenharmony_ci "COMPUTE_SHADER", 929e5c31af7Sopenharmony_ci "GEOMETRY_SHADER", 930e5c31af7Sopenharmony_ci "TESS_CONTROL_SHADER", 931e5c31af7Sopenharmony_ci "TESS_EVALUATION_SHADER", 932e5c31af7Sopenharmony_ci ]), 933e5c31af7Sopenharmony_ci 934e5c31af7Sopenharmony_ci ("PatchParam", [ 935e5c31af7Sopenharmony_ci "PATCH_VERTICES", 936e5c31af7Sopenharmony_ci ]), 937e5c31af7Sopenharmony_ci 938e5c31af7Sopenharmony_ci ("TextureFormat", [ 939e5c31af7Sopenharmony_ci # generated: UncompressedTextureFormat + CompressedTextureFormat 940e5c31af7Sopenharmony_ci ]), 941e5c31af7Sopenharmony_ci 942e5c31af7Sopenharmony_ci # GraphicsResetStatus 943e5c31af7Sopenharmony_ci ("GraphicsResetStatus", [ 944e5c31af7Sopenharmony_ci "NO_ERROR", 945e5c31af7Sopenharmony_ci "GUILTY_CONTEXT_RESET", 946e5c31af7Sopenharmony_ci "INNOCENT_CONTEXT_RESET", 947e5c31af7Sopenharmony_ci "UNKNOWN_CONTEXT_RESET", 948e5c31af7Sopenharmony_ci ]), 949e5c31af7Sopenharmony_ci] 950e5c31af7Sopenharmony_ci 951e5c31af7Sopenharmony_cidef getEnumGroupByName (name): 952e5c31af7Sopenharmony_ci # \note: will raise an (index out of bounds) error if no such group 953e5c31af7Sopenharmony_ci return [x for x in ENUM_GROUPS if x[0]==name][0][1] 954e5c31af7Sopenharmony_ci 955e5c31af7Sopenharmony_ci# EnableCap EnumGroups are also GettableState EnumGroups 956e5c31af7Sopenharmony_cigetEnumGroupByName("GettableState").extend(getEnumGroupByName("EnableCap")) 957e5c31af7Sopenharmony_ci 958e5c31af7Sopenharmony_ci# TextureFormat = UncompressedTextureFormat + CompressedTextureFormat 959e5c31af7Sopenharmony_cigetEnumGroupByName("TextureFormat").extend(getEnumGroupByName("UncompressedTextureFormat") + getEnumGroupByName("CompressedTextureFormat")) 960e5c31af7Sopenharmony_ci 961e5c31af7Sopenharmony_cidef genStrUtil (iface): 962e5c31af7Sopenharmony_ci enumGroups = addValuePrefix(ENUM_GROUPS, "GL_") 963e5c31af7Sopenharmony_ci bitfieldGroups = addValuePrefix(BITFIELD_GROUPS, "GL_") 964e5c31af7Sopenharmony_ci prototypeFile = os.path.join(OPENGL_DIR, "gluStrUtilPrototypes.inl") 965e5c31af7Sopenharmony_ci implFile = os.path.join(OPENGL_DIR, "gluStrUtil.inl") 966e5c31af7Sopenharmony_ci 967e5c31af7Sopenharmony_ci writeInlFile(prototypeFile, indentLines(genStrUtilProtos(iface, enumGroups, bitfieldGroups))) 968e5c31af7Sopenharmony_ci writeInlFile(implFile, genStrUtilImpls(iface, enumGroups, bitfieldGroups)) 969e5c31af7Sopenharmony_ci 970e5c31af7Sopenharmony_ciif __name__ == "__main__": 971e5c31af7Sopenharmony_ci genStrUtil(getHybridInterface()) 972