Disable clang-format on ANGLE features autogen outputs

Updates the script to produce reasonably formatted code without
clang-format.

Autogen files moved to autogen/ sub-directories because clang-format
does not support per-file settings ;(

This allows to run this codegen very quickly
(~50ms on my machine)

Bug: angleproject:8193
Change-Id: Ie84282090d574ebb4debe3edcfd82f983f27a5ff
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4604578
Commit-Queue: Roman Lavrov <romanl@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
This commit is contained in:
Roman Lavrov
2023-06-09 17:30:38 -04:00
committed by Angle LUCI CQ
parent 43ef50f389
commit 21f16cb163
45 changed files with 1293 additions and 794 deletions

View File

@@ -0,0 +1,4 @@
---
Language: Cpp
DisableFormat: true
---

View File

@@ -7,8 +7,8 @@
//
// FeaturesD3D_autogen.h: Features and workarounds for D3D driver bugs and other issues.
#ifndef ANGLE_PLATFORM_FEATURESD3D_H_
#define ANGLE_PLATFORM_FEATURESD3D_H_
#ifndef ANGLE_PLATFORM_AUTOGEN_FEATURESD3D_H_
#define ANGLE_PLATFORM_AUTOGEN_FEATURESD3D_H_
#include "platform/Feature.h"
@@ -56,10 +56,12 @@ struct FeaturesD3D : FeatureSetBase
};
FeatureInfo depthStencilBlitExtraCopy = {
"depthStencilBlitExtraCopy", FeatureCategory::D3DWorkarounds,
"depthStencilBlitExtraCopy",
FeatureCategory::D3DWorkarounds,
"Bug in some drivers triggers a TDR when using CopySubresourceRegion from a staging "
"texture to a depth/stencil",
&members, "http://anglebug.com/1452"};
&members, "http://anglebug.com/1452"
};
FeatureInfo expandIntegerPowExpressions = {
"expandIntegerPowExpressions",
@@ -114,19 +116,27 @@ struct FeaturesD3D : FeatureSetBase
&members,
};
FeatureInfo emulateIsnanFloat = {"emulateIsnanFloat", FeatureCategory::D3DWorkarounds,
"Using isnan() on highp float will get wrong answer", &members,
"https://crbug.com/650547"};
FeatureInfo emulateIsnanFloat = {
"emulateIsnanFloat",
FeatureCategory::D3DWorkarounds,
"Using isnan() on highp float will get wrong answer",
&members, "https://crbug.com/650547"
};
FeatureInfo callClearTwice = {"callClearTwice", FeatureCategory::D3DWorkarounds,
"Using clear() may not take effect", &members,
"https://crbug.com/655534"};
FeatureInfo callClearTwice = {
"callClearTwice",
FeatureCategory::D3DWorkarounds,
"Using clear() may not take effect",
&members, "https://crbug.com/655534"
};
FeatureInfo useSystemMemoryForConstantBuffers = {
"useSystemMemoryForConstantBuffers", FeatureCategory::D3DWorkarounds,
"useSystemMemoryForConstantBuffers",
FeatureCategory::D3DWorkarounds,
"Copying from staging storage to constant buffer "
"storage does not work",
&members, "https://crbug.com/593024"};
&members, "https://crbug.com/593024"
};
FeatureInfo selectViewInGeometryShader = {
"selectViewInGeometryShader",
@@ -137,9 +147,11 @@ struct FeaturesD3D : FeatureSetBase
};
FeatureInfo addMockTextureNoRenderTarget = {
"addMockTextureNoRenderTarget", FeatureCategory::D3DWorkarounds,
"addMockTextureNoRenderTarget",
FeatureCategory::D3DWorkarounds,
"On some drivers when rendering with no render target, two bugs lead to incorrect behavior",
&members, "http://anglebug.com/2152"};
&members, "http://anglebug.com/2152"
};
FeatureInfo skipVSConstantRegisterZero = {
"skipVSConstantRegisterZero",
@@ -149,21 +161,27 @@ struct FeaturesD3D : FeatureSetBase
};
FeatureInfo forceAtomicValueResolution = {
"forceAtomicValueResolution", FeatureCategory::D3DWorkarounds,
"forceAtomicValueResolution",
FeatureCategory::D3DWorkarounds,
"On some drivers the return value from RWByteAddressBuffer.InterlockedAdd does not resolve "
"when used in the .yzw components of a RWByteAddressBuffer.Store operation",
&members, "http://anglebug.com/3246"};
&members, "http://anglebug.com/3246"
};
FeatureInfo allowClearForRobustResourceInit = {
"allowClearForRobustResourceInit", FeatureCategory::D3DWorkarounds,
"allowClearForRobustResourceInit",
FeatureCategory::D3DWorkarounds,
"Some drivers corrupt texture data when clearing for robust resource initialization.",
&members, "http://crbug.com/941620"};
&members, "http://crbug.com/941620"
};
FeatureInfo allowTranslateUniformBlockToStructuredBuffer = {
"allowTranslateUniformBlockToStructuredBuffer", FeatureCategory::D3DWorkarounds,
"allowTranslateUniformBlockToStructuredBuffer",
FeatureCategory::D3DWorkarounds,
"There is a slow fxc compile performance issue with dynamic uniform indexing if "
"translating a uniform block with a large array member to cbuffer.",
&members, "http://anglebug.com/3682"};
&members, "http://anglebug.com/3682"
};
FeatureInfo allowES3OnFL100 = {
"allowES3OnFL100",
@@ -173,8 +191,11 @@ struct FeaturesD3D : FeatureSetBase
};
FeatureInfo disableRasterizerOrderViews = {
"disableRasterizerOrderViews", FeatureCategory::D3DWorkarounds, "Disable ROVs for testing",
&members, "http://anglebug.com/7279"};
"disableRasterizerOrderViews",
FeatureCategory::D3DWorkarounds,
"Disable ROVs for testing",
&members, "http://anglebug.com/7279"
};
FeatureInfo enableTimestampQueries = {
"enableTimestampQueries",
@@ -182,6 +203,7 @@ struct FeaturesD3D : FeatureSetBase
"Enable timestamp on GL_EXT_disjoint_timer_query extension",
&members,
};
};
inline FeaturesD3D::FeaturesD3D() = default;
@@ -189,4 +211,4 @@ inline FeaturesD3D::~FeaturesD3D() = default;
} // namespace angle
#endif // ANGLE_PLATFORM_FEATURESD3D_H_
#endif // ANGLE_PLATFORM_AUTOGEN_FEATURESD3D_H_

View File

@@ -7,8 +7,8 @@
//
// FeaturesGL_autogen.h: angle::Features and workarounds for GL driver bugs and other issues.
#ifndef ANGLE_PLATFORM_FEATURESGL_H_
#define ANGLE_PLATFORM_FEATURESGL_H_
#ifndef ANGLE_PLATFORM_AUTOGEN_FEATURESGL_H_
#define ANGLE_PLATFORM_AUTOGEN_FEATURESGL_H_
#include "platform/Feature.h"
@@ -56,9 +56,11 @@ struct FeaturesGL : FeatureSetBase
};
FeatureInfo doWhileGLSLCausesGPUHang = {
"doWhileGLSLCausesGPUHang", FeatureCategory::OpenGLWorkarounds,
"Some GLSL constructs involving do-while loops cause GPU hangs", &members,
"http://crbug.com/644669"};
"doWhileGLSLCausesGPUHang",
FeatureCategory::OpenGLWorkarounds,
"Some GLSL constructs involving do-while loops cause GPU hangs",
&members, "http://crbug.com/644669"
};
FeatureInfo vertexIDDoesNotIncludeBaseVertex = {
"vertexIDDoesNotIncludeBaseVertex",
@@ -75,9 +77,11 @@ struct FeaturesGL : FeatureSetBase
};
FeatureInfo alwaysCallUseProgramAfterLink = {
"alwaysCallUseProgramAfterLink", FeatureCategory::OpenGLWorkarounds,
"Always call useProgram after a successful link to avoid a driver bug", &members,
"http://crbug.com/110263"};
"alwaysCallUseProgramAfterLink",
FeatureCategory::OpenGLWorkarounds,
"Always call useProgram after a successful link to avoid a driver bug",
&members, "http://crbug.com/110263"
};
FeatureInfo unpackOverlappingRowsSeparatelyUnpackBuffer = {
"unpackOverlappingRowsSeparatelyUnpackBuffer",
@@ -100,10 +104,12 @@ struct FeaturesGL : FeatureSetBase
&members,
};
FeatureInfo emulateAbsIntFunction = {"emulateAbsIntFunction",
FeatureCategory::OpenGLWorkarounds,
"abs(i) where i is an integer returns unexpected result",
&members, "http://crbug.com/642227"};
FeatureInfo emulateAbsIntFunction = {
"emulateAbsIntFunction",
FeatureCategory::OpenGLWorkarounds,
"abs(i) where i is an integer returns unexpected result",
&members, "http://crbug.com/642227"
};
FeatureInfo addAndTrueToLoopCondition = {
"addAndTrueToLoopCondition",
@@ -113,18 +119,25 @@ struct FeaturesGL : FeatureSetBase
};
FeatureInfo unpackLastRowSeparatelyForPaddingInclusion = {
"unpackLastRowSeparatelyForPaddingInclusion", FeatureCategory::OpenGLWorkarounds,
"unpackLastRowSeparatelyForPaddingInclusion",
FeatureCategory::OpenGLWorkarounds,
"When uploading textures from an unpack buffer, some drivers count an extra row padding",
&members, "http://anglebug.com/1512"};
&members, "http://anglebug.com/1512"
};
FeatureInfo packLastRowSeparatelyForPaddingInclusion = {
"packLastRowSeparatelyForPaddingInclusion", FeatureCategory::OpenGLWorkarounds,
"packLastRowSeparatelyForPaddingInclusion",
FeatureCategory::OpenGLWorkarounds,
"When uploading textures from an pack buffer, some drivers count an extra row padding",
&members, "http://anglebug.com/1512"};
&members, "http://anglebug.com/1512"
};
FeatureInfo emulateIsnanFloat = {"emulateIsnanFloat", FeatureCategory::OpenGLWorkarounds,
"Using isnan() on highp float will get wrong answer", &members,
"http://crbug.com/650547"};
FeatureInfo emulateIsnanFloat = {
"emulateIsnanFloat",
FeatureCategory::OpenGLWorkarounds,
"Using isnan() on highp float will get wrong answer",
&members, "http://crbug.com/650547"
};
FeatureInfo useUnusedBlocksWithStandardOrSharedLayout = {
"useUnusedBlocksWithStandardOrSharedLayout",
@@ -141,27 +154,39 @@ struct FeaturesGL : FeatureSetBase
};
FeatureInfo rewriteFloatUnaryMinusOperator = {
"rewriteFloatUnaryMinusOperator", FeatureCategory::OpenGLWorkarounds,
"Using '-<float>' will get wrong answer", &members, "http://crbug.com/308366"};
"rewriteFloatUnaryMinusOperator",
FeatureCategory::OpenGLWorkarounds,
"Using '-<float>' will get wrong answer",
&members, "http://crbug.com/308366"
};
FeatureInfo emulateAtan2Float = {"emulateAtan2Float", FeatureCategory::OpenGLWorkarounds,
"atan(y, x) may return a wrong answer", &members,
"http://crbug.com/672380"};
FeatureInfo emulateAtan2Float = {
"emulateAtan2Float",
FeatureCategory::OpenGLWorkarounds,
"atan(y, x) may return a wrong answer",
&members, "http://crbug.com/672380"
};
FeatureInfo reapplyUBOBindingsAfterUsingBinaryProgram = {
"reapplyUBOBindingsAfterUsingBinaryProgram", FeatureCategory::OpenGLWorkarounds,
"Some drivers forget about UBO bindings when using program binaries", &members,
"http://anglebug.com/1637"};
"reapplyUBOBindingsAfterUsingBinaryProgram",
FeatureCategory::OpenGLWorkarounds,
"Some drivers forget about UBO bindings when using program binaries",
&members, "http://anglebug.com/1637"
};
FeatureInfo emulateMaxVertexAttribStride = {
"emulateMaxVertexAttribStride", FeatureCategory::OpenGLWorkarounds,
"Some drivers return 0 when MAX_VERTEX_ATTRIB_STRIED queried", &members,
"http://anglebug.com/1936"};
"emulateMaxVertexAttribStride",
FeatureCategory::OpenGLWorkarounds,
"Some drivers return 0 when MAX_VERTEX_ATTRIB_STRIED queried",
&members, "http://anglebug.com/1936"
};
FeatureInfo dontInitializeUninitializedLocals = {
"dontInitializeUninitializedLocals", FeatureCategory::OpenGLWorkarounds,
"Initializing uninitialized locals caused odd behavior in a few WebGL 2 tests", &members,
"http://anglebug.com/2046"};
"dontInitializeUninitializedLocals",
FeatureCategory::OpenGLWorkarounds,
"Initializing uninitialized locals caused odd behavior in a few WebGL 2 tests",
&members, "http://anglebug.com/2046"
};
FeatureInfo clampPointSize = {
"clampPointSize",
@@ -171,9 +196,11 @@ struct FeaturesGL : FeatureSetBase
};
FeatureInfo dontUseLoopsToInitializeVariables = {
"dontUseLoopsToInitializeVariables", FeatureCategory::OpenGLWorkarounds,
"For loops used to initialize variables hit native GLSL compiler bugs", &members,
"http://crbug.com/809422"};
"dontUseLoopsToInitializeVariables",
FeatureCategory::OpenGLWorkarounds,
"For loops used to initialize variables hit native GLSL compiler bugs",
&members, "http://crbug.com/809422"
};
FeatureInfo clampFragDepth = {
"clampFragDepth",
@@ -191,134 +218,185 @@ struct FeaturesGL : FeatureSetBase
};
FeatureInfo disableBlendFuncExtended = {
"disableBlendFuncExtended", FeatureCategory::OpenGLWorkarounds,
"ARB_blend_func_extended does not pass the tests", &members, "http://anglebug.com/1085"};
"disableBlendFuncExtended",
FeatureCategory::OpenGLWorkarounds,
"ARB_blend_func_extended does not pass the tests",
&members, "http://anglebug.com/1085"
};
FeatureInfo unsizedSRGBReadPixelsDoesntTransform = {
"unsizedSRGBReadPixelsDoesntTransform", FeatureCategory::OpenGLWorkarounds,
"unsizedSRGBReadPixelsDoesntTransform",
FeatureCategory::OpenGLWorkarounds,
"Drivers returning raw sRGB values instead of linearized values when calling glReadPixels "
"on unsized sRGB texture formats",
&members, "http://crbug.com/550292 http://crbug.com/565179"};
&members, "http://crbug.com/550292 http://crbug.com/565179"
};
FeatureInfo queryCounterBitsGeneratesErrors = {
"queryCounterBitsGeneratesErrors", FeatureCategory::OpenGLWorkarounds,
"Drivers generate errors when querying the number of bits in timer queries", &members,
"http://anglebug.com/3027"};
"queryCounterBitsGeneratesErrors",
FeatureCategory::OpenGLWorkarounds,
"Drivers generate errors when querying the number of bits in timer queries",
&members, "http://anglebug.com/3027"
};
FeatureInfo dontRelinkProgramsInParallel = {
"dontRelinkProgramsInParallel", FeatureCategory::OpenGLWorkarounds,
"Relinking a program in parallel is buggy", &members, "http://anglebug.com/3045"};
"dontRelinkProgramsInParallel",
FeatureCategory::OpenGLWorkarounds,
"Relinking a program in parallel is buggy",
&members, "http://anglebug.com/3045"
};
FeatureInfo disableWorkerContexts = {"disableWorkerContexts",
FeatureCategory::OpenGLWorkarounds,
"Some tests have been seen to fail using worker contexts",
&members, "http://crbug.com/849576"};
FeatureInfo disableWorkerContexts = {
"disableWorkerContexts",
FeatureCategory::OpenGLWorkarounds,
"Some tests have been seen to fail using worker contexts",
&members, "http://crbug.com/849576"
};
FeatureInfo limitWebglMaxTextureSizeTo4096 = {
"limitWebglMaxTextureSizeTo4096", FeatureCategory::OpenGLWorkarounds,
"limitWebglMaxTextureSizeTo4096",
FeatureCategory::OpenGLWorkarounds,
"Limit webgl max texture size to 4096 to avoid frequent "
"out-of-memory errors",
&members, "http://crbug.com/927470"};
&members, "http://crbug.com/927470"
};
FeatureInfo limitMaxMSAASamplesTo4 = {
"limitMaxMSAASamplesTo4", FeatureCategory::OpenGLWorkarounds,
"Various rendering bugs have been observed when using higher MSAA counts", &members,
"http://crbug.com/797243"};
"limitMaxMSAASamplesTo4",
FeatureCategory::OpenGLWorkarounds,
"Various rendering bugs have been observed when using higher MSAA counts",
&members, "http://crbug.com/797243"
};
FeatureInfo allowClearForRobustResourceInit = {
"allowClearForRobustResourceInit", FeatureCategory::OpenGLWorkarounds,
"allowClearForRobustResourceInit",
FeatureCategory::OpenGLWorkarounds,
"Using glClear for robust resource initialization is buggy on some drivers and leads to "
"texture corruption. Default to data uploads except on MacOS where it is very slow.",
&members, "https://crbug.com/848952 http://crbug.com/883276"};
&members, "https://crbug.com/848952 http://crbug.com/883276"
};
FeatureInfo clampArrayAccess = {"clampArrayAccess", FeatureCategory::OpenGLWorkarounds,
"Clamp uniform array access to avoid reading invalid memory.",
&members, "http://anglebug.com/2978"};
FeatureInfo clampArrayAccess = {
"clampArrayAccess",
FeatureCategory::OpenGLWorkarounds,
"Clamp uniform array access to avoid reading invalid memory.",
&members, "http://anglebug.com/2978"
};
FeatureInfo resetTexImage2DBaseLevel = {
"resetTexImage2DBaseLevel", FeatureCategory::OpenGLWorkarounds,
"resetTexImage2DBaseLevel",
FeatureCategory::OpenGLWorkarounds,
"Reset texture base level before calling glTexImage2D to "
"work around pixel comparison failure.",
&members, "https://crbug.com/705865"};
&members, "https://crbug.com/705865"
};
FeatureInfo clearToZeroOrOneBroken = {
"clearToZeroOrOneBroken", FeatureCategory::OpenGLWorkarounds,
"Clears when the clear color is all zeros or ones do not work.", &members,
"https://crbug.com/710443"};
"clearToZeroOrOneBroken",
FeatureCategory::OpenGLWorkarounds,
"Clears when the clear color is all zeros or ones do not work.",
&members, "https://crbug.com/710443"
};
FeatureInfo limitMax3dArrayTextureSizeTo1024 = {
"limitMax3dArrayTextureSizeTo1024", FeatureCategory::OpenGLWorkarounds,
"limitMax3dArrayTextureSizeTo1024",
FeatureCategory::OpenGLWorkarounds,
"Limit max 3d texture size and max array texture layers to 1024 to avoid system hang",
&members, "http://crbug.com/927470"};
&members, "http://crbug.com/927470"
};
FeatureInfo adjustSrcDstRegionForBlitFramebuffer = {
"adjustSrcDstRegionForBlitFramebuffer", FeatureCategory::OpenGLWorkarounds,
"Many platforms have issues with blitFramebuffer when the parameters are large.", &members,
"http://crbug.com/830046"};
"adjustSrcDstRegionForBlitFramebuffer",
FeatureCategory::OpenGLWorkarounds,
"Many platforms have issues with blitFramebuffer when the parameters are large.",
&members, "http://crbug.com/830046"
};
FeatureInfo clipSrcRegionForBlitFramebuffer = {
"clipSrcRegionForBlitFramebuffer", FeatureCategory::OpenGLWorkarounds,
"clipSrcRegionForBlitFramebuffer",
FeatureCategory::OpenGLWorkarounds,
"Issues with blitFramebuffer when the parameters don't match the framebuffer size.",
&members, "http://crbug.com/830046"};
&members, "http://crbug.com/830046"
};
FeatureInfo RGBDXT1TexturesSampleZeroAlpha = {
"RGBDXT1TexturesSampleZeroAlpha", FeatureCategory::OpenGLWorkarounds,
"Sampling BLACK texels from RGB DXT1 textures returns transparent black on Mac.", &members,
"http://anglebug.com/3729"};
"RGBDXT1TexturesSampleZeroAlpha",
FeatureCategory::OpenGLWorkarounds,
"Sampling BLACK texels from RGB DXT1 textures returns transparent black on Mac.",
&members, "http://anglebug.com/3729"
};
FeatureInfo unfoldShortCircuits = {
"unfoldShortCircuits", FeatureCategory::OpenGLWorkarounds,
"unfoldShortCircuits",
FeatureCategory::OpenGLWorkarounds,
"Mac incorrectly executes both sides of && and || expressions when they should "
"short-circuit.",
&members, "http://anglebug.com/482"};
&members, "http://anglebug.com/482"
};
FeatureInfo emulatePrimitiveRestartFixedIndex = {
"emulatePrimitiveRestartFixedIndex", FeatureCategory::OpenGLWorkarounds,
"emulatePrimitiveRestartFixedIndex",
FeatureCategory::OpenGLWorkarounds,
"When GL_PRIMITIVE_RESTART_FIXED_INDEX is not available, emulate it with "
"GL_PRIMITIVE_RESTART and glPrimitiveRestartIndex.",
&members, "http://anglebug.com/3997"};
&members, "http://anglebug.com/3997"
};
FeatureInfo setPrimitiveRestartFixedIndexForDrawArrays = {
"setPrimitiveRestartFixedIndexForDrawArrays", FeatureCategory::OpenGLWorkarounds,
"setPrimitiveRestartFixedIndexForDrawArrays",
FeatureCategory::OpenGLWorkarounds,
"Some drivers discard vertex data in DrawArrays calls when the fixed primitive restart "
"index is within the number of primitives being drawn.",
&members, "http://anglebug.com/3997"};
&members, "http://anglebug.com/3997"
};
FeatureInfo removeDynamicIndexingOfSwizzledVector = {
"removeDynamicIndexingOfSwizzledVector", FeatureCategory::OpenGLWorkarounds,
"removeDynamicIndexingOfSwizzledVector",
FeatureCategory::OpenGLWorkarounds,
"Dynamic indexing of swizzled l-values doesn't work correctly on various platforms.",
&members, "http://crbug.com/709351"};
&members, "http://crbug.com/709351"
};
FeatureInfo preAddTexelFetchOffsets = {
"preAddTexelFetchOffsets", FeatureCategory::OpenGLWorkarounds,
"preAddTexelFetchOffsets",
FeatureCategory::OpenGLWorkarounds,
"Intel Mac drivers mistakenly consider the parameter position of nagative vaule as invalid "
"even if the sum of position and offset is in range, so we need to add workarounds by "
"rewriting texelFetchOffset(sampler, position, lod, offset) into texelFetch(sampler, "
"position + offset, lod).",
&members, "http://crbug.com/642605"};
&members, "http://crbug.com/642605"
};
FeatureInfo regenerateStructNames = {
"regenerateStructNames", FeatureCategory::OpenGLWorkarounds,
"regenerateStructNames",
FeatureCategory::OpenGLWorkarounds,
"All Mac drivers do not handle struct scopes correctly. This workaround overwrites a struct"
"name with a unique prefix.",
&members, "http://crbug.com/403957"};
&members, "http://crbug.com/403957"
};
FeatureInfo readPixelsUsingImplementationColorReadFormatForNorm16 = {
"readPixelsUsingImplementationColorReadFormatForNorm16", FeatureCategory::OpenGLWorkarounds,
"readPixelsUsingImplementationColorReadFormatForNorm16",
FeatureCategory::OpenGLWorkarounds,
"Quite some OpenGL ES drivers don't implement readPixels for RGBA/UNSIGNED_SHORT from "
"EXT_texture_norm16 correctly",
&members, "http://anglebug.com/4214"};
&members, "http://anglebug.com/4214"
};
FeatureInfo flushBeforeDeleteTextureIfCopiedTo = {
"flushBeforeDeleteTextureIfCopiedTo", FeatureCategory::OpenGLWorkarounds,
"flushBeforeDeleteTextureIfCopiedTo",
FeatureCategory::OpenGLWorkarounds,
"Some drivers track CopyTex{Sub}Image texture dependencies incorrectly. Flush"
" before glDeleteTextures in this case",
&members, "http://anglebug.com/4267"};
&members, "http://anglebug.com/4267"
};
FeatureInfo rewriteRowMajorMatrices = {
"rewriteRowMajorMatrices", FeatureCategory::OpenGLWorkarounds,
"rewriteRowMajorMatrices",
FeatureCategory::OpenGLWorkarounds,
"Rewrite row major matrices in shaders as column major as a driver bug workaround",
&members, "http://anglebug.com/2273"};
&members, "http://anglebug.com/2273"
};
FeatureInfo disableDrawBuffersIndexed = {
"disableDrawBuffersIndexed",
@@ -327,18 +405,26 @@ struct FeaturesGL : FeatureSetBase
&members,
};
FeatureInfo disableSemaphoreFd = {"disableSemaphoreFd", FeatureCategory::OpenGLWorkarounds,
"Disable GL_EXT_semaphore_fd extension", &members,
"https://crbug.com/1046462"};
FeatureInfo disableSemaphoreFd = {
"disableSemaphoreFd",
FeatureCategory::OpenGLWorkarounds,
"Disable GL_EXT_semaphore_fd extension",
&members, "https://crbug.com/1046462"
};
FeatureInfo disableTimestampQueries = {
"disableTimestampQueries", FeatureCategory::OpenGLWorkarounds,
"Disable GL_EXT_disjoint_timer_query extension", &members, "https://crbug.com/811661"};
"disableTimestampQueries",
FeatureCategory::OpenGLWorkarounds,
"Disable GL_EXT_disjoint_timer_query extension",
&members, "https://crbug.com/811661"
};
FeatureInfo decodeEncodeSRGBForGenerateMipmap = {
"decodeEncodeSRGBForGenerateMipmap", FeatureCategory::OpenGLWorkarounds,
"Decode and encode before generateMipmap for srgb format textures.", &members,
"http://anglebug.com/4646"};
"decodeEncodeSRGBForGenerateMipmap",
FeatureCategory::OpenGLWorkarounds,
"Decode and encode before generateMipmap for srgb format textures.",
&members, "http://anglebug.com/4646"
};
FeatureInfo emulateCopyTexImage2D = {
"emulateCopyTexImage2D",
@@ -348,41 +434,55 @@ struct FeaturesGL : FeatureSetBase
};
FeatureInfo emulateCopyTexImage2DFromRenderbuffers = {
"emulateCopyTexImage2DFromRenderbuffers", FeatureCategory::OpenGLWorkarounds,
"emulateCopyTexImage2DFromRenderbuffers",
FeatureCategory::OpenGLWorkarounds,
"CopyTexImage2D spuriously returns errors on iOS when copying from renderbuffers.",
&members, "https://anglebug.com/4674"};
&members, "https://anglebug.com/4674"
};
FeatureInfo disableGPUSwitchingSupport = {
"disableGPUSwitchingSupport", FeatureCategory::OpenGLWorkarounds,
"disableGPUSwitchingSupport",
FeatureCategory::OpenGLWorkarounds,
"Disable GPU switching support (use only the low-power GPU) on older MacBook Pros.",
&members, "https://crbug.com/1091824"};
&members, "https://crbug.com/1091824"
};
FeatureInfo disableNativeParallelCompile = {
"disableNativeParallelCompile", FeatureCategory::OpenGLWorkarounds,
"Do not use native KHR_parallel_shader_compile even when available.", &members,
"http://crbug.com/1094869"};
"disableNativeParallelCompile",
FeatureCategory::OpenGLWorkarounds,
"Do not use native KHR_parallel_shader_compile even when available.",
&members, "http://crbug.com/1094869"
};
FeatureInfo emulatePackSkipRowsAndPackSkipPixels = {
"emulatePackSkipRowsAndPackSkipPixels", FeatureCategory::OpenGLWorkarounds,
"GL_PACK_SKIP_ROWS and GL_PACK_SKIP_PIXELS are ignored in Apple's OpenGL driver.", &members,
"https://anglebug.com/4849"};
"emulatePackSkipRowsAndPackSkipPixels",
FeatureCategory::OpenGLWorkarounds,
"GL_PACK_SKIP_ROWS and GL_PACK_SKIP_PIXELS are ignored in Apple's OpenGL driver.",
&members, "https://anglebug.com/4849"
};
FeatureInfo clampMscRate = {
"clampMscRate", FeatureCategory::OpenGLWorkarounds,
"Some drivers return bogus values for GetMscRate, so we clamp it to 30Hz", &members,
"https://crbug.com/1042393"};
"clampMscRate",
FeatureCategory::OpenGLWorkarounds,
"Some drivers return bogus values for GetMscRate, so we clamp it to 30Hz",
&members, "https://crbug.com/1042393"
};
FeatureInfo bindTransformFeedbackBufferBeforeBindBufferRange = {
"bindTransformFeedbackBufferBeforeBindBufferRange", FeatureCategory::OpenGLWorkarounds,
"bindTransformFeedbackBufferBeforeBindBufferRange",
FeatureCategory::OpenGLWorkarounds,
"Bind transform feedback buffers to the generic binding point before calling "
"glBindBufferBase or glBindBufferRange.",
&members, "https://anglebug.com/5140"};
&members, "https://anglebug.com/5140"
};
FeatureInfo disableSyncControlSupport = {
"disableSyncControlSupport", FeatureCategory::OpenGLWorkarounds,
"disableSyncControlSupport",
FeatureCategory::OpenGLWorkarounds,
"Speculative fix for issues on Linux/Wayland where exposing GLX_OML_sync_control renders "
"Chrome unusable",
&members, "https://crbug.com/1137851"};
&members, "https://crbug.com/1137851"
};
FeatureInfo keepBufferShadowCopy = {
"keepBufferShadowCopy",
@@ -399,73 +499,103 @@ struct FeaturesGL : FeatureSetBase
};
FeatureInfo promotePackedFormatsTo8BitPerChannel = {
"promotePackedFormatsTo8BitPerChannel", FeatureCategory::OpenGLWorkarounds,
"Packed color formats are buggy on Macs with AMD GPUs", &members,
"http://anglebug.com/5469"};
"promotePackedFormatsTo8BitPerChannel",
FeatureCategory::OpenGLWorkarounds,
"Packed color formats are buggy on Macs with AMD GPUs",
&members, "http://anglebug.com/5469"
};
FeatureInfo initFragmentOutputVariables = {
"initFragmentOutputVariables", FeatureCategory::OpenGLWorkarounds,
"No init gl_FragColor causes context lost", &members, "http://crbug.com/1171371"};
"initFragmentOutputVariables",
FeatureCategory::OpenGLWorkarounds,
"No init gl_FragColor causes context lost",
&members, "http://crbug.com/1171371"
};
FeatureInfo shiftInstancedArrayDataWithOffset = {
"shiftInstancedArrayDataWithOffset", FeatureCategory::OpenGLWorkarounds,
"glDrawArraysInstanced is buggy on certain new Mac Intel GPUs", &members,
"http://crbug.com/1144207"};
"shiftInstancedArrayDataWithOffset",
FeatureCategory::OpenGLWorkarounds,
"glDrawArraysInstanced is buggy on certain new Mac Intel GPUs",
&members, "http://crbug.com/1144207"
};
FeatureInfo syncVertexArraysToDefault = {
"syncVertexArraysToDefault", FeatureCategory::OpenGLWorkarounds,
"Only use the default VAO because of missing support or driver bugs", &members,
"http://anglebug.com/5577"};
"syncVertexArraysToDefault",
FeatureCategory::OpenGLWorkarounds,
"Only use the default VAO because of missing support or driver bugs",
&members, "http://anglebug.com/5577"
};
FeatureInfo sanitizeAMDGPURendererString = {
"sanitizeAMDGPURendererString", FeatureCategory::OpenGLWorkarounds,
"Strip precise kernel and DRM version information from amdgpu renderer strings.", &members,
"http://crbug.com/1181193"};
"sanitizeAMDGPURendererString",
FeatureCategory::OpenGLWorkarounds,
"Strip precise kernel and DRM version information from amdgpu renderer strings.",
&members, "http://crbug.com/1181193"
};
FeatureInfo unbindFBOBeforeSwitchingContext = {
"unbindFBOBeforeSwitchingContext", FeatureCategory::OpenGLWorkarounds,
"Imagination GL drivers are buggy with context switching.", &members,
"http://crbug.com/1181193"};
"unbindFBOBeforeSwitchingContext",
FeatureCategory::OpenGLWorkarounds,
"Imagination GL drivers are buggy with context switching.",
&members, "http://crbug.com/1181193"
};
FeatureInfo flushOnFramebufferChange = {"flushOnFramebufferChange",
FeatureCategory::OpenGLWorkarounds,
"Switching framebuffers without a flush can lead to "
"crashes on Intel 9th Generation GPU Macs.",
&members, "http://crbug.com/1181068"};
FeatureInfo flushOnFramebufferChange = {
"flushOnFramebufferChange",
FeatureCategory::OpenGLWorkarounds,
"Switching framebuffers without a flush can lead to "
"crashes on Intel 9th Generation GPU Macs.",
&members, "http://crbug.com/1181068"
};
FeatureInfo disableMultisampledRenderToTexture = {
"disableMultisampledRenderToTexture", FeatureCategory::OpenGLWorkarounds,
"Many drivers have bugs when using GL_EXT_multisampled_render_to_texture", &members,
"http://anglebug.com/2894"};
"disableMultisampledRenderToTexture",
FeatureCategory::OpenGLWorkarounds,
"Many drivers have bugs when using GL_EXT_multisampled_render_to_texture",
&members, "http://anglebug.com/2894"
};
FeatureInfo uploadTextureDataInChunks = {
"uploadTextureDataInChunks", FeatureCategory::OpenGLWorkarounds,
"uploadTextureDataInChunks",
FeatureCategory::OpenGLWorkarounds,
"Upload texture data in <120kb chunks to work around Mac driver hangs and crashes.",
&members, "http://crbug.com/1181068"};
&members, "http://crbug.com/1181068"
};
FeatureInfo emulateImmutableCompressedTexture3D = {
"emulateImmutableCompressedTexture3D", FeatureCategory::OpenGLWorkarounds,
"Use non-immutable texture allocation to work around a driver bug.", &members,
"https://crbug.com/1060012"};
"emulateImmutableCompressedTexture3D",
FeatureCategory::OpenGLWorkarounds,
"Use non-immutable texture allocation to work around a driver bug.",
&members, "https://crbug.com/1060012"
};
FeatureInfo emulateRGB10 = {"emulateRGB10", FeatureCategory::OpenGLWorkarounds,
"Emulate RGB10 support using RGB10_A2.", &members,
"https://crbug.com/1300575"};
FeatureInfo emulateRGB10 = {
"emulateRGB10",
FeatureCategory::OpenGLWorkarounds,
"Emulate RGB10 support using RGB10_A2.",
&members, "https://crbug.com/1300575"
};
FeatureInfo alwaysUnbindFramebufferTexture2D = {
"alwaysUnbindFramebufferTexture2D", FeatureCategory::OpenGLWorkarounds,
"alwaysUnbindFramebufferTexture2D",
FeatureCategory::OpenGLWorkarounds,
"Force unbind framebufferTexture2D before binding renderbuffer to work around driver bug.",
&members, "https://anglebug.com/5536"};
&members, "https://anglebug.com/5536"
};
FeatureInfo disableTextureClampToBorder = {
"disableTextureClampToBorder", FeatureCategory::OpenGLWorkarounds,
"disableTextureClampToBorder",
FeatureCategory::OpenGLWorkarounds,
"Imagination devices generate INVALID_ENUM when setting the texture border color.",
&members, "https://anglebug.com/7405"};
&members, "https://anglebug.com/7405"
};
FeatureInfo passHighpToPackUnormSnormBuiltins = {
"passHighpToPackUnormSnormBuiltins", FeatureCategory::OpenGLWorkarounds,
"packUnorm4x8 fails on Pixel 4 if it is not passed a highp vec4.", &members,
"http://anglebug.com/7527"};
"passHighpToPackUnormSnormBuiltins",
FeatureCategory::OpenGLWorkarounds,
"packUnorm4x8 fails on Pixel 4 if it is not passed a highp vec4.",
&members, "http://anglebug.com/7527"
};
FeatureInfo emulateClipDistanceState = {
"emulateClipDistanceState",
@@ -475,50 +605,69 @@ struct FeaturesGL : FeatureSetBase
};
FeatureInfo bindFramebufferForTimerQueries = {
"bindFramebufferForTimerQueries", FeatureCategory::OpenGLWorkarounds,
"bindFramebufferForTimerQueries",
FeatureCategory::OpenGLWorkarounds,
"Some drivers require a non-zero framebuffer when beginQuery for TimeElapsed or"
"Timestampis called.",
&members, "https://crbug.com/1356053"};
&members, "https://crbug.com/1356053"
};
FeatureInfo disableBaseInstanceVertex = {
"disableBaseInstanceVertex", FeatureCategory::OpenGLWorkarounds,
"Some Mali drivers have buggy implementations of glDraw*BaseVertex*.", &members,
"http://anglebug.com/8172"};
"disableBaseInstanceVertex",
FeatureCategory::OpenGLWorkarounds,
"Some Mali drivers have buggy implementations of glDraw*BaseVertex*.",
&members, "http://anglebug.com/8172"
};
FeatureInfo supportsFragmentShaderInterlockNV = {
"supportsFragmentShaderInterlockNV", FeatureCategory::OpenGLFeatures,
"Backend GL context supports NV_fragment_shader_interlock extension", &members,
"http://anglebug.com/7279"};
"supportsFragmentShaderInterlockNV",
FeatureCategory::OpenGLFeatures,
"Backend GL context supports NV_fragment_shader_interlock extension",
&members, "http://anglebug.com/7279"
};
FeatureInfo supportsFragmentShaderOrderingINTEL = {
"supportsFragmentShaderOrderingINTEL", FeatureCategory::OpenGLFeatures,
"Backend GL context supports GL_INTEL_fragment_shader_ordering extension", &members,
"http://anglebug.com/7279"};
"supportsFragmentShaderOrderingINTEL",
FeatureCategory::OpenGLFeatures,
"Backend GL context supports GL_INTEL_fragment_shader_ordering extension",
&members, "http://anglebug.com/7279"
};
FeatureInfo supportsFragmentShaderInterlockARB = {
"supportsFragmentShaderInterlockARB", FeatureCategory::OpenGLFeatures,
"Backend GL context supports ARB_fragment_shader_interlock extension", &members,
"http://anglebug.com/7279"};
"supportsFragmentShaderInterlockARB",
FeatureCategory::OpenGLFeatures,
"Backend GL context supports ARB_fragment_shader_interlock extension",
&members, "http://anglebug.com/7279"
};
FeatureInfo supportsShaderFramebufferFetchEXT = {
"supportsShaderFramebufferFetchEXT", FeatureCategory::OpenGLFeatures,
"Backend GL context supports EXT_shader_framebuffer_fetch extension", &members,
"http://anglebug.com/7279"};
"supportsShaderFramebufferFetchEXT",
FeatureCategory::OpenGLFeatures,
"Backend GL context supports EXT_shader_framebuffer_fetch extension",
&members, "http://anglebug.com/7279"
};
FeatureInfo supportsShaderFramebufferFetchNonCoherentEXT = {
"supportsShaderFramebufferFetchNonCoherentEXT", FeatureCategory::OpenGLFeatures,
"Backend GL context supports EXT_shader_framebuffer_fetch_non_coherent extension", &members,
"http://anglebug.com/7279"};
"supportsShaderFramebufferFetchNonCoherentEXT",
FeatureCategory::OpenGLFeatures,
"Backend GL context supports EXT_shader_framebuffer_fetch_non_coherent extension",
&members, "http://anglebug.com/7279"
};
FeatureInfo supportsShaderPixelLocalStorageEXT = {
"supportsShaderPixelLocalStorageEXT", FeatureCategory::OpenGLFeatures,
"Backend GL context supports EXT_shader_pixel_local_storage extension", &members,
"http://anglebug.com/7279"};
"supportsShaderPixelLocalStorageEXT",
FeatureCategory::OpenGLFeatures,
"Backend GL context supports EXT_shader_pixel_local_storage extension",
&members, "http://anglebug.com/7279"
};
FeatureInfo disableClipControl = {
"disableClipControl", FeatureCategory::OpenGLFeatures,
"Some ARM Mali devices genenerate errors when querying the clip control state.", &members,
"http://crbug.com/1434317"};
"disableClipControl",
FeatureCategory::OpenGLFeatures,
"Some ARM Mali devices genenerate errors when querying the clip control state.",
&members, "http://crbug.com/1434317"
};
};
inline FeaturesGL::FeaturesGL() = default;
@@ -526,4 +675,4 @@ inline FeaturesGL::~FeaturesGL() = default;
} // namespace angle
#endif // ANGLE_PLATFORM_FEATURESGL_H_
#endif // ANGLE_PLATFORM_AUTOGEN_FEATURESGL_H_

View File

@@ -7,8 +7,8 @@
//
// FeaturesMtl_autogen.h: Optional features for the Metal renderer.
#ifndef ANGLE_PLATFORM_FEATURESMTL_H_
#define ANGLE_PLATFORM_FEATURESMTL_H_
#ifndef ANGLE_PLATFORM_AUTOGEN_FEATURESMTL_H_
#define ANGLE_PLATFORM_AUTOGEN_FEATURESMTL_H_
#include "platform/Feature.h"
@@ -207,133 +207,184 @@ struct FeaturesMtl : FeatureSetBase
};
FeatureInfo multisampleColorFormatShaderReadWorkaround = {
"multisampleColorFormatShaderReadWorkaround", FeatureCategory::MetalWorkarounds,
"Add shaderRead usage to some multisampled texture formats", &members,
"http://anglebug.com/7049"};
"multisampleColorFormatShaderReadWorkaround",
FeatureCategory::MetalWorkarounds,
"Add shaderRead usage to some multisampled texture formats",
&members, "http://anglebug.com/7049"
};
FeatureInfo copyIOSurfaceToNonIOSurfaceForReadOptimization = {
"copyIOSurfaceToNonIOSurfaceForReadOptimization", FeatureCategory::MetalWorkarounds,
"copyIOSurfaceToNonIOSurfaceForReadOptimization",
FeatureCategory::MetalWorkarounds,
"some GPUs are faster to read an IOSurface texture by first copying the texture to a "
"non-IOSurface texture",
&members, "http://anglebug.com/7117 http://anglebug.com/7573"};
&members, "http://anglebug.com/7117 http://anglebug.com/7573"
};
FeatureInfo copyTextureToBufferForReadOptimization = {
"copyTextureToBufferForReadOptimization", FeatureCategory::MetalWorkarounds,
"some GPUs are faster to read a texture by first copying the texture to a buffer", &members,
"http://anglebug.com/7117"};
"copyTextureToBufferForReadOptimization",
FeatureCategory::MetalWorkarounds,
"some GPUs are faster to read a texture by first copying the texture to a buffer",
&members, "http://anglebug.com/7117"
};
FeatureInfo limitMaxDrawBuffersForTesting = {
"limitMaxDrawBuffersForTesting", FeatureCategory::MetalFeatures,
"Used to check the backend works when the device's advertized limit is less than the "
"code's limit",
&members, "http://anglebug.com/7280"};
"limitMaxDrawBuffersForTesting",
FeatureCategory::MetalFeatures,
"Used to check the backend works when the device's advertized limit is less than the code's limit",
&members, "http://anglebug.com/7280"
};
FeatureInfo limitMaxColorTargetBitsForTesting = {
"limitMaxColorTargetBitsForTesting", FeatureCategory::MetalFeatures,
"Metal iOS has a limit on the number of color target bits per pixel.", &members,
"http://anglebug.com/7280"};
"limitMaxColorTargetBitsForTesting",
FeatureCategory::MetalFeatures,
"Metal iOS has a limit on the number of color target bits per pixel.",
&members, "http://anglebug.com/7280"
};
FeatureInfo preemptivelyStartProvokingVertexCommandBuffer = {
"preemptivelyStartProvokingVertexCommandBuffer", FeatureCategory::MetalFeatures,
"AMD Metal Drivers appear to have a bug this works around", &members,
"http://anglebug.com/7635"};
"preemptivelyStartProvokingVertexCommandBuffer",
FeatureCategory::MetalFeatures,
"AMD Metal Drivers appear to have a bug this works around",
&members, "http://anglebug.com/7635"
};
FeatureInfo uploadDataToIosurfacesWithStagingBuffers = {
"uploadDataToIosurfacesWithStagingBuffers", FeatureCategory::MetalWorkarounds,
"When uploading data to IOSurface-backed textures, use a staging buffer.", &members,
"http://anglebug.com/7573"};
"uploadDataToIosurfacesWithStagingBuffers",
FeatureCategory::MetalWorkarounds,
"When uploading data to IOSurface-backed textures, use a staging buffer.",
&members, "http://anglebug.com/7573"
};
FeatureInfo alwaysUseStagedBufferUpdates = {
"alwaysUseStagedBufferUpdates", FeatureCategory::MetalFeatures,
"Always update buffers by copying the data to a staging buffer and then blitting it to the "
"actual buffer",
&members, "http://anglebug.com/7544"};
"alwaysUseStagedBufferUpdates",
FeatureCategory::MetalFeatures,
"Always update buffers by copying the data to a staging buffer and then blitting it to the actual buffer",
&members, "http://anglebug.com/7544"
};
FeatureInfo useShadowBuffersWhenAppropriate = {
"useShadowBuffersWhenAppropriate", FeatureCategory::MetalFeatures,
"useShadowBuffersWhenAppropriate",
FeatureCategory::MetalFeatures,
"On some architectures using a shadow buffer can be faster for certain size buffers",
&members, "http://anglebug.com/7544"};
&members, "http://anglebug.com/7544"
};
FeatureInfo alwaysUseManagedStorageModeForBuffers = {
"alwaysUseManagedStorageModeForBuffers", FeatureCategory::MetalFeatures,
"Metal buffers can be managed, shared, or private. Sometimes managed is fastest", &members,
"http://anglebug.com/7544"};
"alwaysUseManagedStorageModeForBuffers",
FeatureCategory::MetalFeatures,
"Metal buffers can be managed, shared, or private. Sometimes managed is fastest",
&members, "http://anglebug.com/7544"
};
FeatureInfo alwaysUseSharedStorageModeForBuffers = {
"alwaysUseSharedStorageModeForBuffers", FeatureCategory::MetalFeatures,
"Metal buffers can be managed, shared, or private. Sometimes shared is fastest", &members,
"http://anglebug.com/7544"};
"alwaysUseSharedStorageModeForBuffers",
FeatureCategory::MetalFeatures,
"Metal buffers can be managed, shared, or private. Sometimes shared is fastest",
&members, "http://anglebug.com/7544"
};
FeatureInfo preferCpuForBuffersubdata = {
"preferCpuForBuffersubdata", FeatureCategory::MetalFeatures,
"Makes bufferSubData always update via CPU", &members, "http://anglebug.com/7544"};
"preferCpuForBuffersubdata",
FeatureCategory::MetalFeatures,
"Makes bufferSubData always update via CPU",
&members, "http://anglebug.com/7544"
};
FeatureInfo disableProgrammableBlending = {
"disableProgrammableBlending", FeatureCategory::MetalFeatures,
"disableProgrammableBlending",
FeatureCategory::MetalFeatures,
"Disable programmable blending in order to test read_write pixel local storage textures",
&members, "http://anglebug.com/7279"};
&members, "http://anglebug.com/7279"
};
FeatureInfo disableRWTextureTier2Support = {
"disableRWTextureTier2Support", FeatureCategory::MetalFeatures,
"Disable tier2 read_write textures in order to test tier1 support", &members,
"http://anglebug.com/7279"};
"disableRWTextureTier2Support",
FeatureCategory::MetalFeatures,
"Disable tier2 read_write textures in order to test tier1 support",
&members, "http://anglebug.com/7279"
};
FeatureInfo disableRasterOrderGroups = {
"disableRasterOrderGroups", FeatureCategory::MetalFeatures,
"disableRasterOrderGroups",
FeatureCategory::MetalFeatures,
"Disable raster order groups in order to test pixel local storage memory barriers",
&members, "http://anglebug.com/7279"};
&members, "http://anglebug.com/7279"
};
FeatureInfo enableInMemoryMtlLibraryCache = {
"enableInMemoryMtlLibraryCache", FeatureCategory::MetalFeatures,
"Cache MTLLibrary objects in memory.", &members, "http://crbug.com/1385510"};
"enableInMemoryMtlLibraryCache",
FeatureCategory::MetalFeatures,
"Cache MTLLibrary objects in memory.",
&members, "http://crbug.com/1385510"
};
FeatureInfo enableParallelMtlLibraryCompilation = {
"enableParallelMtlLibraryCompilation", FeatureCategory::MetalFeatures,
"Compile MTLLibrary in multiple threads.", &members, "http://crbug.com/1385510"};
"enableParallelMtlLibraryCompilation",
FeatureCategory::MetalFeatures,
"Compile MTLLibrary in multiple threads.",
&members, "http://crbug.com/1385510"
};
FeatureInfo alwaysPreferStagedTextureUploads = {
"alwaysPreferStagedTextureUploads", FeatureCategory::MetalFeatures,
"Always prefer to upload texture data via a staging buffer and avoid "
"MTLTexture::replaceRegion.",
&members, "http://crbug.com/1380790"};
"alwaysPreferStagedTextureUploads",
FeatureCategory::MetalFeatures,
"Always prefer to upload texture data via a staging buffer and avoid MTLTexture::replaceRegion.",
&members, "http://crbug.com/1380790"
};
FeatureInfo disableStagedInitializationOfPackedTextureFormats = {
"disableStagedInitializationOfPackedTextureFormats", FeatureCategory::MetalFeatures,
"disableStagedInitializationOfPackedTextureFormats",
FeatureCategory::MetalFeatures,
"Staged GPU upload of some packed texture formats such as RGB9_E5 fail on Intel GPUs.",
&members, "http://anglebug.com/8092"};
&members, "http://anglebug.com/8092"
};
FeatureInfo compileMetalShaders = {
"compileMetalShaders", FeatureCategory::MetalFeatures,
"compileMetalShaders",
FeatureCategory::MetalFeatures,
"Compiles metal shaders using command line tools and saves to BlobCache. "
"Requires using --no-sandbox and disabling enableParallelMtlLibraryCompilation.",
&members, "http://crbug.com/1423136"};
&members, "http://crbug.com/1423136"
};
FeatureInfo loadMetalShadersFromBlobCache = {
"loadMetalShadersFromBlobCache", FeatureCategory::MetalFeatures,
"loadMetalShadersFromBlobCache",
FeatureCategory::MetalFeatures,
"Loads metal shaders from blob cache. Useful if compile_metal_shaders was used to "
"generate shaders.",
&members, "http://crbug.com/1423136"};
&members, "http://crbug.com/1423136"
};
FeatureInfo printMetalShaders = {"printMetalShaders", FeatureCategory::MetalFeatures,
"Prints the source to a shader before it's compiled.",
&members, "http://crbug.com/1423136"};
FeatureInfo printMetalShaders = {
"printMetalShaders",
FeatureCategory::MetalFeatures,
"Prints the source to a shader before it's compiled.",
&members, "http://crbug.com/1423136"
};
FeatureInfo generateShareableShaders = {
"generateShareableShaders", FeatureCategory::MetalFeatures,
"generateShareableShaders",
FeatureCategory::MetalFeatures,
"Attempts to generate shaders that are shareable. More specifically, shaders"
" end up with conditionals that are decided at run time via input parameters vs"
" compile time. This results in bigger shaders.",
&members, "http://crbug.com/1423136"};
&members, "http://crbug.com/1423136"
};
FeatureInfo disableMetalOnGpuFamily1 = {
"disableMetalOnGpuFamily1", FeatureCategory::MetalFeatures,
"disableMetalOnGpuFamily1",
FeatureCategory::MetalFeatures,
"GPUs that don't support Mac GPU family 2 or greater are unsupported by the Metal backend.",
&members, "http://anglebug.com/7952"};
&members, "http://anglebug.com/7952"
};
FeatureInfo disableMetalOnNvidia = {
"disableMetalOnNvidia", FeatureCategory::MetalFeatures,
"NVIDIA GPUs are unsupported due to scarcity of the hardware.", &members,
"http://anglebug.com/8170"};
"disableMetalOnNvidia",
FeatureCategory::MetalFeatures,
"NVIDIA GPUs are unsupported due to scarcity of the hardware.",
&members, "http://anglebug.com/8170"
};
FeatureInfo flushAfterStreamVertexData = {
"flushAfterStreamVertexData",
@@ -341,6 +392,7 @@ struct FeaturesMtl : FeatureSetBase
"Flush after calls to StreamVertexData to work around driver bugs.",
&members,
};
};
inline FeaturesMtl::FeaturesMtl() = default;
@@ -348,4 +400,4 @@ inline FeaturesMtl::~FeaturesMtl() = default;
} // namespace angle
#endif // ANGLE_PLATFORM_FEATURESMTL_H_
#endif // ANGLE_PLATFORM_AUTOGEN_FEATURESMTL_H_

View File

@@ -8,8 +8,8 @@
// FrontendFeatures_autogen.h: Features/workarounds for driver bugs and other behaviors seen
// on all platforms.
#ifndef ANGLE_PLATFORM_FRONTENDFEATURES_H_
#define ANGLE_PLATFORM_FRONTENDFEATURES_H_
#ifndef ANGLE_PLATFORM_AUTOGEN_FRONTENDFEATURES_H_
#define ANGLE_PLATFORM_AUTOGEN_FRONTENDFEATURES_H_
#include "platform/Feature.h"
@@ -36,18 +36,25 @@ struct FrontendFeatures : FeatureSetBase
};
FeatureInfo scalarizeVecAndMatConstructorArgs = {
"scalarizeVecAndMatConstructorArgs", FeatureCategory::FrontendWorkarounds,
"Always rewrite vec/mat constructors to be consistent", &members,
"http://crbug.com/1165751"};
"scalarizeVecAndMatConstructorArgs",
FeatureCategory::FrontendWorkarounds,
"Always rewrite vec/mat constructors to be consistent",
&members, "http://crbug.com/1165751"
};
FeatureInfo disableProgramBinary = {"disableProgramBinary", FeatureCategory::FrontendFeatures,
"Disable support for GL_OES_get_program_binary", &members,
"http://anglebug.com/5007"};
FeatureInfo disableProgramBinary = {
"disableProgramBinary",
FeatureCategory::FrontendFeatures,
"Disable support for GL_OES_get_program_binary",
&members, "http://anglebug.com/5007"
};
FeatureInfo disableDrawBuffersIndexed = {
"disableDrawBuffersIndexed", FeatureCategory::FrontendFeatures,
"Disable support for OES_draw_buffers_indexed and EXT_draw_buffers_indexed", &members,
"http://anglebug.com/7724"};
"disableDrawBuffersIndexed",
FeatureCategory::FrontendFeatures,
"Disable support for OES_draw_buffers_indexed and EXT_draw_buffers_indexed",
&members, "http://anglebug.com/7724"
};
FeatureInfo disableAnisotropicFiltering = {
"disableAnisotropicFiltering",
@@ -71,17 +78,25 @@ struct FrontendFeatures : FeatureSetBase
};
FeatureInfo forceDepthAttachmentInitOnClear = {
"forceDepthAttachmentInitOnClear", FeatureCategory::FrontendWorkarounds,
"Force depth attachment initialization on clear ops", &members,
"https://anglebug.com/7246"};
"forceDepthAttachmentInitOnClear",
FeatureCategory::FrontendWorkarounds,
"Force depth attachment initialization on clear ops",
&members, "https://anglebug.com/7246"
};
FeatureInfo enableCaptureLimits = {"enableCaptureLimits", FeatureCategory::FrontendFeatures,
"Set the context limits like frame capturing was enabled",
&members, "http://anglebug.com/5750"};
FeatureInfo enableCaptureLimits = {
"enableCaptureLimits",
FeatureCategory::FrontendFeatures,
"Set the context limits like frame capturing was enabled",
&members, "http://anglebug.com/5750"
};
FeatureInfo forceRobustResourceInit = {
"forceRobustResourceInit", FeatureCategory::FrontendFeatures,
"Force-enable robust resource init", &members, "http://anglebug.com/6041"};
"forceRobustResourceInit",
FeatureCategory::FrontendFeatures,
"Force-enable robust resource init",
&members, "http://anglebug.com/6041"
};
FeatureInfo forceInitShaderVariables = {
"forceInitShaderVariables",
@@ -91,36 +106,54 @@ struct FrontendFeatures : FeatureSetBase
};
FeatureInfo enableProgramBinaryForCapture = {
"enableProgramBinaryForCapture", FeatureCategory::FrontendFeatures,
"Even if FrameCapture is enabled, enable GL_OES_get_program_binary", &members,
"http://anglebug.com/5658"};
"enableProgramBinaryForCapture",
FeatureCategory::FrontendFeatures,
"Even if FrameCapture is enabled, enable GL_OES_get_program_binary",
&members, "http://anglebug.com/5658"
};
FeatureInfo forceGlErrorChecking = {
"forceGlErrorChecking", FeatureCategory::FrontendFeatures,
"forceGlErrorChecking",
FeatureCategory::FrontendFeatures,
"Force GL error checking (i.e. prevent applications from disabling error checking",
&members, "https://issuetracker.google.com/220069903"};
&members, "https://issuetracker.google.com/220069903"
};
FeatureInfo emulatePixelLocalStorage = {
"emulatePixelLocalStorage", FeatureCategory::FrontendFeatures,
"Emulate ANGLE_shader_pixel_local_storage using shader images", &members,
"http://anglebug.com/7279"};
"emulatePixelLocalStorage",
FeatureCategory::FrontendFeatures,
"Emulate ANGLE_shader_pixel_local_storage using shader images",
&members, "http://anglebug.com/7279"
};
FeatureInfo cacheCompiledShader = {"cacheCompiledShader", FeatureCategory::FrontendFeatures,
"Enable to cache compiled shaders", &members,
"http://anglebug.com/7036"};
FeatureInfo cacheCompiledShader = {
"cacheCompiledShader",
FeatureCategory::FrontendFeatures,
"Enable to cache compiled shaders",
&members, "http://anglebug.com/7036"
};
FeatureInfo dumpShaderSource = {"dumpShaderSource", FeatureCategory::FrontendFeatures,
"Write shader source to temp directory", &members,
"http://anglebug.com/7760"};
FeatureInfo dumpShaderSource = {
"dumpShaderSource",
FeatureCategory::FrontendFeatures,
"Write shader source to temp directory",
&members, "http://anglebug.com/7760"
};
FeatureInfo enableShaderSubstitution = {
"enableShaderSubstitution", FeatureCategory::FrontendWorkarounds,
"enableShaderSubstitution",
FeatureCategory::FrontendWorkarounds,
"Check the filesystem for shaders to use instead of those provided through glShaderSource",
&members, "http://anglebug.com/7761"};
&members, "http://anglebug.com/7761"
};
FeatureInfo disableProgramCaching = {
"disableProgramCaching",
FeatureCategory::FrontendFeatures,
"Disables saving programs to the cache",
&members, "http://anglebug.com/1423136"
};
FeatureInfo disableProgramCaching = {"disableProgramCaching", FeatureCategory::FrontendFeatures,
"Disables saving programs to the cache", &members,
"http://anglebug.com/1423136"};
};
inline FrontendFeatures::FrontendFeatures() = default;
@@ -128,4 +161,4 @@ inline FrontendFeatures::~FrontendFeatures() = default;
} // namespace angle
#endif // ANGLE_PLATFORM_FRONTENDFEATURES_H_
#endif // ANGLE_PLATFORM_AUTOGEN_FRONTENDFEATURES_H_

View File

@@ -21,16 +21,16 @@ feature_files = {
'mtl_features.json': ('Metal', 'FeaturesMtl'),
'vk_features.json': ('Vulkan', 'FeaturesVk'),
}
feature_list_header_file = '../../util/angle_features_autogen.h'
feature_list_source_file = '../../util/angle_features_autogen.cpp'
feature_list_header_file = '../../util/autogen/angle_features_autogen.h'
feature_list_source_file = '../../util/autogen/angle_features_autogen.cpp'
template_header = u"""// GENERATED FILE - DO NOT EDIT.
// Generated by {script_name} using data from {input_file_name}.
//
{description}
#ifndef ANGLE_PLATFORM_{NAME}_H_
#define ANGLE_PLATFORM_{NAME}_H_
#ifndef ANGLE_PLATFORM_AUTOGEN_{NAME}_H_
#define ANGLE_PLATFORM_AUTOGEN_{NAME}_H_
#include "platform/Feature.h"
@@ -50,14 +50,15 @@ inline {name}::~{name}() = default;
}} // namespace angle
#endif // ANGLE_PLATFORM_{NAME}_H_
#endif // ANGLE_PLATFORM_AUTOGEN_{NAME}_H_
"""
template_feature = u"""FeatureInfo {var_name} = {{
"{display_name}", FeatureCategory::{category},
{description},
&members, {issue}
}};
template_feature = u""" FeatureInfo {var_name} = {{
"{display_name}",
FeatureCategory::{category},
{description},
&members,{issue}
}};
"""
template_feature_list_header = u"""// GENERATED FILE - DO NOT EDIT.
@@ -69,10 +70,10 @@ template_feature_list_header = u"""// GENERATED FILE - DO NOT EDIT.
//
// angle_features_autogen.h: List of ANGLE features to help enable/disable them in tests.
#ifndef ANGLE_SRC_TESTS_TEST_UTILS_ANGLE_FEATURES_AUTOGEN_H_
#define ANGLE_SRC_TESTS_TEST_UTILS_ANGLE_FEATURES_AUTOGEN_H_
#ifndef ANGLE_SRC_TESTS_TEST_UTIL_AUTOGEN_ANGLE_FEATURES_AUTOGEN_H_
#define ANGLE_SRC_TESTS_TEST_UTIL_AUTOGEN_ANGLE_FEATURES_AUTOGEN_H_
#include "util_export.h"
#include "../util_export.h"
namespace angle
{{
@@ -88,7 +89,7 @@ ANGLE_UTIL_EXPORT extern const char *GetFeatureName(Feature feature);
}} // namespace angle
#endif // ANGLE_SRC_TESTS_TEST_UTILS_ANGLE_FEATURES_AUTOGEN_H_
#endif // ANGLE_SRC_TESTS_TEST_UTIL_AUTOGEN_ANGLE_FEATURES_AUTOGEN_H_
"""
template_feature_enum = u"""{VarName},"""
@@ -110,9 +111,9 @@ namespace angle
{{
namespace
{{
constexpr PackedEnumMap<Feature, const char *> kFeatureNames = {{ {{
constexpr PackedEnumMap<Feature, const char *> kFeatureNames = {{{{
{features}
}} }};
}}}};
}} // anonymous namespace
const char *GetFeatureName(Feature feature)
@@ -123,7 +124,7 @@ const char *GetFeatureName(Feature feature)
}} // namespace angle
"""
template_feature_string = u"""{{Feature::{VarName}, "{display_name}"}},"""
template_feature_string = u""" {{Feature::{VarName}, "{display_name}"}},"""
def make_camel_case(json_name):
@@ -135,14 +136,17 @@ def make_header_name(class_name):
return class_name + '_autogen.h'
def header_path(class_name):
return 'autogen/' + make_header_name(class_name)
def main():
if len(sys.argv) == 2 and sys.argv[1] == 'inputs':
print(','.join(list(feature_files.keys())))
return
if len(sys.argv) == 2 and sys.argv[1] == 'outputs':
print(','.join(
[make_header_name(class_name) for (_, class_name) in feature_files.values()]) + ',' +
feature_list_header_file + ',' + feature_list_source_file)
print(','.join([header_path(class_name) for (_, class_name) in feature_files.values()]) +
',' + feature_list_header_file + ',' + feature_list_source_file)
return
name_map = {}
@@ -165,8 +169,9 @@ def main():
var_name=var_name,
display_name=display_name,
category=category_prefix + feature_json['category'],
description='\n'.join('"' + line + '"' for line in feature_json['description']),
issue='' if issue is None else '"' + issue + '"')
description='\n '.join(
'"' + line + '"' for line in feature_json['description']),
issue='' if issue is None else ' "' + issue + '"')
features.append(feature)
@@ -174,7 +179,8 @@ def main():
# multiple backends. That's ok for the purposes of feature overriding.
name_map[var_name] = display_name
description = '\n'.join(['// ' + line for line in src['description']])
description = '\n'.join(
['//' + (' ' + line if line else '') for line in src['description']])
header_file = make_header_name(class_name)
header = template_header.format(
@@ -185,7 +191,7 @@ def main():
NAME=class_name.upper(),
features='\n'.join(features))
with open(header_file, 'w') as fout:
with open(header_path(class_name), 'w') as fout:
fout.write(header)
fout.close()
@@ -205,7 +211,7 @@ def main():
template_feature_list_header.format(
script_name=os.path.basename(__file__),
input_file_name='*_features.json',
features='\n'.join(feature_enums)))
features='\n'.join(' ' + v for v in feature_enums)))
fout.close()
with open(feature_list_source_file, 'w') as fout: