Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/angle
Path: blob/main_old/src/libANGLE/Caps.h
1693 views
1
//
2
// Copyright 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 <array>
16
#include <map>
17
#include <set>
18
#include <string>
19
#include <vector>
20
21
namespace gl
22
{
23
24
struct Extensions;
25
26
struct TextureCaps
27
{
28
TextureCaps();
29
TextureCaps(const TextureCaps &other);
30
TextureCaps &operator=(const TextureCaps &other);
31
32
~TextureCaps();
33
34
// Supports for basic texturing: glTexImage, glTexSubImage, etc
35
bool texturable = false;
36
37
// Support for linear or anisotropic filtering
38
bool filterable = false;
39
40
// Support for being used as a framebuffer attachment, i.e. glFramebufferTexture2D
41
bool textureAttachment = false;
42
43
// Support for being used as a renderbuffer format, i.e. glFramebufferRenderbuffer
44
bool renderbuffer = false;
45
46
// Support for blend modes while being used as a framebuffer attachment
47
bool blendable = false;
48
49
// Set of supported sample counts, only guaranteed to be valid in ES3.
50
SupportedSampleSet sampleCounts;
51
52
// Get the maximum number of samples supported
53
GLuint getMaxSamples() const;
54
55
// Get the number of supported samples that is at least as many as requested. Returns 0 if
56
// there are no sample counts available
57
GLuint getNearestSamples(GLuint requestedSamples) const;
58
};
59
60
TextureCaps GenerateMinimumTextureCaps(GLenum internalFormat,
61
const Version &clientVersion,
62
const Extensions &extensions);
63
64
class TextureCapsMap final : angle::NonCopyable
65
{
66
public:
67
TextureCapsMap();
68
~TextureCapsMap();
69
70
// These methods are deprecated. Please use angle::Format for new features.
71
void insert(GLenum internalFormat, const TextureCaps &caps);
72
const TextureCaps &get(GLenum internalFormat) const;
73
74
void clear();
75
76
// Prefer using angle::Format methods.
77
const TextureCaps &get(angle::FormatID formatID) const;
78
void set(angle::FormatID formatID, const TextureCaps &caps);
79
80
private:
81
TextureCaps &get(angle::FormatID formatID);
82
83
// Indexed by angle::FormatID
84
angle::FormatMap<TextureCaps> mFormatData;
85
};
86
87
void InitMinimumTextureCapsMap(const Version &clientVersion,
88
const Extensions &extensions,
89
TextureCapsMap *capsMap);
90
91
// Returns true if all the formats required to support GL_ANGLE_compressed_texture_etc are
92
// present. Does not determine if they are natively supported without decompression.
93
bool DetermineCompressedTextureETCSupport(const TextureCapsMap &textureCaps);
94
95
struct Extensions
96
{
97
Extensions();
98
Extensions(const Extensions &other);
99
100
Extensions &operator=(const Extensions &other);
101
102
// Generate a vector of supported extension strings
103
std::vector<std::string> getStrings() const;
104
105
// Set all texture related extension support based on the supported textures.
106
// Determines support for:
107
// GL_OES_packed_depth_stencil
108
// GL_OES_rgb8_rgba8
109
// GL_EXT_texture_format_BGRA8888
110
// GL_EXT_color_buffer_half_float,
111
// GL_OES_texture_half_float, GL_OES_texture_half_float_linear
112
// GL_OES_texture_float, GL_OES_texture_float_linear
113
// GL_EXT_texture_rg
114
// GL_EXT_texture_type_2_10_10_10_REV
115
// GL_EXT_texture_compression_dxt1, GL_ANGLE_texture_compression_dxt3,
116
// GL_ANGLE_texture_compression_dxt5
117
// GL_KHR_texture_compression_astc_ldr, GL_OES_texture_compression_astc.
118
// NOTE: GL_KHR_texture_compression_astc_hdr must be enabled separately. Support for the
119
// HDR profile cannot be determined from the format enums alone.
120
// GL_OES_compressed_ETC1_RGB8_texture
121
// GL_EXT_sRGB
122
// GL_ANGLE_depth_texture, GL_OES_depth32
123
// GL_EXT_color_buffer_float
124
// GL_EXT_texture_norm16
125
// GL_EXT_texture_compression_bptc
126
// GL_EXT_texture_compression_rgtc
127
void setTextureExtensionSupport(const TextureCapsMap &textureCaps);
128
129
// indicate if any depth texture extension is available
130
bool depthTextureAny() const { return (depthTextureANGLE || depthTextureOES); }
131
132
// ES2 Extension support
133
134
// GL_OES_element_index_uint
135
bool elementIndexUintOES = false;
136
137
// GL_OES_packed_depth_stencil
138
bool packedDepthStencilOES = false;
139
140
// GL_NV_read_depth
141
bool readDepthNV = false;
142
143
// GL_NV_read_stencil
144
bool readStencilNV = false;
145
146
// GL_NV_depth_buffer_float2
147
bool depthBufferFloat2NV = false;
148
149
// GL_OES_get_program_binary
150
bool getProgramBinaryOES = false;
151
152
// GL_OES_rgb8_rgba8
153
// Implies that TextureCaps for GL_RGB8 and GL_RGBA8 exist
154
bool rgb8rgba8OES = false;
155
156
// GL_EXT_texture_format_BGRA8888
157
// Implies that TextureCaps for GL_BGRA8 exist
158
bool textureFormatBGRA8888 = false;
159
160
// GL_EXT_read_format_bgra
161
bool readFormatBGRA = false;
162
163
// GL_NV_pixel_buffer_object
164
bool pixelBufferObjectNV = false;
165
166
// GL_ARB_sync
167
bool glSyncARB = false;
168
169
// GL_OES_mapbuffer and GL_EXT_map_buffer_range
170
bool mapBufferOES = false;
171
bool mapBufferRange = false;
172
173
// GL_EXT_color_buffer_half_float
174
// Together with GL_OES_texture_half_float in a GLES 2.0 context, implies that half-float
175
// textures are renderable.
176
bool colorBufferHalfFloat = false;
177
178
// GL_OES_texture_half_float and GL_OES_texture_half_float_linear
179
// Implies that TextureCaps for GL_RGB16F, GL_RGBA16F, GL_ALPHA32F_EXT, GL_LUMINANCE32F_EXT and
180
// GL_LUMINANCE_ALPHA32F_EXT exist
181
bool textureHalfFloat = false;
182
bool textureHalfFloatLinear = false;
183
184
// GL_OES_texture_float and GL_OES_texture_float_linear
185
// Implies that TextureCaps for GL_RGB32F, GL_RGBA32F, GL_ALPHA16F_EXT, GL_LUMINANCE16F_EXT and
186
// GL_LUMINANCE_ALPHA16F_EXT exist
187
bool textureFloatOES = false;
188
bool textureFloatLinearOES = false;
189
190
// GL_EXT_texture_rg
191
// Implies that TextureCaps for GL_R8, GL_RG8 (and floating point R/RG texture formats if
192
// floating point extensions are also present) exist
193
bool textureRG = false;
194
195
// GL_EXT_texture_type_2_10_10_10_REV
196
bool textureFormat2101010REV = false;
197
198
// GL_EXT_texture_compression_dxt1, GL_ANGLE_texture_compression_dxt3 and
199
// GL_ANGLE_texture_compression_dxt5 Implies that TextureCaps exist for
200
// GL_COMPRESSED_RGB_S3TC_DXT1_EXT, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT
201
// GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE and GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE
202
bool textureCompressionDXT1 = false;
203
bool textureCompressionDXT3 = false;
204
bool textureCompressionDXT5 = false;
205
206
// GL_EXT_texture_compression_s3tc_srgb
207
// Implies that TextureCaps exist for GL_COMPRESSED_SRGB_S3TC_DXT1_EXT,
208
// GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, and
209
// GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT
210
bool textureCompressionS3TCsRGB = false;
211
212
// GL_KHR_texture_compression_astc_ldr
213
bool textureCompressionASTCLDRKHR = false;
214
215
// GL_KHR_texture_compression_astc_hdr
216
bool textureCompressionASTCHDRKHR = false;
217
218
// GL_OES_texture_compression_astc
219
bool textureCompressionASTCOES = false;
220
221
// GL_KHR_texture_compression_astc_sliced_3d
222
bool textureCompressionSliced3dASTCKHR = false;
223
224
// GL_EXT_texture_compression_bptc
225
bool textureCompressionBPTC = false;
226
227
// GL_EXT_texture_compression_rgtc
228
bool textureCompressionRGTC = false;
229
230
// GL_OES_compressed_ETC1_RGB8_texture
231
// Implies that TextureCaps for GL_ETC1_RGB8_OES exist
232
bool compressedETC1RGB8TextureOES = false;
233
234
// GL_EXT_compressed_ETC1_RGB8_sub_texture
235
bool compressedETC1RGB8SubTexture = false;
236
237
// OES_compressed_ETC2_RGB8_texture
238
bool compressedETC2RGB8TextureOES = false;
239
240
// OES_compressed_ETC2_sRGB8_texture
241
bool compressedETC2sRGB8TextureOES = false;
242
243
// OES_compressed_ETC2_punchthroughA_RGBA8_texture
244
bool compressedETC2PunchthroughARGB8TextureOES = false;
245
246
// OES_compressed_ETC2_punchthroughA_sRGB8_alpha_texture
247
bool compressedETC2PunchthroughAsRGB8AlphaTextureOES = false;
248
249
// OES_compressed_ETC2_RGBA8_texture
250
bool compressedETC2RGBA8TextureOES = false;
251
252
// OES_compressed_ETC2_sRGB8_alpha8_texture
253
bool compressedETC2sRGB8Alpha8TextureOES = false;
254
255
// OES_compressed_EAC_R11_unsigned_texture
256
bool compressedEACR11UnsignedTextureOES = false;
257
258
// OES_compressed_EAC_R11_signed_texture
259
bool compressedEACR11SignedTextureOES = false;
260
261
// OES_compressed_EAC_RG11_unsigned_texture
262
bool compressedEACRG11UnsignedTextureOES = false;
263
264
// OES_compressed_EAC_RG11_signed_texture
265
bool compressedEACRG11SignedTextureOES = false;
266
267
// ANGLE_compressed_texture_etc
268
// ONLY exposed if ETC texture formats are natively supported without decompression
269
// Backends should enable this extension explicitly. It is not enabled with
270
// setTextureExtensionSupport, use DetermineCompressedTextureETCSupport to check if all of the
271
// individual formats required to support this extension are available.
272
bool compressedTextureETC = false;
273
274
// GL_IMG_texture_compression_pvrtc
275
bool compressedTexturePVRTC = false;
276
277
// GL_EXT_pvrtc_sRGB
278
bool compressedTexturePVRTCsRGB = false;
279
280
// GL_EXT_sRGB
281
// Implies that TextureCaps for GL_SRGB8_ALPHA8 and GL_SRGB8 exist
282
// TODO: Don't advertise this extension in ES3
283
bool sRGB = false;
284
285
// GL_EXT_texture_sRGB_R8
286
bool sRGBR8EXT = false;
287
288
// GL_EXT_texture_sRGB_RG8
289
bool sRGBRG8EXT = false;
290
291
// GL_ANGLE_depth_texture
292
bool depthTextureANGLE = false;
293
294
// OES_depth_texture
295
bool depthTextureOES = false;
296
297
// GL_OES_depth_texture_cube_map
298
bool depthTextureCubeMapOES = false;
299
300
// GL_OES_depth24
301
// Allows DEPTH_COMPONENT24_OES as a valid Renderbuffer format.
302
bool depth24OES = false;
303
304
// GL_OES_depth32
305
// Allows DEPTH_COMPONENT32_OES as a valid Renderbuffer format.
306
bool depth32OES = false;
307
308
// GL_OES_texture_3D
309
bool texture3DOES = false;
310
311
// GL_EXT_texture_storage
312
bool textureStorage = false;
313
314
// GL_OES_texture_npot
315
bool textureNPOTOES = false;
316
317
// GL_EXT_draw_buffers
318
bool drawBuffers = false;
319
320
// GL_EXT_draw_buffers_indexed
321
bool drawBuffersIndexedEXT = false;
322
323
// GL_OES_draw_buffers_indexed
324
bool drawBuffersIndexedOES = false;
325
326
// Any version of the draw_buffers_indexed
327
bool drawBuffersIndexedAny() const { return (drawBuffersIndexedEXT || drawBuffersIndexedOES); }
328
329
// GL_EXT_texture_filter_anisotropic
330
bool textureFilterAnisotropic = false;
331
GLfloat maxTextureAnisotropy = 0.0f;
332
333
// GL_EXT_occlusion_query_boolean
334
bool occlusionQueryBoolean = false;
335
336
// GL_NV_fence
337
bool fenceNV = false;
338
339
// GL_EXT_disjoint_timer_query
340
bool disjointTimerQuery = false;
341
GLuint queryCounterBitsTimeElapsed = 0;
342
GLuint queryCounterBitsTimestamp = 0;
343
344
// GL_EXT_robustness
345
bool robustness = false;
346
347
// GL_KHR_robust_buffer_access_behavior
348
bool robustBufferAccessBehavior = false;
349
350
// GL_EXT_blend_minmax
351
bool blendMinMax = false;
352
353
// GL_ANGLE_framebuffer_blit
354
bool framebufferBlitANGLE = false;
355
// GL_NV_framebuffer_blit
356
bool framebufferBlitNV = false;
357
// Any version of the framebuffer_blit extension
358
bool framebufferBlitAny() const { return (framebufferBlitANGLE || framebufferBlitNV); }
359
360
// GL_ANGLE_framebuffer_multisample
361
bool framebufferMultisample = false;
362
363
// GL_EXT_multisampled_render_to_texture
364
bool multisampledRenderToTexture = false;
365
366
// GL_EXT_multisampled_render_to_texture2
367
bool multisampledRenderToTexture2 = false;
368
369
// GL_ANGLE_instanced_arrays
370
bool instancedArraysANGLE = false;
371
// GL_EXT_instanced_arrays
372
bool instancedArraysEXT = false;
373
// Any version of the instanced arrays extension
374
bool instancedArraysAny() const { return (instancedArraysANGLE || instancedArraysEXT); }
375
376
// GL_ANGLE_pack_reverse_row_order
377
bool packReverseRowOrder = false;
378
379
// GL_OES_standard_derivatives
380
bool standardDerivativesOES = false;
381
382
// GL_EXT_shader_texture_lod
383
bool shaderTextureLOD = false;
384
385
// GL_EXT_shader_framebuffer_fetch_non_coherent
386
bool shaderFramebufferFetchNonCoherentEXT = false;
387
388
// GL_EXT_frag_depth
389
bool fragDepth = false;
390
391
// OVR_multiview
392
bool multiview = false;
393
GLuint maxViews = 1;
394
395
// OVR_multiview2
396
bool multiview2 = false;
397
398
// GL_ANGLE_texture_usage
399
bool textureUsage = false;
400
401
// GL_ANGLE_translated_shader_source
402
bool translatedShaderSource = false;
403
404
// GL_OES_fbo_render_mipmap
405
bool fboRenderMipmapOES = false;
406
407
// GL_EXT_discard_framebuffer
408
bool discardFramebuffer = false;
409
410
// EXT_debug_marker
411
bool debugMarker = false;
412
413
// EXT_debug_label
414
bool debugLabel = false;
415
416
// GL_OES_EGL_image
417
bool eglImageOES = false;
418
419
// GL_OES_EGL_image_external
420
bool eglImageExternalOES = false;
421
422
// GL_OES_EGL_image_external_essl3
423
bool eglImageExternalEssl3OES = false;
424
425
// GL_EXT_EGL_image_external_wrap_modes
426
bool eglImageExternalWrapModesEXT = false;
427
428
// GL_OES_EGL_sync
429
bool eglSyncOES = false;
430
431
// GL_EXT_memory_object
432
bool memoryObject = false;
433
434
// GL_EXT_memory_object_fd
435
bool memoryObjectFd = false;
436
437
// GL_ANGLE_memory_object_flags
438
bool memoryObjectFlagsANGLE = false;
439
440
// GL_ANGLE_memory_object_fuchsia
441
bool memoryObjectFuchsiaANGLE = false;
442
443
// GL_EXT_semaphore
444
bool semaphore = false;
445
446
// GL_EXT_semaphore_fd
447
bool semaphoreFd = false;
448
449
// GL_ANGLE_semaphore_fuchsia
450
bool semaphoreFuchsiaANGLE = false;
451
452
// NV_EGL_stream_consumer_external
453
bool eglStreamConsumerExternalNV = false;
454
455
// EXT_unpack_subimage
456
bool unpackSubimage = false;
457
458
// NV_pack_subimage
459
bool packSubimage = false;
460
461
// GL_NV_shader_noperspective_interpolation
462
bool noperspectiveInterpolationNV = false;
463
464
// GL_OES_vertex_half_float
465
bool vertexHalfFloatOES = false;
466
467
// GL_OES_vertex_array_object
468
bool vertexArrayObjectOES = false;
469
470
// GL_OES_vertex_type_10_10_10_2
471
bool vertexAttribType1010102OES = false;
472
473
// GL_KHR_debug
474
bool debug = false;
475
GLuint maxDebugMessageLength = 0;
476
GLuint maxDebugLoggedMessages = 0;
477
GLuint maxDebugGroupStackDepth = 0;
478
GLuint maxLabelLength = 0;
479
480
// KHR_no_error
481
bool noError = false;
482
483
// GL_ANGLE_lossy_etc_decode
484
bool lossyETCDecode = false;
485
486
// GL_CHROMIUM_bind_uniform_location
487
bool bindUniformLocation = false;
488
489
// GL_CHROMIUM_sync_query
490
bool syncQuery = false;
491
492
// GL_CHROMIUM_copy_texture
493
bool copyTexture = false;
494
495
// GL_CHROMIUM_copy_compressed_texture
496
bool copyCompressedTexture = false;
497
498
// GL_ANGLE_copy_texture_3d
499
bool copyTexture3d = false;
500
501
// GL_ANGLE_webgl_compatibility
502
bool webglCompatibility = false;
503
504
// GL_ANGLE_request_extension
505
bool requestExtension = false;
506
507
// GL_CHROMIUM_bind_generates_resource
508
bool bindGeneratesResource = false;
509
510
// GL_ANGLE_robust_client_memory
511
bool robustClientMemory = false;
512
513
// GL_OES_texture_border_clamp
514
bool textureBorderClampOES = false;
515
516
// GL_EXT_texture_border_clamp
517
bool textureBorderClampEXT = false;
518
519
// Any version of the texture border clamp extension
520
bool textureBorderClampAny() const { return (textureBorderClampOES || textureBorderClampEXT); }
521
522
// GL_EXT_texture_sRGB_decode
523
bool textureSRGBDecode = false;
524
525
// GL_EXT_texture_format_sRGB_override
526
bool textureSRGBOverride = false;
527
528
// GL_EXT_sRGB_write_control
529
bool sRGBWriteControl = false;
530
531
// GL_CHROMIUM_color_buffer_float_rgb
532
bool colorBufferFloatRGB = false;
533
534
// GL_CHROMIUM_color_buffer_float_rgba
535
bool colorBufferFloatRGBA = false;
536
537
// GL_EXT_EGL_image_array
538
bool eglImageArray = false;
539
540
// ES3 Extension support
541
542
// GL_EXT_color_buffer_float
543
bool colorBufferFloat = false;
544
545
// GL_EXT_multisample_compatibility.
546
// written against ES 3.1 but can apply to earlier versions.
547
bool multisampleCompatibility = false;
548
549
// GL_CHROMIUM_framebuffer_mixed_samples
550
bool framebufferMixedSamples = false;
551
552
// GL_EXT_texture_norm16
553
// written against ES 3.1 but can apply to ES 3.0 as well.
554
bool textureNorm16 = false;
555
556
// GL_OES_surfaceless_context
557
bool surfacelessContextOES = false;
558
559
// GL_ANGLE_client_arrays
560
bool clientArrays = false;
561
562
// GL_ANGLE_robust_resource_initialization
563
bool robustResourceInitialization = false;
564
565
// GL_ANGLE_program_cache_control
566
bool programCacheControl = false;
567
568
// GL_ANGLE_texture_rectangle
569
bool textureRectangle = false;
570
571
// GL_EXT_geometry_shader
572
bool geometryShaderEXT = false;
573
// GL_OES_geometry_shader
574
bool geometryShaderOES = false;
575
// Any version of the geometry shader extension
576
bool geometryShaderAny() const { return (geometryShaderEXT || geometryShaderOES); }
577
578
// GLES1 emulation: GLES1 extensions
579
// GL_OES_point_size_array
580
bool pointSizeArrayOES = false;
581
582
// GL_OES_texture_cube_map
583
bool textureCubeMapOES = false;
584
585
// GL_OES_point_sprite
586
bool pointSpriteOES = false;
587
588
// GL_OES_draw_texture
589
bool drawTextureOES = false;
590
591
// GL_OES_framebuffer_object
592
bool framebufferObjectOES = false;
593
594
// GL_KHR_parallel_shader_compile
595
bool parallelShaderCompile = false;
596
597
// GL_EXT_separate_shader_objects
598
bool separateShaderObjects = false;
599
600
// GL_OES_texture_storage_multisample_2d_array
601
bool textureStorageMultisample2DArrayOES = false;
602
603
// GL_ANGLE_multiview_multisample
604
bool multiviewMultisample = false;
605
606
// GL_KHR_blend_equation_advanced
607
bool blendEquationAdvancedKHR = false;
608
609
// GL_EXT_blend_func_extended
610
bool blendFuncExtended = false;
611
GLuint maxDualSourceDrawBuffers = 0;
612
613
// GL_EXT_float_blend
614
bool floatBlend = false;
615
616
// GL_ANGLE_memory_size
617
bool memorySize = false;
618
619
// GL_ANGLE_texture_multisample
620
bool textureMultisample = false;
621
622
// GL_ANGLE_multi_draw
623
bool multiDraw = false;
624
625
// GL_ANGLE_provoking_vertex
626
bool provokingVertex = false;
627
628
// GL_CHROMIUM_texture_filtering_hint
629
bool textureFilteringCHROMIUM = false;
630
631
// GL_CHROMIUM_lose_context
632
bool loseContextCHROMIUM = false;
633
634
// GL_ANGLE_texture_external_update
635
bool textureExternalUpdateANGLE = false;
636
637
// GL_ANGLE_base_vertex_base_instance
638
bool baseVertexBaseInstance = false;
639
640
// GL_ANGLE_get_image
641
bool getImageANGLE = false;
642
643
// GL_OES_draw_elements_base_vertex
644
bool drawElementsBaseVertexOES = false;
645
// GL_EXT_draw_elements_base_vertex
646
bool drawElementsBaseVertexEXT = false;
647
// Any version of the base vertex extension
648
bool drawElementsBaseVertexAny() const
649
{
650
return (drawElementsBaseVertexOES || drawElementsBaseVertexEXT);
651
}
652
653
// GL_EXT_shader_non_constant_global_initializers
654
bool shaderNonConstGlobalInitializersEXT = false;
655
656
// GL_OES_shader_io_blocks
657
bool shaderIoBlocksOES = false;
658
// GL_EXT_shader_io_blocks
659
bool shaderIoBlocksEXT = false;
660
// Any version of shader io block extension
661
bool shaderIoBlocksAny() const { return (shaderIoBlocksOES || shaderIoBlocksEXT); }
662
663
// GL_EXT_gpu_shader5
664
bool gpuShader5EXT = false;
665
// WEBGL_video_texture
666
bool webglVideoTexture = false;
667
668
// GL_APPLE_clip_distance
669
bool clipDistanceAPPLE = false;
670
671
// GL_EXT_clip_control
672
bool clipControlEXT = false;
673
674
// GL_OES_texture_cube_map_array
675
bool textureCubeMapArrayOES = false;
676
// GL_EXT_texture_cube_map_array
677
bool textureCubeMapArrayEXT = false;
678
// Any version of the texture cube map array extension
679
bool textureCubeMapArrayAny() const
680
{
681
return (textureCubeMapArrayOES || textureCubeMapArrayEXT);
682
}
683
684
// GL_EXT_shadow_samplers
685
bool shadowSamplersEXT = false;
686
687
// GL_EXT_buffer_storage
688
bool bufferStorageEXT = false;
689
690
// GL_EXT_external_buffer
691
bool externalBufferEXT = false;
692
693
// GL_OES_texture_stencil8
694
bool stencilIndex8 = false;
695
696
// GL_OES_sample_shading
697
bool sampleShadingOES = false;
698
699
// OES_shader_multisample_interpolation
700
bool multisampleInterpolationOES = false;
701
702
// GL_OES_shader_image_atomic
703
bool shaderImageAtomicOES = false;
704
705
// GL_OES_sample_variables
706
bool sampleVariablesOES = false;
707
708
// GL_NV_robustness_video_memory_purge
709
bool robustnessVideoMemoryPurgeNV = false;
710
711
// GL_ANGLE_get_tex_level_parameter
712
bool getTexLevelParameterANGLE = false;
713
714
// GL_EXT_tessellation_shader
715
bool tessellationShaderEXT = false;
716
717
// GL_EXT_copy_image
718
bool copyImageEXT = false;
719
720
// GL_OES_texture_buffer
721
bool textureBufferOES = false;
722
// GL_EXT_texture_buffer
723
bool textureBufferEXT = false;
724
// Any version of the texture buffer extension
725
bool textureBufferAny() const { return (textureBufferOES || textureBufferEXT); }
726
727
// GL_EXT_YUV_target
728
bool yuvTargetEXT = false;
729
730
// GL_EXT_clip_cull_distance
731
bool clipCullDistanceEXT = false;
732
733
// GL_ANGLE_get_serialized_context_string
734
bool getSerializedContextStringANGLE = false;
735
736
// GL_EXT_primitive_bounding_box
737
bool primitiveBoundingBoxEXT = false;
738
739
// GL_ANGLE_relaxed_vertex_attribute_type
740
bool relaxedVertexAttributeTypeANGLE = false;
741
742
// GL_ANGLE_yuv_internal_format
743
bool yuvInternalFormatANGLE = false;
744
745
// GL_EXT_protected_textures
746
bool protectedTexturesEXT = false;
747
};
748
749
// Pointer to a boolean memeber of the Extensions struct
750
using ExtensionBool = bool Extensions::*;
751
752
struct ExtensionInfo
753
{
754
// If this extension can be enabled or disabled with glRequestExtension
755
// (GL_ANGLE_request_extension)
756
bool Requestable = false;
757
bool Disablable = false;
758
759
// Pointer to a boolean member of the Extensions struct
760
ExtensionBool ExtensionsMember = nullptr;
761
};
762
763
using ExtensionInfoMap = std::map<std::string, ExtensionInfo>;
764
const ExtensionInfoMap &GetExtensionInfoMap();
765
766
struct Limitations
767
{
768
Limitations();
769
Limitations(const Limitations &other);
770
771
Limitations &operator=(const Limitations &other);
772
773
// Renderer doesn't support gl_FrontFacing in fragment shaders
774
bool noFrontFacingSupport = false;
775
776
// Renderer doesn't support GL_SAMPLE_ALPHA_TO_COVERAGE
777
bool noSampleAlphaToCoverageSupport = false;
778
779
// In glVertexAttribDivisorANGLE, attribute zero must have a zero divisor
780
bool attributeZeroRequiresZeroDivisorInEXT = false;
781
782
// Unable to support different values for front and back faces for stencil refs and masks
783
bool noSeparateStencilRefsAndMasks = false;
784
785
// Renderer doesn't support non-constant indexing loops in fragment shader
786
bool shadersRequireIndexedLoopValidation = false;
787
788
// Renderer doesn't support Simultaneous use of GL_CONSTANT_ALPHA/GL_ONE_MINUS_CONSTANT_ALPHA
789
// and GL_CONSTANT_COLOR/GL_ONE_MINUS_CONSTANT_COLOR blend functions.
790
bool noSimultaneousConstantColorAndAlphaBlendFunc = false;
791
792
// D3D9 does not support flexible varying register packing.
793
bool noFlexibleVaryingPacking = false;
794
795
// D3D does not support having multiple transform feedback outputs go to the same buffer.
796
bool noDoubleBoundTransformFeedbackBuffers = false;
797
798
// D3D does not support vertex attribute aliasing
799
bool noVertexAttributeAliasing = false;
800
801
// Renderer doesn't support GL_TEXTURE_COMPARE_MODE=GL_NONE on a shadow sampler.
802
// TODO(http://anglebug.com/5231): add validation code to front-end.
803
bool noShadowSamplerCompareModeNone = false;
804
805
// PVRTC1 textures must be squares.
806
bool squarePvrtc1 = false;
807
808
// ETC1 texture support is emulated.
809
bool emulatedEtc1 = false;
810
811
// No compressed TEXTURE_3D support.
812
bool noCompressedTexture3D = false;
813
};
814
815
struct TypePrecision
816
{
817
TypePrecision();
818
TypePrecision(const TypePrecision &other);
819
820
TypePrecision &operator=(const TypePrecision &other);
821
822
void setIEEEFloat();
823
void setTwosComplementInt(unsigned int bits);
824
void setSimulatedFloat(unsigned int range, unsigned int precision);
825
void setSimulatedInt(unsigned int range);
826
827
void get(GLint *returnRange, GLint *returnPrecision) const;
828
829
std::array<GLint, 2> range = {0, 0};
830
GLint precision = 0;
831
};
832
833
struct Caps
834
{
835
Caps();
836
Caps(const Caps &other);
837
Caps &operator=(const Caps &other);
838
839
~Caps();
840
841
// If the values could be got by using GetIntegeri_v, they should
842
// be GLint instead of GLuint and call LimitToInt() to ensure
843
// they will not overflow.
844
845
GLfloat minInterpolationOffset = 0;
846
GLfloat maxInterpolationOffset = 0;
847
GLint subPixelInterpolationOffsetBits = 0;
848
849
// ES 3.1 (April 29, 2015) 20.39: implementation dependent values
850
GLint64 maxElementIndex = 0;
851
GLint max3DTextureSize = 0;
852
GLint max2DTextureSize = 0;
853
GLint maxRectangleTextureSize = 0;
854
GLint maxArrayTextureLayers = 0;
855
GLfloat maxLODBias = 0.0f;
856
GLint maxCubeMapTextureSize = 0;
857
GLint maxRenderbufferSize = 0;
858
GLfloat minAliasedPointSize = 1.0f;
859
GLfloat maxAliasedPointSize = 1.0f;
860
GLfloat minAliasedLineWidth = 0.0f;
861
GLfloat maxAliasedLineWidth = 0.0f;
862
863
// ES 3.1 (April 29, 2015) 20.40: implementation dependent values (cont.)
864
GLint maxDrawBuffers = 0;
865
GLint maxFramebufferWidth = 0;
866
GLint maxFramebufferHeight = 0;
867
GLint maxFramebufferSamples = 0;
868
GLint maxColorAttachments = 0;
869
GLint maxViewportWidth = 0;
870
GLint maxViewportHeight = 0;
871
GLint maxSampleMaskWords = 0;
872
GLint maxColorTextureSamples = 0;
873
GLint maxDepthTextureSamples = 0;
874
GLint maxIntegerSamples = 0;
875
GLint64 maxServerWaitTimeout = 0;
876
877
// ES 3.1 (April 29, 2015) Table 20.41: Implementation dependent values (cont.)
878
GLint maxVertexAttribRelativeOffset = 0;
879
GLint maxVertexAttribBindings = 0;
880
GLint maxVertexAttribStride = 0;
881
GLint maxElementsIndices = 0;
882
GLint maxElementsVertices = 0;
883
std::vector<GLenum> compressedTextureFormats;
884
std::vector<GLenum> programBinaryFormats;
885
std::vector<GLenum> shaderBinaryFormats;
886
TypePrecision vertexHighpFloat;
887
TypePrecision vertexMediumpFloat;
888
TypePrecision vertexLowpFloat;
889
TypePrecision vertexHighpInt;
890
TypePrecision vertexMediumpInt;
891
TypePrecision vertexLowpInt;
892
TypePrecision fragmentHighpFloat;
893
TypePrecision fragmentMediumpFloat;
894
TypePrecision fragmentLowpFloat;
895
TypePrecision fragmentHighpInt;
896
TypePrecision fragmentMediumpInt;
897
TypePrecision fragmentLowpInt;
898
899
// Implementation dependent limits required on all shader types.
900
// TODO([email protected]): organize all such limits into ShaderMap.
901
// ES 3.1 (April 29, 2015) Table 20.43: Implementation dependent Vertex shader limits
902
// ES 3.1 (April 29, 2015) Table 20.44: Implementation dependent Fragment shader limits
903
// ES 3.1 (April 29, 2015) Table 20.45: implementation dependent compute shader limits
904
// GL_EXT_geometry_shader (May 31, 2016) Table 20.43gs: Implementation dependent geometry shader
905
// limits
906
// GL_EXT_geometry_shader (May 31, 2016) Table 20.46: Implementation dependent aggregate shader
907
// limits
908
ShaderMap<GLint> maxShaderUniformBlocks = {};
909
ShaderMap<GLint> maxShaderTextureImageUnits = {};
910
ShaderMap<GLint> maxShaderStorageBlocks = {};
911
ShaderMap<GLint> maxShaderUniformComponents = {};
912
ShaderMap<GLint> maxShaderAtomicCounterBuffers = {};
913
ShaderMap<GLint> maxShaderAtomicCounters = {};
914
ShaderMap<GLint> maxShaderImageUniforms = {};
915
// Note that we can query MAX_COMPUTE_UNIFORM_COMPONENTS and MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT
916
// by GetIntegerv, but we can only use GetInteger64v on MAX_VERTEX_UNIFORM_COMPONENTS and
917
// MAX_FRAGMENT_UNIFORM_COMPONENTS. Currently we use GLuint64 to store all these values so that
918
// we can put them together into one ShaderMap.
919
ShaderMap<GLint64> maxCombinedShaderUniformComponents = {};
920
921
// ES 3.1 (April 29, 2015) Table 20.43: Implementation dependent Vertex shader limits
922
GLint maxVertexAttributes = 0;
923
GLint maxVertexUniformVectors = 0;
924
GLint maxVertexOutputComponents = 0;
925
926
// ES 3.1 (April 29, 2015) Table 20.44: Implementation dependent Fragment shader limits
927
GLint maxFragmentUniformVectors = 0;
928
GLint maxFragmentInputComponents = 0;
929
GLint minProgramTextureGatherOffset = 0;
930
GLint maxProgramTextureGatherOffset = 0;
931
GLint minProgramTexelOffset = 0;
932
GLint maxProgramTexelOffset = 0;
933
934
// ES 3.1 (April 29, 2015) Table 20.45: implementation dependent compute shader limits
935
std::array<GLint, 3> maxComputeWorkGroupCount = {0, 0, 0};
936
std::array<GLint, 3> maxComputeWorkGroupSize = {0, 0, 0};
937
GLint maxComputeWorkGroupInvocations = 0;
938
GLint maxComputeSharedMemorySize = 0;
939
940
// ES 3.1 (April 29, 2015) Table 20.46: implementation dependent aggregate shader limits
941
GLint maxUniformBufferBindings = 0;
942
GLint64 maxUniformBlockSize = 0;
943
GLint uniformBufferOffsetAlignment = 0;
944
GLint maxCombinedUniformBlocks = 0;
945
GLint maxVaryingComponents = 0;
946
GLint maxVaryingVectors = 0;
947
GLint maxCombinedTextureImageUnits = 0;
948
GLint maxCombinedShaderOutputResources = 0;
949
950
// ES 3.1 (April 29, 2015) Table 20.47: implementation dependent aggregate shader limits (cont.)
951
GLint maxUniformLocations = 0;
952
GLint maxAtomicCounterBufferBindings = 0;
953
GLint maxAtomicCounterBufferSize = 0;
954
GLint maxCombinedAtomicCounterBuffers = 0;
955
GLint maxCombinedAtomicCounters = 0;
956
GLint maxImageUnits = 0;
957
GLint maxCombinedImageUniforms = 0;
958
GLint maxShaderStorageBufferBindings = 0;
959
GLint64 maxShaderStorageBlockSize = 0;
960
GLint maxCombinedShaderStorageBlocks = 0;
961
GLint shaderStorageBufferOffsetAlignment = 0;
962
963
// ES 3.1 (April 29, 2015) Table 20.48: implementation dependent transform feedback limits
964
GLint maxTransformFeedbackInterleavedComponents = 0;
965
GLint maxTransformFeedbackSeparateAttributes = 0;
966
GLint maxTransformFeedbackSeparateComponents = 0;
967
968
// ES 3.1 (April 29, 2015) Table 20.49: Framebuffer Dependent Values
969
GLint maxSamples = 0;
970
971
// GL_EXT_geometry_shader (May 31, 2016) Table 20.40: Implementation-Dependent Values (cont.)
972
GLint maxFramebufferLayers = 0;
973
GLint layerProvokingVertex = 0;
974
975
// GL_EXT_geometry_shader (May 31, 2016) Table 20.43gs: Implementation dependent geometry shader
976
// limits
977
GLint maxGeometryInputComponents = 0;
978
GLint maxGeometryOutputComponents = 0;
979
GLint maxGeometryOutputVertices = 0;
980
GLint maxGeometryTotalOutputComponents = 0;
981
GLint maxGeometryShaderInvocations = 0;
982
983
// GL_EXT_tessellation_shader
984
GLint maxTessControlInputComponents = 0;
985
GLint maxTessControlOutputComponents = 0;
986
GLint maxTessControlTotalOutputComponents = 0;
987
988
GLint maxTessPatchComponents = 0;
989
GLint maxPatchVertices = 0;
990
GLint maxTessGenLevel = 0;
991
992
GLint maxTessEvaluationInputComponents = 0;
993
GLint maxTessEvaluationOutputComponents = 0;
994
995
GLuint subPixelBits = 4;
996
997
// GL_APPLE_clip_distance/GL_EXT_clip_cull_distance
998
GLuint maxClipDistances = 0;
999
GLuint maxCullDistances = 0;
1000
GLuint maxCombinedClipAndCullDistances = 0;
1001
1002
// GLES1 emulation: Caps for ES 1.1. Taken from Table 6.20 / 6.22 in the OpenGL ES 1.1 spec.
1003
GLuint maxMultitextureUnits = 0;
1004
GLuint maxClipPlanes = 0;
1005
GLuint maxLights = 0;
1006
static constexpr int GlobalMatrixStackDepth = 16;
1007
GLuint maxModelviewMatrixStackDepth = 0;
1008
GLuint maxProjectionMatrixStackDepth = 0;
1009
GLuint maxTextureMatrixStackDepth = 0;
1010
GLfloat minSmoothPointSize = 0.0f;
1011
GLfloat maxSmoothPointSize = 0.0f;
1012
GLfloat minSmoothLineWidth = 0.0f;
1013
GLfloat maxSmoothLineWidth = 0.0f;
1014
1015
// ES 3.2 Table 20.41: Implementation Dependent Values (cont.)
1016
GLint maxTextureBufferSize = 0;
1017
GLint textureBufferOffsetAlignment = 0;
1018
1019
// Direct-to-metal constants:
1020
GLuint driverUniformsBindingIndex = 0;
1021
GLuint defaultUniformsBindingIndex = 0;
1022
GLuint UBOArgumentBufferBindingIndex = 0;
1023
};
1024
1025
Caps GenerateMinimumCaps(const Version &clientVersion, const Extensions &extensions);
1026
} // namespace gl
1027
1028
namespace egl
1029
{
1030
1031
struct Caps
1032
{
1033
Caps();
1034
1035
// Support for NPOT surfaces
1036
bool textureNPOT;
1037
1038
// Support for Stencil8 configs
1039
bool stencil8;
1040
};
1041
1042
struct DisplayExtensions
1043
{
1044
DisplayExtensions();
1045
1046
// Generate a vector of supported extension strings
1047
std::vector<std::string> getStrings() const;
1048
1049
// EGL_EXT_create_context_robustness
1050
bool createContextRobustness = false;
1051
1052
// EGL_ANGLE_d3d_share_handle_client_buffer
1053
bool d3dShareHandleClientBuffer = false;
1054
1055
// EGL_ANGLE_d3d_texture_client_buffer
1056
bool d3dTextureClientBuffer = false;
1057
1058
// EGL_ANGLE_surface_d3d_texture_2d_share_handle
1059
bool surfaceD3DTexture2DShareHandle = false;
1060
1061
// EGL_ANGLE_query_surface_pointer
1062
bool querySurfacePointer = false;
1063
1064
// EGL_ANGLE_window_fixed_size
1065
bool windowFixedSize = false;
1066
1067
// EGL_ANGLE_keyed_mutex
1068
bool keyedMutex = false;
1069
1070
// EGL_ANGLE_surface_orientation
1071
bool surfaceOrientation = false;
1072
1073
// EGL_NV_post_sub_buffer
1074
bool postSubBuffer = false;
1075
1076
// EGL_KHR_create_context
1077
bool createContext = false;
1078
1079
// EGL_KHR_image
1080
bool image = false;
1081
1082
// EGL_KHR_image_base
1083
bool imageBase = false;
1084
1085
// EGL_KHR_image_pixmap
1086
bool imagePixmap = false;
1087
1088
// EGL_KHR_gl_texture_2D_image
1089
bool glTexture2DImage = false;
1090
1091
// EGL_KHR_gl_texture_cubemap_image
1092
bool glTextureCubemapImage = false;
1093
1094
// EGL_KHR_gl_texture_3D_image
1095
bool glTexture3DImage = false;
1096
1097
// EGL_KHR_gl_renderbuffer_image
1098
bool glRenderbufferImage = false;
1099
1100
// EGL_KHR_get_all_proc_addresses
1101
bool getAllProcAddresses = false;
1102
1103
// EGL_ANGLE_flexible_surface_compatibility
1104
bool flexibleSurfaceCompatibility = false;
1105
1106
// EGL_ANGLE_direct_composition
1107
bool directComposition = false;
1108
1109
// EGL_ANGLE_windows_ui_composition
1110
bool windowsUIComposition = false;
1111
1112
// KHR_create_context_no_error
1113
bool createContextNoError = false;
1114
1115
// EGL_KHR_stream
1116
bool stream = false;
1117
1118
// EGL_KHR_stream_consumer_gltexture
1119
bool streamConsumerGLTexture = false;
1120
1121
// EGL_NV_stream_consumer_gltexture_yuv
1122
bool streamConsumerGLTextureYUV = false;
1123
1124
// EGL_ANGLE_stream_producer_d3d_texture
1125
bool streamProducerD3DTexture = false;
1126
1127
// EGL_KHR_fence_sync
1128
bool fenceSync = false;
1129
1130
// EGL_KHR_wait_sync
1131
bool waitSync = false;
1132
1133
// EGL_ANGLE_create_context_webgl_compatibility
1134
bool createContextWebGLCompatibility = false;
1135
1136
// EGL_CHROMIUM_create_context_bind_generates_resource
1137
bool createContextBindGeneratesResource = false;
1138
1139
// EGL_CHROMIUM_sync_control
1140
bool syncControlCHROMIUM = false;
1141
1142
// EGL_ANGLE_sync_control_rate
1143
bool syncControlRateANGLE = false;
1144
1145
// EGL_KHR_swap_buffers_with_damage
1146
bool swapBuffersWithDamage = false;
1147
1148
// EGL_EXT_pixel_format_float
1149
bool pixelFormatFloat = false;
1150
1151
// EGL_KHR_surfaceless_context
1152
bool surfacelessContext = false;
1153
1154
// EGL_ANGLE_display_texture_share_group
1155
bool displayTextureShareGroup = false;
1156
1157
// EGL_ANGLE_display_semaphore_share_group
1158
bool displaySemaphoreShareGroup = false;
1159
1160
// EGL_ANGLE_create_context_client_arrays
1161
bool createContextClientArrays = false;
1162
1163
// EGL_ANGLE_program_cache_control
1164
bool programCacheControl = false;
1165
1166
// EGL_ANGLE_robust_resource_initialization
1167
bool robustResourceInitialization = false;
1168
1169
// EGL_ANGLE_iosurface_client_buffer
1170
bool iosurfaceClientBuffer = false;
1171
1172
// EGL_ANGLE_metal_texture_client_buffer
1173
bool mtlTextureClientBuffer = false;
1174
1175
// EGL_ANGLE_create_context_extensions_enabled
1176
bool createContextExtensionsEnabled = false;
1177
1178
// EGL_ANDROID_presentation_time
1179
bool presentationTime = false;
1180
1181
// EGL_ANDROID_blob_cache
1182
bool blobCache = false;
1183
1184
// EGL_ANDROID_image_native_buffer
1185
bool imageNativeBuffer = false;
1186
1187
// EGL_ANDROID_get_frame_timestamps
1188
bool getFrameTimestamps = false;
1189
1190
// EGL_ANDROID_recordable
1191
bool recordable = false;
1192
1193
// EGL_ANGLE_power_preference
1194
bool powerPreference = false;
1195
1196
// EGL_ANGLE_image_d3d11_texture
1197
bool imageD3D11Texture = false;
1198
1199
// EGL_ANDROID_get_native_client_buffer
1200
bool getNativeClientBufferANDROID = false;
1201
1202
// EGL_ANDROID_create_native_client_buffer
1203
bool createNativeClientBufferANDROID = false;
1204
1205
// EGL_ANDROID_native_fence_sync
1206
bool nativeFenceSyncANDROID = false;
1207
1208
// EGL_ANGLE_create_context_backwards_compatible
1209
bool createContextBackwardsCompatible = false;
1210
1211
// EGL_KHR_no_config_context
1212
bool noConfigContext = false;
1213
1214
// EGL_IMG_context_priority
1215
bool contextPriority = false;
1216
1217
// EGL_ANGLE_ggp_stream_descriptor
1218
bool ggpStreamDescriptor = false;
1219
1220
// EGL_ANGLE_swap_with_frame_token
1221
bool swapWithFrameToken = false;
1222
1223
// EGL_KHR_gl_colorspace
1224
bool glColorspace = false;
1225
1226
// EGL_EXT_gl_colorspace_display_p3_linear
1227
bool glColorspaceDisplayP3Linear = false;
1228
1229
// EGL_EXT_gl_colorspace_display_p3
1230
bool glColorspaceDisplayP3 = false;
1231
1232
// EGL_EXT_gl_colorspace_scrgb
1233
bool glColorspaceScrgb = false;
1234
1235
// EGL_EXT_gl_colorspace_scrgb_linear
1236
bool glColorspaceScrgbLinear = false;
1237
1238
// EGL_EXT_gl_colorspace_display_p3_passthrough
1239
bool glColorspaceDisplayP3Passthrough = false;
1240
1241
// EGL_ANDROID_framebuffer_target
1242
bool framebufferTargetANDROID = false;
1243
1244
// EGL_EXT_image_gl_colorspace
1245
bool imageGlColorspace = false;
1246
1247
// EGL_EXT_image_dma_buf_import
1248
bool imageDmaBufImportEXT = false;
1249
1250
// EGL_EXT_image_dma_buf_import_modifiers
1251
bool imageDmaBufImportModifiersEXT = false;
1252
1253
// EGL_NOK_texture_from_pixmap
1254
bool textureFromPixmapNOK = false;
1255
1256
// EGL_NV_robustness_video_memory_purge
1257
bool robustnessVideoMemoryPurgeNV = false;
1258
1259
// EGL_KHR_reusable_sync
1260
bool reusableSyncKHR = false;
1261
1262
// EGL_ANGLE_external_context_and_surface
1263
bool externalContextAndSurface = false;
1264
1265
// EGL_EXT_buffer_age
1266
bool bufferAgeEXT = false;
1267
1268
// EGL_KHR_mutable_render_buffer
1269
bool mutableRenderBufferKHR = false;
1270
1271
// EGL_EXT_protected_content
1272
bool protectedContentEXT = false;
1273
1274
// EGL_ANGLE_create_surface_swap_interval
1275
bool createSurfaceSwapIntervalANGLE = false;
1276
};
1277
1278
struct DeviceExtensions
1279
{
1280
DeviceExtensions();
1281
1282
// Generate a vector of supported extension strings
1283
std::vector<std::string> getStrings() const;
1284
1285
// EGL_ANGLE_device_d3d
1286
bool deviceD3D = false;
1287
1288
// EGL_ANGLE_device_cgl
1289
bool deviceCGL = false;
1290
1291
// EGL_ANGLE_device_eagl
1292
bool deviceEAGL = false;
1293
1294
// EGL_ANGLE_device_metal
1295
bool deviceMetal = false;
1296
};
1297
1298
struct ClientExtensions
1299
{
1300
ClientExtensions();
1301
ClientExtensions(const ClientExtensions &other);
1302
1303
// Generate a vector of supported extension strings
1304
std::vector<std::string> getStrings() const;
1305
1306
// EGL_EXT_client_extensions
1307
bool clientExtensions = false;
1308
1309
// EGL_EXT_platform_base
1310
bool platformBase = false;
1311
1312
// EGL_EXT_platform_device
1313
bool platformDevice = false;
1314
1315
// EGL_ANGLE_platform_angle
1316
bool platformANGLE = false;
1317
1318
// EGL_ANGLE_platform_angle_d3d
1319
bool platformANGLED3D = false;
1320
1321
// EGL_ANGLE_platform_angle_d3d11on12
1322
bool platformANGLED3D11ON12 = false;
1323
1324
// EGL_ANGLE_platform_angle_opengl
1325
bool platformANGLEOpenGL = false;
1326
1327
// EGL_ANGLE_platform_angle_null
1328
bool platformANGLENULL = false;
1329
1330
// EGL_ANGLE_platform_angle_vulkan
1331
bool platformANGLEVulkan = false;
1332
1333
// EGL_ANGLE_platform_angle_metal
1334
bool platformANGLEMetal = false;
1335
1336
// EGL_ANGLE_platform_angle_context_virtualization
1337
bool platformANGLEContextVirtualization = false;
1338
1339
// EGL_ANGLE_platform_angle_device_context_volatile_eagl
1340
bool platformANGLEDeviceContextVolatileEagl = false;
1341
1342
// EGL_ANGLE_platform_angle_device_context_volatile_cgl
1343
bool platformANGLEDeviceContextVolatileCgl = false;
1344
1345
// EGL_ANGLE_device_creation
1346
bool deviceCreation = false;
1347
1348
// EGL_ANGLE_device_creation_d3d11
1349
bool deviceCreationD3D11 = false;
1350
1351
// EGL_ANGLE_x11_visual
1352
bool x11Visual = false;
1353
1354
// EGL_ANGLE_experimental_present_path
1355
bool experimentalPresentPath = false;
1356
1357
// EGL_KHR_client_get_all_proc_addresses
1358
bool clientGetAllProcAddresses = false;
1359
1360
// EGL_KHR_debug
1361
bool debug = false;
1362
1363
// EGL_ANGLE_feature_control
1364
bool featureControlANGLE = false;
1365
1366
// EGL_ANGLE_platform_angle_device_type_swiftshader
1367
bool platformANGLEDeviceTypeSwiftShader = false;
1368
1369
// EGL_ANGLE_platform_angle_device_type_egl_angle
1370
bool platformANGLEDeviceTypeEGLANGLE = false;
1371
1372
// EGL_EXT_device_query
1373
bool deviceQueryEXT = false;
1374
};
1375
1376
} // namespace egl
1377
1378
#endif // LIBANGLE_CAPS_H_
1379
1380