1//
2// Copyright 2015 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// FeaturesGL.h: Features and workarounds for GL driver bugs and other issues.
8
9#ifndef ANGLE_PLATFORM_FEATURESGL_H_
10#define ANGLE_PLATFORM_FEATURESGL_H_
11
12#include "platform/Feature.h"
13
14namespace angle
15{
16
17struct FeaturesGL : FeatureSetBase
18{
19 FeaturesGL();
20 ~FeaturesGL();
21
22 // When writing a float to a normalized integer framebuffer, desktop OpenGL is allowed to write
23 // one of the two closest normalized integer representations (although round to nearest is
24 // preferred) (see section 2.3.5.2 of the GL 4.5 core specification). OpenGL ES requires that
25 // round-to-nearest is used (see "Conversion from Floating-Point to Framebuffer Fixed-Point" in
26 // section 2.1.2 of the OpenGL ES 2.0.25 spec). This issue only shows up on AMD drivers on
27 // framebuffer formats that have 1-bit alpha, work around this by using higher precision formats
28 // instead.
29 Feature avoid1BitAlphaTextureFormats = {"avoid_1_bit_alpha_texture_formats",
30 FeatureCategory::OpenGLWorkarounds,
31 "Issue with 1-bit alpha framebuffer formats", &members};
32
33 // On some older Intel drivers, GL_RGBA4 is not color renderable, glCheckFramebufferStatus
34 // returns GL_FRAMEBUFFER_UNSUPPORTED. Work around this by using a known color-renderable
35 // format.
36 Feature rgba4IsNotSupportedForColorRendering = {"rgba4_is_not_supported_for_color_rendering",
37 FeatureCategory::OpenGLWorkarounds,
38 "GL_RGBA4 is not color renderable", &members};
39
40 // When clearing a framebuffer on Intel or AMD drivers, when GL_FRAMEBUFFER_SRGB is enabled, the
41 // driver clears to the linearized clear color despite the framebuffer not supporting SRGB
42 // blending. It only seems to do this when the framebuffer has only linear attachments, mixed
43 // attachments appear to get the correct clear color.
44 Feature doesSRGBClearsOnLinearFramebufferAttachments = {
45 "does_srgb_clears_on_linear_framebuffer_attachments", FeatureCategory::OpenGLWorkarounds,
46 "Issue clearing framebuffers with linear attachments when GL_FRAMEBUFFER_SRGB is enabled",
47 &members};
48
49 // On Mac some GLSL constructs involving do-while loops cause GPU hangs, such as the following:
50 // int i = 1;
51 // do {
52 // i --;
53 // continue;
54 // } while (i > 0)
55 // Work around this by rewriting the do-while to use another GLSL construct (block + while)
56 Feature doWhileGLSLCausesGPUHang = {
57 "do_while_glsl_causes_gpu_hang", FeatureCategory::OpenGLWorkarounds,
58 "Some GLSL constructs involving do-while loops cause GPU hangs", &members,
59 "http://crbug.com/644669"};
60
61 // On Mac AMD GPU gl_VertexID in GLSL vertex shader doesn't include base vertex value,
62 // Work aronud this by replace gl_VertexID with (gl_VertexID - angle_BaseVertex) when
63 // angle_BaseVertex is present.
64 Feature addBaseVertexToVertexID = {
65 "vertex_id_does_not_include_base_vertex", FeatureCategory::OpenGLWorkarounds,
66 "gl_VertexID in GLSL vertex shader doesn't include base vertex value", &members};
67
68 // Calling glFinish doesn't cause all queries to report that the result is available on some
69 // (NVIDIA) drivers. It was found that enabling GL_DEBUG_OUTPUT_SYNCHRONOUS before the finish
70 // causes it to fully finish.
71 Feature finishDoesNotCauseQueriesToBeAvailable = {
72 "finish_does_not_cause_queries_to_be_available", FeatureCategory::OpenGLWorkarounds,
73 "glFinish doesn't cause all queries to report available result", &members};
74
75 // Always call useProgram after a successful link to avoid a driver bug.
76 // This workaround is meant to reproduce the use_current_program_after_successful_link
77 // workaround in Chromium (http://crbug.com/110263). It has been shown that this workaround is
78 // not necessary for MacOSX 10.9 and higher (http://crrev.com/39eb535b).
79 Feature alwaysCallUseProgramAfterLink = {
80 "always_call_use_program_after_link", FeatureCategory::OpenGLWorkarounds,
81 "Always call useProgram after a successful link to avoid a driver bug", &members,
82 "http://crbug.com/110263"};
83
84 // On NVIDIA, in the case of unpacking from a pixel unpack buffer, unpack overlapping rows row
85 // by row.
86 Feature unpackOverlappingRowsSeparatelyUnpackBuffer = {
87 "unpack_overlapping_rows_separately_unpack_buffer", FeatureCategory::OpenGLWorkarounds,
88 "In the case of unpacking from a pixel unpack buffer, unpack overlapping rows row by row",
89 &members};
90
91 // On NVIDIA, in the case of packing to a pixel pack buffer, pack overlapping rows row by row.
92 Feature packOverlappingRowsSeparatelyPackBuffer = {
93 "pack_overlapping_rows_separately_pack_buffer", FeatureCategory::OpenGLWorkarounds,
94 "In the case of packing to a pixel pack buffer, pack overlapping rows row by row",
95 &members};
96
97 // On NVIDIA, during initialization, assign the current vertex attributes to the spec-mandated
98 // defaults.
99 Feature initializeCurrentVertexAttributes = {
100 "initialize_current_vertex_attributes", FeatureCategory::OpenGLWorkarounds,
101 "During initialization, assign the current vertex attributes to the spec-mandated defaults",
102 &members};
103
104 // abs(i) where i is an integer returns unexpected result on Intel Mac.
105 // Emulate abs(i) with i * sign(i).
106 Feature emulateAbsIntFunction = {"emulate_abs_int_function", FeatureCategory::OpenGLWorkarounds,
107 "abs(i) where i is an integer returns unexpected result",
108 &members, "http://crbug.com/642227"};
109
110 // On Intel Mac, calculation of loop conditions in for and while loop has bug.
111 // Add "&& true" to the end of the condition expression to work around the bug.
112 Feature addAndTrueToLoopCondition = {
113 "add_and_true_to_loop_condition", FeatureCategory::OpenGLWorkarounds,
114 "Calculation of loop conditions in for and while loop has bug", &members};
115
116 // When uploading textures from an unpack buffer, some drivers count an extra row padding when
117 // checking if the pixel unpack buffer is big enough. Tracking bug: http://anglebug.com/1512
118 // For example considering the pixel buffer below where in memory, each row data (D) of the
119 // texture is followed by some unused data (the dots):
120 // +-------+--+
121 // |DDDDDDD|..|
122 // |DDDDDDD|..|
123 // |DDDDDDD|..|
124 // |DDDDDDD|..|
125 // +-------A--B
126 // The last pixel read will be A, but the driver will think it is B, causing it to generate an
127 // error when the pixel buffer is just big enough.
128 Feature unpackLastRowSeparatelyForPaddingInclusion = {
129 "unpack_last_row_separately_for_padding_inclusion", FeatureCategory::OpenGLWorkarounds,
130 "When uploading textures from an unpack buffer, some drivers count an extra row padding",
131 &members, "http://anglebug.com/1512"};
132
133 // Equivalent workaround when uploading data from a pixel pack buffer.
134 Feature packLastRowSeparatelyForPaddingInclusion = {
135 "pack_last_row_separately_for_padding_inclusion", FeatureCategory::OpenGLWorkarounds,
136 "When uploading textures from an pack buffer, some drivers count an extra row padding",
137 &members, "http://anglebug.com/1512"};
138
139 // On some Intel drivers, using isnan() on highp float will get wrong answer. To work around
140 // this bug, we use an expression to emulate function isnan().
141 // Tracking bug: http://crbug.com/650547
142 Feature emulateIsnanFloat = {"emulate_isnan_float", FeatureCategory::OpenGLWorkarounds,
143 "Using isnan() on highp float will get wrong answer", &members,
144 "http://crbug.com/650547"};
145
146 // On Mac with OpenGL version 4.1, unused std140 or shared uniform blocks will be
147 // treated as inactive which is not consistent with WebGL2.0 spec. Reference all members in a
148 // unused std140 or shared uniform block at the beginning of main to work around it.
149 // Also used on Linux AMD.
150 Feature useUnusedBlocksWithStandardOrSharedLayout = {
151 "use_unused_blocks_with_standard_or_shared_layout", FeatureCategory::OpenGLWorkarounds,
152 "Unused std140 or shared uniform blocks will be treated as inactive", &members};
153
154 // This flag is used to fix spec difference between GLSL 4.1 or lower and ESSL3.
155 Feature removeInvariantAndCentroidForESSL3 = {
156 "remove_invarient_and_centroid_for_essl3", FeatureCategory::OpenGLWorkarounds,
157 "Fix spec difference between GLSL 4.1 or lower and ESSL3", &members};
158
159 // On Intel Mac OSX 10.11 driver, using "-float" will get wrong answer. Use "0.0 - float" to
160 // replace "-float".
161 // Tracking bug: http://crbug.com/308366
162 Feature rewriteFloatUnaryMinusOperator = {
163 "rewrite_float_unary_minus_operator", FeatureCategory::OpenGLWorkarounds,
164 "Using '-<float>' will get wrong answer", &members, "http://crbug.com/308366"};
165
166 // On NVIDIA drivers, atan(y, x) may return a wrong answer.
167 // Tracking bug: http://crbug.com/672380
168 Feature emulateAtan2Float = {"emulate_atan_2_float", FeatureCategory::OpenGLWorkarounds,
169 "atan(y, x) may return a wrong answer", &members,
170 "http://crbug.com/672380"};
171
172 // Some drivers seem to forget about UBO bindings when using program binaries. Work around
173 // this by re-applying the bindings after the program binary is loaded or saved.
174 // This only seems to affect AMD OpenGL drivers, and some Android devices.
175 // http://anglebug.com/1637
176 Feature reapplyUBOBindingsAfterUsingBinaryProgram = {
177 "reapply_ubo_bindings_after_using_binary_program", FeatureCategory::OpenGLWorkarounds,
178 "Some drivers forget about UBO bindings when using program binaries", &members,
179 "http://anglebug.com/1637"};
180
181 // Some Linux OpenGL drivers return 0 when we query MAX_VERTEX_ATTRIB_STRIDE in an OpenGL 4.4 or
182 // higher context.
183 // This only seems to affect AMD OpenGL drivers.
184 // Tracking bug: http://anglebug.com/1936
185 Feature emulateMaxVertexAttribStride = {
186 "emulate_max_vertex_attrib_stride", FeatureCategory::OpenGLWorkarounds,
187 "Some drivers return 0 when MAX_VERTEX_ATTRIB_STRIED queried", &members,
188 "http://anglebug.com/1936"};
189
190 // Initializing uninitialized locals caused odd behavior on Android Qualcomm in a few WebGL 2
191 // tests. Tracking bug: http://anglebug.com/2046
192 Feature dontInitializeUninitializedLocals = {
193 "dont_initialize_uninitialized_locals", FeatureCategory::OpenGLWorkarounds,
194 "Initializing uninitialized locals caused odd behavior in a few WebGL 2 tests", &members,
195 "http://anglebug.com/2046"};
196
197 // On some NVIDIA drivers the point size range reported from the API is inconsistent with the
198 // actual behavior. Clamp the point size to the value from the API to fix this.
199 Feature clampPointSize = {
200 "clamp_point_size", FeatureCategory::OpenGLWorkarounds,
201 "The point size range reported from the API is inconsistent with the actual behavior",
202 &members};
203
204 // On some NVIDIA drivers certain types of GLSL arithmetic ops mixing vectors and scalars may be
205 // executed incorrectly. Change them in the shader translator. Tracking bug:
206 // http://crbug.com/772651
207 Feature rewriteVectorScalarArithmetic = {"rewrite_vector_scalar_arithmetic",
208 FeatureCategory::OpenGLWorkarounds,
209 "Certain types of GLSL arithmetic ops mixing vectors "
210 "and scalars may be executed incorrectly",
211 &members, "http://crbug.com/772651"};
212
213 // On some Android devices for loops used to initialize variables hit native GLSL compiler bugs.
214 Feature dontUseLoopsToInitializeVariables = {
215 "dont_use_loops_to_initialize_variables", FeatureCategory::OpenGLWorkarounds,
216 "For loops used to initialize variables hit native GLSL compiler bugs", &members,
217 "http://crbug.com/809422"};
218
219 // On some NVIDIA drivers gl_FragDepth is not clamped correctly when rendering to a floating
220 // point depth buffer. Clamp it in the translated shader to fix this.
221 Feature clampFragDepth = {
222 "clamp_frag_depth", FeatureCategory::OpenGLWorkarounds,
223 "gl_FragDepth is not clamped correctly when rendering to a floating point depth buffer",
224 &members};
225
226 // On some NVIDIA drivers before version 397.31 repeated assignment to swizzled values inside a
227 // GLSL user-defined function have incorrect results. Rewrite this type of statements to fix
228 // this.
229 Feature rewriteRepeatedAssignToSwizzled = {"rewrite_repeated_assign_to_swizzled",
230 FeatureCategory::OpenGLWorkarounds,
231 "Repeated assignment to swizzled values inside a "
232 "GLSL user-defined function have incorrect results",
233 &members};
234
235 // On some AMD and Intel GL drivers ARB_blend_func_extended does not pass the tests.
236 // It might be possible to work around the Intel bug by rewriting *FragData to *FragColor
237 // instead of disabling the functionality entirely. The AMD bug looked like incorrect blending,
238 // not sure if a workaround is feasible. http://anglebug.com/1085
239 Feature disableBlendFuncExtended = {
240 "disable_blend_func_extended", FeatureCategory::OpenGLWorkarounds,
241 "ARB_blend_func_extended does not pass the tests", &members, "http://anglebug.com/1085"};
242
243 // Qualcomm drivers returns raw sRGB values instead of linearized values when calling
244 // glReadPixels on unsized sRGB texture formats. http://crbug.com/550292 and
245 // http://crbug.com/565179
246 Feature unsizedsRGBReadPixelsDoesntTransform = {
247 "unsized_srgb_read_pixels_doesnt_transform", FeatureCategory::OpenGLWorkarounds,
248 "Drivers returning raw sRGB values instead of linearized values when calling glReadPixels "
249 "on unsized sRGB texture formats",
250 &members, "http://crbug.com/565179"};
251
252 // Older Qualcomm drivers generate errors when querying the number of bits in timer queries, ex:
253 // GetQueryivEXT(GL_TIME_ELAPSED, GL_QUERY_COUNTER_BITS). http://anglebug.com/3027
254 Feature queryCounterBitsGeneratesErrors = {
255 "query_counter_bits_generates_errors", FeatureCategory::OpenGLWorkarounds,
256 "Drivers generate errors when querying the number of bits in timer queries", &members,
257 "http://anglebug.com/3027"};
258
259 // Re-linking a program in parallel is buggy on some Intel Windows OpenGL drivers and Android
260 // platforms.
261 // http://anglebug.com/3045
262 Feature dontRelinkProgramsInParallel = {
263 "dont_relink_programs_in_parallel", FeatureCategory::OpenGLWorkarounds,
264 "Relinking a program in parallel is buggy", &members, "http://anglebug.com/3045"};
265
266 // Some tests have been seen to fail using worker contexts, this switch allows worker contexts
267 // to be disabled for some platforms. http://crbug.com/849576
268 Feature disableWorkerContexts = {"disable_worker_contexts", FeatureCategory::OpenGLWorkarounds,
269 "Some tests have been seen to fail using worker contexts",
270 &members, "http://crbug.com/849576"};
271
272 // Most Android devices fail to allocate a texture that is larger than 4096. Limit the caps
273 // instead of generating GL_OUT_OF_MEMORY errors. Also causes system to hang on some older
274 // intel mesa drivers on Linux.
275 Feature limitMaxTextureSizeTo4096 = {"max_texture_size_limit_4096",
276 FeatureCategory::OpenGLWorkarounds,
277 "Limit max texture size to 4096 to avoid frequent "
278 "out-of-memory errors",
279 &members, "http://crbug.com/927470"};
280
281 // Prevent excessive MSAA allocations on Android devices, various rendering bugs have been
282 // observed and they tend to be high DPI anyways. http://crbug.com/797243
283 Feature limitMaxMSAASamplesTo4 = {
284 "max_msaa_sample_count_4", FeatureCategory::OpenGLWorkarounds,
285 "Various rendering bugs have been observed when using higher MSAA counts", &members,
286 "http://crbug.com/797243"};
287
288 // Prefer to do the robust resource init clear using a glClear. Calls to TexSubImage2D on large
289 // textures can take hundreds of milliseconds because of slow uploads on macOS. Do this only on
290 // macOS because clears are buggy on other drivers.
291 // https://crbug.com/848952 (slow uploads on macOS)
292 // https://crbug.com/883276 (buggy clears on Android)
293 Feature allowClearForRobustResourceInit = {
294 "allow_clear_for_robust_resource_init", FeatureCategory::OpenGLWorkarounds,
295 "Using glClear for robust resource initialization is buggy on some drivers and leads to "
296 "texture corruption. Default to data uploads except on MacOS where it is very slow.",
297 &members, "http://crbug.com/883276"};
298
299 // Some drivers automatically handle out-of-bounds uniform array access but others need manual
300 // clamping to satisfy the WebGL requirements.
301 Feature clampArrayAccess = {"clamp_array_access", FeatureCategory::OpenGLWorkarounds,
302 "Clamp uniform array access to avoid reading invalid memory.",
303 &members, "http://anglebug.com/2978"};
304
305 // Reset glTexImage2D base level to workaround pixel comparison failure above Mac OS 10.12.4 on
306 // Intel Mac.
307 Feature resetTexImage2DBaseLevel = {"reset_teximage2d_base_level",
308 FeatureCategory::OpenGLWorkarounds,
309 "Reset texture base level before calling glTexImage2D to "
310 "work around pixel comparison failure.",
311 &members, "https://crbug.com/705865"};
312
313 // glClearColor does not always work on Intel 6xxx Mac drivers when the clear color made up of
314 // all zeros and ones.
315 Feature clearToZeroOrOneBroken = {
316 "clear_to_zero_or_one_broken", FeatureCategory::OpenGLWorkarounds,
317 "Clears when the clear color is all zeros or ones do not work.", &members,
318 "https://crbug.com/710443"};
319
320 // Some older Linux Intel mesa drivers will hang the system when allocating large textures. Fix
321 // this by capping the max texture size.
322 Feature limitMax3dArrayTextureSizeTo1024 = {
323 "max_3d_array_texture_size_1024", FeatureCategory::OpenGLWorkarounds,
324 "Limit max 3d texture size and max array texture layers to 1024 to avoid system hang",
325 &members, "http://crbug.com/927470"};
326
327 // BlitFramebuffer has issues on some platforms with large source/dest texture sizes. This
328 // workaround adjusts the destination rectangle source and dest rectangle to fit within maximum
329 // twice the size of the framebuffer.
330 Feature adjustSrcDstRegionBlitFramebuffer = {
331 "adjust_src_dst_region_for_blitframebuffer", FeatureCategory::OpenGLWorkarounds,
332 "Many platforms have issues with blitFramebuffer when the parameters are large.", &members,
333 "http://crbug.com/830046"};
334
335 // BlitFramebuffer has issues on Mac when the source bounds aren't enclosed by the framebuffer.
336 // This workaround clips the source region and adjust the dest region proportionally.
337 Feature clipSrcRegionBlitFramebuffer = {
338 "clip_src_region_for_blitframebuffer", FeatureCategory::OpenGLWorkarounds,
339 "Issues with blitFramebuffer when the parameters don't match the framebuffer size.",
340 &members, "http://crbug.com/830046"};
341
342 // Calling glTexImage2D with zero size generates GL errors
343 Feature resettingTexturesGeneratesErrors = {
344 "reset_texture_generates_errors", FeatureCategory::OpenGLWorkarounds,
345 "Calling glTexImage2D with zero size generates errors.", &members,
346 "http://anglebug.com/3859"};
347
348 // Mac Intel samples transparent black from GL_COMPRESSED_RGB_S3TC_DXT1_EXT
349 Feature rgbDXT1TexturesSampleZeroAlpha = {
350 "rgb_dxt1_textures_sample_zero_alpha", FeatureCategory::OpenGLWorkarounds,
351 "Sampling BLACK texels from RGB DXT1 textures returns transparent black on Mac.", &members,
352 "http://anglebug.com/3729"};
353
354 // Mac incorrectly executes both sides of && and || expressions when they should short-circuit.
355 Feature unfoldShortCircuits = {
356 "unfold_short_circuits", FeatureCategory::OpenGLWorkarounds,
357 "Mac incorrectly executes both sides of && and || expressions when they should "
358 "short-circuit.",
359 &members, "http://anglebug.com/482"};
360
361 Feature emulatePrimitiveRestartFixedIndex = {
362 "emulate_primitive_restart_fixed_index", FeatureCategory::OpenGLWorkarounds,
363 "When GL_PRIMITIVE_RESTART_FIXED_INDEX is not available, emulate it with "
364 "GL_PRIMITIVE_RESTART and glPrimitiveRestartIndex.",
365 &members, "http://anglebug.com/3997"};
366
367 Feature setPrimitiveRestartFixedIndexForDrawArrays = {
368 "set_primitive_restart_fixed_index_for_draw_arrays", FeatureCategory::OpenGLWorkarounds,
369 "Some drivers discard vertex data in DrawArrays calls when the fixed primitive restart "
370 "index is within the number of primitives being drawn.",
371 &members, "http://anglebug.com/3997"};
372
373 // Dynamic indexing of swizzled l-values doesn't work correctly on various platforms.
374 Feature removeDynamicIndexingOfSwizzledVector = {
375 "remove_dynamic_indexing_of_swizzled_vector", FeatureCategory::OpenGLWorkarounds,
376 "Dynamic indexing of swizzled l-values doesn't work correctly on various platforms.",
377 &members, "http://crbug.com/709351"};
378
379 // Intel Mac drivers does not treat texelFetchOffset() correctly.
380 Feature preAddTexelFetchOffsets = {
381 "pre_add_texel_fetch_offsets", FeatureCategory::OpenGLWorkarounds,
382 "Intel Mac drivers mistakenly consider the parameter position of nagative vaule as invalid "
383 "even if the sum of position and offset is in range, so we need to add workarounds by "
384 "rewriting texelFetchOffset(sampler, position, lod, offset) into texelFetch(sampler, "
385 "position + offset, lod).",
386 &members, "http://crbug.com/642605"};
387
388 // All Mac drivers do not handle struct scopes correctly. This workaround overwrites a struct
389 // name with a unique prefix
390 Feature regenerateStructNames = {
391 "regenerate_struct_names", FeatureCategory::OpenGLWorkarounds,
392 "All Mac drivers do not handle struct scopes correctly. This workaround overwrites a struct"
393 "name with a unique prefix.",
394 &members, "http://crbug.com/403957"};
395
396 // Quite some OpenGL ES drivers don't implement readPixels for RGBA/UNSIGNED_SHORT from
397 // EXT_texture_norm16 correctly
398 Feature readPixelsUsingImplementationColorReadFormatForNorm16 = {
399 "read_pixels_using_implementation_color_read_format", FeatureCategory::OpenGLWorkarounds,
400 "Quite some OpenGL ES drivers don't implement readPixels for RGBA/UNSIGNED_SHORT from "
401 "EXT_texture_norm16 correctly",
402 &members, "http://anglebug.com/4214"};
403
404 // Bugs exist in some Intel drivers where dependencies are incorrectly
405 // tracked for textures which are copy destinations (via CopyTexImage2D, for
406 // example). Flush before DeleteTexture if these entry points have been
407 // called recently.
408 Feature flushBeforeDeleteTextureIfCopiedTo = {
409 "flush_before_delete_texture_if_copied_to", FeatureCategory::OpenGLWorkarounds,
410 "Some drivers track CopyTex{Sub}Image texture dependencies incorrectly. Flush"
411 " before glDeleteTextures in this case",
412 &members, "http://anglebug.com/4267"};
413
414 // Rewrite row-major matrices as column-major as a driver bug workaround if
415 // necessary.
416 Feature rewriteRowMajorMatrices = {
417 "rewrite_row_major_matrices", FeatureCategory::OpenGLWorkarounds,
418 "Rewrite row major matrices in shaders as column major as a driver bug workaround",
419 &members, "http://anglebug.com/2273"};
420
421 // Bugs exist in various OpenGL Intel drivers on Windows that produce incorrect
422 // values for GL_COMPRESSED_SRGB_S3TC_DXT1_EXT format. Replace it with
423 // GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT as it's the closest option allowed by
424 // the WebGL extension spec.
425 Feature avoidDXT1sRGBTextureFormat = {
426 "avoid_dxt1_srgb_texture_format", FeatureCategory::OpenGLWorkarounds,
427 "Replaces DXT1 sRGB with DXT1 sRGB Alpha as a driver bug workaround.", &members};
428
429 // GL_EXT_semaphore_fd doesn't work properly with Mesa 19.3.4 and earlier versions.
430 Feature disableSemaphoreFd = {"disable_semaphore_fd", FeatureCategory::OpenGLWorkarounds,
431 "Disable GL_EXT_semaphore_fd extension", &members,
432 "https://crbug.com/1046462"};
433};
434
435inline FeaturesGL::FeaturesGL() = default;
436inline FeaturesGL::~FeaturesGL() = default;
437
438} // namespace angle
439
440#endif // ANGLE_PLATFORM_FEATURESGL_H_
441