1 // 2 // Copyright (c) 2014 The ANGLE Project Authors. All rights reserved. 3 // Use of this source code is governed by a BSD-style license that can be 4 // found in the LICENSE file. 5 // 6 7 #ifndef LIBANGLE_CAPS_H_ 8 #define LIBANGLE_CAPS_H_ 9 10 #include "angle_gl.h" 11 #include "libANGLE/Version.h" 12 #include "libANGLE/angletypes.h" 13 #include "libANGLE/renderer/Format.h" 14 15 #include <map> 16 #include <set> 17 #include <string> 18 #include <vector> 19 #include <array> 20 21 namespace gl 22 { 23 24 struct Extensions; 25 26 typedef std::set<GLuint> SupportedSampleSet; 27 28 struct TextureCaps 29 { 30 TextureCaps(); 31 TextureCaps(const TextureCaps &other); 32 ~TextureCaps(); 33 34 // Supports for basic texturing: glTexImage, glTexSubImage, etc 35 bool texturable; 36 37 // Support for linear or anisotropic filtering 38 bool filterable; 39 40 // Support for being used as a framebuffer attachment or renderbuffer format 41 bool renderable; 42 43 // Set of supported sample counts, only guaranteed to be valid in ES3. 44 SupportedSampleSet sampleCounts; 45 46 // Get the maximum number of samples supported 47 GLuint getMaxSamples() const; 48 49 // Get the number of supported samples that is at least as many as requested. Returns 0 if 50 // there are no sample counts available 51 GLuint getNearestSamples(GLuint requestedSamples) const; 52 }; 53 54 TextureCaps GenerateMinimumTextureCaps(GLenum internalFormat, 55 const Version &clientVersion, 56 const Extensions &extensions); 57 58 class TextureCapsMap final : angle::NonCopyable 59 { 60 public: 61 TextureCapsMap(); 62 ~TextureCapsMap(); 63 64 // These methods are deprecated. Please use angle::Format for new features. 65 void insert(GLenum internalFormat, const TextureCaps &caps); 66 const TextureCaps &get(GLenum internalFormat) const; 67 68 void clear(); 69 70 // Prefer using angle::Format methods. 71 const TextureCaps &get(angle::Format::ID formatID) const; 72 void set(angle::Format::ID formatID, const TextureCaps &caps); 73 74 private: 75 TextureCaps &get(angle::Format::ID formatID); 76 77 // Indexed by angle::Format::ID 78 std::array<TextureCaps, angle::kNumANGLEFormats> mFormatData; 79 }; 80 81 void InitMinimumTextureCapsMap(const Version &clientVersion, 82 const Extensions &extensions, 83 TextureCapsMap *capsMap); 84 85 struct Extensions 86 { 87 Extensions(); 88 89 // Generate a vector of supported extension strings 90 std::vector<std::string> getStrings() const; 91 92 // Set all texture related extension support based on the supported textures. 93 // Determines support for: 94 // GL_OES_packed_depth_stencil 95 // GL_OES_rgb8_rgba8 96 // GL_EXT_texture_format_BGRA8888 97 // GL_EXT_color_buffer_half_float, 98 // GL_OES_texture_half_float, GL_OES_texture_half_float_linear 99 // GL_OES_texture_float, GL_OES_texture_float_linear 100 // GL_EXT_texture_rg 101 // GL_EXT_texture_compression_dxt1, GL_ANGLE_texture_compression_dxt3, 102 // GL_ANGLE_texture_compression_dxt5 103 // GL_KHR_texture_compression_astc_hdr, GL_KHR_texture_compression_astc_ldr 104 // GL_OES_compressed_ETC1_RGB8_texture 105 // GL_EXT_sRGB 106 // GL_ANGLE_depth_texture, GL_OES_depth32 107 // GL_EXT_color_buffer_float 108 // GL_EXT_texture_norm16 109 void setTextureExtensionSupport(const TextureCapsMap &textureCaps); 110 111 // ES2 Extension support 112 113 // GL_OES_element_index_uint 114 bool elementIndexUint; 115 116 // GL_OES_packed_depth_stencil 117 bool packedDepthStencil; 118 119 // GL_OES_get_program_binary 120 bool getProgramBinary; 121 122 // GL_OES_rgb8_rgba8 123 // Implies that TextureCaps for GL_RGB8 and GL_RGBA8 exist 124 bool rgb8rgba8; 125 126 // GL_EXT_texture_format_BGRA8888 127 // Implies that TextureCaps for GL_BGRA8 exist 128 bool textureFormatBGRA8888; 129 130 // GL_EXT_read_format_bgra 131 bool readFormatBGRA; 132 133 // GL_NV_pixel_buffer_object 134 bool pixelBufferObject; 135 136 // GL_OES_mapbuffer and GL_EXT_map_buffer_range 137 bool mapBuffer; 138 bool mapBufferRange; 139 140 // GL_EXT_color_buffer_half_float 141 // Together with GL_OES_texture_half_float in a GLES 2.0 context, implies that half-float 142 // textures are renderable. 143 bool colorBufferHalfFloat; 144 145 // GL_OES_texture_half_float and GL_OES_texture_half_float_linear 146 // Implies that TextureCaps for GL_RGB16F, GL_RGBA16F, GL_ALPHA32F_EXT, GL_LUMINANCE32F_EXT and 147 // GL_LUMINANCE_ALPHA32F_EXT exist 148 bool textureHalfFloat; 149 bool textureHalfFloatLinear; 150 151 // GL_OES_texture_float and GL_OES_texture_float_linear 152 // Implies that TextureCaps for GL_RGB32F, GL_RGBA32F, GL_ALPHA16F_EXT, GL_LUMINANCE16F_EXT and 153 // GL_LUMINANCE_ALPHA16F_EXT exist 154 bool textureFloat; 155 bool textureFloatLinear; 156 157 // GL_EXT_texture_rg 158 // Implies that TextureCaps for GL_R8, GL_RG8 (and floating point R/RG texture formats if floating point extensions 159 // are also present) exist 160 bool textureRG; 161 162 // GL_EXT_texture_compression_dxt1, GL_ANGLE_texture_compression_dxt3 and GL_ANGLE_texture_compression_dxt5 163 // Implies that TextureCaps exist for GL_COMPRESSED_RGB_S3TC_DXT1_EXT, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 164 // GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE and GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE 165 bool textureCompressionDXT1; 166 bool textureCompressionDXT3; 167 bool textureCompressionDXT5; 168 169 // GL_EXT_texture_compression_s3tc_srgb 170 // Implies that TextureCaps exist for GL_COMPRESSED_SRGB_S3TC_DXT1_EXT, 171 // GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, and 172 // GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 173 bool textureCompressionS3TCsRGB; 174 175 // GL_KHR_texture_compression_astc_hdr 176 bool textureCompressionASTCHDR; 177 178 // GL_KHR_texture_compression_astc_ldr 179 bool textureCompressionASTCLDR; 180 181 // GL_OES_compressed_ETC1_RGB8_texture 182 // Implies that TextureCaps for GL_ETC1_RGB8_OES exist 183 bool compressedETC1RGB8Texture; 184 185 // GL_EXT_sRGB 186 // Implies that TextureCaps for GL_SRGB8_ALPHA8 and GL_SRGB8 exist 187 // TODO: Don't advertise this extension in ES3 188 bool sRGB; 189 190 // GL_ANGLE_depth_texture 191 bool depthTextures; 192 193 // GL_OES_depth32 194 // Allows DEPTH_COMPONENT32_OES as a valid Renderbuffer format. 195 bool depth32; 196 197 // GL_EXT_texture_storage 198 bool textureStorage; 199 200 // GL_OES_texture_npot 201 bool textureNPOT; 202 203 // GL_EXT_draw_buffers 204 bool drawBuffers; 205 206 // GL_EXT_texture_filter_anisotropic 207 bool textureFilterAnisotropic; 208 GLfloat maxTextureAnisotropy; 209 210 // GL_EXT_occlusion_query_boolean 211 bool occlusionQueryBoolean; 212 213 // GL_NV_fence 214 bool fence; 215 216 // GL_EXT_disjoint_timer_query 217 bool disjointTimerQuery; 218 GLuint queryCounterBitsTimeElapsed; 219 GLuint queryCounterBitsTimestamp; 220 221 // GL_EXT_robustness 222 bool robustness; 223 224 // GL_KHR_robust_buffer_access_behavior 225 bool robustBufferAccessBehavior; 226 227 // GL_EXT_blend_minmax 228 bool blendMinMax; 229 230 // GL_ANGLE_framebuffer_blit 231 bool framebufferBlit; 232 233 // GL_ANGLE_framebuffer_multisample 234 bool framebufferMultisample; 235 236 // GL_ANGLE_instanced_arrays 237 bool instancedArrays; 238 239 // GL_ANGLE_pack_reverse_row_order 240 bool packReverseRowOrder; 241 242 // GL_OES_standard_derivatives 243 bool standardDerivatives; 244 245 // GL_EXT_shader_texture_lod 246 bool shaderTextureLOD; 247 248 // GL_EXT_frag_depth 249 bool fragDepth; 250 251 // ANGLE_multiview 252 bool multiview; 253 GLuint maxViews; 254 255 // GL_ANGLE_texture_usage 256 bool textureUsage; 257 258 // GL_ANGLE_translated_shader_source 259 bool translatedShaderSource; 260 261 // GL_OES_fbo_render_mipmap 262 bool fboRenderMipmap; 263 264 // GL_EXT_discard_framebuffer 265 bool discardFramebuffer; 266 267 // EXT_debug_marker 268 bool debugMarker; 269 270 // GL_OES_EGL_image 271 bool eglImage; 272 273 // GL_OES_EGL_image_external 274 bool eglImageExternal; 275 276 // GL_OES_EGL_image_external_essl3 277 bool eglImageExternalEssl3; 278 279 // NV_EGL_stream_consumer_external 280 bool eglStreamConsumerExternal; 281 282 // EXT_unpack_subimage 283 bool unpackSubimage; 284 285 // NV_pack_subimage 286 bool packSubimage; 287 288 // GL_OES_vertex_array_object 289 bool vertexArrayObject; 290 291 // GL_KHR_debug 292 bool debug; 293 GLuint maxDebugMessageLength; 294 GLuint maxDebugLoggedMessages; 295 GLuint maxDebugGroupStackDepth; 296 GLuint maxLabelLength; 297 298 // KHR_no_error 299 bool noError; 300 301 // GL_ANGLE_lossy_etc_decode 302 bool lossyETCDecode; 303 304 // GL_CHROMIUM_bind_uniform_location 305 bool bindUniformLocation; 306 307 // GL_CHROMIUM_sync_query 308 bool syncQuery; 309 310 // GL_CHROMIUM_copy_texture 311 bool copyTexture; 312 313 // GL_CHROMIUM_copy_compressed_texture 314 bool copyCompressedTexture; 315 316 // GL_ANGLE_webgl_compatibility 317 bool webglCompatibility; 318 319 // GL_ANGLE_request_extension 320 bool requestExtension; 321 322 // GL_CHROMIUM_bind_generates_resource 323 bool bindGeneratesResource; 324 325 // GL_ANGLE_robust_client_memory 326 bool robustClientMemory; 327 328 // GL_EXT_texture_sRGB_decode 329 bool textureSRGBDecode; 330 331 // GL_EXT_sRGB_write_control 332 bool sRGBWriteControl; 333 334 // GL_CHROMIUM_color_buffer_float_rgb 335 bool colorBufferFloatRGB; 336 337 // GL_CHROMIUM_color_buffer_float_rgba 338 bool colorBufferFloatRGBA; 339 340 // ES3 Extension support 341 342 // GL_EXT_color_buffer_float 343 bool colorBufferFloat; 344 345 // GL_EXT_multisample_compatibility. 346 // written against ES 3.1 but can apply to earlier versions. 347 bool multisampleCompatibility; 348 349 // GL_CHROMIUM_framebuffer_mixed_samples 350 bool framebufferMixedSamples; 351 352 // GL_EXT_texture_norm16 353 // written against ES 3.1 but can apply to ES 3.0 as well. 354 bool textureNorm16; 355 356 // GL_CHROMIUM_path_rendering 357 bool pathRendering; 358 359 // GL_OES_surfaceless_context 360 bool surfacelessContext; 361 362 // GL_ANGLE_client_arrays 363 bool clientArrays; 364 365 // GL_ANGLE_robust_resource_initialization 366 bool robustResourceInitialization; 367 368 // GL_ANGLE_program_cache_control 369 bool programCacheControl; 370 371 // GL_ANGLE_texture_rectangle 372 bool textureRectangle; 373 374 // GL_EXT_geometry_shader 375 bool geometryShader; 376 // GL_EXT_geometry_shader (May 31, 2016) Table 20.43gs: Implementation dependent geometry shader 377 // limits 378 // TODO(jiawei.shao@intel.com): add all implementation dependent geometry shader limits. 379 GLuint maxGeometryOutputVertices; 380 GLuint maxGeometryShaderInvocations; 381 }; 382 383 struct ExtensionInfo 384 { 385 // If this extension can be enabled with glRequestExtension (GL_ANGLE_request_extension) 386 bool Requestable = false; 387 388 // Pointer to a boolean member of the Extensions struct 389 typedef bool(Extensions::*ExtensionBool); 390 ExtensionBool ExtensionsMember = nullptr; 391 }; 392 393 using ExtensionInfoMap = std::map<std::string, ExtensionInfo>; 394 const ExtensionInfoMap &GetExtensionInfoMap(); 395 396 struct Limitations 397 { 398 Limitations(); 399 400 // Renderer doesn't support gl_FrontFacing in fragment shaders 401 bool noFrontFacingSupport; 402 403 // Renderer doesn't support GL_SAMPLE_ALPHA_TO_COVERAGE 404 bool noSampleAlphaToCoverageSupport; 405 406 // In glVertexAttribDivisorANGLE, attribute zero must have a zero divisor 407 bool attributeZeroRequiresZeroDivisorInEXT; 408 409 // Unable to support different values for front and back faces for stencil refs and masks 410 bool noSeparateStencilRefsAndMasks; 411 412 // Renderer doesn't support non-constant indexing loops in fragment shader 413 bool shadersRequireIndexedLoopValidation; 414 415 // Renderer doesn't support Simultaneous use of GL_CONSTANT_ALPHA/GL_ONE_MINUS_CONSTANT_ALPHA 416 // and GL_CONSTANT_COLOR/GL_ONE_MINUS_CONSTANT_COLOR blend functions. 417 bool noSimultaneousConstantColorAndAlphaBlendFunc; 418 }; 419 420 struct TypePrecision 421 { 422 TypePrecision(); 423 TypePrecision(const TypePrecision &other); 424 425 void setIEEEFloat(); 426 void setTwosComplementInt(unsigned int bits); 427 void setSimulatedFloat(unsigned int range, unsigned int precision); 428 void setSimulatedInt(unsigned int range); 429 430 void get(GLint *returnRange, GLint *returnPrecision) const; 431 432 std::array<GLint, 2> range; 433 GLint precision; 434 }; 435 436 struct Caps 437 { 438 Caps(); 439 Caps(const Caps &other); 440 ~Caps(); 441 442 // ES 3.1 (April 29, 2015) 20.39: implementation dependent values 443 GLuint64 maxElementIndex; 444 GLuint max3DTextureSize; 445 GLuint max2DTextureSize; 446 GLuint maxRectangleTextureSize; 447 GLuint maxArrayTextureLayers; 448 GLfloat maxLODBias; 449 GLuint maxCubeMapTextureSize; 450 GLuint maxRenderbufferSize; 451 GLfloat minAliasedPointSize; 452 GLfloat maxAliasedPointSize; 453 GLfloat minAliasedLineWidth; 454 GLfloat maxAliasedLineWidth; 455 456 // ES 3.1 (April 29, 2015) 20.40: implementation dependent values (cont.) 457 GLuint maxDrawBuffers; 458 GLuint maxFramebufferWidth; 459 GLuint maxFramebufferHeight; 460 GLuint maxFramebufferSamples; 461 GLuint maxColorAttachments; 462 GLuint maxViewportWidth; 463 GLuint maxViewportHeight; 464 GLuint maxSampleMaskWords; 465 GLuint maxColorTextureSamples; 466 GLuint maxDepthTextureSamples; 467 GLuint maxIntegerSamples; 468 GLuint64 maxServerWaitTimeout; 469 470 // ES 3.1 (April 29, 2015) Table 20.41: Implementation dependent values (cont.) 471 GLint maxVertexAttribRelativeOffset; 472 GLuint maxVertexAttribBindings; 473 GLint maxVertexAttribStride; 474 GLuint maxElementsIndices; 475 GLuint maxElementsVertices; 476 std::vector<GLenum> compressedTextureFormats; 477 std::vector<GLenum> programBinaryFormats; 478 std::vector<GLenum> shaderBinaryFormats; 479 TypePrecision vertexHighpFloat; 480 TypePrecision vertexMediumpFloat; 481 TypePrecision vertexLowpFloat; 482 TypePrecision vertexHighpInt; 483 TypePrecision vertexMediumpInt; 484 TypePrecision vertexLowpInt; 485 TypePrecision fragmentHighpFloat; 486 TypePrecision fragmentMediumpFloat; 487 TypePrecision fragmentLowpFloat; 488 TypePrecision fragmentHighpInt; 489 TypePrecision fragmentMediumpInt; 490 TypePrecision fragmentLowpInt; 491 492 // ES 3.1 (April 29, 2015) Table 20.43: Implementation dependent Vertex shader limits 493 GLuint maxVertexAttributes; 494 GLuint maxVertexUniformComponents; 495 GLuint maxVertexUniformVectors; 496 GLuint maxVertexUniformBlocks; 497 GLuint maxVertexOutputComponents; 498 GLuint maxVertexTextureImageUnits; 499 GLuint maxVertexAtomicCounterBuffers; 500 GLuint maxVertexAtomicCounters; 501 GLuint maxVertexImageUniforms; 502 GLuint maxVertexShaderStorageBlocks; 503 504 // ES 3.1 (April 29, 2015) Table 20.44: Implementation dependent Fragment shader limits 505 GLuint maxFragmentUniformComponents; 506 GLuint maxFragmentUniformVectors; 507 GLuint maxFragmentUniformBlocks; 508 GLuint maxFragmentInputComponents; 509 GLuint maxTextureImageUnits; 510 GLuint maxFragmentAtomicCounterBuffers; 511 GLuint maxFragmentAtomicCounters; 512 GLuint maxFragmentImageUniforms; 513 GLuint maxFragmentShaderStorageBlocks; 514 GLint minProgramTextureGatherOffset; 515 GLuint maxProgramTextureGatherOffset; 516 GLint minProgramTexelOffset; 517 GLint maxProgramTexelOffset; 518 519 // ES 3.1 (April 29, 2015) Table 20.45: implementation dependent compute shader limits 520 std::array<GLuint, 3> maxComputeWorkGroupCount; 521 std::array<GLuint, 3> maxComputeWorkGroupSize; 522 GLuint maxComputeWorkGroupInvocations; 523 GLuint maxComputeUniformBlocks; 524 GLuint maxComputeTextureImageUnits; 525 GLuint maxComputeSharedMemorySize; 526 GLuint maxComputeUniformComponents; 527 GLuint maxComputeAtomicCounterBuffers; 528 GLuint maxComputeAtomicCounters; 529 GLuint maxComputeImageUniforms; 530 GLuint maxCombinedComputeUniformComponents; 531 GLuint maxComputeShaderStorageBlocks; 532 533 // ES 3.1 (April 29, 2015) Table 20.46: implementation dependent aggregate shader limits 534 GLuint maxUniformBufferBindings; 535 GLuint64 maxUniformBlockSize; 536 GLuint uniformBufferOffsetAlignment; 537 GLuint maxCombinedUniformBlocks; 538 GLuint64 maxCombinedVertexUniformComponents; 539 GLuint64 maxCombinedFragmentUniformComponents; 540 GLuint maxVaryingComponents; 541 GLuint maxVaryingVectors; 542 GLuint maxCombinedTextureImageUnits; 543 GLuint maxCombinedShaderOutputResources; 544 545 // ES 3.1 (April 29, 2015) Table 20.47: implementation dependent aggregate shader limits (cont.) 546 GLuint maxUniformLocations; 547 GLuint maxAtomicCounterBufferBindings; 548 GLuint maxAtomicCounterBufferSize; 549 GLuint maxCombinedAtomicCounterBuffers; 550 GLuint maxCombinedAtomicCounters; 551 GLuint maxImageUnits; 552 GLuint maxCombinedImageUniforms; 553 GLuint maxShaderStorageBufferBindings; 554 GLuint64 maxShaderStorageBlockSize; 555 GLuint maxCombinedShaderStorageBlocks; 556 GLuint shaderStorageBufferOffsetAlignment; 557 558 // ES 3.1 (April 29, 2015) Table 20.48: implementation dependent transform feedback limits 559 GLuint maxTransformFeedbackInterleavedComponents; 560 GLuint maxTransformFeedbackSeparateAttributes; 561 GLuint maxTransformFeedbackSeparateComponents; 562 563 // ES 3.1 (April 29, 2015) Table 20.49: Framebuffer Dependent Values 564 GLuint maxSamples; 565 }; 566 567 Caps GenerateMinimumCaps(const Version &clientVersion, const Extensions &extensions); 568 } 569 570 namespace egl 571 { 572 573 struct Caps 574 { 575 Caps(); 576 577 // Support for NPOT surfaces 578 bool textureNPOT; 579 }; 580 581 struct DisplayExtensions 582 { 583 DisplayExtensions(); 584 585 // Generate a vector of supported extension strings 586 std::vector<std::string> getStrings() const; 587 588 // EGL_EXT_create_context_robustness 589 bool createContextRobustness; 590 591 // EGL_ANGLE_d3d_share_handle_client_buffer 592 bool d3dShareHandleClientBuffer; 593 594 // EGL_ANGLE_d3d_texture_client_buffer 595 bool d3dTextureClientBuffer; 596 597 // EGL_ANGLE_surface_d3d_texture_2d_share_handle 598 bool surfaceD3DTexture2DShareHandle; 599 600 // EGL_ANGLE_query_surface_pointer 601 bool querySurfacePointer; 602 603 // EGL_ANGLE_window_fixed_size 604 bool windowFixedSize; 605 606 // EGL_ANGLE_keyed_mutex 607 bool keyedMutex; 608 609 // EGL_ANGLE_surface_orientation 610 bool surfaceOrientation; 611 612 // EGL_NV_post_sub_buffer 613 bool postSubBuffer; 614 615 // EGL_KHR_create_context 616 bool createContext; 617 618 // EGL_EXT_device_query 619 bool deviceQuery; 620 621 // EGL_KHR_image 622 bool image; 623 624 // EGL_KHR_image_base 625 bool imageBase; 626 627 // EGL_KHR_image_pixmap 628 bool imagePixmap; 629 630 // EGL_KHR_gl_texture_2D_image 631 bool glTexture2DImage; 632 633 // EGL_KHR_gl_texture_cubemap_image 634 bool glTextureCubemapImage; 635 636 // EGL_KHR_gl_texture_3D_image 637 bool glTexture3DImage; 638 639 // EGL_KHR_gl_renderbuffer_image 640 bool glRenderbufferImage; 641 642 // EGL_KHR_get_all_proc_addresses 643 bool getAllProcAddresses; 644 645 // EGL_ANGLE_flexible_surface_compatibility 646 bool flexibleSurfaceCompatibility; 647 648 // EGL_ANGLE_direct_composition 649 bool directComposition; 650 651 // KHR_create_context_no_error 652 bool createContextNoError; 653 654 // EGL_KHR_stream 655 bool stream; 656 657 // EGL_KHR_stream_consumer_gltexture 658 bool streamConsumerGLTexture; 659 660 // EGL_NV_stream_consumer_gltexture_yuv 661 bool streamConsumerGLTextureYUV; 662 663 // EGL_ANGLE_stream_producer_d3d_texture_nv12 664 bool streamProducerD3DTextureNV12; 665 666 // EGL_ANGLE_create_context_webgl_compatibility 667 bool createContextWebGLCompatibility; 668 669 // EGL_CHROMIUM_create_context_bind_generates_resource 670 bool createContextBindGeneratesResource; 671 672 // EGL_CHROMIUM_get_sync_values 673 bool getSyncValues; 674 675 // EGL_EXT_swap_buffers_with_damage 676 bool swapBuffersWithDamage; 677 678 // EGL_EXT_pixel_format_float 679 bool pixelFormatFloat; 680 681 // EGL_KHR_surfaceless_context 682 bool surfacelessContext; 683 684 // EGL_ANGLE_display_texture_share_group 685 bool displayTextureShareGroup; 686 687 // EGL_ANGLE_create_context_client_arrays 688 bool createContextClientArrays; 689 690 // EGL_ANGLE_program_cache_control 691 bool programCacheControl; 692 693 // EGL_ANGLE_robust_resource_initialization 694 bool robustResourceInitialization; 695 }; 696 697 struct DeviceExtensions 698 { 699 DeviceExtensions(); 700 701 // Generate a vector of supported extension strings 702 std::vector<std::string> getStrings() const; 703 704 // EGL_ANGLE_device_d3d 705 bool deviceD3D; 706 }; 707 708 struct ClientExtensions 709 { 710 ClientExtensions(); 711 ClientExtensions(const ClientExtensions &other); 712 713 // Generate a vector of supported extension strings 714 std::vector<std::string> getStrings() const; 715 716 // EGL_EXT_client_extensions 717 bool clientExtensions; 718 719 // EGL_EXT_platform_base 720 bool platformBase; 721 722 // EGL_EXT_platform_device 723 bool platformDevice; 724 725 // EGL_ANGLE_platform_angle 726 bool platformANGLE; 727 728 // EGL_ANGLE_platform_angle_d3d 729 bool platformANGLED3D; 730 731 // EGL_ANGLE_platform_angle_opengl 732 bool platformANGLEOpenGL; 733 734 // EGL_ANGLE_platform_angle_null 735 bool platformANGLENULL; 736 737 // EGL_ANGLE_platform_angle_vulkan 738 bool platformANGLEVulkan; 739 740 // EGL_ANGLE_device_creation 741 bool deviceCreation; 742 743 // EGL_ANGLE_device_creation_d3d11 744 bool deviceCreationD3D11; 745 746 // EGL_ANGLE_x11_visual 747 bool x11Visual; 748 749 // EGL_ANGLE_experimental_present_path 750 bool experimentalPresentPath; 751 752 // EGL_KHR_client_get_all_proc_addresses 753 bool clientGetAllProcAddresses; 754 }; 755 756 } // namespace egl 757 758 #endif // LIBANGLE_CAPS_H_ 759